summaryrefslogtreecommitdiff
path: root/src/pretty_print_coq.ml
diff options
context:
space:
mode:
authorJon French2019-02-03 17:50:01 +0000
committerJon French2019-02-03 17:50:01 +0000
commitab3f3671d4dd682b2aee922d5a05e9455afd5849 (patch)
treed951e1beac8fa0af18c71e6c33879925b2707049 /src/pretty_print_coq.ml
parentbce4ee6000254c368fc83cdf62bdcdb9374b9691 (diff)
parent4f45f462333c5494a84886677bc78a49c84da081 (diff)
Merge branch 'sail2' into rmem_interpreter
Diffstat (limited to 'src/pretty_print_coq.ml')
-rw-r--r--src/pretty_print_coq.ml11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pretty_print_coq.ml b/src/pretty_print_coq.ml
index 279a8182..b5d72807 100644
--- a/src/pretty_print_coq.ml
+++ b/src/pretty_print_coq.ml
@@ -239,9 +239,9 @@ let doc_nexp ctx ?(skip_vars=KidSet.empty) nexp =
and app (Nexp_aux (n,l) as nexp) =
match n with
| Nexp_app (Id_aux (Id "div",_), [n1;n2])
- -> separate space [string "Z.quot"; atomic n1; atomic n2]
+ -> separate space [string "ZEuclid.div"; atomic n1; atomic n2]
| Nexp_app (Id_aux (Id "mod",_), [n1;n2])
- -> separate space [string "Z.rem"; atomic n1; atomic n2]
+ -> separate space [string "ZEuclid.modulo"; atomic n1; atomic n2]
| Nexp_app (Id_aux (Id "abs_atom",_), [n1])
-> separate space [string "Z.abs"; atomic n1]
| _ -> atomic nexp
@@ -585,8 +585,9 @@ let doc_lit (L_aux(lit,l)) =
| L_false -> utf8string "false"
| L_true -> utf8string "true"
| L_num i ->
- let ipp = Big_int.to_string i in
- utf8string ipp
+ let s = Big_int.to_string i in
+ let ipp = utf8string s in
+ if Big_int.less i Big_int.zero then parens ipp else ipp
| L_hex n -> failwith "Shouldn't happen" (*"(num_to_vec " ^ ("0x" ^ n) ^ ")" (*shouldn't happen*)*)
| L_bin n -> failwith "Shouldn't happen" (*"(num_to_vec " ^ ("0b" ^ n) ^ ")" (*shouldn't happen*)*)
| L_undef ->
@@ -1296,7 +1297,7 @@ let doc_exp, doc_let =
[parens (string "_limit_reduces _acc")]
else match f with
| Id_aux (Id x,_) when is_prefix "#rec#" x ->
- main_call @ [parens (string "Zwf_well_founded _ _")]
+ main_call @ [parens (string "Zwf_guarded _")]
| _ -> main_call
in hang 2 (flow (break 1) all) in