There is a newer version of this record available.

Software Open Access


Alexander Steen

scala-tptp-parser is a library for parsing the input languages of the TPTP infrastructure.

The package contains a data structure for the abstract syntax tree (AST) of the parsed input as well as the parser for the different language of the TPTP, see for details. In particular, the parser supports:

  • 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.

Currently, parsing of TFX (FOOL) and TCF (typed CNF) is not supported. Apart from that, the parser should cover every other language. The parser is based on v7.4.0.3 of the TPTP syntax BNF (


Release notes of Version 1.3 of the Scala TPTP parser library:


  • Bumped Scala version to 2.13.5
  • Fixed two errors when parsing numbers
    • When parsing floats of the form X.Y, the parser automatically added E1 (instead of exponent 0).
    • Usage of BigInts for arbitrary precision integers/arithmetic. Before, really big numbers overflowed (or underflowed).
  • First (planned) release on Sonatype

See the README for further information.

The TPTP syntax specification may be accessed at
Files (45.4 kB)
Name Size
45.4 kB Download
All versions This version
Views 14344
Downloads 73
Data volume 411.7 kB136.2 kB
Unique views 10436
Unique downloads 63


Cite as