aboutsummaryrefslogtreecommitdiff
path: root/src/RewriterInterpProofs1.v
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2019-04-03 16:43:48 -0400
committerGravatar Jason Gross <jasongross9@gmail.com>2019-04-09 21:59:06 -0400
commit067d1f14b03d83dcb1c0a60808919ceff6205836 (patch)
treeab6612a1c1a07321a264b4c3e02d31eb7baac8ff /src/RewriterInterpProofs1.v
parentde6be31e9e0f6be7ca2f61159d6a5a0e6f3969be (diff)
Automate more of the rewriter reification, proof
Now we actually make use of the rewrite-rule-specific proofs, rather than duplicating them inline. We now support reifying `ident.gets_inlined` to `SubstVarLike.is_var_fst_snd_pair_opp_cast`. We also now fix a bug where we previously incorrectly substituted context variables when reifying side conditions (needed for correct reification of split-mul things, coming up soon). Things are unfortunately a bit slow. I'm not sure what's up with my proof of `reflect_ident_iota_interp_related`; it seems more complicated than it should be (maybe partly due to funext concerns). Next up is to split out the rewrite rule generation bits into separate files and have a single tactic that builds the entire package for us (in prep for making the rewriter builder a vernacular). After that I want to more fully parameterize things over `ident`, and then also over the non-container base-types (which will require some reworking of how we handle special identifiers). Additionally, I want to make the rewrite rule definitions not depend on Language.v. After | File Name | Before || Change | % Change ----------------------------------------------------------------------------------------------- 20m50.18s | Total | 23m01.24s || -2m11.06s | -9.48% ----------------------------------------------------------------------------------------------- 0m27.24s | RewriterRulesGood.vo | 1m34.94s || -1m07.70s | -71.30% 0m54.89s | RewriterRulesInterpGood.vo | 1m57.72s || -1m02.82s | -53.37% 1m37.88s | RewriterWf2.vo | 1m47.69s || -0m09.81s | -9.10% 1m16.71s | Rewriter.vo | 1m12.61s || +0m04.10s | +5.64% 0m37.14s | ExtractionHaskell/unsaturated_solinas | 0m40.06s || -0m02.92s | -7.28% 0m36.10s | RewriterWf1.vo | 0m33.12s || +0m02.98s | +8.99% 0m18.31s | p256_32.c | 0m20.70s || -0m02.39s | -11.54% 1m43.31s | Fancy/Barrett256.vo | 1m42.09s || +0m01.21s | +1.19% 0m32.46s | ExtractionHaskell/saturated_solinas | 0m30.92s || +0m01.53s | +4.98% 0m23.44s | ExtractionOCaml/word_by_word_montgomery | 0m22.26s || +0m01.17s | +5.30% 0m12.17s | ExtractionOCaml/word_by_word_montgomery.ml | 0m13.58s || -0m01.41s | -10.38% 0m10.04s | p224_32.c | 0m08.20s || +0m01.83s | +22.43% 0m09.98s | ExtractionOCaml/saturated_solinas | 0m11.67s || -0m01.68s | -14.48% 0m07.80s | ExtractionOCaml/saturated_solinas.ml | 0m06.16s || +0m01.63s | +26.62% 0m06.87s | ExtractionHaskell/saturated_solinas.hs | 0m04.98s || +0m01.88s | +37.95% 3m23.11s | p384_32.c | 3m22.61s || +0m00.50s | +0.24% 0m59.32s | ExtractionHaskell/word_by_word_montgomery | 0m58.76s || +0m00.56s | +0.95% 0m46.19s | p521_32.c | 0m47.16s || -0m00.96s | -2.05% 0m45.26s | RewriterInterpProofs1.vo | 0m45.64s || -0m00.38s | -0.83% 0m39.50s | p521_64.c | 0m38.97s || +0m00.53s | +1.36% 0m36.38s | PushButtonSynthesis/UnsaturatedSolinas.vo | 0m36.00s || +0m00.38s | +1.05% 0m34.40s | Fancy/Montgomery256.vo | 0m34.63s || -0m00.23s | -0.66% 0m26.95s | PushButtonSynthesis/WordByWordMontgomery.vo | 0m26.44s || +0m00.50s | +1.92% 0m25.62s | SlowPrimeSynthesisExamples.vo | 0m26.04s || -0m00.41s | -1.61% 0m24.39s | RewriterRulesProofs.vo | 0m24.18s || +0m00.21s | +0.86% 0m20.49s | PushButtonSynthesis/BarrettReduction.vo | 0m20.62s || -0m00.13s | -0.63% 0m18.54s | p448_solinas_64.c | 0m19.15s || -0m00.60s | -3.18% 0m17.37s | secp256k1_32.c | 0m17.70s || -0m00.32s | -1.86% 0m14.80s | p434_64.c | 0m14.16s || +0m00.64s | +4.51% 0m14.05s | ExtractionOCaml/unsaturated_solinas | 0m14.28s || -0m00.22s | -1.61% 0m09.17s | ExtractionOCaml/unsaturated_solinas.ml | 0m09.58s || -0m00.41s | -4.27% 0m08.47s | ExtractionHaskell/word_by_word_montgomery.hs | 0m08.22s || +0m00.25s | +3.04% 0m07.69s | p384_64.c | 0m07.72s || -0m00.02s | -0.38% 0m06.80s | BoundsPipeline.vo | 0m06.65s || +0m00.14s | +2.25% 0m06.49s | ExtractionHaskell/unsaturated_solinas.hs | 0m05.59s || +0m00.90s | +16.10% 0m03.54s | PushButtonSynthesis/Primitives.vo | 0m03.46s || +0m00.08s | +2.31% 0m03.35s | PushButtonSynthesis/SmallExamples.vo | 0m03.36s || -0m00.00s | -0.29% 0m03.19s | PushButtonSynthesis/SaturatedSolinas.vo | 0m03.15s || +0m00.04s | +1.26% 0m02.79s | curve25519_32.c | 0m03.32s || -0m00.52s | -15.96% 0m02.66s | PushButtonSynthesis/FancyMontgomeryReduction.vo | 0m02.73s || -0m00.06s | -2.56% 0m02.55s | RewriterRules.vo | 0m02.52s || +0m00.02s | +1.19% 0m01.98s | curve25519_64.c | 0m01.57s || +0m00.40s | +26.11% 0m01.78s | p224_64.c | 0m01.30s || +0m00.48s | +36.92% 0m01.60s | secp256k1_64.c | 0m01.74s || -0m00.13s | -8.04% 0m01.45s | p256_64.c | 0m01.55s || -0m00.10s | -6.45% 0m01.34s | RewriterProofs.vo | 0m01.16s || +0m00.18s | +15.51% 0m01.33s | CLI.vo | 0m01.40s || -0m00.06s | -4.99% 0m01.12s | StandaloneOCamlMain.vo | 0m01.09s || +0m00.03s | +2.75% 0m01.10s | CompilersTestCases.vo | 0m01.08s || +0m00.02s | +1.85% 0m01.08s | StandaloneHaskellMain.vo | 0m01.02s || +0m00.06s | +5.88%
Diffstat (limited to 'src/RewriterInterpProofs1.v')
-rw-r--r--src/RewriterInterpProofs1.v46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/RewriterInterpProofs1.v b/src/RewriterInterpProofs1.v
index 611a6ca5b..145a3d388 100644
--- a/src/RewriterInterpProofs1.v
+++ b/src/RewriterInterpProofs1.v
@@ -455,52 +455,6 @@ Module Compilers.
subst; reflexivity.
Qed.
- Lemma interp_Base_value {t v1 v2}
- : value_interp_related v1 v2
- -> value_interp_related (@Base_value t v1) v2.
- Proof using Type.
- cbv [Base_value]; destruct t; exact id.
- Qed.
-
- Lemma interp_splice_under_lets_with_value_of_ex {T T' t R e f v}
- : (exists fv (xv : T'),
- UnderLets.interp_related ident_interp R e xv
- /\ (forall x1 x2,
- R x1 x2
- -> value_interp_related (f x1) (fv x2))
- /\ fv xv = v)
- -> value_interp_related (@splice_under_lets_with_value T t e f) v.
- Proof using Type.
- induction t as [|s IHs d IHd].
- all: repeat first [ progress cbn [value_interp_related splice_under_lets_with_value] in *
- | progress intros
- | progress destruct_head'_ex
- | progress destruct_head'_and
- | progress subst
- | eassumption
- | solve [ eauto ]
- | now (eapply UnderLets.splice_interp_related_of_ex; eauto)
- | match goal with
- | [ H : _ |- _ ] => eapply H; clear H
- | [ |- exists fv xv, _ /\ _ /\ _ ]
- => do 2 eexists; repeat apply conj; [ eassumption | | ]
- end ].
- Qed.
-
- Lemma interp_splice_value_with_lets_of_ex {t t' e f v}
- : (exists fv xv,
- value_interp_related e xv
- /\ (forall x1 x2,
- value_interp_related x1 x2
- -> value_interp_related (f x1) (fv x2))
- /\ fv xv = v)
- -> value_interp_related (@splice_value_with_lets t t' e f) v.
- Proof using Type.
- cbv [splice_value_with_lets]; break_innermost_match.
- { apply interp_splice_under_lets_with_value_of_ex. }
- { intros; destruct_head'_ex; destruct_head'_and; subst; eauto. }
- Qed.
-
Lemma interp_reify_and_let_binds {with_lets t v1 v}
: value_interp_related v1 v
-> UnderLets_interp_related (@reify_and_let_binds_cps with_lets t v1 _ UnderLets.Base) v.