summaryrefslogtreecommitdiff
path: root/src/pretty_print_lem.ml
diff options
context:
space:
mode:
authorJon French2019-04-15 16:23:44 +0100
committerJon French2019-04-15 16:23:44 +0100
commita230fb980a70f0484daa01bb69c0204b431c9267 (patch)
tree5fb4b9749afff963635b0d31301ebc3af124f208 /src/pretty_print_lem.ml
parenta9f0b829507e9882efdb59cce4d83ea7e87f5f71 (diff)
parent4529e0acc377bed4d1bab4230f4023e4bee3ae85 (diff)
Merge branch 'sail2' of github.com:rems-project/sail into sail2
Diffstat (limited to 'src/pretty_print_lem.ml')
-rw-r--r--src/pretty_print_lem.ml8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pretty_print_lem.ml b/src/pretty_print_lem.ml
index 633d910e..10441ed5 100644
--- a/src/pretty_print_lem.ml
+++ b/src/pretty_print_lem.ml
@@ -715,11 +715,12 @@ let doc_exp_lem, doc_let_lem =
| _ -> raise (Reporting.err_unreachable l __POS__
"Unexpected number of arguments for loop combinator")
end
- | Id_aux (Id (("while#" | "until#") as combinator), _) ->
- let combinator = String.sub combinator 0 (String.length combinator - 1) in
+ | Id_aux (Id (("while#" | "until#" | "while#t" | "until#t") as combinator), _) ->
+ let combinator = String.sub combinator 0 (String.index combinator '#') in
begin
match args with
- | [cond; varstuple; body] ->
+ | [cond; varstuple; body]
+ | [cond; varstuple; body; _] -> (* Ignore termination measures - not used in Lem *)
let return (E_aux (e, a)) = E_aux (E_internal_return (E_aux (e, a)), a) in
let csuffix, cond, body =
match effectful (effect_of cond), effectful (effect_of body) with
@@ -1485,6 +1486,7 @@ let rec doc_def_lem type_env def =
| DEF_mapdef (MD_aux (_, (l, _))) -> unreachable l __POS__ "Lem doesn't support mappings"
| DEF_pragma _ -> empty
| DEF_measure _ -> empty (* we might use these in future *)
+ | DEF_loop_measures _ -> empty
let find_exc_typ defs =
let is_exc_typ_def = function