equal
deleted
inserted
replaced
823 let |
823 let |
824 val config = |
824 val config = |
825 {cautious = cautious, |
825 {cautious = cautious, |
826 problem_name = |
826 problem_name = |
827 SOME (TPTP_Problem_Name.parse_problem_name ((Path.base #> Path.implode) |
827 SOME (TPTP_Problem_Name.parse_problem_name ((Path.base #> Path.implode) |
828 file_name)) |
828 file_name))} |
829 } |
|
830 handle _(*FIXME*) => |
|
831 {cautious = cautious, |
|
832 problem_name = NONE |
|
833 } |
|
834 in interpret_file' config [] path_prefix file_name end |
829 in interpret_file' config [] path_prefix file_name end |
835 |
830 |
836 fun import_file cautious path_prefix file_name type_map const_map thy = |
831 fun import_file cautious path_prefix file_name type_map const_map thy = |
837 let |
832 let |
838 val prob_name = |
833 val prob_name = |
839 TPTP_Problem_Name.parse_problem_name (Path.implode (Path.base file_name)) |
834 TPTP_Problem_Name.parse_problem_name (Path.implode (Path.base file_name)) |
840 handle _(*FIXME*) => TPTP_Problem_Name.Nonstandard (Path.implode file_name) |
|
841 val (result, thy') = |
835 val (result, thy') = |
842 interpret_file cautious path_prefix file_name type_map const_map thy |
836 interpret_file cautious path_prefix file_name type_map const_map thy |
|
837 (*FIXME doesn't check if problem has already been interpreted*) |
843 in TPTP_Data.map (cons ((prob_name, result))) thy' end |
838 in TPTP_Data.map (cons ((prob_name, result))) thy' end |
844 |
839 |
845 val _ = |
840 val _ = |
846 Outer_Syntax.improper_command @{command_spec "import_tptp"} "import TPTP problem" |
841 Outer_Syntax.improper_command @{command_spec "import_tptp"} "import TPTP problem" |
847 (Parse.path >> (fn path => |
842 (Parse.path >> (fn path => |