39348
|
1 |
(* ========================================================================= *)
|
|
2 |
(* THE RESOLUTION PROOF PROCEDURE *)
|
72004
|
3 |
(* Copyright (c) 2001 Joe Leslie-Hurd, distributed under the BSD License *)
|
39348
|
4 |
(* ========================================================================= *)
|
|
5 |
|
|
6 |
signature Resolution =
|
|
7 |
sig
|
|
8 |
|
|
9 |
(* ------------------------------------------------------------------------- *)
|
|
10 |
(* A type of resolution proof procedures. *)
|
|
11 |
(* ------------------------------------------------------------------------- *)
|
|
12 |
|
|
13 |
type parameters =
|
|
14 |
{active : Active.parameters,
|
|
15 |
waiting : Waiting.parameters}
|
|
16 |
|
|
17 |
type resolution
|
|
18 |
|
|
19 |
(* ------------------------------------------------------------------------- *)
|
|
20 |
(* Basic operations. *)
|
|
21 |
(* ------------------------------------------------------------------------- *)
|
|
22 |
|
|
23 |
val default : parameters
|
|
24 |
|
|
25 |
val new :
|
|
26 |
parameters -> {axioms : Thm.thm list, conjecture : Thm.thm list} ->
|
|
27 |
resolution
|
|
28 |
|
|
29 |
val active : resolution -> Active.active
|
|
30 |
|
|
31 |
val waiting : resolution -> Waiting.waiting
|
|
32 |
|
|
33 |
val pp : resolution Print.pp
|
|
34 |
|
|
35 |
(* ------------------------------------------------------------------------- *)
|
|
36 |
(* The main proof loop. *)
|
|
37 |
(* ------------------------------------------------------------------------- *)
|
|
38 |
|
|
39 |
datatype decision =
|
|
40 |
Contradiction of Thm.thm
|
|
41 |
| Satisfiable of Thm.thm list
|
|
42 |
|
|
43 |
datatype state =
|
|
44 |
Decided of decision
|
|
45 |
| Undecided of resolution
|
|
46 |
|
|
47 |
val iterate : resolution -> state
|
|
48 |
|
|
49 |
val loop : resolution -> decision
|
|
50 |
|
|
51 |
end
|