public class LogExpr extends BinaryStructure implements LogicalFormula
Modifier and Type | Class and Description |
---|---|
static class |
LogExpr.LogicalOp |
Literal.FalseLiteral, Literal.TrueLiteral
Modifier and Type | Field and Description |
---|---|
static java.util.List<Unifier> |
EMPTY_UNIF_LIST |
private static java.util.logging.Logger |
logger |
private LogExpr.LogicalOp |
op |
private static long |
serialVersionUID |
emptyTermArray, emptyTermList
DefaultNS, LFalse, LNeg, LPos, LTrue, predicateIndicatorCache
hashCodeCache, srcInfo
Constructor and Description |
---|
LogExpr(LogExpr.LogicalOp oper,
LogicalFormula f) |
LogExpr(LogicalFormula f1,
LogExpr.LogicalOp oper,
LogicalFormula f2) |
Modifier and Type | Method and Description |
---|---|
Term |
capply(Unifier u)
clone and applies together (and faster than clone and then apply)
|
LogicalFormula |
clone()
make a hard copy of the terms
|
Literal |
cloneNS(Atom newnamespace)
clone in another namespace
|
static java.util.Iterator<Unifier> |
createUnifIterator(Unifier... unifs)
creates an iterator for a list of unifiers
|
org.w3c.dom.Element |
getAsDOM(org.w3c.dom.Document document)
get as XML
|
LogicalFormula |
getLHS()
gets the LHS of this Expression
|
LogExpr.LogicalOp |
getOp()
gets the Operation of this Expression
|
LogicalFormula |
getRHS()
gets the RHS 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
|
toString
addTerm, addTerms, addTerms, calcHashCode, compareTo, countVars, delTerm, equals, getArity, getSingletonVars, getTerm, getTerms, getTermsSize, hasTerm, hasVar, isAtom, isGround, isStructure, isUnary, makeTermsAnnon, makeVarsAnnon, makeVarsAnnon, parse, setTerm, setTerms, subsumes, varToReplace
getFunctor, getNS
addAnnot, addAnnots, addAnnots, addSource, canBeAddedInBB, clearAnnots, copy, delAnnot, delAnnots, delSource, delSources, equalsAsStructure, forceFullLiteralImpl, getAnnot, getAnnots, getAnnots, getAsListOfTerms, getPredicateIndicator, getSources, getTermsArray, hasAnnot, hasAnnot, hasSource, hasSource, hasSubsetAnnot, hasSubsetAnnot, importAnnots, isLiteral, negated, newFromListOfTerms, parseLiteral, setAnnots, setNegated
getCyclicVar, getErrorMsg, getSrcInfo, hashCode, isArithExpr, isCyclicTerm, isInternalAction, isList, isNumeric, isPlanBody, isPred, isRule, isString, isUnnamedVar, isVar, resetHashCodeCache, setSrcInfo
finalize, getClass, notify, notifyAll, wait, wait, wait
countVars, equals, getCyclicVar, getSrcInfo, hasVar, isArithExpr, isAtom, isCyclicTerm, isGround, isInternalAction, isList, isLiteral, isNumeric, isPlanBody, isPred, isRule, isString, isStructure, isUnnamedVar, isVar, setSrcInfo, subsumes
private static final long serialVersionUID
private static java.util.logging.Logger logger
public static final java.util.List<Unifier> EMPTY_UNIF_LIST
private LogExpr.LogicalOp op
public LogExpr(LogicalFormula f1, LogExpr.LogicalOp oper, LogicalFormula f2)
public LogExpr(LogExpr.LogicalOp oper, LogicalFormula f)
public LogicalFormula getLHS()
getLHS
in class BinaryStructure
public LogicalFormula getRHS()
getRHS
in class BinaryStructure
public java.util.Iterator<Unifier> logicalConsequence(Agent ag, Unifier un)
Literal
logicalConsequence
in interface LogicalFormula
logicalConsequence
in class Literal
public static java.util.Iterator<Unifier> createUnifIterator(Unifier... unifs)
public static LogicalFormula parseExpr(java.lang.String sExpr)
public Term capply(Unifier u)
Term
public LogicalFormula clone()
public Literal cloneNS(Atom newnamespace)
Term
public LogExpr.LogicalOp getOp()
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
getAsDOM
in interface ToDOM
getAsDOM
in class BinaryStructure