object THF
Contains the THF AST data types.
- Alphabetic
- By Inheritance
- THF
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- sealed abstract class BinaryConnective extends Connective
- final case class BinaryFormula(connective: BinaryConnective, left: Formula, right: Formula) extends Formula with Product with Serializable
- final case class ConditionalTerm(condition: Formula, thn: Formula, els: Formula) extends Formula with Product with Serializable
- sealed abstract class Connective extends AnyRef
- final case class ConnectiveTerm(conn: Connective) extends Formula with Product with Serializable
Connective as proper term.
- sealed abstract class DefinedTH1Constant extends AnyRef
Special kind of interpreted TPTP constants that do not start with a dollar sign.
Special kind of interpreted TPTP constants that do not start with a dollar sign. Used in TH1 for polymorphic constant symbols that correspond to quantification, equality, etc.
- final case class DefinedTH1ConstantTerm(constant: DefinedTH1Constant) extends Formula with Product with Serializable
- final case class DistinctObject(name: String) extends Formula with Product with Serializable
An object that is unequal to every DistinctObject with a different name.
- sealed abstract class Formula extends AnyRef
- final case class FunctionTerm(f: String, args: Seq[Formula]) extends Formula with Product with Serializable
Constant symbols
c
or FOF-style functional expressionsf(c)
.Constant symbols
c
or FOF-style functional expressionsf(c)
. Important:f
may be a dollar word, a dollar dollar word (plain string starting with $ or $$), a lower word (plain string with certain restrictions) or a single quoted TPTP atomic word. In the latter case, non-lower word atomic words are enclosed in single quotes, e.g. '...'. Any string that is neither a dollar/dollardollar word, a lower word, or a single quoted, is an invalid value forf
. UseTPTP.isLowerWord
to check if the string a valid (non-quoted) value for
f
, or transform viaTPTP.convertStringToAtomicWord
if necessary before. Quotes and Backslashes are not escaped in the representation, but will (need to) be escaped for pretty printing.
- See also
- final case class LetTerm(typing: Map[String, Type], binding: Seq[(Formula, Formula)], body: Formula) extends Formula with Product with Serializable
- final case class Logical(formula: Formula) extends Statement with Product with Serializable
- final case class NonclassicalBox(index: Option[Formula]) extends VararyNonclassicalOperator with Product with Serializable
- final case class NonclassicalCone(index: Option[Formula]) extends VararyNonclassicalOperator with Product with Serializable
- final case class NonclassicalDiamond(index: Option[Formula]) extends VararyNonclassicalOperator with Product with Serializable
- final case class NonclassicalLongOperator(name: String, index: Option[Formula], parameters: Seq[(Formula, Formula)]) extends VararyNonclassicalOperator with Product with Serializable
- final case class NonclassicalPolyaryFormula(connective: VararyNonclassicalOperator, args: Seq[Formula]) extends Formula with Product with Serializable
Non-classical formula as per recent TPTP NHF standard.
Non-classical formula as per recent TPTP NHF standard. The connective is n-ary with arbitrary n, see the TPTP documentation which connective names have pre-defined meaning. When used with short connectives ([.], <.>, /.\) it will print as unary connective (without @ sign).
- final case class NumberTerm(value: Number) extends Formula with Product with Serializable
- final case class QuantifiedFormula(quantifier: Quantifier, variableList: Seq[TypedVariable], body: Formula) extends Formula with Product with Serializable
- sealed abstract class Quantifier extends AnyRef
- final case class Sequent(lhs: Seq[Formula], rhs: Seq[Formula]) extends Statement with Product with Serializable
- sealed abstract class Statement extends AnyRef
- final case class Tuple(elements: Seq[Formula]) extends Formula with Product with Serializable
- type Type = Formula
- type TypedVariable = (String, Type)
- final case class Typing(atom: String, typ: Type) extends Statement with Product with Serializable
- sealed abstract class UnaryConnective extends Connective
- final case class UnaryFormula(connective: UnaryConnective, body: Formula) extends Formula with Product with Serializable
- sealed abstract class VararyNonclassicalOperator extends AnyRef
- final case class Variable(name: String) extends Formula with Product with Serializable
A TPTP variable.
A TPTP variable. Precondition for creating a Variable object:
name
is uppercase.
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() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- 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() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- case object ! extends Quantifier with Product with Serializable
Universal quantification (as binder)
- case object !! extends DefinedTH1Constant with Product with Serializable
Universal quantification (as TH1 constant)
- case object !> extends Quantifier with Product with Serializable
Universal type quantifier (type-as-term, as binder)
- case object & extends BinaryConnective with Product with Serializable
Conjunction connective
- case object := extends BinaryConnective with Product with Serializable
Assignment
- case object <= extends BinaryConnective with Product with Serializable
Reverse implication connective
- case object <=> extends BinaryConnective with Product with Serializable
Equivalence connective
- case object <~> extends BinaryConnective with Product with Serializable
Negated equivalence connective
- case object == extends BinaryConnective with Product with Serializable
Meta-level identitity
- case object ? extends Quantifier with Product with Serializable
Existential quantification (as binder)
- case object ?* extends Quantifier with Product with Serializable
Existential type quantifier (type-as-term, as binder)
- case object ?? extends DefinedTH1Constant with Product with Serializable
Existential quantification (as TH1 constant)
- case object @+ extends Quantifier with Product with Serializable
Choice quantifier (as binder)
- case object @- extends Quantifier with Product with Serializable
Definite description quantifier (as binder)
- case object @= extends DefinedTH1Constant with Product with Serializable
Equality (as TH1 constant)
- case object @@+ extends DefinedTH1Constant with Product with Serializable
Choice (as TH1 constant)
- case object @@- extends DefinedTH1Constant with Product with Serializable
Definite description (as TH1 constant)
- case object App extends BinaryConnective with Product with Serializable
Application pseudo-connective
- case object Eq extends BinaryConnective with Product with Serializable
Equality connective
- case object FunTyConstructor extends BinaryConnective with Product with Serializable
Function type constructor (type as term)
- case object Impl extends BinaryConnective with Product with Serializable
Implication connective
- case object Neq extends BinaryConnective with Product with Serializable
Disequality connective
- case object ProductTyConstructor extends BinaryConnective with Product with Serializable
Product type constructor (type as term)
- case object SumTyConstructor extends BinaryConnective with Product with Serializable
Sum type constructor (type as term)
- case object ^ extends Quantifier with Product with Serializable
Lambda pseudo-quantifier (binder)
- case object | extends BinaryConnective with Product with Serializable
Disjunction connective
- case object ~ extends UnaryConnective with Product with Serializable
Negation connective
- case object ~& extends BinaryConnective with Product with Serializable
Nand connective
- case object ~| extends BinaryConnective with Product with Serializable
Nor connective
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
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