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

CDSAT specifications #913

Merged
merged 1 commit into from
Dec 5, 2023
Merged

CDSAT specifications #913

merged 1 commit into from
Dec 5, 2023

Conversation

xldenis
Copy link
Collaborator

@xldenis xldenis commented Dec 5, 2023

I'm getting ready to open up my work on formalizing CDSAT, and it requires the following changes to compile.

  • Seq::to_owned_seq which turns a Seq<&T> into Seq<T>, I used to have this called just to_owned, but now this doesn't seem to compile properly?
    • I'd like to figure out why the hell this broke, but it seems like Rust's name resolution is doing something unexpected when its called just to_owned.
  • Allowing proof_assert and pearlite in pearlite functions / scopes which is usefully for proving lemma functions.
  • A spec for PartialEq::ne (which, duh).
  • A Real::from_int function to build real numbers in the logic.
  • A fix to a crash which can occur with proof_asserts

@xldenis xldenis merged commit c39918f into master Dec 5, 2023
4 checks passed
@xldenis xldenis deleted the cdsat-final branch December 5, 2023 19:37
@ratmice
Copy link

ratmice commented Dec 5, 2023

  • Seq::to_owned_seq which turns a Seq<&T> into Seq<T>, I used to have this called just to_owned, but now this doesn't seem to compile properly?

Curious, I tried compiling locally renaming this back to to_owned, but everything compiled okay here. Does that only occur in something downstream, or should just building creusot reproduce it? Offhand, since Seq doesn't appear to be Clone I don't think I see any reason it would conflict with the impl<T> std::borrow::ToOwned for T where T: Clone?

@xldenis
Copy link
Collaborator Author

xldenis commented Dec 5, 2023

Curious, I tried compiling locally renaming this back to to_owned, but everything compiled okay here. Does that only occur in something downstream, or should just building creusot reproduce it?

Yea, it only occurs in a downstream proof I'm working on.

Offhand, since Seq doesn't appear to be Clone I don't think I see any reason it would conflict with the impl std::borrow::ToOwned for T where T: Clone?

I think the issue is that I was working with a Ghost<Seq<T>> and Ghost is Copy.

I'd like to fix it so it is just to_owned, but in the interest of expediency (I need this proof public in two weeks), I had to make a few compromises.

@ratmice
Copy link

ratmice commented Dec 6, 2023

Thanks for clarifying, that does seem like it could trigger it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants