public class Rule extends LiteralImpl
emptyTermArray, emptyTermList
LFalse, LNeg, LPos, LTrue, predicateIndicatorCache
hashCodeCache, srcInfo
Constructor and Description |
---|
Rule(Literal head,
LogicalFormula body) |
Rule(Rule r,
Unifier u) |
Modifier and Type | Method and Description |
---|---|
protected int |
calcHashCode() |
Term |
capply(Unifier u)
clone and applies together (and faster than clone and then apply)
|
Rule |
clone()
make a deep copy of the terms
|
void |
countVars(java.util.Map<VarTerm,java.lang.Integer> c) |
boolean |
equals(java.lang.Object o) |
org.w3c.dom.Element |
getAsDOM(org.w3c.dom.Document document)
get as XML
|
LogicalFormula |
getBody() |
boolean |
hasVar(VarTerm t,
Unifier u) |
Literal |
headCApply(Unifier u) |
Literal |
headClone() |
boolean |
isRule() |
Literal |
makeVarsAnnon(Unifier un)
replaces all variables of the term for unnamed variables (_).
|
java.lang.String |
toString() |
canBeAddedInBB, compareTo, getErrorMsg, getPredicateIndicator, isAtom, negated, setNegated
addAnnot, addAnnots, addAnnots, addSource, clearAnnots, createSource, delAnnot, delAnnots, delSource, delSources, equalsAsStructure, getAnnot, getAnnots, getAnnots, getSources, hasAnnot, hasAnnot, hasSource, hasSource, hasSubsetAnnot, hasSubsetAnnot, importAnnots, isGround, isPred, parsePred, setAnnots, toStringAsTerm
addTerm, addTerms, addTerms, delTerm, getArity, getSingletonVars, getTerm, getTerms, getTermsSize, hasTerm, isStructure, isUnary, makeTermsAnnon, makeVarsAnnon, parse, setTerm, setTerms, subsumes, varToReplace
getFunctor
copy, forceFullLiteralImpl, getAsListOfTerms, getTermsArray, isLiteral, logicalConsequence, newFromListOfTerms, parseLiteral
getCyclicVar, getSrcInfo, hashCode, isArithExpr, isCyclicTerm, isInternalAction, isList, isNumeric, isPlanBody, isString, isUnnamedVar, isVar, resetHashCodeCache, setSrcInfo
finalize, getClass, notify, notifyAll, wait, wait, wait
getCyclicVar, getSrcInfo, isArithExpr, isCyclicTerm, isInternalAction, isList, isNumeric, isPlanBody, isString, isUnnamedVar, isVar, setSrcInfo
public Rule(Literal head, LogicalFormula body)
public boolean isRule()
isRule
in interface Term
isRule
in class DefaultTerm
public boolean equals(java.lang.Object o)
equals
in interface Term
equals
in class LiteralImpl
protected int calcHashCode()
calcHashCode
in class LiteralImpl
public LogicalFormula getBody()
public Literal makeVarsAnnon(Unifier un)
Literal
makeVarsAnnon
in class Pred
un
- is the unifier that contains the map of replacementspublic Term capply(Unifier u)
Term
capply
in interface Term
capply
in class LiteralImpl
public Rule clone()
Structure
clone
in interface Term
clone
in class LiteralImpl
public Literal headClone()
public java.lang.String toString()
toString
in class LiteralImpl
public void countVars(java.util.Map<VarTerm,java.lang.Integer> c)
public org.w3c.dom.Element getAsDOM(org.w3c.dom.Document document)
getAsDOM
in interface ToDOM
getAsDOM
in class LiteralImpl