Class DLVSolver

    • Constructor Summary

      Constructors 
      Constructor Description
      DLVSolver​(java.lang.String pathToDLV)
      Constructs a new instance pointing to a specific DLV solver.
      DLVSolver​(java.lang.String pathToDLV, Shell bash)
      Constructs a new instance pointing to a specific DLV solver.
    • Method Summary

      Modifier and Type Method Description
      AnswerSet getModel​(Program p)
      Returns a single (dedicated) model of the given belief base.
      AnswerSet getModel​(Program p, int maxInt)
      Returns a characterizing model (answer set) of the given belief base using the given upper integer limit.
      java.util.List<AnswerSet> getModels​(java.io.File file)
      Returns a characterizing model (answer set) of the given belief base.
      java.util.List<AnswerSet> getModels​(java.lang.String p)
      Returns a characterizing model (answer set) of the given belief base.
      java.util.List<AnswerSet> getModels​(Program p)
      Returns a characterizing model of the given belief base
      java.util.Collection<AnswerSet> getModels​(Program p, int maxInt)
      Returns a characterizing model (answer set) of the given belief base using the given upper integer limit.
      java.lang.Boolean query​(Program beliefbase, ASPLiteral formula)
      Queries the given belief base for the given formula.
      java.lang.Boolean query​(Program beliefbase, ASPLiteral formula, InferenceMode inferenceMode)  
      void setOptions​(java.lang.String options)
      Set additional command line options for DLV.
      void setPathToDLV​(java.lang.String pathToDLV)
      Sets the location of the DLV solver on the hard drive.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DLVSolver

        public DLVSolver​(java.lang.String pathToDLV)
        Constructs a new instance pointing to a specific DLV solver.
        Parameters:
        pathToDLV - binary location of DLV on the hard drive
      • DLVSolver

        public DLVSolver​(java.lang.String pathToDLV,
                         Shell bash)
        Constructs a new instance pointing to a specific DLV solver.
        Parameters:
        pathToDLV - binary location of DLV on the hard drive
        bash - shell to run commands
    • Method Detail

      • getModels

        public java.util.Collection<AnswerSet> getModels​(Program p,
                                                         int maxInt)
        Returns a characterizing model (answer set) of the given belief base using the given upper integer limit.
        Overrides:
        getModels in class ASPSolver
        Parameters:
        p - a program
        maxInt - the max number of models to be returned
        Returns:
        AnswerSet
      • getModel

        public AnswerSet getModel​(Program p,
                                  int maxInt)
        Returns a characterizing model (answer set) of the given belief base using the given upper integer limit.
        Overrides:
        getModel in class ASPSolver
        Parameters:
        p - a program
        maxInt - the max number of models to be returned
        Returns:
        AnswerSet
      • getModels

        public java.util.List<AnswerSet> getModels​(java.lang.String p)
        Description copied from class: ASPSolver
        Returns a characterizing model (answer set) of the given belief base.
        Specified by:
        getModels in class ASPSolver
        Parameters:
        p - containing belief base
        Returns:
        AnswerSet
      • getModels

        public java.util.List<AnswerSet> getModels​(java.io.File file)
        Description copied from class: ASPSolver
        Returns a characterizing model (answer set) of the given belief base.
        Specified by:
        getModels in class ASPSolver
        Parameters:
        file - containing belief base
        Returns:
        AnswerSet
      • getModel

        public AnswerSet getModel​(Program p)
        Description copied from interface: ModelProvider
        Returns a single (dedicated) model of the given belief base. If the implemented method allows for more than one dedicated model, the selection may be non-deterministic.
        Parameters:
        p - some belief base
        Returns:
        a selected model of the belief base.
      • setOptions

        public void setOptions​(java.lang.String options)
        Set additional command line options for DLV.
        Parameters:
        options - a string of options
      • setPathToDLV

        public void setPathToDLV​(java.lang.String pathToDLV)
        Sets the location of the DLV solver on the hard drive.
        Parameters:
        pathToDLV - path to DLV