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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetKernels(Collection<PlFormula> formulas, PlFormula formula) Retrieves the set of kernels for the given formula from the given set of formulas.booleanisEquivalent(PlFormula p1, PlFormula p2) Checks whether the two formulas are equivalentabstract Booleanquery(PlBeliefSet beliefbase, PlFormula formula) Queries the given belief base for the given formula.booleanChecks whether the first formula entails the second.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.tweetyproject.commons.QualitativeReasoner
isInstalled
-
Constructor Details
-
AbstractPlReasoner
public AbstractPlReasoner()
-
-
Method Details
-
query
Description copied from interface:ReasonerQueries the given belief base for the given formula.- Specified by:
queryin interfaceQualitativeReasoner<PlBeliefSet,PlFormula> - Specified by:
queryin interfaceReasoner<Boolean,PlBeliefSet, PlFormula> - Parameters:
beliefbase- a belief baseformula- a formula- Returns:
- the answer to the query
-
query
Checks whether the first formula entails the second.- Parameters:
formula- some formulaformula2- a formula- Returns:
- true if the second formula is entailed be the first formula.
-
isEquivalent
Checks whether the two formulas are equivalent- Parameters:
p1- a formulap2- 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:KernelProviderRetrieves the set of kernels for the given formula from the given set of formulas.- Specified by:
getKernelsin interfaceKernelProvider<PlFormula>- Parameters:
formulas- a set of formulas.formula- a formula.- Returns:
- the collection of kernels
-