| 1 |
Require Import Rewriter.Language.Language. |
| 2 |
Require Import Crypto.Language.API. |
| 3 |
Require Import Rewriter.Language.Wf. |
| 4 |
Require Import Crypto.Language.WfExtra. |
| 5 |
Require Import Crypto.Rewriter.AllTacticsExtra. |
| 6 |
Require Import Crypto.Rewriter.RulesProofs. |
| 7 |
|
| 8 |
Module Compilers. |
| 9 |
Import Language.Compilers. |
| 10 |
Import Language.API.Compilers. |
| 11 |
Import Language.Wf.Compilers. |
| 12 |
Import Language.WfExtra.Compilers. |
| 13 |
Import Rewriter.AllTacticsExtra.Compilers.RewriteRules.GoalType. |
| 14 |
Import Rewriter.AllTactics.Compilers.RewriteRules.Tactic. |
| 15 |
Import Compilers.Classes. |
| 16 |
|
| 17 |
Module Import RewriteRules. |
| 18 |
Section __. |
| 19 |
Definition VerifiedRewriterStripLiteralCasts : VerifiedRewriter_with_args false false true strip_literal_casts_rewrite_rules_proofs. |
| 20 |
Proof using All. make_rewriter. Defined. |
| 21 |
|
| 22 |
Definition default_opts := Eval hnf in @default_opts VerifiedRewriterStripLiteralCasts. |
| 23 |
Let optsT := Eval hnf in optsT VerifiedRewriterStripLiteralCasts. |
| 24 |
|
| 25 |
Definition RewriteStripLiteralCasts (opts : optsT) {t : API.type} := Eval hnf in @Rewrite VerifiedRewriterStripLiteralCasts opts t. |
| 26 |
|
| 27 |
Lemma Wf_RewriteStripLiteralCasts opts {t} e (Hwf : Wf e) : Wf (@RewriteStripLiteralCasts opts t e). |
| 28 |
Proof. now apply VerifiedRewriterStripLiteralCasts. Qed. |
| 29 |
|
| 30 |
Lemma Interp_RewriteStripLiteralCasts opts {t} e (Hwf : Wf e) : expr.Interp (@Compilers.ident_interp) (@RewriteStripLiteralCasts opts t e) == expr.Interp (@Compilers.ident_interp) e. |
| 31 |
Proof. now apply VerifiedRewriterStripLiteralCasts. Qed. |
| 32 |
End __. |
| 33 |
End RewriteRules. |
| 34 |
|
| 35 |
Module Export Hints. |
| 36 |
#[global] |
| 37 |
Hint Resolve Wf_RewriteStripLiteralCasts : wf wf_extra. |
| 38 |
#[global] |
| 39 |
Hint Opaque RewriteStripLiteralCasts : wf wf_extra interp interp_extra rewrite. |
| 40 |
#[global] |
| 41 |
Hint Rewrite @Interp_RewriteStripLiteralCasts : interp interp_extra. |
| 42 |
End Hints. |
| 43 |
End Compilers. |