-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add missing range check bound to assert_nn_le()
spec
#195
Open
Julek
wants to merge
12
commits into
master
Choose a base branch
from
julek/assert_nn_le_spec_fix
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In this commit, we add a function `userAnnotatedSources` which replaces `isStandardSource`. It generates a list of all the user annotated ScopedFunctions. This list is used to filter modules for solving. This requires a slight refactor within `FunctionAnalysis.hs`. * Add `extern_remove_dirty` test. The basic idea is this: 1. Find all wrapper functions. 2. Compute their respective set of reachable functions. 3. Mark them all as 'don't check' unless they are referenced from a different source as well.
Don't verify `@external`-generated wrapper functions
* Use `ssh-agent` to clone with specific private key * Set `0o400` permissions on private key file * Add `mathsat` to list of solvers used in tests
Add mathsat installation to Github actions workflow
Cairo semantics comments
…ted-specs Add FAQ about commenting-out annotations
…eadme-additions Add `README.md` section on details of `CairoSemanticsL`
6cea51d
to
e45ffbb
Compare
b0ae760
to
b704100
Compare
assert_nn_le()
spec
langfield
reviewed
Mar 29, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this agree with the docstring?
// Verifies that 0 <= a <= b.
//
// Prover assumption: b < RANGE_CHECK_BOUND.
//
// This function is still sound without the prover assumptions. In that case, it is guaranteed
// that a < RANGE_CHECK_BOUND and b < 2 * RANGE_CHECK_BOUND.
// @pre b < 2**128
// @post 0 <= a and a <= b
func assert_nn_le{range_check_ptr}(a, b) {
assert_nn(a);
assert_le(a, b);
return ();
}
Looks like the b < rcBound
is an assumption. But I suppose we want that in the post so other stuff can use it?
9f9928b
to
3397b7c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.