Class KnowledgeBase
java.lang.Object
org.tweetyproject.commons.BeliefSet<PlFormula,PlSignature>
org.tweetyproject.logics.pl.syntax.PlBeliefSet
org.tweetyproject.arg.dung.causal.syntax.KnowledgeBase
- All Implemented Interfaces:
Iterable<PlFormula>
,Collection<PlFormula>
,BeliefBase
- Direct Known Subclasses:
CausalKnowledgeBase
This class describes a knowledge base.
Reference: "Argumentation-based Causal and Counterfactual Reasoning" by
Lars Bengel, Lydia Blümel, Tjitze Rienstra and Matthias Thimm, published at 1st International Workshop on Argumentation
for eXplainable AI (ArgXAI, co-located with COMMA ’22), September 12, 2022
- Version:
- TweetyProject 1.23
- Author:
- Julian Sander
-
Field Summary
Fields inherited from class org.tweetyproject.commons.BeliefSet
EQUALS_USES_SIGNATURE
-
Constructor Summary
ConstructorDescriptionKnowledgeBase
(Set<PlFormula> assumptions) Constructs a knowledge base with a specified set of background assumptions. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addAssumption
(PlFormula assumption) Adds a background assumption to this knowledge base.clone()
boolean
Computes if a specified conclusion could be drawn from adding the specified premises to this instance.Retrieves all beliefs (propositional formulas) stored in this knowledge base.boolean
removeAssumption
(PlFormula assumption) Removes a background assumption from this knowledge base.Methods inherited from class org.tweetyproject.logics.pl.syntax.PlBeliefSet
getCanonicalOrdering, getMinimalSignature, getSyntaxComponents, toCnf
Methods inherited from class org.tweetyproject.commons.BeliefSet
add, add, addAll, clear, contains, containsAll, equals, getSignature, hashCode, isEmpty, iterator, remove, removeAll, retainAll, setSignature, size, toArray, toArray, toString, toString
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Constructor Details
-
KnowledgeBase
-
-
Method Details
-
addAssumption
Adds a background assumption to this knowledge base.- Parameters:
assumption
- The PlFormula representing the assumption to be added.- Returns:
- true if the assumption was successfully added, false if it already exists in the set.
-
entails
Computes if a specified conclusion could be drawn from adding the specified premises to this instance.- Parameters:
premises
- Set of formulas, which will be added to this knowledge base.conclusion
- Formula, which is checked to be a conclusion of the combination of this instance and the specified premises or not.- Returns:
- TRUE iff the specified formula is a conclusion of this knowledge base and the specified set of premises.
-
getAssumptions
-
getBeliefs
-
removeAssumption
Removes a background assumption from this knowledge base.- Parameters:
assumption
- The assumption to be removed.- Returns:
- true if the assumption was successfully removed, false if it was not found in the set.
-
clone
-