summaryrefslogtreecommitdiff
path: root/src/constraint.ml
diff options
context:
space:
mode:
authorAlasdair Armstrong2017-08-29 18:00:51 +0100
committerAlasdair Armstrong2017-08-29 18:00:51 +0100
commit04c32956a50d2e0a2f62b02828e9b549854a2b8c (patch)
treecbdaadcb1f11fa8c740378d7fa6a3e04b63f7802 /src/constraint.ml
parent9cc9b5afff769b9185c6e6e4afad496d58d1a38d (diff)
parent2300d45d6645faae3c00a183e80547c1a6cb9165 (diff)
Merge branch 'experiments' of https://bitbucket.org/Peter_Sewell/sail into experiments
Diffstat (limited to 'src/constraint.ml')
-rw-r--r--src/constraint.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/constraint.ml b/src/constraint.ml
index f71193b2..e8252f2a 100644
--- a/src/constraint.ml
+++ b/src/constraint.ml
@@ -19,7 +19,7 @@ let big_int_op : nexp_op -> big_int -> big_int -> big_int = function
let rec arith constr =
let constr' = match constr with
| NFun (op, x, y) -> NFun (op, arith x, arith y)
- | N2n c -> arith c
+ | N2n c -> N2n (arith c)
| c -> c
in
match constr' with
@@ -188,13 +188,13 @@ let rec sexpr_of_cbool = function
| BFun (And, x, y) -> sfun "and" [sexpr_of_cbool x; sexpr_of_cbool y]
| BFun (Or, x, y) -> sfun "or" [sexpr_of_cbool x; sexpr_of_cbool y]
| Not x -> sfun "not" [sexpr_of_cbool x]
- | CFun (op, x, y) -> cop_sexpr op (sexpr_of_nexp x) (sexpr_of_nexp y)
+ | CFun (op, x, y) -> cop_sexpr op (sexpr_of_nexp (arith x)) (sexpr_of_nexp (arith y))
| Branch xs -> sfun "BRANCH" (List.map sexpr_of_cbool xs)
| Boolean true -> Atom "true"
| Boolean false -> Atom "false"
let sexpr_of_constraint_leaf = function
- | LFun (op, x, y) -> cop_sexpr op (sexpr_of_nexp x) (sexpr_of_nexp y)
+ | LFun (op, x, y) -> cop_sexpr op (sexpr_of_nexp (arith x)) (sexpr_of_nexp (arith y))
| LBoolean true -> Atom "true"
| LBoolean false -> Atom "false"