summaryrefslogtreecommitdiff
path: root/src/constraint.ml
diff options
context:
space:
mode:
authorBrian Campbell2019-06-12 17:25:47 +0100
committerBrian Campbell2019-06-13 18:03:07 +0100
commitd2f702da3b5cc9934f8cd3ea457f93c6ce2b6c12 (patch)
treeb20fb23cb690571bdbdf28b6f8694cb44c8f7d63 /src/constraint.ml
parent4b83ad134a472159f730a015187f036104ff35fd (diff)
Add AST for greater-than and less-than constraints
Mostly to make constraints sent to the SMT solver and Coq nicer, but also makes it easy to remove uninformative constraints in the Coq back-end.
Diffstat (limited to 'src/constraint.ml')
-rw-r--r--src/constraint.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/constraint.ml b/src/constraint.ml
index 1a4129ff..6c34bc9b 100644
--- a/src/constraint.ml
+++ b/src/constraint.ml
@@ -192,7 +192,9 @@ let to_smt l vars constr =
match aux with
| NC_equal (nexp1, nexp2) -> sfun "=" [smt_nexp nexp1; smt_nexp nexp2]
| NC_bounded_le (nexp1, nexp2) -> sfun "<=" [smt_nexp nexp1; smt_nexp nexp2]
+ | NC_bounded_lt (nexp1, nexp2) -> sfun "<" [smt_nexp nexp1; smt_nexp nexp2]
| NC_bounded_ge (nexp1, nexp2) -> sfun ">=" [smt_nexp nexp1; smt_nexp nexp2]
+ | NC_bounded_gt (nexp1, nexp2) -> sfun ">" [smt_nexp nexp1; smt_nexp nexp2]
| NC_not_equal (nexp1, nexp2) -> sfun "not" [sfun "=" [smt_nexp nexp1; smt_nexp nexp2]]
| NC_set (v, ints) ->
sfun "or" (List.map (fun i -> sfun "=" [smt_var v; Atom (Big_int.to_string i)]) ints)