diff options
author | 2016-11-13 17:00:44 -0500 | |
---|---|---|
committer | 2016-11-13 17:00:44 -0500 | |
commit | 646a21fc7271316880edc4e627923e7bdd93065b (patch) | |
tree | e4c4ba26f442f5e705a90c7325e1d622845344e1 /src/SpecificGen/GF41417_32Reflective/Reified/CarrySub.v | |
parent | 3d3b942308e09a678641005eabdc2f3761f0edae (diff) |
Add SpecificGen/GF*
For bounds analysis
Diffstat (limited to 'src/SpecificGen/GF41417_32Reflective/Reified/CarrySub.v')
-rw-r--r-- | src/SpecificGen/GF41417_32Reflective/Reified/CarrySub.v | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/SpecificGen/GF41417_32Reflective/Reified/CarrySub.v b/src/SpecificGen/GF41417_32Reflective/Reified/CarrySub.v new file mode 100644 index 000000000..ccd18a264 --- /dev/null +++ b/src/SpecificGen/GF41417_32Reflective/Reified/CarrySub.v @@ -0,0 +1,17 @@ +Require Import Crypto.SpecificGen.GF41417_32Reflective.CommonBinOp. + +Definition rcarry_subZ_sig : rexpr_binop_sig carry_sub. Proof. reify_sig. Defined. +Definition rcarry_subW := Eval vm_compute in rword_of_Z rcarry_subZ_sig. +Lemma rcarry_subW_correct_and_bounded_gen : correct_and_bounded_genT rcarry_subW rcarry_subZ_sig. +Proof. rexpr_correct. Qed. +Definition rcarry_sub_output_bounds := Eval vm_compute in compute_bounds rcarry_subW ExprBinOp_bounds. +Local Obligation Tactic := intros; vm_compute; constructor. +Program Definition rcarry_subW_correct_and_bounded + := ExprBinOp_correct_and_bounded + rcarry_subW carry_sub rcarry_subZ_sig rcarry_subW_correct_and_bounded_gen + _ _. + +Local Open Scope string_scope. +Compute ("Carry_Sub", compute_bounds_for_display rcarry_subW ExprBinOp_bounds). +Compute ("Carry_Sub overflows? ", sanity_compute rcarry_subW ExprBinOp_bounds). +Compute ("Carry_Sub overflows (error if it does)? ", sanity_check rcarry_subW ExprBinOp_bounds). |