diff options
author | Yann Herklotz <git@yannherklotz.com> | 2022-04-18 21:48:38 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2022-04-18 21:48:38 +0100 |
commit | 33289fbde8979fe8b766c397429603e5bb10e7e7 (patch) | |
tree | d663279d9b02986d58a1249565bd3f79b727f9be /src/hls/RTLBlockgen.v | |
parent | d92a54d13dd6dd184fef7e71207ec1d611ad13f2 (diff) | |
download | vericert-33289fbde8979fe8b766c397429603e5bb10e7e7.tar.gz vericert-33289fbde8979fe8b766c397429603e5bb10e7e7.zip |
Extract some lemmas from the main proof
Diffstat (limited to 'src/hls/RTLBlockgen.v')
-rw-r--r-- | src/hls/RTLBlockgen.v | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/hls/RTLBlockgen.v b/src/hls/RTLBlockgen.v index 2c40291..8b0ea65 100644 --- a/src/hls/RTLBlockgen.v +++ b/src/hls/RTLBlockgen.v @@ -39,12 +39,20 @@ Require Import vericert.hls.RTLBlock. (*| ``find_block max nodes index``: Does not need to be sorted, because we use filter and the max fold function to find the desired element. + + Compute find_block 100 (2::94::48::39::19::nil) 40 + = 48 + : positive + +It wants to find the nearest block that is greater than or equal to the current +block. |*) -Definition find_block (max: positive) (nodes: list positive) (index: positive) : positive := +Definition find_block (max: positive) (nodes: list positive) (index: positive) + : positive := List.fold_right Pos.min max (List.filter (fun x => (index <=? x)) nodes). -(*Compute find_block 100 (2::94::48::39::19::nil) 40.*) +(*Compute (find_block 100 (2::94::48::39::19::nil) 40 =? 48).*) (*| .. index:: |