jason.asSyntax
Class RelExpr

Package class diagram package RelExpr
java.lang.Object
  extended by jason.asSyntax.DefaultTerm
      extended by jason.asSyntax.Literal
          extended by jason.asSyntax.Atom
              extended by jason.asSyntax.Structure
                  extended by jason.asSyntax.BinaryStructure
                      extended by 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:

See Also:
Serialized Form

Nested Class Summary
static class RelExpr.RelationalOp
           
 
Field Summary
 
Fields inherited from class jason.asSyntax.Structure
emptyTermArray, emptyTermList
 
Fields inherited from class jason.asSyntax.Literal
LFalse, LNeg, LPos, LTrue, predicateIndicatorCache
 
Fields inherited from class jason.asSyntax.DefaultTerm
hashCodeCache, srcInfo
 
Constructor Summary
RelExpr(Term t1, RelExpr.RelationalOp oper, Term t2)
           
 
Method Summary
 LogicalFormula clone()
          make a hard copy of the terms
 org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
          get as XML
 RelExpr.RelationalOp getOp()
          gets the Operation of this Expression
 java.util.Iterator<Unifier> logicalConsequence(Agent ag, Unifier un)
          logicalConsequence checks whether one particular predicate is a logical consequence of the belief base.
static LogicalFormula parseExpr(java.lang.String sExpr)
          returns some LogicalFormula that can be evaluated
 
Methods inherited from class jason.asSyntax.BinaryStructure
getLHS, getRHS, isUnary, toString
 
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.Atom
getFunctor
 
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
 

Constructor Detail

RelExpr

public RelExpr(Term t1,
               RelExpr.RelationalOp oper,
               Term t2)
Method Detail

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