Class SPASSMlReasoner

java.lang.Object
org.tweetyproject.logics.ml.reasoner.AbstractMlReasoner
org.tweetyproject.logics.ml.reasoner.SPASSMlReasoner
All Implemented Interfaces:
QualitativeReasoner<MlBeliefSet,FolFormula>, Reasoner<Boolean,MlBeliefSet,FolFormula>

public class SPASSMlReasoner extends AbstractMlReasoner
Invokes SPASS (http://www.mpi-inf.mpg.de/departments/automation-of-logic/software/spass-workbench/), an automated theorem prover for first-order logic, modal logic and description logics.
Note: There are unresolved errors for some cases, see org.tweetyproject.logics.ml.SPASSTest#ComplexQueryTest() for examples.
Author:
Anna Gessler, Matthias Thimm
  • Constructor Details

    • SPASSMlReasoner

      public SPASSMlReasoner(String binaryLocation, Shell bash)
      Constructs a new instance pointing to a specific SPASS Prover.
      Parameters:
      binaryLocation - of the SPASS executable on the hard drive
      bash - shell to run commands
    • SPASSMlReasoner

      public SPASSMlReasoner(String binaryLocation)
      Constructs a new instance pointing to a specific SPASS
      Parameters:
      binaryLocation - of the SPASS executable on the hard drive
  • Method Details

    • setCmdOptions

      public void setCmdOptions(String s)
      Sets the command line options that will be used by SPASS when executing the query.
      Parameters:
      s - a string containing the command line arguments
    • query

      public Boolean query(MlBeliefSet kb, 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<MlBeliefSet,FolFormula>
      Specified by:
      query in interface Reasoner<Boolean,MlBeliefSet,FolFormula>
      Specified by:
      query in class AbstractMlReasoner
      Parameters:
      kb - 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.
    • queryProof

      public String queryProof(MlBeliefSet kb, Formula query)
      Determines the answer wrt. to the given query and returns the proof (if applicable). May decrease SPASS's performance, use query(MlBeliefSet,FolFormula) if only a yes/no result is needed.
      Parameters:
      kb - a modal belief set
      query - a formula
      Returns:
      a string containing proof documentation
    • 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.
      Returns:
      `true` if the solver is installed and available, `false` otherwise.