jason.asSyntax
Class RelExpr
java.lang.Object
jason.asSyntax.DefaultTerm
jason.asSyntax.Literal
jason.asSyntax.Atom
jason.asSyntax.Structure
jason.asSyntax.BinaryStructure
jason.asSyntax.RelExpr
- All Implemented Interfaces:
- LogicalFormula, Term, ToDOM, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Term>
public class RelExpr
- extends BinaryStructure
- implements LogicalFormula
Represents a relational expression like 10 > 20.
When the operator is =.., the first argument is a literal and the
second as list, e.g.:
Literal =.. [functor, list of terms, list of annots]
Examples:
- X =.. [~p, [t1, t2], [a1,a2]]
X is ~p(t1,t2)[a1,a2]
- ~p(t1,t2)[a1,a2] =.. X
X is [~p, [t1, t2], [a1,a2]]
- See Also:
- Serialized Form
Methods inherited from class jason.asSyntax.Structure |
addTerm, addTerms, addTerms, apply, calcHashCode, compareTo, countVars, delTerm, equals, getArity, getSingletonVars, getTerm, getTerms, getTermsSize, hasTerm, hasVar, isAtom, isGround, isStructure, makeTermsAnnon, makeVarsAnnon, makeVarsAnnon, parse, setTerm, setTerms, varToReplace |
Methods inherited from class jason.asSyntax.Literal |
addAnnot, addAnnots, addAnnots, addSource, canBeAddedInBB, clearAnnots, copy, delAnnot, delAnnots, delSource, delSources, equalsAsStructure, forceFullLiteralImpl, getAnnots, getAnnots, getAsListOfTerms, getPredicateIndicator, getSources, getTermsArray, hasAnnot, hasAnnot, hasSource, hasSource, hasSubsetAnnot, hasSubsetAnnot, importAnnots, isLiteral, negated, newFromListOfTerms, parseLiteral, setAnnots, setNegated |
Methods inherited from class jason.asSyntax.DefaultTerm |
getErrorMsg, getSrcInfo, hashCode, isArithExpr, isInternalAction, isList, isNumeric, isPlanBody, isPred, isRule, isString, isUnnamedVar, isVar, resetHashCodeCache, setSrcInfo |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jason.asSyntax.Term |
apply, countVars, equals, getSrcInfo, hasVar, isArithExpr, isAtom, isGround, isInternalAction, isList, isLiteral, isNumeric, isPlanBody, isPred, isRule, isString, isStructure, isUnnamedVar, isVar, setSrcInfo |
Methods inherited from interface java.lang.Comparable |
compareTo |
RelExpr
public RelExpr(Term t1,
RelExpr.RelationalOp oper,
Term t2)
logicalConsequence
public java.util.Iterator<Unifier> logicalConsequence(Agent ag,
Unifier un)
- Description copied from class:
Literal
- logicalConsequence checks whether one particular predicate
is a logical consequence of the belief base.
Returns an iterator for all unifiers that are logCons.
- Specified by:
logicalConsequence
in interface LogicalFormula
- Overrides:
logicalConsequence
in class Literal
parseExpr
public static LogicalFormula parseExpr(java.lang.String sExpr)
- returns some LogicalFormula that can be evaluated
clone
public LogicalFormula clone()
- make a hard copy of the terms
- Specified by:
clone
in interface Term
- Overrides:
clone
in class Structure
getOp
public RelExpr.RelationalOp getOp()
- gets the Operation of this Expression
getAsDOM
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
- get as XML
- Specified by:
getAsDOM
in interface ToDOM
- Overrides:
getAsDOM
in class BinaryStructure