TPTPParser (hol v1.0.1)

View Source

This module currently only contains functions to express a unification problem as a TPTP-Problem (see unification_problem_to_tptp/1) and some helper functions.

Summary

Functions

Outputs a variable name as a string that can be used inside of TPTP Problems.

Transform a term into a TPTP parsable term string

Transform a type into a TPTP parsable type string

Transform an unification problem into a TPTP parsable problem

Transform a variable into a TPTP parsable variable string

Functions

get_var_name(arg)

@spec get_var_name(HOL.Data.declaration()) :: String.t()

Outputs a variable name as a string that can be used inside of TPTP Problems.

Bound Variables have a BV_ prepended before the number.

Constant names are unchanged.

Free Variables are forced into uppercase.

Warning

Variable names are generally case sensitive ("x" != "X"). This is not possible in TPTP and may cause issues.

term_to_tptp(arg)

@spec term_to_tptp(HOL.Data.hol_term()) :: String.t()

Transform a term into a TPTP parsable term string

type_to_tptp(type, brackets_around \\ false)

@spec type_to_tptp(HOL.Data.type(), boolean()) :: String.t()

Transform a type into a TPTP parsable type string

unification_problem_to_tptp(input)

@spec unification_problem_to_tptp(
  [HOL.Data.Unification.term_pair()]
  | HOL.Data.Unification.term_pair()
) ::
  String.t()

Transform an unification problem into a TPTP parsable problem

vars_to_tptp_declaration(vars)

@spec vars_to_tptp_declaration([HOL.Data.declaration()]) :: String.t()

Transform a variable into a TPTP parsable variable string