object TPTP
Collection of TPTP-related data types that are returned by the leo.modules.input.TPTPParser. An overview:
- Whole TPTP problem files are represented by leo.datastructures.TPTP.Problem,
- Annotated formulas are represented by leo.datastructures.TPTP.AnnotatedFormulas, more specifically ...
- Annotated THF formulas by leo.datastructures.TPTP.THFAnnotated,
- Annotated TFF formulas by leo.datastructures.TPTP.TFFAnnotated,
- Annotated FOF formulas by leo.datastructures.TPTP.FOFAnnotated,
- Annotated TCF formulas by leo.datastructures.TPTP.TCFAnnotated,
- Annotated CNF formulas by leo.datastructures.TPTP.CNFAnnotated, and
- Annotated TPI formulas by leo.datastructures.TPTP.TPIAnnotated
- Include directives are represented by tuples
(filename,(optional-list-of-ids,comments))
of type leo.datastructures.TPTP.Include.
See TPTP.THF, TPTP.TFF, TPTP.FOF, TPTP.TCF, TPTP.CNF for more information on the representation of "plain" THF, TFF, FOF, TCF and CNF formulas, respectively.
All classes have a function called pretty
that will output the TPTP-compliant representation
of the respective structure. It should hold that parse(x.pretty) = x
where parse
is
the hypothetical parsing function for that structure.
- Alphabetic
- By Inheritance
- TPTP
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed abstract class AnnotatedFormula extends AnyRef
Parent type of the individual annotated formulas of the different dialects.
- type Annotations = Option[(GeneralTerm, Option[Seq[GeneralTerm]])]
Optional annotation at the end of an TPTP.AnnotatedFormula.
- final case class CNFAnnotated(name: String, role: String, formula: Statement, annotations: Annotations) extends AnnotatedFormula with Product with Serializable
An annotated CNF formula.
- final case class CNFData(formula: Statement) extends FormulaData with Product with Serializable
- final case class Comment(format: CommentFormat, commentType: CommentType, content: String) extends Product with Serializable
- final case class DistinctObjectData(name: String) extends GeneralData with Product with Serializable
- See also
- final case class FOFAnnotated(name: String, role: String, formula: Statement, annotations: Annotations) extends AnnotatedFormula with Product with Serializable
An annotated FOF formula.
- final case class FOFData(formula: Statement) extends FormulaData with Product with Serializable
- final case class FOTData(formula: Term) extends FormulaData with Product with Serializable
- sealed abstract class FormulaData extends AnyRef
- sealed abstract class GeneralData extends AnyRef
General formula annotation data.
General formula annotation data. Can be one of the following:
- MetaFunctionData, a term-like meta expression: either a (meta-)function or a (meta-)constant.
- MetaVariable, a term-like meta expression that captures a variable.
- NumberData, a numerical value.
- DistinctObjectData, an expression that represents itself.
- GeneralFormulaData, an expression that contains object-level formula expressions.
- See also
See GeneralTerm for some context and http://tptp.org/TPTP/SyntaxBNF.html#general_term for a use case.
- final case class GeneralFormulaData(data: FormulaData) extends GeneralData with Product with Serializable
- See also
- final case class GeneralTerm(data: Seq[GeneralData], list: Option[Seq[GeneralTerm]]) extends Product with Serializable
Returns a TPTP-compliant serialization of the "general_term" (cf.
Returns a TPTP-compliant serialization of the "general_term" (cf. TPTP syntax BNF).
- type Include = (String, (Seq[String], Seq[Comment]))
Representation of TPTP include directives, where the first element in the file to be includes, the second element in a tuple of additional information: A list of identifiers to be imported (empty if everything is imported), and a (possibly empty) list of comments associated to the import.
- final case class Integer(value: BigInt) extends Number with Product with Serializable
Representation of an integer.
- final case class MetaFunctionData(f: String, args: Seq[GeneralTerm]) extends GeneralData with Product with Serializable
- See also
- final case class MetaVariable(variable: String) extends GeneralData with Product with Serializable
- See also
- sealed abstract class Number extends AnyRef
Parent type of the three different number types in the TPTP language.
Parent type of the three different number types in the TPTP language.
- final case class NumberData(number: Number) extends GeneralData with Product with Serializable
- See also
- final case class Problem(includes: Seq[Include], formulas: Seq[AnnotatedFormula], formulaComments: Map[String, Seq[Comment]]) extends Product with Serializable
The representation of whole TPTP problems, consisting of:
The representation of whole TPTP problems, consisting of:
- include statements (imports of axiom files etc.),
- annotated formulas (axioms, conjectures, type declarations, etc.), and
- comments associated to annotated formulas.
- includes
The list of include statements
- formulas
The list of annotated formulas
- formulaComments
The comments associated with this annotated formula, which are the comments right before/over the formula.
- final case class Rational(numerator: BigInt, denominator: BigInt) extends Number with Product with Serializable
Representation of a rational number p/q where p is
numerator
and q isdenominator
. - final case class Real(wholePart: BigInt, decimalPlaces: BigInt, exponent: BigInt) extends Number with Product with Serializable
Representation of a real number p.q*10x where p is the part before the decimal point (
wholePart
), q is are the decimal places after the point (decimalPlaces
) andexponent
in the x. - final case class TCFAnnotated(name: String, role: String, formula: Statement, annotations: Annotations) extends AnnotatedFormula with Product with Serializable
An annotated TCF formula.
- final case class TFFAnnotated(name: String, role: String, formula: Statement, annotations: Annotations) extends AnnotatedFormula with Product with Serializable
An annotated TFF formula.
- final case class TFFData(formula: Statement) extends FormulaData with Product with Serializable
- final case class THFAnnotated(name: String, role: String, formula: Statement, annotations: Annotations) extends AnnotatedFormula with Product with Serializable
An annotated THF formula.
- final case class THFData(formula: Statement) extends FormulaData with Product with Serializable
- final case class TPIAnnotated(name: String, role: String, formula: Statement, annotations: Annotations) extends AnnotatedFormula with Product with Serializable
An annotated TPI formula.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- object AnnotatedFormula
- object CNF
Contains the CNF AST data types.
- object Comment extends Serializable
- object FOF
Contains the FOF AST data types.
- object TCF
Contains the TCF AST data types.
- object TFF
Contains the TFF AST data types.
- object THF
Contains the THF AST data types.
This is the documentation for the Scala TPTP parser used, e.g., by the Leo-III prover.
Package structure
The leo package contains two sub-packages as follows:
leo.datastructures
contains the leo.datastructures.TPTP object that bundles the different abstract syntax tree (AST) representations for the different TPTP language dialects, including ...leo.datastructures.TPTP.THF
- Higher-order formulas (THF)leo.datastructures.TPTP.TFF
- Typed first-order formulas (TFF)leo.datastructures.TPTP.FOF
- Untyped first-order formulas (FOF)leo.datastructures.TPTP.TCF
- Typed clausal form (TCF)leo.datastructures.TPTP.CNF
- Untyped clausal form (CNF)leo.modules.input
- the parser itself.Usage (in short)
The leo.modules.input.TPTPParser offers several parsing methods:
Exemplary use case