jason.asSyntax
Class LogExpr
java.lang.Object
jason.asSyntax.DefaultTerm
jason.asSyntax.Literal
jason.asSyntax.Atom
jason.asSyntax.Structure
jason.asSyntax.BinaryStructure
jason.asSyntax.LogExpr
- All Implemented Interfaces:
- LogicalFormula, Term, ToDOM, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Term>
public class LogExpr
- extends BinaryStructure
- implements LogicalFormula
Represents a logical formula with some logical operator ("&", "|", "not").
- 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 |
EMPTY_UNIF_LIST
public static final java.util.List<Unifier> EMPTY_UNIF_LIST
LogExpr
public LogExpr(LogicalFormula f1,
LogExpr.LogicalOp oper,
LogicalFormula f2)
LogExpr
public LogExpr(LogExpr.LogicalOp oper,
LogicalFormula f)
getLHS
public LogicalFormula getLHS()
- gets the LHS of this Expression
- Overrides:
getLHS
in class BinaryStructure
getRHS
public LogicalFormula getRHS()
- gets the RHS of this Expression
- Overrides:
getRHS
in class BinaryStructure
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
createUnifIterator
public static java.util.Iterator<Unifier> createUnifIterator(Unifier... unifs)
- creates an iterator for a list of unifiers
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 LogExpr.LogicalOp 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