Module Logtk_parsers.Util_tptp
Utils related to TPTP
module A = Ast_tptptype 'a or_error= ('a, string) CCResult.ttype untyped= Logtk.STerm.ttype typed= Logtk.TypedSTerm.t
Printing/Parsing
val create_parse_cache : unit -> parse_cacheval find_file : string -> string -> string optionfind_file name dirlooks for a file with the givenname, recursively, indir, or in its parent dir recursively. It also looks in the "TPTP" environment variable.
val parse_lexbuf : ?names:A.name list -> Stdlib.Lexing.lexbuf -> untyped A.t Iter.t or_errorGiven a lexbuf, try to parse its content into a sequence of untyped declarations
val parse_file : ?cache:parse_cache -> recursive:bool -> string -> untyped A.t Iter.t or_errorParsing a TPTP file is here presented with a
recursiveoption that, if true, will make "include" directives to be recursively parsed. It usesfind_filefor included files.- parameter parse_cache
used to avoid including the same file twice, if
recursive=true
- returns
an error-wrapped sequence of declarations.
Bridge to UntypedAST
val to_ast : untyped A.t -> Logtk.UntypedAST.statement- raises Error
if there are remaining includes
val of_ast : Logtk.UntypedAST.statement -> untyped A.t- raises Error
if the AST contains Data