aboutsummaryrefslogtreecommitdiffstats
path: root/src/hls/GibleSeq.v
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-05-31 02:05:44 +0100
committerYann Herklotz <git@yannherklotz.com>2022-05-31 02:05:44 +0100
commit04e3b3ab09c94a7ab3a1441b925843cb60a9c97c (patch)
tree04be29bf7192bd6b2810c47a8eb6841ef8660e3d /src/hls/GibleSeq.v
parentd90473f74c93a22bdecdef6057f5efccfa465e65 (diff)
downloadvericert-04e3b3ab09c94a7ab3a1441b925843cb60a9c97c.tar.gz
vericert-04e3b3ab09c94a7ab3a1441b925843cb60a9c97c.zip
Fix GibleSeqgenproof with new semantics
Diffstat (limited to 'src/hls/GibleSeq.v')
-rw-r--r--src/hls/GibleSeq.v9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/hls/GibleSeq.v b/src/hls/GibleSeq.v
index 9444f28..30eb250 100644
--- a/src/hls/GibleSeq.v
+++ b/src/hls/GibleSeq.v
@@ -62,3 +62,12 @@ End SeqBB.
Module GibleSeq := Gible(SeqBB).
Export GibleSeq.
+
+Fixpoint replace_section {A: Type} (f: A -> instr -> (A * SeqBB.t)) (s: A) (b: SeqBB.t): A * SeqBB.t :=
+ match b with
+ | i :: b' =>
+ let (s', b'') := replace_section f s b' in
+ let (s'', i') := f s' i in
+ (s'', i' ++ b'')
+ | nil => (s, nil)
+ end.