File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -303,8 +303,6 @@ absoluteSum = undefined
303
303
\n ewthought{Inference}
304
304
LiquidHaskell verifies `vectorSum` -- or, to be precise,
305
305
the safety of the vector accesses `vec ! i`.
306
- **Note** you need to run `liquid` with the option `--no-termination` or make
307
- sure your source file has `{-@ LIQUID " -- no-termination" @-}.
308
306
The verification works out because LiquidHaskell is able to
309
307
*automatically infer* ^[In your editor, click on `go` to see the inferred type.]
310
308
@@ -317,6 +315,12 @@ between `0` and the length of `vec` (inclusive). LiquidHaskell
317
315
uses this and the test that `i < sz` to establish that `i` is
318
316
between `0` and `(vlen vec)` to prove safety.
319
317
318
+ **Note** you need to run `liquid` with the option `--no-termination`
319
+ or make sure your source file has `{-@ LIQUID " -- no-termination" @-},
320
+ otherwise the code for `go` fails the now default termination check.
321
+ We will come back to this example later to see how to verify termination
322
+ using metrics.
323
+
320
324
< div class= " hwex" id = " Off by one?" >
321
325
Why does the type of `go` have `v <= sz` and not `v < sz` ?
322
326
</ div >
You can’t perform that action at this time.
0 commit comments