Skip to content

Commit b1de5c4

Browse files
committed
reverted to the variation of the rewrite rule that caused observable changed
1 parent d250fe6 commit b1de5c4

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/PushButtonSynthesis/DettmanMultiplication.v

+3-4
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,14 @@ Section __.
104104
Definition input_bounds : list (ZRange.type.option.interp base.type.Z)
105105
:= fold_left (fun l i => Some r[0 ~> Qceiling (2 * input_magnitude * ((weightf (i + 1) / weightf i) - 1))]%zrange :: l) (seq 0 (n - 1)) [] ++
106106
[Some r[0 ~> Qceiling (2 * input_magnitude * (2^last_limb_width - 1))]%zrange].
107-
(*Definition output_bounds : list (ZRange.type.option.interp base.type.Z)
107+
Definition output_bounds : list (ZRange.type.option.interp base.type.Z)
108108
:= fold_left (fun l i => Some r[0 ~> Qceiling (2 * output_magnitude_first_limbs * ((weightf (i + 1) / weightf i) - 1))]%zrange :: l) (seq 0 (n - 1)) [] ++
109109
[Some r[0 ~> Qceiling (2 * output_magnitude_last_limb * (2^last_limb_width - 1))]%zrange].
110-
*)
111-
Definition output_bounds : list (ZRange.type.option.interp base.type.Z) :=
110+
(*Definition output_bounds : list (ZRange.type.option.interp base.type.Z) :=
112111
match inbounds_multiplier with
113112
| Some _ => [None; None; None; None; None]
114113
| None => [None; None; None; None; None]
115-
end.
114+
end.*)
116115
Local Existing Instance default_translate_to_fancy.
117116
Local Instance no_select_size : no_select_size_opt := no_select_size_of_no_select machine_wordsize.
118117
Local Instance split_mul_to : split_mul_to_opt := split_mul_to_of_should_split_mul machine_wordsize possible_values.

src/Rewriter/Rules.v

-2
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,6 @@ Definition arith_with_casts_rewrite_rulesT (adc_no_carry_to_add : bool) : list (
338338
rland.(upper) ∈ rm1
339339
-> rland.(upper) = Z.ones (Z.succ (Z.log2 rland.(upper)))
340340
-> (0 = rland.(lower))
341-
-> (rland <= rm1)%zrange
342-
-> (rm1 <= rland)%zrange
343341
-> cstZ rland (Z.land v (cstZ rm1 ('rland.(upper)))) = cstZ rland v)
344342
; (forall rland rm1 rv v,
345343
(rv <= rland)%zrange -> -1 ∈ rm1

0 commit comments

Comments
 (0)