Skip to content

Various updates in preparation for Z3 version update - #585

Merged
marcoeilers merged 12 commits into
masterfrom
meilers_z3_416
Aug 25, 2026
Merged

marcoeilers merged 12 commits into
masterfrom
meilers_z3_416

Conversation

@marcoeilers

Copy link
Copy Markdown
Contributor

We might want to update our used Z3 version from 4.8.7 to 4.16.0 soon. This version leads to some issues with the current version of Carbon, which I'm trying to address in this PR:

  • Doing several asserts related to quantified permissions that we emit without triggers inside their own if (*) { ... assume false } block, to prevent them from being triggered in subsequent assertions.
  • Dropping some Z3 flags
  • Rewriting the axiom that states that for predicate P(x, y), P(x1, y1) == P(x2, y2) ==> x1 == x2 && y1 == y2 to one that uses getter functions for each parameter and therefore should not be multiplicative in the same way
  • Some small changes to sequence axioms
  • Introducing a timeout in the standard test suite

@alexanderjsummers alexanderjsummers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Most of my comments are out-of-interest; the minor fix to the one axiom seems worth doing now

Comment thread src/main/scala/viper/carbon/verifier/BoogieInterface.scala
Comment thread src/main/scala/viper/carbon/verifier/BoogieInterface.scala
Comment thread src/main/scala/viper/carbon/verifier/BoogieInterface.scala
Comment thread src/main/scala/viper/carbon/verifier/BoogieInterface.scala
@marcoeilers
marcoeilers marked this pull request as ready for review August 14, 2026 11:56
@marcoeilers

Copy link
Copy Markdown
Contributor Author

The changes do have some consequences independent of the Z3 version: Since more asserts are wrapped into if (*) { ...; assume false }, these asserts are not visible to the following code (that's the whole point). As a result, if these asserts fail, the rest of the code is verified without the assumption that the failed asserts holds, which we'd get in current Carbon. So we get a few more repeated errors than we currently do.

IMO this is worth it, since any later error that is currently hidden by some asserted-assumed-quantifier for which we don't have good triggers is also a potential performance problem. Any other solution to the same problem that I can think of (like adding artificial triggers to make sure the asserted quantifiers are never triggered) would have the same consequences. @Dev-XYS @alexanderjsummers Please speak up if you disagree.

@marcoeilers
marcoeilers dismissed alexanderjsummers’s stale review August 25, 2026 19:42

I incorporated the sequence axiom change you asked for.

@marcoeilers
marcoeilers merged commit 91d40d8 into master Aug 25, 2026
1 check passed
@marcoeilers
marcoeilers deleted the meilers_z3_416 branch August 25, 2026 19:43
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