Class Prover9Writer

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.io.Writer writer
      output is redirected to this writer
    • Constructor Summary

      Constructors 
      Constructor Description
      Prover9Writer()
      creates new Prover9Writer
      Prover9Writer​(java.io.Writer writer)
      creates new Prover9Writer
    • Method Summary

      Modifier and Type Method Description
      void close()
      Closes the Writer.
      private java.lang.String parens​(java.lang.String str)
      Puts str in parentheses.
      void printBase​(FolBeliefSet b)
      Prints formatted representation of a knowledge base.
      void printEquivalence​(FolFormula a, FolFormula b)
      Prints an Equivalence.
      private java.lang.String printFormula​(RelationalFormula f)
      Creates a representation of a formula in Prover9 format.
      void printQuery​(FolFormula query)
      Prints formatted representation of a query.
      private java.lang.String printVar​(Variable v)
      Crates a type check or type def for a variable
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • writer

        java.io.Writer writer
        output is redirected to this writer
    • Constructor Detail

      • Prover9Writer

        public Prover9Writer​(java.io.Writer writer)
        creates new Prover9Writer
        Parameters:
        writer - output is redirected to this writer
      • Prover9Writer

        public Prover9Writer()
        creates new Prover9Writer
    • Method Detail

      • printQuery

        public void printQuery​(FolFormula query)
                        throws java.io.IOException
        Description copied from interface: FolWriter
        Prints formatted representation of a query.
        Specified by:
        printQuery in interface FolWriter
        Parameters:
        query - the formula to be queried
        Throws:
        java.io.IOException - if an IO issue occurs.
      • printEquivalence

        public void printEquivalence​(FolFormula a,
                                     FolFormula b)
                              throws java.io.IOException
        Description copied from interface: FolWriter
        Prints an Equivalence.
        Specified by:
        printEquivalence in interface FolWriter
        Parameters:
        a - formula on one side of the equation
        b - formula on the other side of the equation
        Throws:
        java.io.IOException - if an IO issue occurs.
      • printBase

        public void printBase​(FolBeliefSet b)
                       throws java.io.IOException
        Description copied from interface: FolWriter
        Prints formatted representation of a knowledge base.
        Specified by:
        printBase in interface FolWriter
        Parameters:
        b - a knowledge base
        Throws:
        java.io.IOException - if an IO issue occurs.
      • printVar

        private java.lang.String printVar​(Variable v)
        Crates a type check or type def for a variable
        Parameters:
        v - a variable
        Returns:
        type(var)
      • printFormula

        private java.lang.String printFormula​(RelationalFormula f)
        Creates a representation of a formula in Prover9 format.
        Parameters:
        f - a formula
        Returns:
        a string that represents the formula in Prover9 format
      • parens

        private java.lang.String parens​(java.lang.String str)
        Puts str in parentheses.
        Parameters:
        str - a string
        Returns:
        (str)
      • close

        public void close()
                   throws java.io.IOException
        Description copied from interface: FolWriter
        Closes the Writer.
        Specified by:
        close in interface FolWriter
        Throws:
        java.io.IOException - if an IO issue occurs.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object