Package | Description |
---|---|
org.projog.api |
Provides a programming interface for Java applications to interact with Projog.
|
org.projog.core.event |
Provides a mechanism for objects to notify and be notified of events.
|
org.projog.core.io | |
org.projog.core.kb | |
org.projog.core.math | |
org.projog.core.parser |
Provides classes for constructing
Term objects from Prolog syntax. |
org.projog.core.predicate | |
org.projog.core.predicate.builtin.classify |
Predicates for classifying terms.
|
org.projog.core.predicate.builtin.clp |
Predicates to support constraint logic programming.
|
org.projog.core.predicate.builtin.compare |
Predicates for comparing terms, including specific predicates for comparing numeric values.
|
org.projog.core.predicate.builtin.compound |
Predicates for the construction of compound/complex sentences.
|
org.projog.core.predicate.builtin.construct |
Predicates for inspecting the structure of terms.
|
org.projog.core.predicate.builtin.db |
Predicates to support working with the recorded database.
|
org.projog.core.predicate.builtin.debug |
Predicates to aid the debugging of Prolog programs.
|
org.projog.core.predicate.builtin.flow |
Predicates for affecting the flow of goal evaluation on backtracking.
|
org.projog.core.predicate.builtin.io |
Predicates for system input and output with the file system.
|
org.projog.core.predicate.builtin.kb |
Predicates for inspecting, adding and retracting clauses.
|
org.projog.core.predicate.builtin.list |
Predicates for working with list data structures.
|
org.projog.core.predicate.builtin.reif |
Predicates that provide reification functionality.
|
org.projog.core.predicate.builtin.time |
Predicates to support working with dates and times.
|
org.projog.core.predicate.udp |
Provides functionality to evaluate user defined predicates defined using Prolog syntax.
|
org.projog.core.term |
Contains the building blocks used to construct Prolog programs and queries.
|
Modifier and Type | Method and Description |
---|---|
Term |
QueryStatement.findFirstAsTerm()
Execute the query once and return the
Term the single query variable was unified with. |
Term |
QueryPlan.findFirstAsTerm() |
Term |
ProjogStackTraceElement.getTerm()
Represents the clause this stack trace element was generated for.
|
Term |
QueryResult.getTerm(String variableId)
Returns the term instantiated to the variable with the specified id.
|
Modifier and Type | Method and Description |
---|---|
List<Term> |
QueryStatement.findAllAsTerm()
Find all solutions generated by the query and return the
Term values the single query variable was unified
with. |
List<Term> |
QueryPlan.findAllAsTerm() |
Optional<Term> |
QueryStatement.findFirstAsOptionalTerm()
Attempt to execute the query once and return a
Term representation of the term the single query variable
was unified with. |
Optional<Term> |
QueryPlan.findFirstAsOptionalTerm() |
Modifier and Type | Method and Description |
---|---|
String |
Projog.formatTerm(Term t)
Returns a string representation of the specified
Term . |
void |
QueryStatement.setListOfTerms(String variableId,
Term... terms)
Attempts to unify the specified
Term values as a Prolog list to the variable with the specified id. |
void |
QueryStatement.setTerm(String variableId,
Term term)
Attempts to unify the specified term to the variable with the specified id.
|
Modifier and Type | Method and Description |
---|---|
void |
QueryStatement.setListOfTerms(String variableId,
List<? extends Term> terms)
Attempts to unify the specified
Term values as a Prolog list to the variable with the specified id. |
Modifier and Type | Method and Description |
---|---|
void |
SpyPoints.SpyPoint.logCall(Object source,
Term[] args)
Notifies listeners of a first attempt to evaluate a goal.
|
void |
SpyPoints.SpyPoint.logExit(Object source,
Term[] args,
ClauseModel clause)
Notifies listeners of that an attempt to evaluate a goal has succeeded.
|
void |
SpyPoints.SpyPoint.logExit(Object source,
Term[] args,
int clauseNumber)
Deprecated.
|
void |
SpyPoints.SpyPoint.logFail(Object source,
Term[] args)
Notifies listeners of that an attempt to evaluate a goal has failed.
|
void |
SpyPoints.SpyPoint.logRedo(Object source,
Term[] args)
Notifies listeners of an attempt to re-evaluate a goal.
|
Modifier and Type | Method and Description |
---|---|
Term |
FileHandles.getCurrentInputHandle()
Return the
Term representing the current input stream. |
Term |
FileHandles.getCurrentOutputHandle()
Return the
Term representing the current output stream. |
Modifier and Type | Method and Description |
---|---|
void |
FileHandles.close(Term handle)
Closes the stream represented by the specified
Term . |
void |
FileHandles.setInput(Term handle)
Sets the current input stream to the input stream represented by the specified
Term . |
void |
FileHandles.setOutput(Term handle)
Sets the current output stream to the output stream represented by the specified
Term . |
Modifier and Type | Method and Description |
---|---|
static Term[] |
KnowledgeBaseUtils.toArrayOfConjunctions(Term t)
|
Modifier and Type | Method and Description |
---|---|
static boolean |
KnowledgeBaseUtils.isConjunction(Term t)
|
static boolean |
KnowledgeBaseUtils.isQuestionOrDirectiveFunctionCall(Term t)
|
static boolean |
KnowledgeBaseUtils.isSingleAnswer(KnowledgeBase kb,
Term term)
Returns
true if the predicate represented by the specified Term never succeeds on re-evaluation. |
static Term[] |
KnowledgeBaseUtils.toArrayOfConjunctions(Term t)
|
Modifier and Type | Interface and Description |
---|---|
interface |
Numeric
A
Term that has a numerical value. |
Modifier and Type | Method and Description |
---|---|
Numeric |
ArithmeticOperator.calculate(Term[] args)
Returns the result of the calculation using the specified arguments.
|
Numeric |
AbstractArithmeticOperator.calculate(Term[] args) |
int |
NumericTermComparator.compare(Term t1,
Term t2,
ArithmeticOperators operators)
Compares the two arguments, representing arithmetic expressions, for order.
|
Numeric |
ArithmeticOperators.getNumeric(Term t)
Returns the result of evaluating the specified arithmetic expression.
|
ArithmeticOperator |
ArithmeticOperators.getPreprocessedArithmeticOperator(Term argument) |
ArithmeticOperator |
PreprocessableArithmeticOperator.preprocess(Term arg) |
ArithmeticOperator |
AbstractArithmeticOperator.preprocess(Term expression) |
Modifier and Type | Method and Description |
---|---|
Term |
SentenceParser.parseSentence()
|
Modifier and Type | Method and Description |
---|---|
Term |
PredicateKey.toTerm() |
Modifier and Type | Method and Description |
---|---|
static PredicateKey |
PredicateKey.createForTerm(Term t)
Returns a
PredicateKey for the specified term. |
static PredicateKey |
PredicateKey.createFromNameAndArity(Term t) |
protected boolean |
AbstractSingleResultPredicate.evaluate(Term arg) |
boolean |
AbstractSingleResultPredicate.evaluate(Term[] args) |
protected boolean |
AbstractSingleResultPredicate.evaluate(Term arg1,
Term arg2) |
protected boolean |
AbstractSingleResultPredicate.evaluate(Term arg1,
Term arg2,
Term arg3) |
protected boolean |
AbstractSingleResultPredicate.evaluate(Term arg1,
Term arg2,
Term arg3,
Term arg4) |
Predicate |
Predicates.getPredicate(Term t) |
protected Predicate |
AbstractPredicateFactory.getPredicate(Term arg) |
Predicate |
UnknownPredicate.getPredicate(Term[] args) |
Predicate |
PredicateFactory.getPredicate(Term[] args)
Returns a
Predicate to be used in the evaluation of a goal. |
Predicate |
AbstractSingleResultPredicate.getPredicate(Term[] args) |
Predicate |
AbstractPredicateFactory.getPredicate(Term[] args) |
protected Predicate |
AbstractPredicateFactory.getPredicate(Term arg1,
Term arg2) |
protected Predicate |
AbstractPredicateFactory.getPredicate(Term arg1,
Term arg2,
Term arg3) |
protected Predicate |
AbstractPredicateFactory.getPredicate(Term arg1,
Term arg2,
Term arg3,
Term arg4) |
PredicateFactory |
Predicates.getPredicateFactory(Term term)
Returns the
PredicateFactory associated with the specified Term . |
PredicateFactory |
Predicates.getPreprocessedPredicateFactory(Term term) |
PredicateFactory |
UnknownPredicate.preprocess(Term arg) |
PredicateFactory |
PreprocessablePredicateFactory.preprocess(Term arg) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
IsVar.evaluate(Term arg) |
protected boolean |
IsNumber.evaluate(Term arg) |
protected boolean |
IsNonVar.evaluate(Term arg) |
protected boolean |
IsList.evaluate(Term arg) |
protected boolean |
IsInteger.evaluate(Term arg) |
protected boolean |
IsFloat.evaluate(Term arg) |
protected boolean |
IsCompound.evaluate(Term arg) |
protected boolean |
IsAtomic.evaluate(Term arg) |
protected boolean |
IsAtom.evaluate(Term arg) |
protected Predicate |
CharType.getPredicate(Term character,
Term type) |
Modifier and Type | Method and Description |
---|---|
org.projog.clp.Constraint |
NumericConstraintPredicate.createConstraint(Term[] args,
Set<org.projog.core.predicate.builtin.clp.ClpVariable> vars) |
org.projog.clp.Constraint |
ConstraintFactory.createConstraint(Term[] args,
Set<org.projog.core.predicate.builtin.clp.ClpVariable> vars) |
org.projog.clp.Constraint |
BooleanConstraintPredicate.createConstraint(Term[] args,
Set<org.projog.core.predicate.builtin.clp.ClpVariable> vars) |
boolean |
Distinct.evaluate(Term arg) |
boolean |
NumericConstraintPredicate.evaluate(Term x,
Term y) |
boolean |
In.evaluate(Term t,
Term range) |
protected boolean |
AddExpressionFactory.evaluate(Term functionNameAndArity,
Term javaClass) |
Predicate |
Resolve.getPredicate(Term arg) |
Predicate |
BooleanConstraintPredicate.getPredicate(Term[] args) |
org.projog.clp.Expression |
ExpressionFactories.toExpression(Term t,
Set<org.projog.core.predicate.builtin.clp.ClpVariable> vars) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
UnifyWithOccursCheck.evaluate(Term arg1,
Term arg2) |
protected boolean |
TermLessThanOrEqual.evaluate(Term arg1,
Term arg2) |
protected boolean |
TermLessThan.evaluate(Term arg1,
Term arg2) |
protected boolean |
TermGreaterThanOrEqual.evaluate(Term arg1,
Term arg2) |
protected boolean |
TermGreaterThan.evaluate(Term arg1,
Term arg2) |
protected boolean |
StrictEquality.evaluate(Term arg1,
Term arg2) |
protected boolean |
NumericLessThanOrEqual.evaluate(Term arg1,
Term arg2) |
protected boolean |
NumericLessThan.evaluate(Term arg1,
Term arg2) |
protected boolean |
NumericInequality.evaluate(Term arg1,
Term arg2) |
protected boolean |
NumericGreaterThanOrEqual.evaluate(Term arg1,
Term arg2) |
protected boolean |
NumericGreaterThan.evaluate(Term arg1,
Term arg2) |
protected boolean |
NumericEquality.evaluate(Term arg1,
Term arg2) |
protected boolean |
NotUnifiable.evaluate(Term arg1,
Term arg2) |
protected boolean |
NotStrictEquality.evaluate(Term arg1,
Term arg2) |
protected boolean |
Is.evaluate(Term arg1,
Term arg2) |
protected boolean |
Equal.evaluate(Term arg1,
Term arg2) |
protected boolean |
PredSort.evaluate(Term predicateName,
Term input,
Term sorted) |
protected boolean |
Compare.evaluate(Term result,
Term t1,
Term t2) |
protected Predicate |
Between.getPredicate(Term low,
Term high,
Term middle) |
PredicateFactory |
PredSort.preprocess(Term term) |
PredicateFactory |
Is.preprocess(Term arg) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
Once.evaluate(Term t) |
protected boolean |
Not.evaluate(Term t) |
protected boolean |
FindAll.evaluate(Term template,
Term goal,
Term output) |
Predicate |
Call.getPredicate(Term[] args) |
Predicate |
Limit.getPredicate(Term maxAttempts,
Term goal) |
protected Predicate |
IfThen.getPredicate(Term conditionTerm,
Term thenTerm) |
protected Predicate |
Disjunction.getPredicate(Term firstArg,
Term secondArg) |
protected Predicate |
Conjunction.getPredicate(Term arg1,
Term arg2) |
protected Predicate |
SetOf.getPredicate(Term template,
Term goal,
Term bag) |
protected Predicate |
BagOf.getPredicate(Term template,
Term goal,
Term bag) |
PredicateFactory |
SetOf.preprocess(Term term) |
PredicateFactory |
Once.preprocess(Term term) |
PredicateFactory |
Not.preprocess(Term term) |
PredicateFactory |
Limit.preprocess(Term term) |
PredicateFactory |
IfThen.preprocess(Term term) |
PredicateFactory |
FindAll.preprocess(Term term) |
PredicateFactory |
Disjunction.preprocess(Term term) |
PredicateFactory |
Conjunction.preprocess(Term term) |
PredicateFactory |
BagOf.preprocess(Term term) |
Modifier and Type | Method and Description |
---|---|
protected Term |
TermSplit.charToTerm(char c) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
NumberVars.evaluate(Term arg) |
boolean |
Univ.evaluate(Term arg1,
Term arg2) |
protected boolean |
TermSplit.evaluate(Term arg1,
Term arg2) |
protected boolean |
CopyTerm.evaluate(Term arg1,
Term arg2) |
protected boolean |
NumberVars.evaluate(Term arg1,
Term arg2,
Term arg3) |
protected boolean |
Functor.evaluate(Term term,
Term functor,
Term arity) |
protected boolean |
Arg.evaluate(Term arg1,
Term arg2,
Term arg3) |
protected Predicate |
AtomConcat.getPredicate(Term prefix,
Term suffix,
Term combined) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
Erase.evaluate(Term arg) |
protected boolean |
InsertRecord.evaluate(Term key,
Term value) |
protected boolean |
InsertRecord.evaluate(Term key,
Term value,
Term reference) |
protected Predicate |
Recorded.getPredicate(Term key,
Term value) |
protected Predicate |
Recorded.getPredicate(Term key,
Term value,
Term reference) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
AlterSpyPoint.evaluate(Term t) |
Modifier and Type | Method and Description |
---|---|
boolean |
Throw.evaluate(Term error) |
protected Predicate |
RepeatSetAmount.getPredicate(Term arg) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
Writef.evaluate(Term atom) |
protected boolean |
WriteCanonical.evaluate(Term arg) |
protected boolean |
Write.evaluate(Term arg) |
protected boolean |
Tell.evaluate(Term source) |
protected boolean |
Tab.evaluate(Term arg) |
protected boolean |
SetOutput.evaluate(Term arg) |
protected boolean |
SetInput.evaluate(Term arg) |
protected boolean |
See.evaluate(Term source) |
protected boolean |
Read.evaluate(Term argument) |
protected boolean |
PutChar.evaluate(Term argument) |
protected boolean |
GetCode.evaluate(Term argument) |
protected boolean |
GetChar.evaluate(Term argument) |
protected boolean |
CurrentOutput.evaluate(Term argument) |
protected boolean |
CurrentInput.evaluate(Term argument) |
protected boolean |
Close.evaluate(Term argument) |
protected boolean |
Writef.evaluate(Term atom,
Term list) |
protected boolean |
Open.evaluate(Term fileNameAtom,
Term operationAtom,
Term variableToAssignTo) |
protected boolean |
Op.evaluate(Term arg1,
Term arg2,
Term arg3) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
RetractAll.evaluate(Term t) |
protected boolean |
Listing.evaluate(Term arg) |
protected boolean |
EnsureLoaded.evaluate(Term arg) |
protected boolean |
Dynamic.evaluate(Term arg) |
protected boolean |
Consult.evaluate(Term arg) |
protected boolean |
Assert.evaluate(Term clause) |
protected boolean |
AddUserDefinedArithmeticOperator.evaluate(Term arg) |
protected boolean |
ConsultList.evaluate(Term head,
Term tail) |
protected boolean |
AddPredicateFactory.evaluate(Term arg1,
Term arg2) |
protected boolean |
AddArithmeticOperator.evaluate(Term functionNameAndArity,
Term javaClass) |
protected boolean |
Flag.evaluate(Term key,
Term oldValue,
Term newValue) |
protected Predicate |
Inspect.getPredicate(Term clauseHead) |
protected Predicate |
CurrentPredicate.getPredicate(Term arg) |
protected Predicate |
Inspect.getPredicate(Term clauseHead,
Term clauseBody) |
Modifier and Type | Method and Description |
---|---|
static Term[] |
PartialApplicationUtils.createArguments(Term partiallyAppliedFunction,
Term... extraArguments) |
Modifier and Type | Method and Description |
---|---|
static boolean |
PartialApplicationUtils.apply(PredicateFactory pf,
Term[] args) |
static Term[] |
PartialApplicationUtils.createArguments(Term partiallyAppliedFunction,
Term... extraArguments) |
static Term[] |
PartialApplicationUtils.createArguments(Term partiallyAppliedFunction,
Term... extraArguments) |
protected boolean |
Subset.evaluate(Term subsetTerm,
Term set) |
protected boolean |
SortAsSet.evaluate(Term unsorted,
Term sorted) |
protected boolean |
Sort.evaluate(Term unsorted,
Term sorted) |
boolean |
PairsElements.evaluate(Term pairs,
Term values) |
protected boolean |
MemberCheck.evaluate(Term element,
Term list) |
protected boolean |
KeySort.evaluate(Term original,
Term result) |
protected boolean |
Flatten.evaluate(Term original,
Term expected) |
protected boolean |
ExtremumList.evaluate(Term input,
Term output) |
protected boolean |
AtomicListConcat.evaluate(Term atomList,
Term concatenatedResultAtom) |
protected boolean |
AppendListOfLists.evaluate(Term listOfLists,
Term termToUnifyWith) |
protected boolean |
SubtractFromList.evaluate(Term original,
Term itemsToRemove,
Term result) |
protected boolean |
SubList.evaluate(Term partiallyAppliedFunction,
Term args,
Term filteredOutput) |
protected boolean |
Delete.evaluate(Term input,
Term element,
Term output) |
protected boolean |
AtomicListConcat.evaluate(Term atomList,
Term separatorAtom,
Term concatenatedResultAtom) |
static PredicateFactory |
PartialApplicationUtils.getCurriedPredicateFactory(Predicates predicates,
Term partiallyAppliedFunction) |
static PredicateFactory |
PartialApplicationUtils.getPartiallyAppliedPredicateFactory(Predicates predicates,
Term partiallyAppliedFunction,
int numberOfExtraArguments) |
static Predicate |
PartialApplicationUtils.getPredicate(PredicateFactory pf,
Term action,
Term... args) |
static Predicate |
PartialApplicationUtils.getPredicate(PredicateFactory pf,
Term action,
Term... args) |
Predicate |
MapList.getPredicate(Term[] input) |
protected Predicate |
Reverse.getPredicate(Term list1,
Term list2) |
protected Predicate |
Member.getPredicate(Term element,
Term list) |
protected Predicate |
Length.getPredicate(Term list,
Term expectedLength) |
protected Predicate |
Last.getPredicate(Term list,
Term termToUnifyLastElementWith) |
Predicate |
Select.getPredicate(Term element,
Term inputList,
Term outputList) |
protected Predicate |
Nth.getPredicate(Term index,
Term list,
Term element) |
protected Predicate |
Append.getPredicate(Term prefix,
Term suffix,
Term concatenated) |
protected Predicate |
Fold.getPredicate(Term atom,
Term values,
Term start,
Term result) |
static PredicateFactory |
PartialApplicationUtils.getPreprocessedCurriedPredicateFactory(Predicates predicates,
Term partiallyAppliedFunction) |
static PredicateFactory |
PartialApplicationUtils.getPreprocessedPartiallyAppliedPredicateFactory(Predicates predicates,
Term partiallyAppliedFunction,
int extraArgs) |
static boolean |
PartialApplicationUtils.isAtomOrStructure(Term arg) |
static boolean |
PartialApplicationUtils.isList(Term arg) |
PredicateFactory |
SubList.preprocess(Term term) |
PredicateFactory |
MemberCheck.preprocess(Term term) |
PredicateFactory |
MapList.preprocess(Term input) |
PredicateFactory |
Fold.preprocess(Term arg) |
Modifier and Type | Method and Description |
---|---|
boolean |
Dif.evaluate(Term arg1,
Term arg2) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
GetTime.evaluate(Term t) |
protected boolean |
ConvertTime.evaluate(Term timestamp,
Term text) |
Modifier and Type | Method and Description |
---|---|
Term |
ClauseModel.getAntecedent()
Returns the body of the clause.
|
Term |
ClauseModel.getConsequent()
Returns the head of the clause.
|
Term |
ClauseModel.getOriginal() |
Modifier and Type | Method and Description |
---|---|
static ClauseModel |
ClauseModel.createClauseModel(Term original) |
Predicate |
StaticUserDefinedPredicateFactory.getPredicate(Term[] args) |
org.projog.core.predicate.udp.InterpretedTailRecursivePredicate |
InterpretedTailRecursivePredicateFactory.getPredicate(Term[] args) |
Predicate |
DynamicUserDefinedPredicateFactory.getPredicate(Term[] args) |
Predicate |
ClauseAction.getPredicate(Term[] input) |
PredicateFactory |
StaticUserDefinedPredicateFactory.preprocess(Term arg) |
Constructor and Description |
---|
InterpretedUserDefinedPredicate(Iterator<ClauseAction> clauseActions,
SpyPoints.SpyPoint spyPoint,
Term[] queryArgs) |
Modifier and Type | Class and Description |
---|---|
class |
Atom
Represents a specific object or relationship.
|
class |
DecimalFraction
Represents a value of the primitive type
double as a Term . |
class |
EmptyList
Represents a data structure with no
Term s. |
class |
IntegerNumber
Represents a value of the primitive type
long as a Term . |
class |
List
Represents a data structure with two
Term s - a head and a tail. |
class |
Structure
|
class |
Variable
Represents an unspecified
Term . |
Modifier and Type | Field and Description |
---|---|
static Term[] |
TermUtils.EMPTY_ARRAY
A
Term array of length 0. |
Modifier and Type | Method and Description |
---|---|
Term |
Variable.copy(Map<Variable,Variable> sharedVariables) |
Term |
Term.copy(Map<Variable,Variable> sharedVariables)
Returns a copy of this term.
|
Term |
EmptyList.copy(Map<Variable,Variable> sharedVariables) |
static Term[] |
TermUtils.copy(Term... input)
Returns copies of the specified {link Term}s
|
static Term |
ListFactory.createList(Collection<? extends Term> terms)
Returns a new
List with the specified terms and a empty list as the final tail element. |
static Term |
ListFactory.createList(Term[] terms)
Returns a new
List with the specified terms and a empty list as the final tail element. |
static Term |
ListFactory.createList(Term[] terms,
Term tail)
Returns a new
List with the specified terms and the second parameter as the tail element. |
static Term |
ListFactory.createListOfLength(int length)
Returns a new list of the specified length where is each element is a variable.
|
static Term |
Structure.createStructure(String functor,
Term[] args)
Factory method for creating
Structure instances. |
Term[] |
Variable.getArgs()
|
Term[] |
Term.getArgs()
Returns an array of this terms's arguments.
|
Term[] |
Structure.getArgs() |
Term[] |
List.getArgs() |
Term[] |
IntegerNumber.getArgs() |
Term[] |
EmptyList.getArgs() |
Term[] |
DecimalFraction.getArgs() |
Term[] |
Atom.getArgs() |
Term |
Variable.getArgument(int index)
Calls
getArgument(int) on the Term this variable is instantiated with. |
Term |
Term.getArgument(int index)
Returns the term at the specified position in this term's arguments.
|
Term |
Structure.getArgument(int index) |
Term |
List.getArgument(int index) |
Term |
IntegerNumber.getArgument(int index) |
Term |
EmptyList.getArgument(int index) |
Term |
DecimalFraction.getArgument(int index) |
Term |
Atom.getArgument(int index) |
Term |
Variable.getAttributeOrDefault(VariableAttribute attributeKey,
Term defaultValue) |
Term |
Variable.getBound() |
default Term |
Term.getBound()
Returns the term this object is bound to.
|
Term |
Variable.getTerm() |
Term |
Term.getTerm()
Returns the current instantiated state of this term.
|
Term |
VariableAttribute.join(Term a,
Term b) |
Modifier and Type | Method and Description |
---|---|
static List<Term> |
ListUtils.toJavaUtilList(Term list)
Returns a new
java.util.List containing the contents of the specified org.projog.core.term.List . |
static List<Term> |
ListUtils.toSortedJavaUtilList(Term unsorted)
Returns a new
java.util.List containing the sorted contents of the specified
org.projog.core.term.List . |
Modifier and Type | Method and Description |
---|---|
static void |
TermUtils.assertType(Term t,
TermType type) |
static void |
TermUtils.backtrack(Term[] terms)
Backtracks all
Term s in the specified array. |
IntegerNumber |
IntegerNumber.calculate(Term[] args) |
DecimalFraction |
DecimalFraction.calculate(Term[] args) |
static Numeric |
TermUtils.castToNumeric(Term t)
|
int |
TermComparator.compare(Term t1,
Term t2)
Compares the two arguments for order.
|
static Term[] |
TermUtils.copy(Term... input)
Returns copies of the specified {link Term}s
|
static Term |
ListFactory.createList(Term[] terms)
Returns a new
List with the specified terms and a empty list as the final tail element. |
static Term |
ListFactory.createList(Term[] terms,
Term tail)
Returns a new
List with the specified terms and the second parameter as the tail element. |
static Term |
ListFactory.createList(Term[] terms,
Term tail)
Returns a new
List with the specified terms and the second parameter as the tail element. |
static List |
ListFactory.createList(Term head,
Term tail)
Returns a new
List with specified head and tail. |
static Term |
Structure.createStructure(String functor,
Term[] args)
Factory method for creating
Structure instances. |
String |
TermFormatter.formatTerm(Term t)
Returns a string representation of the specified
Term . |
static Set<Variable> |
TermUtils.getAllVariablesInTerm(Term argument)
Returns all
Variable s contained in the specified term. |
static String |
TermUtils.getAtomName(Term t)
|
Term |
Variable.getAttributeOrDefault(VariableAttribute attributeKey,
Term defaultValue) |
static boolean |
ListUtils.isMember(Term element,
Term list)
Checks is a term can be unified with at least one element of a list.
|
Term |
VariableAttribute.join(Term a,
Term b) |
boolean |
VariableAttribute.postUnify(Variable variable,
Term attributeValue) |
void |
Variable.putAttribute(VariableAttribute attributeKey,
Term attributeValue) |
static boolean |
TermUtils.termsEqual(Term a,
Term b) |
static int |
TermUtils.toInt(Term t)
|
static List<Term> |
ListUtils.toJavaUtilList(Term list)
Returns a new
java.util.List containing the contents of the specified org.projog.core.term.List . |
static long |
TermUtils.toLong(ArithmeticOperators operators,
Term t)
Return the long value represented by the specified term.
|
static List<Term> |
ListUtils.toSortedJavaUtilList(Term unsorted)
Returns a new
java.util.List containing the sorted contents of the specified
org.projog.core.term.List . |
boolean |
Variable.unify(Term t) |
boolean |
Term.unify(Term t)
Attempts to unify this term to the specified term.
|
boolean |
Structure.unify(Term t) |
boolean |
List.unify(Term t1) |
boolean |
IntegerNumber.unify(Term t) |
boolean |
EmptyList.unify(Term t) |
boolean |
DecimalFraction.unify(Term t) |
boolean |
Atom.unify(Term t) |
static boolean |
TermUtils.unify(Term[] queryArgs,
Term[] consequentArgs)
Attempts to unify all corresponding
Term s in the specified arrays. |
static boolean |
TermUtils.unify(Term[] queryArgs,
Term[] consequentArgs)
Attempts to unify all corresponding
Term s in the specified arrays. |
Modifier and Type | Method and Description |
---|---|
static Term |
ListFactory.createList(Collection<? extends Term> terms)
Returns a new
List with the specified terms and a empty list as the final tail element. |
Constructor and Description |
---|
List(Term head,
Term tail)
Creates a new list with the specified head and tail.
|
Copyright © 2024. All rights reserved.