Class AbstractPlReasoner

java.lang.Object
org.tweetyproject.logics.pl.reasoner.AbstractPlReasoner
All Implemented Interfaces:
KernelProvider<PlFormula>, QualitativeReasoner<PlBeliefSet,PlFormula>, Reasoner<Boolean,PlBeliefSet,PlFormula>
Direct Known Subclasses:
NaiveQbfReasoner, SatReasoner, SimplePlReasoner

public abstract class AbstractPlReasoner extends Object implements QualitativeReasoner<PlBeliefSet,PlFormula>, KernelProvider<PlFormula>
Abstract class for propositional logic reasoners.
Author:
Matthias Thimm
  • Constructor Details

    • AbstractPlReasoner

      public AbstractPlReasoner()
  • Method Details

    • query

      public abstract Boolean query(PlBeliefSet beliefbase, PlFormula formula)
      Description copied from interface: Reasoner
      Queries the given belief base for the given formula.
      Specified by:
      query in interface QualitativeReasoner<PlBeliefSet,PlFormula>
      Specified by:
      query in interface Reasoner<Boolean,PlBeliefSet,PlFormula>
      Parameters:
      beliefbase - a belief base
      formula - a formula
      Returns:
      the answer to the query
    • query

      public boolean query(PlFormula formula, PlFormula formula2)
      Checks whether the first formula entails the second.
      Parameters:
      formula - some formula
      formula2 - a formula
      Returns:
      true if the second formula is entailed be the first formula.
    • isEquivalent

      public boolean isEquivalent(PlFormula p1, PlFormula p2)
      Checks whether the two formulas are equivalent
      Parameters:
      p1 - a formula
      p2 - a formula
      Returns:
      true iff the two formulas are equivalent
    • getKernels

      public Collection<Collection<PlFormula>> getKernels(Collection<PlFormula> formulas, PlFormula formula)
      Description copied from interface: KernelProvider
      Retrieves the set of kernels for the given formula from the given set of formulas.
      Specified by:
      getKernels in interface KernelProvider<PlFormula>
      Parameters:
      formulas - a set of formulas.
      formula - a formula.
      Returns:
      the collection of kernels