Added constraint support to PDR#33
Merged
ekiwi merged 5 commits intoJul 7, 2026
Merged
Conversation
Collaborator
|
@michael-zhang-lambda : can you use an activation literal for the |
Contributor
Author
Changes
|
ekiwi
reviewed
Jul 7, 2026
ekiwi
reviewed
Jul 7, 2026
ekiwi
reviewed
Jul 7, 2026
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.
Changes
FROM_STEPTO_STEPinrel_indand infinite frame propagation stepsinputs/chiseltesttests with constraintsSoundness
Frame Trace Invariant (HOLDS FOR VANILLA PDR WITHOUT GENERALIZATION)
All blocked cubes in the frame trace must satisfy the constraints.
Asserting Constraints at
FROM_STEPWe examine all three cases:
get_bad_cube, we must always assume that the frontier frame (stepped atFROM_STEP) satisfies the constraints. Otherwise, we may yield a bad cube that violates the constraints, leading to unsoundness.rel_ind, we must always assert that the previous framepropagate_blocked_cubes, we apply similar reasoning to the second case with regards to propagating finite frame blocked cubes to the infinite frame.Asserting Constraints at
TO_STEPWe first assert that asserting constraints at
TO_STEPis UNSOUND inget_bad_cube. To do this, consider the following counterexample:Suppose we have the circuit
In this case,$\mathbf{R}_0$ trivially satisfies the safety property. However, at $\mathbf{R}_1$ , a concrete counterexample could simply be $\mathbf{T}$ is permanently asserted and we constrain the next state to be
count == 2'd1. However, sincecount != 2'd2, the solver would not find this true counterexample. Therefore, PDR would falsely prove the safety property here.However, we assert that asserting constraints at
TO_STEPis sound for the other cases:rel_indare either made on blocked cubes in the frame trace (which must satisfy the invariant) or extracted models from previousrel_indcalls must satisfy constraints (by construction).Tests
All regression tests pass. Some tests (
Quiz1.btor,Quiz2.unsat.btor,Quiz4.unsat.btor) have been skipped since they hang when run. This is probably due to PDR trying to individually block concrete values of a 16-bit register, which leads to many SMT queries that slow down execution. The most important fix for this issue should be blocked cube generalization.