public abstract class RelationalFormula extends Object implements net.sf.tweety.logics.commons.syntax.interfaces.ClassicalFormula, net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormula
| Constructor and Description |
|---|
RelationalFormula() |
| Modifier and Type | Method and Description |
|---|---|
Set<RelationalFormula> |
allGroundInstances(Set<net.sf.tweety.logics.commons.syntax.Constant> constants)
Computes all ground instances of this relational formula wrt.
|
Set<Map<net.sf.tweety.logics.commons.syntax.Variable,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>> |
allSubstitutions(Collection<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> terms)
Computes all possible substitutions, i.e.
|
abstract RelationalFormula |
clone() |
abstract Conjunction |
combineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjuctable formula) |
abstract Disjunction |
combineWithOr(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable formula) |
abstract RelationalFormula |
complement() |
<C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> |
containsTermsOfType(Class<C> cls) |
RelationalFormula |
exchange(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v,
net.sf.tweety.logics.commons.syntax.interfaces.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.
|
abstract Set<FOLAtom> |
getAtoms() |
RelationalFormula |
getFormula() |
abstract Set<net.sf.tweety.logics.commons.syntax.Functor> |
getFunctors() |
Class<net.sf.tweety.logics.commons.syntax.Predicate> |
getPredicateCls() |
double |
getSatisfactionRatio()
Returns the ratio of worlds not satisfying this formula to
worlds satisfying this formula.
|
FolSignature |
getSignature() |
abstract net.sf.tweety.math.probability.Probability |
getUniformProbability() |
boolean |
isGround()
Checks whether this formula is ground, i.e.
|
boolean |
isWellFormed()
Tests whether this formula is well-formed, i.e.
|
RelationalFormula |
substitute(Map<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> map)
Substitutes all occurrences of all terms "v" in map.keyset() in this formula
by map.get(v) and returns the new formula.
NOTE: variables bound to quantifiers are not substituted in their inner formulas even if they appear in the map. |
abstract RelationalFormula |
substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v,
net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t)
Substitutes all occurrences of term "v" in this formula
by term "t" and returns the new formula.
|
abstract String |
toString() |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcontainsQuantifier, getQuantifierVariables, getUnboundVariables, isClosed, isClosed, isWellBound, isWellBoundpublic Class<net.sf.tweety.logics.commons.syntax.Predicate> getPredicateCls()
getPredicateCls in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulapublic RelationalFormula getFormula()
getFormula in interface net.sf.tweety.logics.commons.syntax.interfaces.QuantifiedFormulapublic abstract Set<FOLAtom> getAtoms()
getAtoms in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulapublic abstract Set<net.sf.tweety.logics.commons.syntax.Functor> getFunctors()
public abstract RelationalFormula substitute(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t) throws IllegalArgumentException
substitute in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulav - the term to be substituted.t - the term to substitute.IllegalArgumentException - if "v" and "t" are of different sorts
(NOTE: this exception is only thrown when "v" actually appears in this
formula).public RelationalFormula exchange(net.sf.tweety.logics.commons.syntax.interfaces.Term<?> v, net.sf.tweety.logics.commons.syntax.interfaces.Term<?> t) throws IllegalArgumentException
exchange in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulav - a term.t - a term.IllegalArgumentException - if "v" and "t" are of different sortspublic RelationalFormula substitute(Map<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>,? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> map) throws IllegalArgumentException
substitute in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulamap - a mapping defining which terms to be substituted.IllegalArgumentException - if any term and its mapping are of different sorts
(NOTE: this exception is only thrown when the variable actually appears in this
formula).public Set<Map<net.sf.tweety.logics.commons.syntax.Variable,net.sf.tweety.logics.commons.syntax.interfaces.Term<?>>> allSubstitutions(Collection<? extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> terms) throws IllegalArgumentException
terms - a set of terms.IllegalArgumentException - if there is an unbound variable in this formula for
which there is no term in "terms" with the same sort.public Set<RelationalFormula> allGroundInstances(Set<net.sf.tweety.logics.commons.syntax.Constant> constants) throws IllegalArgumentException
constants - a set of constantsIllegalArgumentException - if there is an unbound variable in this formula for
which there is no constant in "constants" with the same sort.public double getSatisfactionRatio()
public abstract net.sf.tweety.math.probability.Probability getUniformProbability()
getUniformProbability in interface net.sf.tweety.logics.commons.syntax.interfaces.ProbabilityAwarepublic boolean isGround()
isGround in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulapublic boolean isWellFormed()
isWellFormed in interface net.sf.tweety.logics.commons.syntax.interfaces.ComplexLogicalFormulapublic FolSignature getSignature()
getSignature in interface net.sf.tweety.commons.Formulapublic <C extends net.sf.tweety.logics.commons.syntax.interfaces.Term<?>> boolean containsTermsOfType(Class<C> cls)
containsTermsOfType in interface net.sf.tweety.logics.commons.syntax.interfaces.LogicStructurepublic abstract RelationalFormula complement()
complement in interface net.sf.tweety.logics.commons.syntax.interfaces.Invertablepublic abstract Disjunction combineWithOr(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable formula)
combineWithOr in interface net.sf.tweety.logics.commons.syntax.interfaces.Disjunctablepublic abstract Conjunction combineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjuctable formula)
combineWithAnd in interface net.sf.tweety.logics.commons.syntax.interfaces.Conjuctablepublic abstract RelationalFormula clone()
Copyright © 2016. All rights reserved.