Class SimpleDefaultReasoner

java.lang.Object
org.tweetyproject.logics.rdl.reasoner.SimpleDefaultReasoner
All Implemented Interfaces:
ModelProvider<FolFormula,DefaultTheory,Extension>, QualitativeReasoner<DefaultTheory,FolFormula>, Reasoner<Boolean,DefaultTheory,FolFormula>

public class SimpleDefaultReasoner extends Object implements QualitativeReasoner<DefaultTheory,FolFormula>, ModelProvider<FolFormula,DefaultTheory,Extension>
Implements a naive reasoner for default logic based on exhaustive application of defaults in process trees.
Author:
Matthias Thimm, Nils Geilen
  • Constructor Details

    • SimpleDefaultReasoner

      public SimpleDefaultReasoner()
      Defaul Constructor
  • Method Details

    • getModels

      public Collection<Extension> getModels(DefaultTheory bbase)
      Description copied from interface: ModelProvider
      Returns a characterizing model of the given belief base
      Specified by:
      getModels in interface ModelProvider<FolFormula,DefaultTheory,Extension>
      Parameters:
      bbase - some belief base
      Returns:
      the (selected) models of the belief base
    • getModel

      public Extension getModel(DefaultTheory bbase)
      Description copied from interface: ModelProvider
      Returns a single (dedicated) model of the given belief base. If the implemented method allows for more than one dedicated model, the selection may be non-deterministic.
      Specified by:
      getModel in interface ModelProvider<FolFormula,DefaultTheory,Extension>
      Parameters:
      bbase - some belief base
      Returns:
      a selected model of the belief base.
    • query

      public Boolean query(DefaultTheory theory, FolFormula query)
      Description copied from interface: QualitativeReasoner
      Queries the given belief base with the provided formula and returns a boolean result. The result indicates whether the formula is entailed or satisfied by the belief base according to the qualitative reasoning method implemented by the reasoner.
      Specified by:
      query in interface QualitativeReasoner<DefaultTheory,FolFormula>
      Specified by:
      query in interface Reasoner<Boolean,DefaultTheory,FolFormula>
      Parameters:
      theory - The belief base to be queried.
      query - The formula for which the query is made.
      Returns:
      `TRUE` if the formula is entailed or satisfied by the belief base, `FALSE` otherwise.
    • query

      public Boolean query(DefaultTheory theory, FolFormula query, InferenceMode inferenceMode)
      Queries the given default theory for the given query using the given inference mode.
      Parameters:
      theory - a default theory
      query - a formula
      inferenceMode - either InferenceMode.SKEPTICAL or InferenceMode.CREDULOUS
      Returns:
      "true" if the formula is accepted
    • isInstalled

      public boolean isInstalled()
      Description copied from interface: QualitativeReasoner
      Checks whether the underlying solver or reasoning mechanism used by this reasoner is installed and available for use. This can be helpful when the reasoner depends on external tools or libraries for performing the reasoning tasks.
      Specified by:
      isInstalled in interface QualitativeReasoner<DefaultTheory,FolFormula>
      Returns:
      `true` if the solver is installed and available, `false` otherwise.