public abstract class PropositionalFormula extends Object implements net.sf.tweety.logics.commons.syntax.interfaces.ClassicalFormula
| Constructor and Description |
|---|
PropositionalFormula() |
| Modifier and Type | Method and Description |
|---|---|
abstract PropositionalFormula |
clone() |
abstract PropositionalFormula |
collapseAssociativeFormulas()
This method collapses all associative operations appearing
in this term, e.g.
|
Conjunction |
combineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjuctable f) |
Disjunction |
combineWithOr(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable f) |
net.sf.tweety.logics.commons.syntax.interfaces.ClassicalFormula |
complement() |
abstract boolean |
equals(Object other) |
abstract Set<Proposition> |
getAtoms() |
abstract Set<PropositionalFormula> |
getLiterals()
Returns all literals, i.e.
|
Set<PossibleWorld> |
getModels()
Returns the set of models of this formula wrt.
|
abstract Set<PossibleWorld> |
getModels(PropositionalSignature sig)
Returns the set of models of this formula wrt.
|
Class<PropositionalPredicate> |
getPredicateCls() |
abstract Set<PropositionalPredicate> |
getPredicates() |
Collection<PropositionalFormula> |
getPrimeImplicants()
Returns the set of prime implicants of this formula.
|
PropositionalSignature |
getSignature() |
net.sf.tweety.math.probability.Probability |
getUniformProbability()
Returns this formula's probability in the uniform distribution.
|
abstract int |
hashCode() |
boolean |
isConjunctiveClause()
Checks whether this formula is a conjunctive clause,
i.e.
|
boolean |
isLiteral() |
abstract int |
numberOfOccurrences(Proposition p)
Returns the number of occurrences of the given proposition
within this formula
|
abstract PropositionalFormula |
replace(Proposition p,
PropositionalFormula f,
int i)
Replaces the ith instance of the proposition p by f.
|
boolean |
resolvableWith(PropositionalFormula other)
Checks whether this formula (which must be a conjunction of literals) is
resolvable with the given formulas (which is also a conjunction of literals,
i.e.
|
Conjunction |
resolveWith(PropositionalFormula other)
Resolves this formula with the given one (both have to be conjunctive
clauses) and returns some resolvent.
|
PropositionalFormula |
toBlakeCanonicalForm()
This method returns this formula in Blake canonical form.
|
abstract Conjunction |
toCnf()
This method returns this formula in conjunctive normal form (CNF).
|
PropositionalFormula |
toDnf()
This method returns this formula in disjunctive normal form (DNF).
|
abstract PropositionalFormula |
toNnf()
This method returns this formula in negation normal form (NNF).
|
abstract PropositionalFormula |
trim()
Removes duplicates (identical formulas) from conjunctions and disjunctions and
duplicate negations.
|
public Class<PropositionalPredicate> getPredicateCls()
getPredicateCls in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulapublic PropositionalSignature getSignature()
getSignature in interface net.sf.tweety.commons.Formulapublic abstract Set<Proposition> getAtoms()
getAtoms in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulapublic abstract Set<PropositionalFormula> getLiterals()
public Conjunction combineWithAnd(net.sf.tweety.logics.commons.syntax.interfaces.Conjuctable f)
combineWithAnd in interface net.sf.tweety.logics.commons.syntax.interfaces.Conjuctablepublic Disjunction combineWithOr(net.sf.tweety.logics.commons.syntax.interfaces.Disjunctable f)
combineWithOr in interface net.sf.tweety.logics.commons.syntax.interfaces.Disjunctablepublic abstract PropositionalFormula collapseAssociativeFormulas()
public abstract Set<PropositionalPredicate> getPredicates()
getPredicates in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulapublic abstract PropositionalFormula trim()
public net.sf.tweety.math.probability.Probability getUniformProbability()
getUniformProbability in interface net.sf.tweety.logics.commons.syntax.interfaces.ProbabilityAwarepublic abstract PropositionalFormula toNnf()
public abstract Conjunction toCnf()
public PropositionalFormula toDnf()
public boolean resolvableWith(PropositionalFormula other)
other - a conjunction of literalspublic Conjunction resolveWith(PropositionalFormula other)
other - a conjunction of formulaspublic PropositionalFormula toBlakeCanonicalForm()
public Collection<PropositionalFormula> getPrimeImplicants()
public Set<PossibleWorld> getModels()
public abstract Set<PossibleWorld> getModels(PropositionalSignature sig)
sig - some propositional signaturepublic net.sf.tweety.logics.commons.syntax.interfaces.ClassicalFormula complement()
complement in interface net.sf.tweety.logics.commons.syntax.interfaces.Invertablepublic boolean isConjunctiveClause()
public abstract int numberOfOccurrences(Proposition p)
p - some propositionpublic abstract PropositionalFormula replace(Proposition p, PropositionalFormula f, int i)
p - some propositionf - some formulai - the index of the propositionpublic boolean isLiteral()
isLiteral in interface net.sf.tweety.logics.commons.syntax.interfaces.SimpleLogicalFormulapublic abstract boolean equals(Object other)
public abstract int hashCode()
public abstract PropositionalFormula clone()
Copyright © 2018. All rights reserved.