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, isConjunctiveClause, resolvableWith, resolveWith, toBlakeCanonicalForm, toDnffinalize, getClass, notify, notifyAll, wait, wait, waitgetPredicateClsprivate 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 Atompublic java.util.Set<PropositionalPredicate> getPredicates()
SimpleLogicalFormulagetPredicates in interface SimpleLogicalFormulagetPredicates in class PropositionalFormulapublic java.lang.String toString()
toString in class java.lang.Objectpublic PropositionalFormula collapseAssociativeFormulas()
PropositionalFormulacollapseAssociativeFormulas in class PropositionalFormulapublic PropositionalSignature getSignature()
FormulagetSignature in interface FormulagetSignature in class PropositionalFormulapublic int hashCode()
hashCode in interface SimpleLogicalFormulahashCode in class PropositionalFormulapublic boolean equals(java.lang.Object obj)
equals in interface SimpleLogicalFormulaequals in class PropositionalFormulapublic PropositionalFormula toNnf()
PropositionalFormulatoNnf in class PropositionalFormulapublic Proposition clone()
SimpleLogicalFormulaclone in interface SimpleLogicalFormulaclone in class PropositionalFormulapublic PropositionalFormula trim()
PropositionalFormulatrim in class PropositionalFormulapublic void addArgument(Term<?> arg)
AtomaddArgument in interface Atomarg - The next argumentpublic java.util.List<? extends Term<?>> getArguments()
getArguments in interface Atompublic boolean isComplete()
isComplete in interface Atompublic java.util.Set<Proposition> getAtoms()
SimpleLogicalFormulagetAtoms in interface SimpleLogicalFormulagetAtoms in class PropositionalFormulapublic boolean isLiteral()
isLiteral in interface SimpleLogicalFormulaisLiteral in class PropositionalFormulapublic java.util.Set<PropositionalFormula> getLiterals()
PropositionalFormulagetLiterals in class PropositionalFormulapublic Atom.RETURN_SET_PREDICATE setPredicate(Predicate predicate)
AtomsetPredicate in interface Atompublic int compareTo(Proposition o)
compareTo in interface java.lang.Comparable<Proposition>public Conjunction toCnf()
PropositionalFormulatoCnf in class PropositionalFormulapublic int numberOfOccurrences(Proposition p)
PropositionalFormulanumberOfOccurrences in class PropositionalFormulap - some propositionpublic PropositionalFormula replace(Proposition p, PropositionalFormula f, int i)
PropositionalFormulareplace in class PropositionalFormulap - some propositionf - some formulai - the index of the propositionpublic java.util.Set<PossibleWorld> getModels(PropositionalSignature sig)
PropositionalFormulagetModels in class PropositionalFormulasig - some propositional signature