Skip to content
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

Uninformative message "cryptol error" #351

Closed
msaaltink opened this issue Jan 8, 2019 · 5 comments
Closed

Uninformative message "cryptol error" #351

msaaltink opened this issue Jan 8, 2019 · 5 comments
Labels
topics: error-messages Issues involving the messages SAW produces on error

Comments

@msaaltink
Copy link
Contributor

Here's a recent SAW error message, in full:

Symbolic simulation completed with side conditions.
user error ("include" (/proof/develop.saw:9:1-9:8):
"really_verify" (/proof/file1.saw:239:24-239:37):
"crucible_llvm_verify" (/proof/base.saw:46:5-46:25):
"tactic" (/proof/base.saw:46:55-46:61):
"unint_yices" (/proof/file2.saw:20:10-20:21):
cryptol error)

The command in question is a crucible llvm verification, the setup describes a call, with a postcondition of {{True}}. Or I can drop the postcondition and just have the crucible_execute_func end the setup.

The simulation appears to have completed, so what's the issue? Where might I look for a Cryptol error? Is there no way to SAW to provide some additional information about the error?

@langston-barrett langston-barrett added the topics: error-messages Issues involving the messages SAW produces on error label Jan 8, 2019
@brianhuffman
Copy link
Contributor

The source of this error message is in the Cryptol saw-core prelude from the cryptol-verifier package, which provides saw-core implementations for cryptol's primitives.

saw/Cryptol.sawcore:ecError a len msg = error a "cryptol error"; -- FIXME: don't throw away message

So this is how the cryptol error primitive is encoded in saw-core. If you see "cryptol error" in an error message, that means that somewhere you must be calling "error" or "undefined" in some cryptol code.

@msaaltink
Copy link
Contributor Author

OK, that's helpful: print_goal_consts is then a way to figure out what function it might be. Thanks.

@msaaltink
Copy link
Contributor Author

Oddly enough, running simplify (cryptol_ss ()); before yices eliminates the error, and the proof succeeds. It makes sense in a way, as the definition of that function is immaterial to the subgoals (which were about overrides), but I wonder if that is supposed to happen.

@atomb
Copy link
Contributor

atomb commented Mar 21, 2019

I've improved the error message in the Cryptol -> SAWCore translation a bit. It's not a lot more informative, but should at least make it clearer that the source of the problem is a call to the error function in some Cryptol code.

@atomb atomb added this to the 0.6 milestone Apr 24, 2020
@atomb atomb modified the milestones: 0.6, 0.7 Aug 20, 2020
@atomb atomb removed this from the 0.7 milestone Oct 16, 2020
@sauclovian-g
Copy link
Contributor

Duplicate of #1326 (q.v.) which contains more info and has a draft patch.

@sauclovian-g sauclovian-g closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topics: error-messages Issues involving the messages SAW produces on error
Projects
None yet
Development

No branches or pull requests

5 participants