-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kprove
crashes on claims without <k> tag or with repeated <k> tags
#3995
Comments
Running an automatic bisection between 9cc71d6 (
#!/usr/bin/env bash
set -euxo pipefail
git submodule update --init --recursive
mvn package -DskipTests || exit 125
BIN=/Users/brucecollie/code/k/k-distribution/target/release/k/bin
cd ~/code/scratch
rm -rf *-kompiled
"$BIN/kompile" --backend haskell test.k || exit 125
"$BIN/kprove" spec-repeated-k-tag.k```
```console
$ git bisect start HEAD v6.0.181
$ git bisect run ./repro.sh |
As I suspected, the bad change is: #3812 (for both broken specs). I'll investigate further on Monday |
I've done a time-boxed investigation of this based on #3812, where Radu did indeed observe that ModuleToKore breaks in a few different ways after the changes there. The underlying causes here are:
The real issue is that we have a tension between two different designs / uses here:
I'm not sure what the moral solution is; we probably need to either more explicitly bifurcate (and document!) the behaviour of the compilation pipeline in JSON / KORE modes, or add a check that requires claims have a surrounding cell. |
Thanks for investigating this! It looks to me as if these changes to require the
Just FWIW in the test that I had to change to work around the What should definitely not happen is the compiler failing or the compiler producing output that the backend fails on. Maybe this can be avoided just by adding some additional checks (rather than trying to accept the input at any cost). |
Indeed; the code here includes a few cases (
100% agree; just need to figure out what those extra checks or restrictions look like in practice. |
I think we want to add a |
With K version 6.2.24 (and probably others after 6.0.181), the command
kprove
may crash in one of two different ways when trying to process claims that used to work in earlier versions.claim without
<k>
tags around the claimspec-no-k-tag.k
The command
kprove spec-no-k-tag.k
crashes when calling the backendkore-exec
because the generatedkore
containsnull
where aSort
should be.Claim using the tags
<k>
twicespec-repeated-k-tag.k
The command
kprove spec-repeated-k-tag.k
fails in the frontend with aNoSuchElement
exception.The definition file for both is an empty
test.k
The text was updated successfully, but these errors were encountered: