diff options
| author | Brian Campbell | 2019-06-12 17:25:47 +0100 |
|---|---|---|
| committer | Brian Campbell | 2019-06-13 18:03:07 +0100 |
| commit | d2f702da3b5cc9934f8cd3ea457f93c6ce2b6c12 (patch) | |
| tree | b20fb23cb690571bdbdf28b6f8694cb44c8f7d63 /src/initial_check.ml | |
| parent | 4b83ad134a472159f730a015187f036104ff35fd (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/initial_check.ml')
| -rw-r--r-- | src/initial_check.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/initial_check.ml b/src/initial_check.ml index 8a61134c..903941e3 100644 --- a/src/initial_check.ml +++ b/src/initial_check.ml @@ -238,8 +238,8 @@ and to_ast_constraint ctx (P.ATyp_aux (aux, l) as atyp) = | "!=" -> NC_not_equal (to_ast_nexp ctx t1, to_ast_nexp ctx t2) | ">=" -> NC_bounded_ge (to_ast_nexp ctx t1, to_ast_nexp ctx t2) | "<=" -> NC_bounded_le (to_ast_nexp ctx t1, to_ast_nexp ctx t2) - | ">" -> NC_bounded_ge (to_ast_nexp ctx t1, nsum (to_ast_nexp ctx t2) (nint 1)) - | "<" -> NC_bounded_le (nsum (to_ast_nexp ctx t1) (nint 1), to_ast_nexp ctx t2) + | ">" -> NC_bounded_gt (to_ast_nexp ctx t1, to_ast_nexp ctx t2) + | "<" -> NC_bounded_lt (to_ast_nexp ctx t1, to_ast_nexp ctx t2) | "&" -> NC_and (to_ast_constraint ctx t1, to_ast_constraint ctx t2) | "|" -> NC_or (to_ast_constraint ctx t1, to_ast_constraint ctx t2) | _ -> |
