public class DefaultRule extends RelationalFormula
| Modifier and Type | Field and Description |
|---|---|
private FolFormula |
conc
The conclusion of the default rule
|
private java.util.Collection<FolFormula> |
jus
The justifications of the default rule
|
private FolFormula |
pre
The prerequisite of the default rule
|
| Constructor and Description |
|---|
DefaultRule()
an empty Default Rule
|
DefaultRule(FolFormula pre,
java.util.Collection<FolFormula> jus,
FolFormula conc) |
DefaultRule(FolFormula pre,
FolFormula jus,
FolFormula conc) |
| Modifier and Type | Method and Description |
|---|---|
RelationalFormula |
clone()
Creates a deep copy of this formula
|
Conjunction |
combineWithAnd(Conjuctable formula)
Returns a conjunction of this and the given formula.
|
Disjunction |
combineWithOr(Disjunctable formula) |
RelationalFormula |
complement() |
boolean |
containsQuantifier()
Checks whether this formula contains any quantification.
|
boolean |
equals(java.lang.Object o) |
java.util.Set<FOLAtom> |
getAtoms()
Processes the set of all atoms which appear in this formula
|
FolFormula |
getConclusion() |
java.util.Set<Functor> |
getFunctors() |
java.util.Collection<FolFormula> |
getJustification() |
java.util.Set<? extends Predicate> |
getPredicates()
Processes the set of all predicates which appear in this
formula
|
FolFormula |
getPrerequisite() |
java.util.Set<Variable> |
getQuantifierVariables() |
FolSignature |
getSignature()
Returns the signature of the language of this formula.
|
java.util.Set<Term<?>> |
getTerms() |
<C extends Term<?>> |
getTerms(java.lang.Class<C> cls)
Processes the set containing all terms of type C.
|
java.util.Set<Variable> |
getUnboundVariables() |
Probability |
getUniformProbability() |
int |
hashCode() |
boolean |
isClosed()
Checks whether this formula is closed, i.e.
|
boolean |
isClosed(java.util.Set<Variable> boundVariables)
Checks whether this formula is closed, i.e.
|
boolean |
isLiteral() |
boolean |
isNormal(DefaultTheory dt)
Tests, whether the default is normal
normal ^= a:c/c
|
boolean |
isWellBound()
Checks whether this formula is well-bound, i.e.
|
boolean |
isWellBound(java.util.Set<Variable> boundVariables)
Checks whether this formula is well-bound, i.e.
|
RelationalFormula |
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() |
allGroundInstances, allSubstitutions, containsTermsOfType, exchange, getFormula, getPredicateCls, getSatisfactionRatio, isGround, isWellFormed, substituteprivate FolFormula pre
private java.util.Collection<FolFormula> jus
private FolFormula conc
public DefaultRule()
public DefaultRule(FolFormula pre, FolFormula jus, FolFormula conc) throws ParserException
ParserExceptionpublic DefaultRule(FolFormula pre, java.util.Collection<FolFormula> jus, FolFormula conc) throws ParserException
ParserExceptionpublic boolean isNormal(DefaultTheory dt)
public FolFormula getPrerequisite()
public java.util.Collection<FolFormula> getJustification()
public FolFormula getConclusion()
public java.util.Set<? extends Predicate> getPredicates()
SimpleLogicalFormulapublic boolean isLiteral()
public java.util.Set<Variable> getQuantifierVariables()
public java.util.Set<Variable> getUnboundVariables()
public boolean containsQuantifier()
QuantifiedFormulapublic boolean isWellBound()
QuantifiedFormulapublic boolean isWellBound(java.util.Set<Variable> boundVariables)
QuantifiedFormulaboundVariables - the variables assumed to be bound.public boolean isClosed()
QuantifiedFormulapublic boolean isClosed(java.util.Set<Variable> boundVariables)
QuantifiedFormulaboundVariables - the variables assumed to be bound.public java.util.Set<Term<?>> getTerms()
public <C extends Term<?>> java.util.Set<C> getTerms(java.lang.Class<C> cls)
LogicStructurecls - The Class structure containing type information about the
searched termpublic java.util.Set<FOLAtom> getAtoms()
SimpleLogicalFormulagetAtoms in interface SimpleLogicalFormulagetAtoms in class RelationalFormulapublic java.util.Set<Functor> getFunctors()
getFunctors in class RelationalFormulapublic RelationalFormula substitute(Term<?> v, Term<?> t) throws java.lang.IllegalArgumentException
RelationalFormulasubstitute in interface ComplexLogicalFormulasubstitute in class RelationalFormulav - the term to be substituted.t - the term to substitute.java.lang.IllegalArgumentException - if "v" and "t" are of different sorts
(NOTE: this exception is only thrown when "v" actually appears in this
formula).public Probability getUniformProbability()
getUniformProbability in interface ProbabilityAwaregetUniformProbability in class RelationalFormulapublic RelationalFormula complement()
complement in interface Invertablecomplement in class RelationalFormulapublic Disjunction combineWithOr(Disjunctable formula)
combineWithOr in interface DisjunctablecombineWithOr in class RelationalFormulaformula - a formula to be combined with OR and this.public Conjunction combineWithAnd(Conjuctable formula)
ConjuctablecombineWithAnd in interface ConjuctablecombineWithAnd in class RelationalFormulaformula - a formula to be combined with AND and this.public FolSignature getSignature()
FormulagetSignature in interface FormulagetSignature in class RelationalFormulapublic java.lang.String toString()
toString in class RelationalFormulapublic RelationalFormula clone()
SimpleLogicalFormulaclone in interface ComplexLogicalFormulaclone in interface SimpleLogicalFormulaclone in class RelationalFormulapublic int hashCode()
hashCode in interface SimpleLogicalFormulahashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface SimpleLogicalFormulaequals in class java.lang.Object