Packages

o

leo.modules.input

TPTPParser

object TPTPParser

Parser for the TPTP-based input language, including ...

  • THF (TH0/TH1): Monomorphic and polymorphic higher-order logic,
  • TFF (TF0/TF1): Monomorphic and polymorphic typed first-order logic,
  • FOF: Untyped first-order logic,
  • CNF: (Untyped) clause-normal form, and
  • TPI: TPTP Process Instruction language.

The parser parses into an abstract syntax tree defined at datastructures.TPTP, resp. its corresponding specializations for the respective language dialect:

Parsing errors will cause TPTPParser.TPTPParseExceptions. Note that includes etc. are parsed as-is and reprented by a datastructures.TPTP.Include entry in the datastructures.TPTP.Problem representation. In particular, they are not parsed recursively. This has to be implemented externally.

Since

January 2021

Note

For the implementation of this parser v7.4.0.3 of the TPTP syntax was used.

,

Limitations: Currently, FOOL logic (i.e., TFX) cannot be parsed.

See also

Original TPTP syntax definition at http://tptp.org/TPTP/SyntaxBNF.html.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TPTPParser
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class TPTPLexer extends BufferedIterator[TPTPLexerToken]
  2. class TPTPParseException extends RuntimeException

    Main exception thrown by the TPTPParser if some parsing error occurs.

  3. final class TPTPParser extends AnyRef

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def annotated(annotatedFormula: String): AnnotatedFormula

    Parses an TPTP annotated formula (THF/TFF/FOF/CNF/TPI) given as String.

    Parses an TPTP annotated formula (THF/TFF/FOF/CNF/TPI) given as String.

    annotatedFormula

    The annotated formula as string.

    returns

    The parsing result

    Exceptions thrown

    TPTPParseException If an parsing error occurred.

  5. final def annotatedCNF(annotatedFormula: String): CNFAnnotated

    Parses an TPTP CNF annotated formula given as String.

    Parses an TPTP CNF annotated formula given as String.

    annotatedFormula

    The annotated formula as string.

    returns

    The parsing result

    Exceptions thrown

    TPTPParseException If an parsing error occurred.

  6. final def annotatedFOF(annotatedFormula: String): FOFAnnotated

    Parses an TPTP FOF annotated formula given as String.

    Parses an TPTP FOF annotated formula given as String.

    annotatedFormula

    The annotated formula as string.

    returns

    The parsing result

    Exceptions thrown

    TPTPParseException If an parsing error occurred.

  7. final def annotatedTFF(annotatedFormula: String): TFFAnnotated

    Parses an TPTP TFF annotated formula given as String.

    Parses an TPTP TFF annotated formula given as String.

    annotatedFormula

    The annotated formula as string.

    returns

    The parsing result

    Exceptions thrown

    TPTPParseException If an parsing error occurred.

  8. final def annotatedTHF(annotatedFormula: String): THFAnnotated

    Parses an TPTP THF annotated formula given as String.

    Parses an TPTP THF annotated formula given as String.

    annotatedFormula

    The annotated formula as string.

    returns

    The parsing result

    Exceptions thrown

    TPTPParseException If an parsing error occurred.

  9. final def annotatedTPI(annotatedFormula: String): TPIAnnotated

    Parses an TPTP TPI annotated formula given as String.

    Parses an TPTP TPI annotated formula given as String.

    annotatedFormula

    The annotated formula as string.

    returns

    The parsing result

    Exceptions thrown

    TPTPParseException If an parsing error occurred.

  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  12. final def cnf(formula: String): Formula

    Parses a plain CNF formula (i.e., without annotations) given as String.

    Parses a plain CNF formula (i.e., without annotations) given as String.

    formula

    The annotated formula as string.

    returns

    The parsing result

    Exceptions thrown

    TPTPParseException If an parsing error occurred.

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  16. final def fof(formula: String): Formula

    Parses a plain FOF formula (i.e., without annotations) given as String.

    Parses a plain FOF formula (i.e., without annotations) given as String.

    formula

    The annotated formula as string.

    returns

    The parsing result

    Exceptions thrown

    TPTPParseException If an parsing error occurred.

  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. final def problem(input: String): Problem

    Parses a whole TPTP file given as String.

    Parses a whole TPTP file given as String.

    input

    The TPTP problem file contents as string.

    returns

    The parsing result

    Annotations
    @inline()
    Exceptions thrown

    TPTPParseException If an parsing error occurred.

  24. final def problem(input: Source): Problem

    Parses a whole TPTP file given as scala.io.Source.

    Parses a whole TPTP file given as scala.io.Source.

    input

    The TPTP problem file.

    returns

    The parsing result

    Exceptions thrown

    TPTPParseException If an parsing error occurred.

  25. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  26. final def tff(formula: String): Formula

    Parses a plain TFF formula (i.e., without annotations) given as String.

    Parses a plain TFF formula (i.e., without annotations) given as String.

    formula

    The annotated formula as string.

    returns

    The parsing result

    Exceptions thrown

    TPTPParseException If an parsing error occurred.

  27. final def thf(formula: String): Formula

    Parses a plain THF formula (i.e., without annotations) given as String.

    Parses a plain THF formula (i.e., without annotations) given as String.

    formula

    The annotated formula as string.

    returns

    The parsing result

    Exceptions thrown

    TPTPParseException If an parsing error occurred.

  28. def toString(): String
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  32. object TPTPLexer

Inherited from AnyRef

Inherited from Any

Ungrouped