21147
|
1 |
structure ROOT =
|
|
2 |
struct
|
|
3 |
|
|
4 |
structure HOL =
|
|
5 |
struct
|
|
6 |
|
|
7 |
fun nota false = true
|
|
8 |
| nota true = false;
|
|
9 |
|
|
10 |
end; (*struct HOL*)
|
|
11 |
|
|
12 |
structure IntDef =
|
|
13 |
struct
|
|
14 |
|
|
15 |
datatype nat = Zero_nat | Succ_nat of nat;
|
|
16 |
|
|
17 |
fun less_nat Zero_nat (Succ_nat n) = true
|
|
18 |
| less_nat na Zero_nat = false
|
|
19 |
| less_nat (Succ_nat m) (Succ_nat nb) = less_nat m nb;
|
|
20 |
|
|
21 |
fun less_eq_nat m n = HOL.nota (less_nat n m);
|
|
22 |
|
|
23 |
end; (*struct IntDef*)
|
|
24 |
|
|
25 |
structure Codegen =
|
|
26 |
struct
|
|
27 |
|
|
28 |
fun in_interval (k, l) n =
|
|
29 |
(IntDef.less_eq_nat k n) andalso (IntDef.less_eq_nat n l);
|
|
30 |
|
|
31 |
end; (*struct Codegen*)
|
|
32 |
|
|
33 |
end; (*struct ROOT*)
|