datatype status_value =
Suc | Unp | Sap | Esa | Sat | Fsa
| Thm | Eqv | Tac | Wec | Eth | Tau
| Wtc | Wth | Cax | Sca | Tca | Wca
| Cup | Csp | Ecs | Csa | Cth | Ceq
| Unc | Wcc | Ect | Fun | Uns | Wuc
| Wct | Scc | Uca | Noc
type name = string type atomic_word = string type inference_rule = atomic_word type file_info = name option type single_quoted = string type file_name = single_quoted type creator_name = atomic_word type variable = string type upper_word = string
and general_data = (*Bind of variable * formula_data*)
Atomic_Word ofstring
| Application ofstring * general_term list(*general_function*)
| V of upper_word (*variable*)
| Number of number_kind * string
| Distinct_Object ofstring
| (*formula_data*) Formula_Data of language * tptp_formula (* $thf(<thf_formula>) *)
| (*formula_data*) Term_Data of tptp_term
and interpreted_symbol =
UMinus | Sum | Difference | Product | Quotient | Quotient_E |
Quotient_T | Quotient_F | Remainder_E | Remainder_T | Remainder_F |
Floor | Ceiling | Truncate | Round | To_Int | To_Rat | To_Real | (*FIXME these should be in defined_pred, but that's not being used in TPTP*)
Less | LessEq | Greater | GreaterEq | EvalEq | Is_Int | Is_Rat |
Distinct | Apply
and logic_symbol = Equals | NEquals | Or | And | Iff | If | Fi | Xor |
Nor | Nand | Not | Op_Forall | Op_Exists | (*FIXME these should be in defined_pred, but that's not being used in TPTP*) True | False
and symbol =
Uninterpreted ofstring
| Interpreted_ExtraLogic of interpreted_symbol
| Interpreted_Logic of logic_symbol
| TypeSymbol of tptp_base_type
| System ofstring
and general_term =
General_Data of general_data (*general_data*)
| General_Term of general_data * general_term (*general_data : general_term*)
| General_List of general_term list
and tptp_term =
Term_FuncG of symbol * tptp_type list(*special hack for TPTP_Interpret*) * tptp_term list
| Term_Var ofstring
| Term_Conditional of tptp_formula * tptp_term * tptp_term
| Term_Num of number_kind * string
| Term_Distinct_Object ofstring
| Term_Let of tptp_let * tptp_term
and tptp_atom =
TFF_Typed_Atom of symbol * tptp_type option(*only TFF*)
| THF_Atom_term of tptp_term (*from here on, only THF*)
| THF_Atom_conn_term of symbol
and tptp_formula =
Pred of symbol * tptp_term list
| Fmla of symbol * tptp_formula list
| Sequent of tptp_formula list * tptp_formula list
| Quant of quantifier * (string * tptp_type option) list * tptp_formula
| Conditional of tptp_formula * tptp_formula * tptp_formula
| Letof tptp_let * tptp_formula
| Atom of tptp_atom
| Type_fmla of tptp_type
| THF_typing of tptp_formula * tptp_type (*only THF*)
and tptp_let =
Let_fmla of (string * tptp_type option) list * tptp_formula
| Let_term of (string * tptp_type option) list * tptp_term
and tptp_type =
Prod_type of tptp_type * tptp_type
| Fn_type of tptp_type * tptp_type
| Atom_type ofstring * tptp_type list
| Var_type ofstring
| Defined_type of tptp_base_type
| Sum_type of tptp_type * tptp_type (*only THF*)
| Fmla_type of tptp_formula
| Subtype of symbol * symbol (*only THF*)
val Term_Func: symbol * tptp_term list -> tptp_term (*for Yacc parser*)
type general_list = general_term list type parent_details = general_list type useful_info = general_term list type info = useful_info
type annotation = general_term * general_term list
exception DEQUOTE ofstring
type position = string * int * int
datatype tptp_line =
Annotated_Formula of position * language * string * role *
tptp_formula * annotation option
| Include of position * string * stringlist
type tptp_problem = tptp_line list
val dequote : single_quoted -> single_quoted
val role_to_string : role -> string
val status_to_string : status_value -> string
val pos_of_line : tptp_line -> position
(*Returns the list of all files included in a directory and its subdirectories. This is only used for testing the parser/interpreter against
all THF problems.*) val get_file_list : Path.T -> Path.T list
val read_status : string -> status_value val string_of_tptp_term : tptp_term -> string val string_of_interpreted_symbol : interpreted_symbol -> string val string_of_tptp_formula : tptp_formula -> string
val latex_of_tptp_formula : tptp_formula -> string
datatype status_value =
Suc | Unp | Sap | Esa | Sat | Fsa
| Thm | Eqv | Tac | Wec | Eth | Tau
| Wtc | Wth | Cax | Sca | Tca | Wca
| Cup | Csp | Ecs | Csa | Cth | Ceq
| Unc | Wcc | Ect | Fun | Uns | Wuc
| Wct | Scc | Uca | Noc
type name = string type atomic_word = string type inference_rule = atomic_word type file_info = name option type single_quoted = string type file_name = single_quoted type creator_name = atomic_word type variable = string type upper_word = string
datatype language = FOF | CNF | TFF | THF | FOT | TFF_with_arithmetic and role =
Role_Axiom | Role_Hypothesis | Role_Definition | Role_Assumption |
Role_Lemma | Role_Theorem | Role_Conjecture | Role_Negated_Conjecture |
Role_Plain | Role_Fi_Domain | Role_Fi_Functors | Role_Fi_Predicates |
Role_Type | Role_Unknown and general_data = (*Bind of variable * formula_data*)
Atomic_Word ofstring
| Application ofstring * (general_term list)
| V of upper_word (*variable*)
| Number of number_kind * string
| Distinct_Object ofstring
| (*formula_data*) Formula_Data of language * tptp_formula (* $thf(<thf_formula>) *)
| (*formula_data*) Term_Data of tptp_term
and symbol =
Uninterpreted ofstring
| Interpreted_ExtraLogic of interpreted_symbol
| Interpreted_Logic of logic_symbol
| TypeSymbol of tptp_base_type
| System ofstring
and general_term =
General_Data of general_data (*general_data*)
| General_Term of general_data * general_term (*general_data : general_term*)
| General_List of general_term list
and tptp_term =
Term_FuncG of symbol * tptp_type list(*special hack for TPTP_Interpret*) * tptp_term list
| Term_Var ofstring
| Term_Conditional of tptp_formula * tptp_term * tptp_term
| Term_Num of number_kind * string
| Term_Distinct_Object ofstring
| Term_Let of tptp_let * tptp_term
and tptp_atom =
TFF_Typed_Atom of symbol * tptp_type option(*only TFF*)
| THF_Atom_term of tptp_term (*from here on, only THF*)
| THF_Atom_conn_term of symbol
and tptp_formula =
Pred of symbol * tptp_term list
| Fmla of symbol * tptp_formula list
| Sequent of tptp_formula list * tptp_formula list
| Quant of quantifier * (string * tptp_type option) list * tptp_formula
| Conditional of tptp_formula * tptp_formula * tptp_formula
| Letof tptp_let * tptp_formula
| Atom of tptp_atom
| Type_fmla of tptp_type
| THF_typing of tptp_formula * tptp_type
and tptp_let =
Let_fmla of (string * tptp_type option) list * tptp_formula
| Let_term of (string * tptp_type option) list * tptp_term
and tptp_type =
Prod_type of tptp_type * tptp_type
| Fn_type of tptp_type * tptp_type
| Atom_type ofstring * tptp_type list
| Var_type ofstring
| Defined_type of tptp_base_type
| Sum_type of tptp_type * tptp_type
| Fmla_type of tptp_formula
| Subtype of symbol * symbol
fun Term_Func (symb, ts) = Term_FuncG (symb, [], ts)
type general_list = general_term list type parent_details = general_list type useful_info = general_term list type info = useful_info
(*type annotation = (source * info option)*) type annotation = general_term * general_term list
exception DEQUOTE ofstring
type position = string * int * int
datatype tptp_line =
Annotated_Formula of position * language * string * role * tptp_formula * annotation option
| Include of position * string * stringlist
type tptp_problem = tptp_line list
fun debug f x = if Options.default_bool \<^system_option>\<open>ML_exception_trace\<close> then (f x; ()) else ()
fun pos_of_line tptp_line = case tptp_line of
Annotated_Formula (position, _, _, _, _, _) => position
| Include (position, _, _) => position
(*Used for debugging. Returns all files contained within a directory or its subdirectories. Follows symbolic links, filters away directories.
Files are ordered by size*) fun get_file_list path = let fun get_file_list' acc paths = case paths of
[] => acc
| (f :: fs) => let (*NOTE needed since no File.is_link and File.read_link*) val f_str = Path.implode f in if File.is_dir f then let val contents =
File.read_dir f
|> map
(Path.explode
#> Path.append f) in
get_file_list' acc (fs @ contents) end elseif OS.FileSys.isLink f_str then (*follow links -- NOTE this breaks if links are relative paths*)
get_file_list' acc (Path.explode (OS.FileSys.readLink f_str) :: fs) else
get_file_list' ((f, OS.FileSys.fileSize f_str) :: acc) fs end in
get_file_list' [] [path]
|> sort (fn ((_, n1), (_, n2)) => Int.compare (n1, n2))
|> map fst end
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.4Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.