Uses of Interface
org.projog.core.predicate.PredicateFactory
Packages that use PredicateFactory
Package
Description
Provides a programming interface for Java applications to interact with Projog.
Predicates to explicitly specify when a goal succeeds of fails.
Predicates for classifying terms.
Predicates to support constraint logic programming.
Predicates for comparing terms, including specific predicates for comparing numeric values.
Predicates for the construction of compound/complex sentences.
Predicates for inspecting the structure of terms.
Predicates to support working with the recorded database.
Predicates to aid the debugging of Prolog programs.
Predicates for affecting the flow of goal evaluation on backtracking.
Predicates for system input and output with the file system.
Predicates for inspecting, adding and retracting clauses.
Predicates for working with list data structures.
Predicates to support working with dates and times.
Provides functionality to evaluate user defined predicates defined using Prolog syntax.
-
Uses of PredicateFactory in org.projog.api
Fields in org.projog.api declared as PredicateFactoryModifier and TypeFieldDescriptionprivate final PredicateFactoryQueryPlan.predicateFactoryprivate final PredicateFactoryQueryStatement.predicateFactoryMethods in org.projog.api with parameters of type PredicateFactoryModifier and TypeMethodDescriptionvoidProjog.addPredicateFactory(PredicateKey key, PredicateFactory predicateFactory) Constructors in org.projog.api with parameters of type PredicateFactoryModifierConstructorDescription(package private)QueryResult(PredicateFactory predicateFactory, Term query, Map<String, Variable> variables) Evaluates a query.(package private)QueryStatement(PredicateFactory predicateFactory, Term prologQuery) Creates a newQueryStatementrepresenting a query specified byprologQuery. -
Uses of PredicateFactory in org.projog.core.predicate
Subinterfaces of PredicateFactory in org.projog.core.predicateClasses in org.projog.core.predicate that implement PredicateFactoryModifier and TypeClassDescriptionclassclassSuperclass of "plug-in" predicates that are not re-evaluated as part of backtracking.final classRepresents all predicates that aKnowledgeBasehas no definition of.Fields in org.projog.core.predicate declared as PredicateFactoryModifier and TypeFieldDescriptionprivate PredicateFactoryUnknownPredicate.actualPredicateFactoryFields in org.projog.core.predicate with type parameters of type PredicateFactoryModifier and TypeFieldDescriptionprivate final Map<PredicateKey, PredicateFactory> Predicates.javaPredicateInstancesThe instances of "built-in" Java predicates (i.e.Methods in org.projog.core.predicate that return PredicateFactoryModifier and TypeMethodDescriptionprivate PredicateFactoryPredicates.getExistingPredicateFactory(PredicateKey key) Predicates.getPredicateFactory(PredicateKey key) Returns thePredicateFactoryassociated with the specifiedPredicateKey.Predicates.getPredicateFactory(Term term) Returns thePredicateFactoryassociated with the specifiedTerm.Predicates.getPreprocessedPredicateFactory(Term term) private PredicateFactoryPredicates.instantiatePredicateFactory(String className) private PredicateFactoryPredicates.instantiatePredicateFactory(PredicateKey key) PreprocessablePredicateFactory.preprocess(Term arg) UnknownPredicate.preprocess(Term arg) private PredicateFactoryPredicates.unknownPredicate(PredicateKey key) Methods in org.projog.core.predicate with parameters of type PredicateFactoryModifier and TypeMethodDescriptionvoidPredicates.addPredicateFactory(PredicateKey key, PredicateFactory predicateFactory) Associates aPredicateFactorywith thisKnowledgeBase. -
Uses of PredicateFactory in org.projog.core.predicate.builtin.bool
Classes in org.projog.core.predicate.builtin.bool that implement PredicateFactory -
Uses of PredicateFactory in org.projog.core.predicate.builtin.classify
Classes in org.projog.core.predicate.builtin.classify that implement PredicateFactoryModifier and TypeClassDescriptionfinal classchar_type(X,Y)- classifies characters.final classatom(X)- checks that a term is an atom.final classatomic(X)- checks that a term is atomic.final classcompound(X)- checks that a term is a compound term.final classfloat(X)- checks that a term is a floating point number.final classinteger(X)- checks that a term is an integer.final classis_list(X)- checks that a term is a list.final classnonvar(X)- checks that a term is not an uninstantiated variable.final classnumber(X)- checks that a term is numeric.final classvar(X)- checks that a term is an uninstantiated variable. -
Uses of PredicateFactory in org.projog.core.predicate.builtin.clp
Classes in org.projog.core.predicate.builtin.clp that implement PredicateFactoryModifier and TypeClassDescriptionfinal classpj_add_clp_expression(X,Y)- defines a Java class as an CLP expression.final classCLP predicates for comparing boolean values.final classall_different([X,Y,Z])- enforce that none of the given CLP variables share the same value.final classX in 1..4/[X,Y,Z] ins 1..4- restrict CLP variables to a range of values.final classCLP predicates for comparing numeric values.final classlabel([X])- assigns concrete values to the given CLP variables. -
Uses of PredicateFactory in org.projog.core.predicate.builtin.compare
Classes in org.projog.core.predicate.builtin.compare that implement PredicateFactoryModifier and TypeClassDescription(package private) classfinal classbetween(X,Y,Z)- checks if a number is within a specified range.final classcompare(X,Y,Z)- compares arguments.final classX=Y- an equality test.final classX is Y- evaluate arithmetic expression.private static final classprivate static final classfinal classX\==Y- a strict equality test.final classX \= Y- checks whether two terms cannot be unified.final classX=:=Y- numeric equality test.final classX>Y- numeric "greater than" test.final classX>=Y- numeric "greater than or equal" test.final classX=\=Y- numeric inequality test.final classX<Y- numeric "less than" test.final classX=<Y- numeric "less than or equal" test.final classpredsort(X,Y,Z)- sorts a list using the specified predicate.private static classfinal classX==Y- a strict equality test.final classX@>Y- term "greater than" test.final classX@>=Y- term "greater than or equal" test.final classX@<Y- term "less than" test.final classX@=<Y- term "less than or equal" test.final classunify_with_occurs_check(X, Y)- an equality test using sound unification.Fields in org.projog.core.predicate.builtin.compare declared as PredicateFactoryModifier and TypeFieldDescriptionprivate final PredicateFactoryPredSort.PredSortComparator.pfprivate final PredicateFactoryPredSort.PreprocessedPredSort.pfMethods in org.projog.core.predicate.builtin.compare that return PredicateFactoryMethods in org.projog.core.predicate.builtin.compare with parameters of type PredicateFactoryModifier and TypeMethodDescriptionprivate static booleanPredSort.evaluatePredSort(PredicateFactory pf, Term predicateName, Term input, Term sorted) Constructors in org.projog.core.predicate.builtin.compare with parameters of type PredicateFactoryModifierConstructorDescriptionprivatePredSortComparator(PredicateFactory pf, Term predicateName) privatePreprocessedPredSort(PredicateFactory pf, Term predicateName) -
Uses of PredicateFactory in org.projog.core.predicate.builtin.compound
Classes in org.projog.core.predicate.builtin.compound that implement PredicateFactoryModifier and TypeClassDescriptionfinal classbagof(X,P,L)- find all solutions that satisfy the goal.private static classfinal classcall(X)- calls the goal represented by a term.final classX,Y- conjunction.private static final classprivate static final classfinal classX;Y- disjunction.private classprivate static classfinal classfindall(X,P,L)- find all solutions that satisfy the goal.private static classfinal classX->Y- ifXsucceeds thenYis evaluated.private static final classfinal classlimit(N, X)- calls the goal represented by a term a maximum number of times.private static final classfinal class\+ X- "not".private static final classfinal classonce(X)- calls the goal represented by a term.private static final classfinal classsetof(X,P,L)- find all solutions that satisfy the goal.private static classFields in org.projog.core.predicate.builtin.compound declared as PredicateFactoryModifier and TypeFieldDescriptionprivate final PredicateFactoryIfThen.OptimisedIfThen.actionprivate final PredicateFactoryDisjunction.OptimisedIfThenElse.conditionprivate final PredicateFactoryIfThen.OptimisedIfThen.conditionprivate final PredicateFactoryDisjunction.OptimisedIfThenElse.elsePfprivate final PredicateFactoryConjunction.OptimisedRetryableConjuction.firstPredicateFactoryprivate final PredicateFactoryConjunction.OptimisedSingletonConjuction.firstPredicateFactoryprivate final PredicateFactoryAbstractCollectionOf.pfprivate final PredicateFactoryBagOf.PreprocessedBagOf.pfprivate final PredicateFactoryFindAll.PreprocessedFindAll.pfprivate final PredicateFactoryLimit.OptimisedLimit.pfprivate final PredicateFactoryNot.OptimisedNot.pfprivate final PredicateFactoryOnce.OptimisedOnce.pfprivate final PredicateFactorySetOf.PreprocessedSetOf.pfprivate final PredicateFactoryDisjunction.DisjunctionPredicate.pf1private final PredicateFactoryDisjunction.OptimisedDisjunction.pf1private final PredicateFactoryDisjunction.DisjunctionPredicate.pf2private final PredicateFactoryDisjunction.OptimisedDisjunction.pf2private final PredicateFactoryConjunction.ConjunctionPredicate.secondPredicateFactoryprivate final PredicateFactoryConjunction.OptimisedRetryableConjuction.secondPredicateFactoryprivate final PredicateFactoryConjunction.OptimisedSingletonConjuction.secondPredicateFactoryprivate final PredicateFactoryDisjunction.OptimisedIfThenElse.thenPfMethods in org.projog.core.predicate.builtin.compound that return PredicateFactoryModifier and TypeMethodDescriptionBagOf.preprocess(Term term) Conjunction.preprocess(Term term) Disjunction.preprocess(Term term) FindAll.preprocess(Term term) IfThen.preprocess(Term term) Limit.preprocess(Term term) Not.preprocess(Term term) Once.preprocess(Term term) SetOf.preprocess(Term term) Methods in org.projog.core.predicate.builtin.compound with parameters of type PredicateFactoryModifier and TypeMethodDescriptionprivate static booleanFindAll.evaluateFindAll(PredicateFactory pf, Term template, Term goal, Term output) private static booleanNot.evaluateNot(Term t, PredicateFactory pf) private static PredicateLimit.getLimitPredicate(PredicateFactory pf, Term maxAttempts, Term goal) private PredicateDisjunction.DisjunctionPredicate.getPredicate(PredicateFactory pf, Term t) Constructors in org.projog.core.predicate.builtin.compound with parameters of type PredicateFactoryModifierConstructorDescriptionprotectedAbstractCollectionOf(PredicateFactory pf, Term template, Term goal, Term bag) privateBagOfPredicate(PredicateFactory pf, Term template, Term goal, Term bag) privateConjunctionPredicate(Predicate firstPredicate, PredicateFactory secondPredicateFactory, Term secondArgument) privateDisjunctionPredicate(PredicateFactory pf1, PredicateFactory pf2, Term inputArg1, Term inputArg2) (package private)(package private)OptimisedIfThen(PredicateFactory condition, PredicateFactory action) (package private)OptimisedIfThenElse(PredicateFactory condition, PredicateFactory thenPf, PredicateFactory elsePf) (package private)(package private)(package private)(package private)OptimisedRetryableConjuction(PredicateFactory firstPredicateFactory, PredicateFactory secondPredicateFactory) (package private)OptimisedSingletonConjuction(PredicateFactory firstPredicateFactory, PredicateFactory secondPredicateFactory) (package private)(package private)privateSetOfPredicate(PredicateFactory pf, Term template, Term goal, Term bag) -
Uses of PredicateFactory in org.projog.core.predicate.builtin.construct
Classes in org.projog.core.predicate.builtin.construct that implement PredicateFactoryModifier and TypeClassDescriptionfinal classarg(N,T,A)- allows access to an argument of a structure.final classatom_concat(X, Y, Z)- concatenates atom names.final classcopy_term(X,Y)- makes a copy of a term.final classfunctor(T,F,N)final classnumbervars(Term,Start,End)- unifies free variables of a term.final classatom_chars/atom_codes/number_chars/number_codesfinal classX=..L- "univ". -
Uses of PredicateFactory in org.projog.core.predicate.builtin.db
Classes in org.projog.core.predicate.builtin.db that implement PredicateFactoryModifier and TypeClassDescriptionfinal classerase(X)- removes a record from the recorded database.final classrecorda(X,Y,Z)/recordz(X,Y,Z)- associates a term with a key.final classrecorded(X,Y,Z)- checks if a term is associated with a key. -
Uses of PredicateFactory in org.projog.core.predicate.builtin.debug
Classes in org.projog.core.predicate.builtin.debug that implement PredicateFactoryModifier and TypeClassDescriptionfinal classspy(X)/nospy(X)- add or remove a spy point for a predicate.final classdebugging- lists current spy points.final classnodebug- removes all current spy points.final classnotrace- disables exhaustive tracing.final classtrace- enables exhaustive tracing. -
Uses of PredicateFactory in org.projog.core.predicate.builtin.flow
Classes in org.projog.core.predicate.builtin.flow that implement PredicateFactoryModifier and TypeClassDescriptionfinal class!- the "cut".final classrepeat- always succeeds.final classrepeat(N)- succeedsNtimes.final classthrow(X)- throws an exception with the given message. -
Uses of PredicateFactory in org.projog.core.predicate.builtin.io
Classes in org.projog.core.predicate.builtin.io that implement PredicateFactoryModifier and TypeClassDescriptionfinal classclose(X)- closes a stream.final classcurrent_input(X)- match a term to the current input stream.final classcurrent_output(X)- match a term to the current output stream.final classget_char(X)- reads the next character from the input stream.final classget_code(X)- reads the next character from the input stream.final classnl- outputs a new line character.final classop(X,Y,Z)final classopen(X,Y,Z)- opens a file.final classput_char(X)- writes a character.final classread(X)- reads a term from the input stream.final classsee(X)- opens a file and sets it as the current input stream.final classseen- closes the current input stream.final classset_input(X)- sets the current input.final classset_output(X)- sets the current output.final classtab(X)- writesXnumber of spaces to the output stream.final classtell(X)- opens a file and sets it as the current output stream.final classtold- closes the current output stream.final classwrite(X)- writes a term to the output stream.final classwrite_canonical(X)- writes a term to the output stream.final classwritef(X,Y)- writes formatted text to the output stream. -
Uses of PredicateFactory in org.projog.core.predicate.builtin.kb
Classes in org.projog.core.predicate.builtin.kb that implement PredicateFactoryModifier and TypeClassDescriptionfinal classpj_add_arithmetic_operator(X,Y)- defines a Java class as an arithmetic operator.final classpj_add_predicate(X,Y)- defines a Java class as a built-in predicate.final classarithmetic_function(X)- defines a predicate as an arithmetic function.final classasserta(X)/assertz(X)- adds a clause to the knowledge base.final classconsult(X)- reads clauses and goals from a file.final classRead clauses and goals from a list of files.final classcurrent_predicate(X)- unifies with defined predicates.final classdynamic/1- indicates that a user defined predicate is dynamic.final classensure_loaded(X)- reads clauses and goals from a file.final classflag(X,Y,Z)- associates a key with a value.final classclause(X,Y)/retract(X)- matches terms to existing clauses.final classlisting(X)- outputs current clauses.final classretractall(X)- remove clauses from the knowledge base.Fields in org.projog.core.predicate.builtin.kb declared as PredicateFactoryModifier and TypeFieldDescription(package private) final PredicateFactoryAddUserDefinedArithmeticOperator.UserDefinedArithmeticOperator.pf -
Uses of PredicateFactory in org.projog.core.predicate.builtin.list
Classes in org.projog.core.predicate.builtin.list that implement PredicateFactoryModifier and TypeClassDescriptionfinal classappend(X,Y,Z)- concatenates two lists.final classappend(ListOfLists, List)- concatenates a list of lists.final classatomic_list_concat(List,Separator,Atom)/atomic_list_concat(List,Atom)final classdelete(X,Y,Z)- remove all occurrences of a term from a list.final classmin_list/max_listfinal classflatten(X,Y)- flattens a nested list.final classfoldl(PredicateName, Values, Start, Result)- combines elements of a list into a single term.private static classfinal classkeysort(X,Y)- sorts a list of key/value pairs.final classlast(X,Y)- finds the last element of a list.final classlength(X,Y)- determines the length of a list.final classmaplist(X,Y)/maplist(X,Y,Z)- determines if a goal succeeds against elements of a list.private static classfinal classmember(E, L)- enumerates members of a list.final classmemberchk(E, L)- checks is a term is a member of a list.private static classfinal classnth0(X,Y,Z)/nth1(X,Y,Z)- examines an element of a list.final classpairs_keys(Pairs,Keys)/pairs_values(Pairs,Values)- get keys or values from list of Key-Value pairs.final classreverse(X,Y)- reverses the order of elements in a list.final classselect(X,Y,Z)- removes an element from a list.final classmsort(X,Y)- sorts a list.final classsort(X,Y)- sorts a list and removes duplicates.final classinclude(X,Y,Z)- filters a list by a goal.private static final classfinal classsubset(X,Y)- checks if a set is a subset.final classsubtract(X,Y,Z)- removes elements from a list.Fields in org.projog.core.predicate.builtin.list declared as PredicateFactoryModifier and TypeFieldDescription(package private) final PredicateFactoryFold.OptimisedFold.pfprivate final PredicateFactoryFold.Retryable.pfprivate final PredicateFactoryMapList.PreprocessedMapList.pfprivate final PredicateFactoryMapList.Retryable.pfprivate final PredicateFactorySubList.PreprocessedSubList.predicateFactoryMethods in org.projog.core.predicate.builtin.list that return PredicateFactoryModifier and TypeMethodDescriptionstatic PredicateFactoryPartialApplicationUtils.getCurriedPredicateFactory(Predicates predicates, Term partiallyAppliedFunction) static PredicateFactoryPartialApplicationUtils.getPartiallyAppliedPredicateFactory(Predicates predicates, Term partiallyAppliedFunction, int numberOfExtraArguments) static PredicateFactoryPartialApplicationUtils.getPreprocessedCurriedPredicateFactory(Predicates predicates, Term partiallyAppliedFunction) static PredicateFactoryPartialApplicationUtils.getPreprocessedPartiallyAppliedPredicateFactory(Predicates predicates, Term partiallyAppliedFunction, int extraArgs) Fold.preprocess(Term arg) MapList.preprocess(Term input) MemberCheck.preprocess(Term term) SubList.preprocess(Term term) Methods in org.projog.core.predicate.builtin.list with parameters of type PredicateFactoryModifier and TypeMethodDescriptionstatic booleanPartialApplicationUtils.apply(PredicateFactory pf, Term[] args) private static booleanFold.evaluateFold(PredicateFactory pf, Term action, List<Term> values, Term start, Term result) private static booleanSubList.evaluateSubList(PredicateFactory pf, Term partiallyAppliedFunction, Term args, Term filteredOutput) private static PredicateFold.getFoldPredicate(PredicateFactory pf, Term action, Term values, Term start, Term result) private static PredicateMapList.getMapListPredicate(PredicateFactory pf, Term[] input) static PredicatePartialApplicationUtils.getPredicate(PredicateFactory pf, Term action, Term... args) Constructors in org.projog.core.predicate.builtin.list with parameters of type PredicateFactoryModifierConstructorDescriptionOptimisedFold(PredicateFactory pf, Term action) (package private)(package private)PreprocessedSubList(PredicateFactory predicateFactory) privateprivateRetryable(PredicateFactory pf, Term action, List<Term>[] lists) -
Uses of PredicateFactory in org.projog.core.predicate.builtin.reif
Classes in org.projog.core.predicate.builtin.reif that implement PredicateFactoryModifier and TypeClassDescriptionfinal classdif(X,Y)- enforces restriction that the two given terms are never equal. -
Uses of PredicateFactory in org.projog.core.predicate.builtin.time
Classes in org.projog.core.predicate.builtin.time that implement PredicateFactoryModifier and TypeClassDescriptionfinal classconvert_time(X,Y)- converts a timestamp to a textual representation.final classget_time(X)- gets the current system time. -
Uses of PredicateFactory in org.projog.core.predicate.udp
Subinterfaces of PredicateFactory in org.projog.core.predicate.udpModifier and TypeInterfaceDescriptioninterfaceMaintains a record of the clauses that define a user defined predicate.Classes in org.projog.core.predicate.udp that implement PredicateFactoryModifier and TypeClassDescriptionfinal classMaintains a record of the clauses that represents a "dynamic" user defined predicate.final classCreates "tail recursion optimised" versions of user defined predicates.(package private) final class(package private) final class(package private) final classclassMaintains a record of the clauses that represents a "static" user defined predicate.private final classprivate final classprivate final classprivate final classFields in org.projog.core.predicate.udp declared as PredicateFactoryModifier and TypeFieldDescriptionprivate PredicateFactoryStaticUserDefinedPredicateFactory.compiledPredicateFactoryprivate final PredicateFactory[]InterpretedTailRecursivePredicate.firstClausePredicateFactoriesprivate final PredicateFactory[]InterpretedTailRecursivePredicateFactory.firstClausePredicateFactoriesprivate final PredicateFactoryClauseActionFactory.ImmutableConsequentRule.pfprivate final PredicateFactoryClauseActionFactory.MutableRule.pfprivate final PredicateFactoryClauseActionFactory.ZeroArgConsequentRule.pfprivate final PredicateFactory[]InterpretedTailRecursivePredicate.secondClausePredicateFactoriesprivate final PredicateFactory[]InterpretedTailRecursivePredicateFactory.secondClausePredicateFactoriesMethods in org.projog.core.predicate.udp that return PredicateFactoryModifier and TypeMethodDescriptionprivate PredicateFactoryStaticUserDefinedPredicateFactory.createInterpretedPredicateFactoryFromClauseActions(Clauses clauses, List<ClauseModel> clauseModels) private PredicateFactoryStaticUserDefinedPredicateFactory.createInterpretedPredicateFactoryFromClauses(Clauses clauses) private PredicateFactoryStaticUserDefinedPredicateFactory.createSingleClausePredicateFactory(ClauseAction clause) StaticUserDefinedPredicateFactory.getActualPredicateFactory()SingleNonRetryableRulePredicateFactory.preprocess(Term arg) SingleRetryableRulePredicateFactory.preprocess(Term arg) StaticUserDefinedPredicateFactory.IndexablePredicateFactory.preprocess(Term arg) StaticUserDefinedPredicateFactory.LinkedHashMapPredicateFactory.preprocess(Term arg) StaticUserDefinedPredicateFactory.NotIndexablePredicateFactory.preprocess(Term arg) StaticUserDefinedPredicateFactory.preprocess(Term arg) StaticUserDefinedPredicateFactory.SingleIndexPredicateFactory.preprocess(Term arg) Constructors in org.projog.core.predicate.udp with parameters of type PredicateFactoryModifierConstructorDescriptionprivateImmutableConsequentRule(ClauseModel model, PredicateFactory pf) (package private)InterpretedTailRecursivePredicate(SpyPoints.SpyPoint spyPoint, Term[] inputArgs, PredicateFactory[] firstClausePredicateFactories, Term[] firstClauseConsequentArgs, Term[] firstClauseOriginalTerms, PredicateFactory[] secondClausePredicateFactories, Term[] secondClauseConsequentArgs, Term[] secondClauseOriginalTerms, boolean isRetryable) privateMutableRule(ClauseModel model, PredicateFactory pf) privateZeroArgConsequentRule(ClauseModel model, PredicateFactory pf)