public class Proposition extends PropositionalFormula implements Atom, java.lang.Comparable<Proposition>
Atom.AtomImpl, Atom.RETURN_SET_PREDICATE
Modifier and Type | Field and Description |
---|---|
private PropositionalPredicate |
predicate
The name of the proposition
|
Constructor and Description |
---|
Proposition()
Default-Ctor for dynamic instantiation
|
Proposition(Proposition other) |
Proposition(java.lang.String name)
Creates a new proposition of the given name.
|
Modifier and Type | Method and Description |
---|---|
void |
addArgument(Term<?> arg)
Adds an argument to the atom's argument list
|
Proposition |
clone()
Creates a deep copy of this formula
|
PropositionalFormula |
collapseAssociativeFormulas()
This method collapses all associative operations appearing
in this term, e.g.
|
int |
compareTo(Proposition o) |
boolean |
equals(java.lang.Object obj) |
java.util.List<? extends Term<?>> |
getArguments() |
java.util.Set<Proposition> |
getAtoms()
Processes the set of all atoms which appear in this formula
|
java.util.Set<PropositionalFormula> |
getLiterals()
Returns all literals, i.e.
|
java.util.Set<PossibleWorld> |
getModels(PropositionalSignature sig)
Returns the set of models of this formula wrt.
|
java.lang.String |
getName() |
PropositionalPredicate |
getPredicate() |
java.util.Set<PropositionalPredicate> |
getPredicates()
Processes the set of all predicates which appear in this
formula
|
PropositionalSignature |
getSignature()
Returns the signature of the language of this formula.
|
int |
hashCode() |
boolean |
isComplete() |
boolean |
isLiteral() |
int |
numberOfOccurrences(Proposition p)
Returns the number of occurrences of the given proposition
within this formula
|
PropositionalFormula |
replace(Proposition p,
PropositionalFormula f,
int i)
Replaces the ith instance of the proposition p by f.
|
Atom.RETURN_SET_PREDICATE |
setPredicate(Predicate predicate)
Changes the predicate of the atom.
|
Conjunction |
toCnf()
This method returns this formula in conjunctive normal form (CNF).
|
PropositionalFormula |
toNnf()
This method returns this formula in negation normal form (NNF).
|
java.lang.String |
toString() |
PropositionalFormula |
trim()
Removes duplicates (identical formulas) from conjunctions and disjunctions and
duplicate negations.
|
combineWithAnd, combineWithOr, complement, getModels, getPredicateCls, getPrimeImplicants, getUniformProbability, isClause, isConjunctiveClause, resolvableWith, resolveWith, toBlakeCanonicalForm, toDnf
finalize, getClass, notify, notifyAll, wait, wait, wait
getPredicateCls
private PropositionalPredicate predicate
public Proposition()
public Proposition(java.lang.String name)
name
- the name of the proposition.public Proposition(Proposition other)
public java.lang.String getName()
public PropositionalPredicate getPredicate()
getPredicate
in interface Atom
public java.util.Set<PropositionalPredicate> getPredicates()
SimpleLogicalFormula
getPredicates
in interface SimpleLogicalFormula
getPredicates
in class PropositionalFormula
public java.lang.String toString()
toString
in class java.lang.Object
public PropositionalFormula collapseAssociativeFormulas()
PropositionalFormula
collapseAssociativeFormulas
in class PropositionalFormula
public PropositionalSignature getSignature()
Formula
getSignature
in interface Formula
getSignature
in class PropositionalFormula
public int hashCode()
hashCode
in interface SimpleLogicalFormula
hashCode
in class PropositionalFormula
public boolean equals(java.lang.Object obj)
equals
in interface SimpleLogicalFormula
equals
in class PropositionalFormula
public PropositionalFormula toNnf()
PropositionalFormula
toNnf
in class PropositionalFormula
public Proposition clone()
SimpleLogicalFormula
clone
in interface SimpleLogicalFormula
clone
in class PropositionalFormula
public PropositionalFormula trim()
PropositionalFormula
trim
in class PropositionalFormula
public void addArgument(Term<?> arg)
Atom
addArgument
in interface Atom
arg
- The next argumentpublic java.util.List<? extends Term<?>> getArguments()
getArguments
in interface Atom
public boolean isComplete()
isComplete
in interface Atom
public java.util.Set<Proposition> getAtoms()
SimpleLogicalFormula
getAtoms
in interface SimpleLogicalFormula
getAtoms
in class PropositionalFormula
public boolean isLiteral()
isLiteral
in interface SimpleLogicalFormula
isLiteral
in class PropositionalFormula
public java.util.Set<PropositionalFormula> getLiterals()
PropositionalFormula
getLiterals
in class PropositionalFormula
public Atom.RETURN_SET_PREDICATE setPredicate(Predicate predicate)
Atom
setPredicate
in interface Atom
public int compareTo(Proposition o)
compareTo
in interface java.lang.Comparable<Proposition>
public Conjunction toCnf()
PropositionalFormula
toCnf
in class PropositionalFormula
public int numberOfOccurrences(Proposition p)
PropositionalFormula
numberOfOccurrences
in class PropositionalFormula
p
- some propositionpublic PropositionalFormula replace(Proposition p, PropositionalFormula f, int i)
PropositionalFormula
replace
in class PropositionalFormula
p
- some propositionf
- some formulai
- the index of the propositionpublic java.util.Set<PossibleWorld> getModels(PropositionalSignature sig)
PropositionalFormula
getModels
in class PropositionalFormula
sig
- some propositional signature