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

Update cvc5 to 1.0.8 #332

Merged
merged 8 commits into from
Oct 19, 2023
Merged

Conversation

CyanoKobalamyne
Copy link
Collaborator

@CyanoKobalamyne CyanoKobalamyne commented Oct 4, 2023

Fixes #328.

@yoni206
Copy link
Collaborator

yoni206 commented Oct 5, 2023

Hi @CyanoKobalamyne , Thanks for doing this, it looks great!
I would be happy to review, but first, could you make CI to pass?
There seems to be a problem with the macos build.

Also, in case this indeed solves #328 , can you mention this in the PR description? This way the issue will be closed automatically.

@CyanoKobalamyne
Copy link
Collaborator Author

I think I fixed that particular error, but now there seem to be other ones that I don't quite understand. Why do the jobs get canceled? Is there some sort of timeout or memory limit?

@barrettcw
Copy link
Collaborator

Weird - I don't know why they are getting cancelled. Something in the configuration?

@CyanoKobalamyne
Copy link
Collaborator Author

Ah, it looks like, by default, if one job fails, all others get cancelled: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#handling-failures

@yoni206
Copy link
Collaborator

yoni206 commented Oct 6, 2023 via email

@yoni206 yoni206 self-requested a review October 6, 2023 16:56
@yoni206 yoni206 self-assigned this Oct 6, 2023
@CyanoKobalamyne
Copy link
Collaborator Author

CyanoKobalamyne commented Oct 6, 2023

Weird, the one failing test, cvc5-printing_test, passes locally on my machine.

@yoni206
Copy link
Collaborator

yoni206 commented Oct 7, 2023 via email

@yoni206
Copy link
Collaborator

yoni206 commented Oct 8, 2023

Another possibly useful pointer:
https://github.com/stanford-centaur/smt-switch/tree/master/ci-scripts

These are scripts that are used in CI.

@CyanoKobalamyne
Copy link
Collaborator Author

I reran all the steps of the CI script in an Ubuntu 22.04 container, and they all passed... I'll try to rerun the checks here, to see if this was some sort of transient issue.

@CyanoKobalamyne
Copy link
Collaborator Author

Sorry, it turns out that I was using the wrong commit. I have successfully reproduced the issue on Ubuntu 22.04.

@CyanoKobalamyne
Copy link
Collaborator Author

The mystery about the error not appearing on my machine is solved: I was compiling smt-switch with assertions disabled.

The failure in the test is an assertion on the expected output (called from test1):

assert(result == expected_result);

The string given here as the expected output is in fact not the output from cvc5 1.0.8 for the same input. The second line, which is the output for s->get_unsat_assumptions(usc), is (ind1), while the test expects it to be (). I'm currently trying to investigate what changed between 1.0.0 and 1.0.8.

@yoni206
Copy link
Collaborator

yoni206 commented Oct 19, 2023

The mystery about the error not appearing on my machine is solved: I was compiling smt-switch with assertions disabled.

Do you mean with debug disabled? I don't see assertions here.

The failure in the test is an assertion on the expected output (called from test1):

assert(result == expected_result);

The string given here as the expected output is in fact not the output from cvc5 1.0.8 for the same input. The second line, which is the output for s->get_unsat_assumptions(usc), is (ind1), while the test expects it to be (). I'm currently trying to investigate what changed between 1.0.0 and 1.0.8.

I think it is perfectly reasonable that one version of cvc5 gives one unsat core while another gives another unsat core, since unsat cores are not unique.

So I think a good solution would be just to fix the test to expect (ind1). A more robust solution would be to check that the output from the solver is a space-separated list wrapped with parentheses, instead of expecting a specific solution that can change between versions. But I don't think that's a priority.

@CyanoKobalamyne
Copy link
Collaborator Author

It seems that the change causing the different output was introduced in cvc5/cvc5@7b8fb6675. After that commit, the arithmetic static learner gets disabled when unsat cores are enabled, and unsat cores are implicitly enabled by the :produce-unsat-assumptions flag set in this test (necessary for (get-unsat-assumptions) to work).

The end result is technically correct, because the list of assumptions is not required to be minimal by the SMT-LIB standard, but since ind1 is an assertion itself, it seems unnecessary to list it as an assumption needed to prove unsat.

Is this something we would file a bug against cvc5 for? The output after the change is not incorrect, but I would certainly consider this a regression.

(As an aside, I think that the way this test is currently written is brittle, and doesn't really just test our code, but is sensitive to changes in cvc5 too. Although it did enable us to discover this regression.)

@CyanoKobalamyne
Copy link
Collaborator Author

So I think a good solution would be just to fix the test to expect (ind1). A more robust solution would be to check that the output from the solver is a space-separated list wrapped with parentheses, instead of expecting a specific solution that can change between versions. But I don't think that's a priority.

Sorry, I only saw your reply after I had already written mine, but this is essentially what I was trying to say in the last paragraph.

I think it is perfectly reasonable that one version of cvc5 gives one unsat core while another gives another unsat core, since unsat cores are not unique.

Okay, so does this mean that we shouldn't bother the cvc5 folks with asking them to "fix" this?

@yoni206
Copy link
Collaborator

yoni206 commented Oct 19, 2023

Thanks for the fix! I see the regressions now pass and I'll review it.
As for cvc5, I agree that this is a regression in the sense that this unsat core is bigger than the previous one, but i am not sure if it is really considered a bug...

Copy link
Collaborator

@yoni206 yoni206 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, and thanks a lot for doing this.
BTW, just wondering: Why did the include paths changed from api/cpp/... to cvc5/...?

@yoni206 yoni206 merged commit 25ead08 into stanford-centaur:master Oct 19, 2023
10 checks passed
@barrettcw
Copy link
Collaborator

I forgot the reason but we had a discussion with Aina and Mathias and decided this was a better organization of the header files.

@CyanoKobalamyne CyanoKobalamyne deleted the cvc5-1.0.8 branch October 19, 2023 22:23
@CyanoKobalamyne CyanoKobalamyne restored the cvc5-1.0.8 branch November 11, 2023 06:16
@CyanoKobalamyne CyanoKobalamyne deleted the cvc5-1.0.8 branch November 11, 2023 06:17
rachelcleaveland pushed a commit to rachelcleaveland/smt-switch that referenced this pull request Jan 12, 2024
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.

smt-switch is very tightly bound to a specific, old version of CVC5.
3 participants