Package net.sf.tweety.arg.lp.syntax
Class ArgumentationKnowledgeBase
- java.lang.Object
-
- net.sf.tweety.commons.BeliefSet<Argument,FolSignature>
-
- net.sf.tweety.arg.lp.syntax.ArgumentationKnowledgeBase
-
- All Implemented Interfaces:
java.lang.Iterable<Argument>
,java.util.Collection<Argument>
,BeliefBase
public class ArgumentationKnowledgeBase extends BeliefSet<Argument,FolSignature>
Instances of this class represent the set of minimal arguments from a extended logic program- Author:
- Sebastian Homann
-
-
Field Summary
-
Fields inherited from class net.sf.tweety.commons.BeliefSet
EQUALS_USES_SIGNATURE, signature
-
-
Constructor Summary
Constructors Constructor Description ArgumentationKnowledgeBase(Program program)
-
Method Summary
Modifier and Type Method Description java.util.Set<Argument>
getArguments()
Returns all minimal arguments constructible from the extended logic programprivate java.util.Set<Argument>
getArguments(java.util.LinkedList<ASPRule> rules)
Recursively constructions minimal arguments in a bottom-up fashion.private java.util.Set<ASPLiteral>
getDerivableLiterals(java.util.Collection<ASPRule> rules)
This method returns the set of conclusions of all rules in the collection of rules given.Signature
getMinimalSignature()
Returns the signature of the language of this knowledge base.private java.util.Set<ASPLiteral>
getOpenLiterals(java.util.Collection<ASPRule> rules)
Returns the set of non-default-negated literals that are part of the premise of some rule but not the conclusion of some other ruleprotected FolSignature
instantiateSignature()
Instantiates the signature which is attached to the belief base.private boolean
isTrue(ASPRule rule, java.util.Set<ASPLiteral> literals)
Returns true iff each non-default-negated literal in the premise of rule is contained in the set of literals-
Methods inherited from class net.sf.tweety.commons.BeliefSet
add, addAll, clear, contains, containsAll, equals, getSignature, hashCode, instantiateSet, isEmpty, iterator, remove, removeAll, retainAll, setSignature, size, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
program
private Program program
-
-
Constructor Detail
-
ArgumentationKnowledgeBase
public ArgumentationKnowledgeBase(Program program)
-
-
Method Detail
-
getArguments
public java.util.Set<Argument> getArguments()
Returns all minimal arguments constructible from the extended logic program- Returns:
- all minimal arguments constructible from the extended logic program
-
getArguments
private java.util.Set<Argument> getArguments(java.util.LinkedList<ASPRule> rules)
Recursively constructions minimal arguments in a bottom-up fashion.- Parameters:
rules
- A set of rules already part of the argument- Returns:
- a set of minimal arguments containing the given set of rules
-
getOpenLiterals
private java.util.Set<ASPLiteral> getOpenLiterals(java.util.Collection<ASPRule> rules)
Returns the set of non-default-negated literals that are part of the premise of some rule but not the conclusion of some other rule- Parameters:
rules
- a set of rules- Returns:
- the set of non-default-negated literals
-
getDerivableLiterals
private java.util.Set<ASPLiteral> getDerivableLiterals(java.util.Collection<ASPRule> rules)
This method returns the set of conclusions of all rules in the collection of rules given.- Parameters:
rules
- a collection of rules- Returns:
- the set of conclusions of said rules
-
isTrue
private boolean isTrue(ASPRule rule, java.util.Set<ASPLiteral> literals)
Returns true iff each non-default-negated literal in the premise of rule is contained in the set of literals- Parameters:
rule
- an elp ruleliterals
- a set of literals- Returns:
- true iff each non-default-negated literal in the premise of rule is contained in the set of literals
-
getMinimalSignature
public Signature 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.
-
instantiateSignature
protected FolSignature instantiateSignature()
Description copied from class:BeliefSet
Instantiates the signature which is attached to the belief base.- Specified by:
instantiateSignature
in classBeliefSet<Argument,FolSignature>
- Returns:
- the signature of this belief base
-
-