{"id":22030901,"url":"https://github.com/leoprover/tptp-utils","last_synced_at":"2026-05-19T07:11:03.280Z","repository":{"id":50661479,"uuid":"435301165","full_name":"leoprover/tptp-utils","owner":"leoprover","description":"Library for TPTP-related utility services","archived":false,"fork":false,"pushed_at":"2025-11-05T18:16:13.000Z","size":1424,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-11-05T20:34:40.160Z","etag":null,"topics":["automated-reasoning","linter","logic","parser","predicate-logic","preprocessor","theorem-prover","theorem-proving","tptp"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leoprover.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-12-05T23:11:01.000Z","updated_at":"2025-11-05T18:16:17.000Z","dependencies_parsed_at":"2024-02-14T09:25:51.642Z","dependency_job_id":"603da3ee-b94b-4924-8a06-9081111daf37","html_url":"https://github.com/leoprover/tptp-utils","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/leoprover/tptp-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoprover%2Ftptp-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoprover%2Ftptp-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoprover%2Ftptp-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoprover%2Ftptp-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leoprover","download_url":"https://codeload.github.com/leoprover/tptp-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leoprover%2Ftptp-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33205721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"online","status_checked_at":"2026-05-19T02:00:06.763Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automated-reasoning","linter","logic","parser","predicate-logic","preprocessor","theorem-prover","theorem-proving","tptp"],"created_at":"2024-11-30T08:12:09.834Z","updated_at":"2026-05-19T07:11:03.262Z","avatar_url":"https://github.com/leoprover.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tptp-utils\nLibrary for TPTP-related utility services\n\n`tptp-utils` may be referenced as [![DOI](https://zenodo.org/badge/435301165.svg)](https://zenodo.org/badge/latestdoi/435301165).\n\n-------------------------------\n\n`tptp-utils` is an application for pre- and post-processing automated theorem proving input files (so-called problem files)\ngiven in the [TPTP](http://tptp.org/) (*Thousands of Problems for Theorem Proving*) syntax standard.\nIt is written in Scala and freely available as open-source software.\n\nPlease check the TPTP web page for an introduction to the different language\ndialects (THF, TFF, FOF, CNF, ...) for automated theorem provers.\n\nCurrent features include:\n - Syntax checking *(validate that the input file is syntactically well-formed)*\n - Reparsing *(Read the input file and print an abstract syntax tree in JSON format)*\n - Dialect transformation *(Translate problem from TPTP dialect A to TPTP dialect B)*\n - Normal form computations *(Convert problem to some normal form)*\n - Decidable FOL fragment detection *(Analyze whether formulas in the TPTP file come from a known decidable FOL fragment)*\n\nExperimental features include:\n - Linting *(Read and check the problem file for suspicious content, malformed logic specification, etc.)* **Work in progress!**\n - Importing (fragments of) LegalRuleML files to [normative TPTP](https://github.com/leoprover/logic-embedding) **Work in progress!**\n \n## Usage\n\n`tptp-utils` is a command-line tool, reads its input from an input file (or stdin)\nand prints its result to stdout (or some output file), as follows:\n\n```\nusage: tptputils [options] \u003ccommand\u003e [command parameters] \u003cproblem file\u003e\n\n \u003ccommand\u003e is the command to be executed (see below). \u003cproblem file\u003e can be\n either a file name or '-' (without quotes) for stdin. If \u003coutput file\u003e is\n specified, the result is written to \u003coutput file\u003e, otherwise to stdout.\n\n Commands:\n  parse        Parse the problem and return SZS Success if successful;\n               SZS SyntaxError otherwise.\n  reparse      Parse the problem and, if successful, print the AST of\n               the parsed problem in a JSON-based format.\n  transform    Parse a problem, and transform and print it in a different\n               TPTP language. This is possible if the goal language is at\n               least as expressive as the source language, e.g. transforming\n               a FOF problem into a THF problem. Auxiliary formulae might be\n               added if necessary, e.g., new type declarations.\n\n               The goal language is specified as a mandatory command parameter\n               using one of the following values:\n               --CNF, --TCF, --FOF, --TFF, --THF\n  downgrade    Parse a problem, transform and print it in a less expressive TPTP\n               language. This will fail if the problem contains formulae that are\n               not directly expressible in the goal language, e.g., lambdas in THF\n               when transforming to TFF and similar.\n               If the goal language is more expressive\n               instead, then `transform` will be executed instead.\n\n               The goal language is specified as a mandatory command parameter\n               using one of the following values:\n               --TFF\n\n  lint         Inspect the input problem for suspicious constructs, unused symbols,\n               malformed logic specifications, etc.\n\n  import       Translate, if possible, the input file into an adequate TPTP\n               representation.\n\n               The source language is specified as a mandatory command parameter:\n               --LRML   (for import from LegalRuleML)\n\n  normalize    Transform the input wrt. some normal form given as parameter.\n               Valid parameters are (more to come):\n               --prenex (for prenex normal form)\n\n  fragment     Analyze the input whether it is member of some known fragment of FOL.\n               Works only for FOF/TFF inputs. Fragments are noted inside the annotation\n               of the annotated formulas. Can recognize:\n               Propositional,\n               BernaysSchoenfinkelRamsey,\n               MonadicFirstOrder,\n               Löwenheim,\n               LöbGurevich,\n               GödelKalmárSchütte,\n               Ackermann,\n               GurevichMaslovOrevkov\n\n Options:\n   --tstp      Enable TSTP-compatible output: The output in \u003coutput file\u003e\n               (or stdout) will start with a SZS status value and the output\n               will be wrapped within SZS BEGIN and SZS END block delimiters.\n               Disabled by default.\n\n  --recursive  Recursively parse all includes contained in the input file.\n               This might make it necessary to set the TPTP environment variable\n               if TPTP-specific includes need to be resolved.\n\n  --output \u003coutput file\u003e\n               Write output to \u003coutput file\u003e instead of stdout.\n\n  --version    Print the version number of the executable and terminate.\n\n  --help       Print this description and terminate.\n```\n\n### Example 1:\nAs an example, if you want to check syntactic well-formedness of some file,\nsay, `path/to/problem.p`, invoke as follows:\n```bash\n\u003e ./tptp-utils parse /path/to/problem.p\n```\nIf exiting without any error (exit status 0), parsing succeeded. If, on the other hand,\nthere is a syntax error, the output will look similar to the following with exit status 1:\n```\nError: Input file could not be parsed, parse error at 33:1: Expected DOT but read LOWERWORD 'thf'\n```\n\n\n### Example 2 (TSTP-compatible output):\nIf providing the `--tstp` option, `tptp-utils` will give results compatible to the\nTSTP data exchange format. Additional output data (for reparse and transform command) is then provided\nbetween SZS output delimiters. Same example as before, but with TSTP-output:\n\n```bash\n\u003e ./tptp-utils --tstp parse /path/to/problem.p\n% SZS status Success for /home/lex/TPTP/Problems/SYN/SYN000^1.p\n```\nIf there is a syntax error, the output will look similar to the following:\n```\n% SZS status Error for /home/lex/Downloads/test.p : Input file could not be parsed, parse error at 33:1: Expected DOT but read LOWERWORD 'thf\n```\n\nUsing TSTP output is important when, e.g., exchanging this information between reasoning systems.\n\n### As library\n\n`tptp-utils` may also be included as library to your Scala software projects.\n\n## Installation\n\nYou can use the pre-built executable .jar file (in the release section), without\nany other installation steps. \n\nYou may build `tptp-utils` from source: This requires a JDK and the scala build tool `sbt` in\na reasonably current version.\n\n## License\n`tptp-utils` is published under MIT license, see `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoprover%2Ftptp-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleoprover%2Ftptp-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleoprover%2Ftptp-utils/lists"}