From d2a01be233f1ea4bed66819096949aa4f56b2695 Mon Sep 17 00:00:00 2001 From: Brian Campbell Date: Thu, 2 Aug 2018 18:15:02 +0100 Subject: Coq: remove type removal holdover from Lem backend, add MIPS lemma --- mips/mips_extras.v | 9 +++++++++ src/pretty_print_coq.ml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) 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,_) -> -- cgit v1.2.3