aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-10-15 16:15:39 -0400
committerGravatar Jason Gross <jasongross9@gmail.com>2017-10-18 23:01:29 -0400
commitc0d5558993a50fa89721b6d720365554b2260b4b (patch)
treee415b8db7869c580f217f184b32c84bcd5d8ff18
parentfdfe5f5d06938138510d422f6a41079a166544ef (diff)
Allow forcing a bitwidth to work
This allows you to set the bitwidth to 64, even if all limb_widths are under 32, for example
-rw-r--r--src/Specific/Framework/ReificationTypes.v4
-rw-r--r--src/Specific/Framework/ReificationTypesPackage.v4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/Specific/Framework/ReificationTypes.v b/src/Specific/Framework/ReificationTypes.v
index 872005958..5160f441f 100644
--- a/src/Specific/Framework/ReificationTypes.v
+++ b/src/Specific/Framework/ReificationTypes.v
@@ -47,9 +47,9 @@ Ltac pose_bound1 r bound1 :=
ltac:(exact {| lower := 0 ; upper := Z.pos r-1 |})
bound1.
-Ltac pose_local_lgbitwidth limb_widths lgbitwidth :=
+Ltac pose_local_lgbitwidth bitwidth lgbitwidth :=
pose_term_with
- ltac:(fun _ => eval compute in (Z.to_nat (Z.log2_up (List.fold_right Z.max 0 limb_widths))))
+ ltac:(fun _ => eval compute in (Z.to_nat (Z.log2_up bitwidth)))
lgbitwidth.
Ltac pose_local_adjusted_bitwidth' lgbitwidth adjusted_bitwidth' :=
diff --git a/src/Specific/Framework/ReificationTypesPackage.v b/src/Specific/Framework/ReificationTypesPackage.v
index 4a868856e..2a5e8e85b 100644
--- a/src/Specific/Framework/ReificationTypesPackage.v
+++ b/src/Specific/Framework/ReificationTypesPackage.v
@@ -38,9 +38,9 @@ Ltac add_bound1 pkg :=
Tag.update pkg TAG.bound1 bound1.
Ltac add_lgbitwidth pkg :=
- let limb_widths := Tag.get pkg TAG.limb_widths in
+ let bitwidth := Tag.get pkg TAG.bitwidth in
let lgbitwidth := fresh "lgbitwidth" in
- let lgbitwidth := pose_local_lgbitwidth limb_widths lgbitwidth in
+ let lgbitwidth := pose_local_lgbitwidth bitwidth lgbitwidth in
Tag.local_update pkg TAG.lgbitwidth lgbitwidth.
Ltac add_adjusted_bitwidth' pkg :=