diff options
| author | Jon French | 2019-04-15 16:23:44 +0100 |
|---|---|---|
| committer | Jon French | 2019-04-15 16:23:44 +0100 |
| commit | a230fb980a70f0484daa01bb69c0204b431c9267 (patch) | |
| tree | 5fb4b9749afff963635b0d31301ebc3af124f208 /src/pretty_print_lem.ml | |
| parent | a9f0b829507e9882efdb59cce4d83ea7e87f5f71 (diff) | |
| parent | 4529e0acc377bed4d1bab4230f4023e4bee3ae85 (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.ml | 8 |
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 |
