aboutsummaryrefslogtreecommitdiff
path: root/model/postlude/step.sail
diff options
context:
space:
mode:
authorValentin Robert <valentin.robert.42@gmail.com>2025-12-08 06:03:00 -0800
committerGitHub <noreply@github.com>2025-12-08 14:03:00 +0000
commit1993f2d414fe6326dc0855a901d620b82f582c71 (patch)
tree6f10a57683f003767eb0ea4cddd4af72278c08a7 /model/postlude/step.sail
parent1c7910bc1a23107a9c36297e4ff733e457e052a4 (diff)
downloadsail-riscv-master.zip
sail-riscv-master.tar.gz
sail-riscv-master.tar.bz2
Scatter termination.sail (#1376)HEADmaster
Scatter the termination module in such a way that one could require some termination measures without having to include every single instruction in the output. This makes building a subset of the model easier. The termination measures for `vmem_read_addr` and `vmem_write_addr` no longer need to be protected only for the Rocq output, so they get taken out of the `$iftarget coq`.
Diffstat (limited to 'model/postlude/step.sail')
-rw-r--r--model/postlude/step.sail10
1 files changed, 10 insertions, 0 deletions
diff --git a/model/postlude/step.sail b/model/postlude/step.sail
index e8a800f..7bf3cc5 100644
--- a/model/postlude/step.sail
+++ b/model/postlude/step.sail
@@ -296,3 +296,13 @@ function loop () : unit -> unit = {
}
}
}
+
+// Termination measures for loops are not supported by the Lean backend, so they
+// should be guarded by this condition:
+$iftarget coq
+
+// The top-level loop isn't terminating, but we put a limit so that it can still
+// be included in the Coq output
+termination_measure loop while 100
+
+$endif