Class Prover9FolReasoner
java.lang.Object
org.tweetyproject.logics.fol.reasoner.FolReasoner
org.tweetyproject.logics.fol.reasoner.Prover9FolReasoner
- All Implemented Interfaces:
QualitativeReasoner<FolBeliefSet,
,FolFormula> Reasoner<Boolean,
FolBeliefSet, FolFormula>
Invokes Prover9
( https://www.cs.unm.edu/~mccune/mace4/),
an automated theorem prover for first-order logic, and returns its results.
- Author:
- Nils Geilen, Matthias Thimm
-
Field Summary
Fields inherited from class org.tweetyproject.logics.fol.reasoner.FolReasoner
defaultReasoner
-
Constructor Summary
ConstructorsConstructorDescriptionProver9FolReasoner
(String binaryLocation) Constructs a new instance pointing to a specific Prover9Prover9FolReasoner
(String binaryLocation, Shell bash) Constructs a new instance pointing to a specific Prover9. -
Method Summary
Modifier and TypeMethodDescriptionboolean
equivalent
(FolBeliefSet kb, FolFormula a, FolFormula b) This method determines whether two formulas are equivalent wrt.boolean
query
(FolBeliefSet kb, FolFormula query) Queries the given belief base for the given formula.void
setBinaryLocation
(String binaryLocation) Changes the path of the Prover9 binaries.Methods inherited from class org.tweetyproject.logics.fol.reasoner.FolReasoner
getDefaultReasoner, setDefaultReasoner
-
Constructor Details
-
Prover9FolReasoner
Constructs a new instance pointing to a specific Prover9.- Parameters:
binaryLocation
- of the prover9 executable on the hard drivebash
- shell to run commands
-
Prover9FolReasoner
Constructs a new instance pointing to a specific Prover9- Parameters:
binaryLocation
- of the prover9 executable on the hard drive
-
-
Method Details
-
query
Description copied from interface:Reasoner
Queries the given belief base for the given formula.- Specified by:
query
in interfaceQualitativeReasoner<FolBeliefSet,
FolFormula> - Specified by:
query
in interfaceReasoner<Boolean,
FolBeliefSet, FolFormula> - Specified by:
query
in classFolReasoner
- Parameters:
kb
- a belief basequery
- a formula- Returns:
- the answer to the query
-
equivalent
Description copied from class:FolReasoner
This method determines whether two formulas are equivalent wrt. to the given knowledge base.- Specified by:
equivalent
in classFolReasoner
- Parameters:
kb
- the knowledge basea
- the first formula.b
- the second formula.- Returns:
- the answer to the query.
-
getBinaryLocation
- Returns:
- the path of the Prover9 binaries.
-
setBinaryLocation
Changes the path of the Prover9 binaries.- Parameters:
binaryLocation
- the new path of the binary
-
isInstalled
public boolean isInstalled()- Returns:
- if the solver is installed
-