equal
deleted
inserted
replaced
9 signature ATP_PROOF = |
9 signature ATP_PROOF = |
10 sig |
10 sig |
11 type 'a fo_term = 'a ATP_Problem.fo_term |
11 type 'a fo_term = 'a ATP_Problem.fo_term |
12 type ('a, 'b, 'c) formula = ('a, 'b, 'c) ATP_Problem.formula |
12 type ('a, 'b, 'c) formula = ('a, 'b, 'c) ATP_Problem.formula |
13 type 'a problem = 'a ATP_Problem.problem |
13 type 'a problem = 'a ATP_Problem.problem |
|
14 |
|
15 exception UNRECOGNIZED_ATP_PROOF of unit |
14 |
16 |
15 datatype failure = |
17 datatype failure = |
16 Unprovable | |
18 Unprovable | |
17 IncompleteUnprovable | |
19 IncompleteUnprovable | |
18 ProofMissing | |
20 ProofMissing | |
63 |
65 |
64 structure ATP_Proof : ATP_PROOF = |
66 structure ATP_Proof : ATP_PROOF = |
65 struct |
67 struct |
66 |
68 |
67 open ATP_Problem |
69 open ATP_Problem |
|
70 |
|
71 exception UNRECOGNIZED_ATP_PROOF of unit |
68 |
72 |
69 datatype failure = |
73 datatype failure = |
70 Unprovable | |
74 Unprovable | |
71 IncompleteUnprovable | |
75 IncompleteUnprovable | |
72 ProofMissing | |
76 ProofMissing | |
443 fun parse_line problem = parse_tstp_line problem || parse_spass_line |
447 fun parse_line problem = parse_tstp_line problem || parse_spass_line |
444 fun parse_proof problem s = |
448 fun parse_proof problem s = |
445 s |> strip_spaces_except_between_ident_chars |
449 s |> strip_spaces_except_between_ident_chars |
446 |> raw_explode |
450 |> raw_explode |
447 |> Scan.finite Symbol.stopper |
451 |> Scan.finite Symbol.stopper |
448 (Scan.error (!! (fn _ => raise Fail "unrecognized ATP output") |
452 (Scan.error (!! (fn _ => raise UNRECOGNIZED_ATP_PROOF ()) |
449 (Scan.repeat1 (parse_line problem)))) |
453 (Scan.repeat1 (parse_line problem)))) |
450 |> fst |
454 |> fst |
451 |
455 |
452 fun clean_up_dependency seen dep = find_first (curry is_same_step dep) seen |
456 fun clean_up_dependency seen dep = find_first (curry is_same_step dep) seen |
453 fun clean_up_dependencies _ [] = [] |
457 fun clean_up_dependencies _ [] = [] |