-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconjectures.ml
More file actions
53 lines (48 loc) · 1.26 KB
/
conjectures.ml
File metadata and controls
53 lines (48 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
open Print
open Debug
open Rewriting
let true_s = "**** CONJECTURE: TRUE ****"
let false_s = "**** CONJECTURE: FALSE ***"
let stars_s = "**************************"
let decide_conjecture dp (b,(s,t)) =
let s' = normalize dp s in
let t' = normalize dp t in
if s' = t' then
begin
if b then
info true_s
else
info false_s;
info ((string_of_rewrite s s') ^ " = " ^
(string_of_rewrite_inv t t'));
end
else
begin
if b then
info false_s
else
info true_s;
info ((string_of_rewrite s s') ^ " != " ^
(string_of_rewrite_inv t t'));
end;
info stars_s
;;
let rec semidecide_conjectures rules = function
[] -> []
| ((b,(s,t)) as conj)::cs ->
let s' = normalize rules s in
let t' = normalize rules t in
if s' = t' then
begin
if b then
info true_s
else
info false_s;
info ((string_of_rewrite s s') ^ " = " ^
(string_of_rewrite_inv t t')) ;
info stars_s;
semidecide_conjectures rules cs
end
else
conj::(semidecide_conjectures rules cs)
;;