-
Notifications
You must be signed in to change notification settings - Fork 71
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
Replace height intrinsic with is_smaller_than and make height a partial order #570
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9f1ab2d
Replace height intrinsic with is_smaller_than,
Chris-Hawblitzel 6a59936
Update .github/workflows/get-z3.sh to Z3 4.12.2
Chris-Hawblitzel b2e546c
Allow decreases on FnSpec fields
Chris-Hawblitzel bb35ccf
Add is_smaller_than_lexicographic and some comments
Chris-Hawblitzel aa9b640
Add decreases_to macro
Chris-Hawblitzel 443279d
Merge branch 'main' into is_smaller_than
Chris-Hawblitzel f75a2e2
Split is_smaller_than handling into separate function
Chris-Hawblitzel 0eedf96
Merge branch 'main' into is_smaller_than
Chris-Hawblitzel c867dc4
Restrict usage of decreases through FnSpec and Map,
Chris-Hawblitzel a5f52a4
Merge branch 'main' into is_smaller_than
Chris-Hawblitzel 5d09b6e
Merge branch 'main' into is_smaller_than
Chris-Hawblitzel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,22 @@ pub enum UnaryOp { | |
BitExtract(u32, u32), | ||
} | ||
|
||
/// These are Z3 special relations x <= y that are documented at | ||
/// https://microsoft.github.io/z3guide/docs/theories/Special%20Relations/ | ||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Hash)] | ||
pub enum Relation { | ||
/// reflexive, transitive, antisymmetric | ||
PartialOrder, | ||
/// reflexive, transitive, antisymmetric, and for all x, y. (x <= y or y <= x) | ||
LinearOrder, | ||
/// reflexive, transitive, antisymmetric, and for all x, y, z. (y <= x and z <= x) ==> (y <= z or z <= y) | ||
TreeOrder, | ||
/// reflexive, transitive, antisymmetric, and: | ||
/// - for all x, y, z. (x <= y and x <= z) ==> (y <= z or z <= y) | ||
/// - for all x, y, z. (y <= x and z <= x) ==> (y <= z or z <= y) | ||
PiecewiseLinearOrder, | ||
} | ||
|
||
#[derive(Copy, Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Hash)] | ||
pub enum BinaryOp { | ||
Implies, | ||
|
@@ -59,7 +75,12 @@ pub enum BinaryOp { | |
Gt, | ||
EuclideanDiv, | ||
EuclideanMod, | ||
|
||
/// Z3 special relations (see Relation above) | ||
/// The u64 is the Z3 unique name ("index") for each relation that the user wants | ||
/// ("To create a different relation that is also a partial order use a different index, | ||
/// such as (_ partial-order 1)", according to | ||
/// https://microsoft.github.io/z3guide/docs/theories/Special%20Relations/ .) | ||
Relation(Relation, u64), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same - what's the u64 for? |
||
BitXor, | ||
BitAnd, | ||
BitOr, | ||
|
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,9 +136,8 @@ fn check_is_sorted_tree(tree: &Tree) -> (ret: TreeSortedness) | |
|
||
proof { | ||
sorted_tree_means_sorted_sequence(**left); | ||
sorted_tree_means_sorted_sequence(**right); | ||
} | ||
// sorted_tree_means_sorted_sequence(**right); // TODO: why is only one of these calls | ||
// necessary? | ||
|
||
// assert(equal(tree@, [email protected](seq![*value as int]).add(right@))); | ||
// assert([email protected]() > 0); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pub const EXPECTED_SOLVER_VERSION: &str = "4.10.1"; | ||
pub const EXPECTED_SOLVER_VERSION: &str = "4.12.2"; |
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
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
Oops, something went wrong.
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.
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.
this could use some documentation