C
- The type of the formulas used for conclusionsP
- The type of the formulas used for the premiseT
- The type of the rules used in the programpublic interface LogicProgram<C extends Formula,P extends Formula,T extends Rule<?,?>> extends BeliefBase
Modifier and Type | Method and Description |
---|---|
void |
addFact(C fact)
Adds the given fact to the program
|
LogicProgram<?,?,?> |
exchange(Term<?> v,
Term<?> t)
Substitutes all occurrences of term "v" in this formula
by term "t" and at the same time replaces all occurrences of term "t"
by term "v" and eventually returns the new formula.
|
Signature |
getSignature()
Returns the signature of the language of this knowledge base.
|
LogicProgram<?,?,?> |
substitute(java.util.Map<? extends Term<?>,? extends Term<?>> map)
Substitutes all occurrences of all terms "v" in map.keyset() in this formula
by map.get(v) and returns the new formula.
|
LogicProgram<?,?,?> |
substitute(Term<?> v,
Term<?> t)
Substitutes all occurrences of term "v" in this formula
by term "t" and returns the new formula.
|
java.lang.String |
toString() |
void addFact(C fact)
fact
- Signature getSignature()
BeliefBase
getSignature
in interface BeliefBase
LogicProgram<?,?,?> substitute(Term<?> v, Term<?> t) throws java.lang.IllegalArgumentException
v
- the term to be substituted.t
- the term to substitute.java.lang.IllegalArgumentException
- if "v" and "t" are of different sortsLogicProgram<?,?,?> substitute(java.util.Map<? extends Term<?>,? extends Term<?>> map) throws java.lang.IllegalArgumentException
map
- a mapping defining which terms to be substituted.java.lang.IllegalArgumentException
- if any term and its mapping are of different sortsLogicProgram<?,?,?> exchange(Term<?> v, Term<?> t) throws java.lang.IllegalArgumentException
v
- a term.t
- a term.java.lang.IllegalArgumentException
- if "v" and "t" are of different sortsjava.lang.String toString()
toString
in interface BeliefBase
toString
in class java.lang.Object