Class ClingoSolver

    • Constructor Summary

      Constructors 
      Constructor Description
      ClingoSolver​(java.lang.String path2clingo)
      Constructs a new instance pointing to specific a Clingo solver.
      ClingoSolver​(java.lang.String path2clingo, Shell bash)
      Constructs a new instance pointing to a specific Clingo solver.
    • Constructor Detail

      • ClingoSolver

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

        public ClingoSolver​(java.lang.String path2clingo)
        Constructs a new instance pointing to specific a Clingo solver.
        Parameters:
        path2clingo - binary location of Clingo on the hard drive
    • Method Detail

      • getModels

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

        public void toggleOutputWhitelist​(boolean b)
        Activates or deactivates the option to use a whitelist of predicates. If activated, answer sets will only contain atoms over predicates that are part of the whitelist. This corresponds to the #show statement of the clingo input language.
        Parameters:
        b - whether to use a whitelist of predicate
      • setOptions

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

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