-
Notifications
You must be signed in to change notification settings - Fork 63
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
Missing llvm_assert
#1644
Comments
Are the intended semantics of |
Indeed. I'm pretty sure we used to basically have this, and it got replaced by the precond/postcond pair. |
Is there any progress on this? I think this would substantially reduce code duplication in helper functions. |
Don't contracts already support this with the saw-script/saw-remote-api/python/saw_client/crucible.py Lines 495 to 508 in 7a8fc9a
|
From #196 we have:
What would that look like in Python? |
|
That might work, although it's a bit clunky. I think it would be pretty easy to add a primitive |
Could this also be added to the Python API? |
Yes, we should. As you've noted, the already-existing |
We have
llvm_precond
andllvm_postcond
, which allow users to state arbitrary logical conditions to be added to the pre or post condition of a function specification. However, there is no agnosticllvm_assert
, which will work in either the pre or postcondition. Although thellvm_precond
andllvm_postcond
operators are nice to allow users to state their intentions clearly, a phase agnostic operator is also useful when writing higher-level helpers, that e.g, specify the state of an entire data structure and make sense in both pre and post conditions. In these situations, we might wish to state invariants about the datastructure (e.g., relating different values appearing in it) that make sense in both pre and post phases.Similar considerations apply to
jvm_precond
andjvm_postcond
.The text was updated successfully, but these errors were encountered: