WIP: Add support for partial orders#774
Draft
bclement-ocp wants to merge 1 commit intocreusot-rs:masterfrom
Draft
WIP: Add support for partial orders#774bclement-ocp wants to merge 1 commit intocreusot-rs:masterfrom
bclement-ocp wants to merge 1 commit intocreusot-rs:masterfrom
Conversation
I do not know yet if the proofs still pass, as this seems to be breaking trait resolution somehow. There are many instances (e.g. 08_haystack) where I get errors about Creusot's inability to find an instance for PartialOrdLogic but everything that used to have an OrdLogic instance should still have one, and OrdLogic implies PartialOrdLogic -- so I'm not sure what's going on there...
Collaborator
|
thanks for the PR, I'll take some time to read over during the week and take a look a the problems you faced. |
jhjourdan
reviewed
Feb 17, 2025
| #[ensures(x.gt_log(y) == (x.cmp_log(y) == Ordering::Greater))] | ||
| fn cmp_gt_log(x: Self, y: Self); | ||
| #[ensures(self.le_log(self))] | ||
| fn le_log_refl(self) {} |
Collaborator
There was a problem hiding this comment.
Partial orders in Rust are not reflexive because of floats.
Collaborator
|
We are sorry not to have handled this during one year an a half. Is this still something you want to add? What is your use case? If you rebase and the issue still exists, I'll be happy to look at it. |
Collaborator
Author
|
The use case was some code that was working on sets equipped with inclusion. IIRC I got around the issue by defining my own |
This file contains hidden or 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
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.
I do not know yet if the proofs still pass, as this seems to be breaking trait resolution somehow. There are many instances (e.g. 08_haystack) where I get errors about Creusot's inability to find an instance for PartialOrdLogic but everything that used to have an OrdLogic instance should still have one, and OrdLogic implies PartialOrdLogic -- so I'm not sure what's going on there...