Class ClingoWriter


  • public class ClingoWriter
    extends Object
    Prints ASP programs and single rules to the Clingo input format (https://potassco.org/clingo/). The Clingo input format adheres (mostly) to the ASP-Core-2 language standard. Also works for the basic elements of the DLV input format.
    Author:
    Anna Gessler
    See Also:
    ClingoSolver, DLVSolver
    • Constructor Detail

      • ClingoWriter

        public ClingoWriter​(Writer writer)
        Create a new ClingoWriter with the given writer.
        Parameters:
        writer - a writer
      • ClingoWriter

        public ClingoWriter()
      • ClingoWriter

        public ClingoWriter​(Writer writer,
                            boolean b)
    • Method Detail

      • printProgram

        public void printProgram​(Program p)
                          throws IOException
        Prints program
        Parameters:
        p - a program
        Throws:
        IOException - if an IO issue occurs.
      • usePredicateWhitelist

        public void usePredicateWhitelist​(boolean b)