Class KnowledgeBase

All Implemented Interfaces:
Iterable<PlFormula>, Collection<PlFormula>, BeliefBase
Direct Known Subclasses:
CausalKnowledgeBase

public class KnowledgeBase extends PlBeliefSet
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
  • Constructor Details

    • KnowledgeBase

      public KnowledgeBase(Set<PlFormula> assumptions)
      Constructs a knowledge base with a specified set of background assumptions.
      Parameters:
      assumptions - A set of propositional logic formulas representing the background assumptions.
  • Method Details

    • addAssumption

      public boolean addAssumption(PlFormula assumption)
      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

      public boolean entails(Set<PlFormula> premises, PlFormula conclusion)
      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

      public HashSet<PlFormula> getAssumptions()
      Returns:
      Set of PlFormula, which are the assumptions of this instance.
    • getBeliefs

      public HashSet<PlFormula> getBeliefs()
      Retrieves all beliefs (propositional formulas) stored in this knowledge base.
      Returns:
      A set of PlFormulas representing the beliefs held in this knowledge base.
    • removeAssumption

      public boolean removeAssumption(PlFormula assumption)
      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

      public KnowledgeBase clone()