public class ForallQuantifiedFormula extends FolFormula
| Modifier and Type | Field and Description |
|---|---|
protected QuantifiedFormulaSupport<FolFormula> |
support
This helper class implements common functionalities of quantified
formulas, meaning the implementation can delegate the method calls to the support
class.
|
| Constructor and Description |
|---|
ForallQuantifiedFormula(ForallQuantifiedFormula other) |
ForallQuantifiedFormula(RelationalFormula folFormula,
java.util.Set<Variable> variables)
Creates a new quantified folFormula with the given folFormula and variables.
|
ForallQuantifiedFormula(RelationalFormula folFormula,
Variable variable)
Creates a new quantified folFormula with the given folFormula and variable.
|
| Modifier and Type | Method and Description |
|---|---|
ForallQuantifiedFormula |
clone()
Creates a deep copy of this formula
|
FolFormula |
collapseAssociativeFormulas()
This method collapses all associative operations appearing
in this term, e.g.
|
boolean |
containsQuantifier()
Checks whether this formula contains any quantification.
|
boolean |
equals(java.lang.Object obj) |
java.util.Set<FOLAtom> |
getAtoms()
Processes the set of all atoms which appear in this formula
|
FolFormula |
getFormula() |
java.util.Set<Functor> |
getFunctors() |
java.util.Set<? extends Predicate> |
getPredicates()
Processes the set of all predicates which appear in this
formula
|
java.util.Set<FolFormula> |
getQuantifiedFormulas() |
java.util.Set<Variable> |
getQuantifierVariables() |
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() |
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 |
isDnf()
Checks whether this formula is in disjunctive normal form.
|
boolean |
isLiteral() |
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.
|
void |
setFormula(FolFormula formula) |
void |
setQuantifierVariables(java.util.Set<Variable> variables) |
ForallQuantifiedFormula |
substitute(Term<?> v,
Term<?> t)
Substitutes all occurrences of term "v" in this formula
by term "t" and returns the new formula.
|
FolFormula |
toNnf()
Makes the negation normal form of this formula.
|
java.lang.String |
toString() |
combineWithAnd, combineWithOr, complement, getSignature, getUniformProbability, toDnfallGroundInstances, allSubstitutions, containsTermsOfType, exchange, getPredicateCls, getSatisfactionRatio, isGround, isWellFormed, substitutefinalize, getClass, hashCode, notify, notifyAll, wait, wait, waithashCodeprotected QuantifiedFormulaSupport<FolFormula> support
public ForallQuantifiedFormula(RelationalFormula folFormula, java.util.Set<Variable> variables)
folFormula - the folFormula this quantified folFormula ranges over.variables - the variables of this quantified folFormula.public ForallQuantifiedFormula(RelationalFormula folFormula, Variable variable)
folFormula - the folFormula this quantified folFormula ranges over.variable - the variable of this quantified folFormula.public ForallQuantifiedFormula(ForallQuantifiedFormula other)
public java.util.Set<FolFormula> getQuantifiedFormulas()
public boolean equals(java.lang.Object obj)
equals in interface SimpleLogicalFormulaequals in class java.lang.Objectpublic FolFormula toNnf()
FolFormulatoNnf in class FolFormulapublic FolFormula collapseAssociativeFormulas()
FolFormulacollapseAssociativeFormulas in class FolFormulapublic ForallQuantifiedFormula substitute(Term<?> v, Term<?> t) throws java.lang.IllegalArgumentException
RelationalFormulasubstitute in interface ComplexLogicalFormulasubstitute in class FolFormulav - 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 java.lang.String toString()
toString in class RelationalFormulapublic ForallQuantifiedFormula clone()
SimpleLogicalFormulaclone in interface ComplexLogicalFormulaclone in interface SimpleLogicalFormulaclone in class FolFormulapublic FolFormula getFormula()
getFormula in interface QuantifiedFormulagetFormula in class RelationalFormulapublic java.util.Set<Variable> getQuantifierVariables()
getQuantifierVariables in interface QuantifiedFormulagetQuantifierVariables in class FolFormulapublic void setFormula(FolFormula formula)
public void setQuantifierVariables(java.util.Set<Variable> variables)
public java.util.Set<FOLAtom> getAtoms()
SimpleLogicalFormulagetAtoms in interface SimpleLogicalFormulagetAtoms in class RelationalFormulapublic java.util.Set<Functor> getFunctors()
getFunctors in class RelationalFormulapublic boolean isDnf()
FolFormulaisDnf in class FolFormulapublic java.util.Set<? extends Predicate> getPredicates()
SimpleLogicalFormulapublic boolean isLiteral()
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 term