39348
|
1 |
(* ========================================================================= *)
|
|
2 |
(* A STORE FOR UNIT THEOREMS *)
|
|
3 |
(* Copyright (c) 2001-2006 Joe Hurd, distributed under the GNU GPL version 2 *)
|
|
4 |
(* ========================================================================= *)
|
|
5 |
|
|
6 |
signature Units =
|
|
7 |
sig
|
|
8 |
|
|
9 |
(* ------------------------------------------------------------------------- *)
|
|
10 |
(* A type of unit store. *)
|
|
11 |
(* ------------------------------------------------------------------------- *)
|
|
12 |
|
|
13 |
type unitThm = Literal.literal * Thm.thm
|
|
14 |
|
|
15 |
type units
|
|
16 |
|
|
17 |
(* ------------------------------------------------------------------------- *)
|
|
18 |
(* Basic operations. *)
|
|
19 |
(* ------------------------------------------------------------------------- *)
|
|
20 |
|
|
21 |
val empty : units
|
|
22 |
|
|
23 |
val size : units -> int
|
|
24 |
|
|
25 |
val toString : units -> string
|
|
26 |
|
|
27 |
val pp : units Print.pp
|
|
28 |
|
|
29 |
(* ------------------------------------------------------------------------- *)
|
|
30 |
(* Add units into the store. *)
|
|
31 |
(* ------------------------------------------------------------------------- *)
|
|
32 |
|
|
33 |
val add : units -> unitThm -> units
|
|
34 |
|
|
35 |
val addList : units -> unitThm list -> units
|
|
36 |
|
|
37 |
(* ------------------------------------------------------------------------- *)
|
|
38 |
(* Matching. *)
|
|
39 |
(* ------------------------------------------------------------------------- *)
|
|
40 |
|
|
41 |
val match : units -> Literal.literal -> (unitThm * Subst.subst) option
|
|
42 |
|
|
43 |
(* ------------------------------------------------------------------------- *)
|
|
44 |
(* Reducing by repeated matching and resolution. *)
|
|
45 |
(* ------------------------------------------------------------------------- *)
|
|
46 |
|
|
47 |
val reduce : units -> Rule.rule
|
|
48 |
|
|
49 |
end
|