summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Campbell2018-08-02 18:15:02 +0100
committerBrian Campbell2018-08-02 18:16:55 +0100
commitd2a01be233f1ea4bed66819096949aa4f56b2695 (patch)
treecc72842b8ab47ac6e69024630f31825e78f5fd92
parent7dbc1523cdb82bdbfb9fea84b5afcdb4f6e829c2 (diff)
Coq: remove type removal holdover from Lem backend, add MIPS lemma
-rw-r--r--mips/mips_extras.v9
-rw-r--r--src/pretty_print_coq.ml2
2 files changed, 10 insertions, 1 deletions
diff --git a/mips/mips_extras.v b/mips/mips_extras.v
index 6a6aed5c..8ca4546c 100644
--- a/mips/mips_extras.v
+++ b/mips/mips_extras.v
@@ -160,3 +160,12 @@ Definition prerr_string (_:string) : unit := tt.
Definition putchar {T} (_:T) : unit := tt.
Require DecimalString.
Definition string_of_int z := DecimalString.NilZero.string_of_int (Z.to_int z).
+
+
+Lemma MEMr_wrapper_lemma : forall size : Z, 8 * size = 8 * (8 * size รท 8).
+intros.
+rewrite Z.mul_comm.
+rewrite Z.quot_mul; auto with zarith.
+Qed.
+Hint Resolve MEMr_wrapper_lemma : sail.
+
diff --git a/src/pretty_print_coq.ml b/src/pretty_print_coq.ml
index d5925dc0..93a24f4e 100644
--- a/src/pretty_print_coq.ml
+++ b/src/pretty_print_coq.ml
@@ -1311,7 +1311,7 @@ let doc_exp_lem, doc_let_lem =
let epp =
let b = match e1 with E_aux (E_if _,_) -> true | _ -> false in
let middle =
- match fst (untyp_pat pat) with
+ match pat with
| P_aux (P_wild,_) | P_aux (P_typ (_, P_aux (P_wild, _)), _) ->
string ">>"
| P_aux (P_id id,_) ->