Package net.sf.tweety.logics.pl.syntax
Class PlBeliefSet
- java.lang.Object
-
- net.sf.tweety.commons.BeliefSet<PlFormula,PlSignature>
-
- net.sf.tweety.logics.pl.syntax.PlBeliefSet
-
- All Implemented Interfaces:
java.lang.Iterable<PlFormula>
,java.util.Collection<PlFormula>
,BeliefBase
- Direct Known Subclasses:
CompilationNode
,DeductiveKnowledgeBase
public class PlBeliefSet extends BeliefSet<PlFormula,PlSignature>
This class represents a knowledge base of propositional formulae.- Author:
- Matthias Thimm
-
-
Field Summary
-
Fields inherited from class net.sf.tweety.commons.BeliefSet
EQUALS_USES_SIGNATURE
-
-
Constructor Summary
Constructors Constructor Description PlBeliefSet()
Creates a new (empty) knowledge base.PlBeliefSet(java.util.Collection<? extends PlFormula> formulas)
Creates a new knowledge base with the given set of formulas.
-
Method Summary
Modifier and Type Method Description java.util.List<PlFormula>
getCanonicalOrdering()
Force ordering on belief set based on comparison of hash codes.PlSignature
getMinimalSignature()
Returns the signature of the language of this knowledge base.java.util.Collection<PlBeliefSet>
getSyntaxComponents()
Returns the set of syntax components of this belief set, i.e.Conjunction
toCnf()
This method returns this belief set in conjunctive normal form (CNF).-
Methods inherited from class net.sf.tweety.commons.BeliefSet
add, add, addAll, clear, contains, containsAll, equals, getSignature, hashCode, isEmpty, iterator, remove, removeAll, retainAll, setSignature, size, toArray, toArray, toString
-
-
-
-
Constructor Detail
-
PlBeliefSet
public PlBeliefSet()
Creates a new (empty) knowledge base.
-
PlBeliefSet
public PlBeliefSet(java.util.Collection<? extends PlFormula> formulas)
Creates a new knowledge base with the given set of formulas.- Parameters:
formulas
- a set of formulas.
-
-
Method Detail
-
toCnf
public Conjunction toCnf()
This method returns this belief set in conjunctive normal form (CNF). A formula is in CNF iff it is a conjunction of disjunctions and in NNF.- Returns:
- the formula in CNF.
-
getSyntaxComponents
public java.util.Collection<PlBeliefSet> getSyntaxComponents()
Returns the set of syntax components of this belief set, i.e. a partitioning {K1,...,Kn} of K (a disjoint union K1u...uKn=K) such that the signatures of K1,...,Kn are pairwise disjoint.- Returns:
- the set of syntax components of this belief set
-
getCanonicalOrdering
public java.util.List<PlFormula> getCanonicalOrdering()
Force ordering on belief set based on comparison of hash codes.- Returns:
- list of "canonically" ordered formulas
- See Also:
PlBeliefSet.PlFormulaHashCodeComparator
-
getMinimalSignature
public PlSignature getMinimalSignature()
Description copied from interface:BeliefBase
Returns the signature of the language of this knowledge base.- Returns:
- the signature of the language of this knowledge base.
-
-