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
-
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.boolean
isEquivalent
(PlFormula p1, PlFormula p2) Checks whether the two formulas are equivalentabstract Boolean
query
(PlBeliefSet beliefbase, PlFormula formula) Queries the given belief base with the provided formula and returns a boolean result.boolean
Checks whether the first formula entails the second.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.tweetyproject.commons.QualitativeReasoner
isInstalled
-
Constructor Details
-
AbstractPlReasoner
public AbstractPlReasoner()Default Constructor
-
-
Method Details
-
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 interfaceQualitativeReasoner<PlBeliefSet,
PlFormula> - Specified by:
query
in interfaceReasoner<Boolean,
PlBeliefSet, PlFormula> - Parameters:
beliefbase
- The belief base to be queried.formula
- The formula for which the query is made.- Returns:
- `TRUE` if the formula is entailed or satisfied by the belief base, `FALSE` otherwise.
-
query
-
isEquivalent
-
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 interfaceKernelProvider<PlFormula>
- Parameters:
formulas
- a set of formulas.formula
- a formula.- Returns:
- the collection of kernels
-