Source file constraints__simple__Simple.ml
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
52
53
54
type t =
| Cst of Constraints__cst__C.t
| IsTrue of Constraints__isTrue__C.t
| Not of Constraints__not___C.t
| Add of Constraints__add__C.t
| Le of Constraints__le__C.t
| Or of Constraints__or__C.t
| Equiv of Constraints__equiv__C.t
| BoolPresent of Constraints__boolPresent__C.t
let compute_vars_ti (c: t) (si: Cp__Impl0.Si.t) : unit =
match c with
| Cst c1 -> Constraints__cst__C.compute_vars_ti c1 si
| IsTrue c1 -> Constraints__isTrue__C.compute_vars_ti c1 si
| Not c1 -> Constraints__not___C.compute_vars_ti c1 si
| Add c1 -> Constraints__add__C.compute_vars_ti c1 si
| Le c1 -> Constraints__le__C.compute_vars_ti c1 si
| Or c1 -> Constraints__or__C.compute_vars_ti c1 si
| Equiv c1 -> Constraints__equiv__C.compute_vars_ti c1 si
| BoolPresent c1 -> Constraints__boolPresent__C.compute_vars_ti c1 si
let compute_vars_tb (c: t) (sb: Cp__Impl0.Sb.t) : unit =
match c with
| Cst c1 -> Constraints__cst__C.compute_vars_tb c1 sb
| IsTrue c1 -> Constraints__isTrue__C.compute_vars_tb c1 sb
| Not c1 -> Constraints__not___C.compute_vars_tb c1 sb
| Add c1 -> Constraints__add__C.compute_vars_tb c1 sb
| Le c1 -> Constraints__le__C.compute_vars_tb c1 sb
| Or c1 -> Constraints__or__C.compute_vars_tb c1 sb
| Equiv c1 -> Constraints__equiv__C.compute_vars_tb c1 sb
| BoolPresent c1 -> Constraints__boolPresent__C.compute_vars_tb c1 sb
let propagate (e: (Cp__DomI.t, Cp__DomB.t) Cp__Type.env) (c: t) : unit =
match c with
| Cst c1 -> Constraints__cst__C.propagate e c1
| IsTrue c1 -> Constraints__isTrue__C.propagate e c1
| Not c1 -> Constraints__not___C.propagate e c1
| Add c1 -> Constraints__add__C.propagate e c1
| Le c1 -> Constraints__le__C.propagate e c1
| Or c1 -> Constraints__or__C.propagate e c1
| Equiv c1 -> Constraints__equiv__C.propagate e c1
| BoolPresent c1 -> Constraints__boolPresent__C.propagate e c1
let check_model (mo: (Z.t, bool) Cp__Type.model) (c: t) : bool =
match c with
| Cst c1 -> Constraints__cst__C.check_model mo c1
| IsTrue c1 -> Constraints__isTrue__C.check_model mo c1
| Not c1 -> Constraints__not___C.check_model mo c1
| Add c1 -> Constraints__add__C.check_model mo c1
| Le c1 -> Constraints__le__C.check_model mo c1
| Or c1 -> Constraints__or__C.check_model mo c1
| Equiv c1 -> Constraints__equiv__C.check_model mo c1
| BoolPresent c1 -> Constraints__boolPresent__C.check_model mo c1