Skip to content

Conversation

qobilidop
Copy link
Member

[P4-Constraints] Added ConstraintSolver hook to export constraints to a specified z3 solver.

  • Add ConstraintSolver::ExportConstraintsToTargetSolver that adds P4-Constraints constraints to a z3 solver, renaming variables according to a given SymbolicEnvironment if necessary.

PUBLIC: Added ConstraintSolver::ExportConstraintsToTargetSolver to export constraints to a specified z3 solver.

@qobilidop
Copy link
Member Author

This PR is on behalf of @Shoooooon, who wrote the CL internally at Google, but has some technical difficulty upstreaming it.

@qobilidop qobilidop force-pushed the cl/780137491 branch 10 times, most recently from f0f4c67 to db62f6e Compare September 3, 2025 23:47
… a specified z3 solver.

- Add ConstraintSolver::ExportConstraintsToTargetSolver that adds P4-Constraints constraints to a z3 solver, renaming variables according to a given SymbolicEnvironment if necessary.

PUBLIC: Added ConstraintSolver::ExportConstraintsToTargetSolver to export constraints to a specified z3 solver.
PiperOrigin-RevId: 780137491
Signed-off-by: Bili Dong <[email protected]>
Copy link
Contributor

@matthewtlam matthewtlam left a comment

Choose a reason for hiding this comment

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

Thanks @qobilidop and @Shoooooon. LGTM!

@matthewtlam matthewtlam merged commit c48be3a into master Sep 4, 2025
4 checks passed
@matthewtlam matthewtlam deleted the cl/780137491 branch September 4, 2025 00:23
Shoooooon added a commit to Shoooooon/p4-constraints that referenced this pull request Sep 14, 2025
… a specified z3 solver. (p4lang#174)

- Add ConstraintSolver::ExportConstraintsToTargetSolver that adds P4-Constraints constraints to a z3 solver, renaming variables according to a given SymbolicEnvironment if necessary.

PUBLIC: Added ConstraintSolver::ExportConstraintsToTargetSolver to export constraints to a specified z3 solver.
PiperOrigin-RevId: 780137491

Signed-off-by: Bili Dong <[email protected]>
Co-authored-by: Shaan Nagy <[email protected]>
Shoooooon added a commit to Shoooooon/p4-constraints that referenced this pull request Sep 14, 2025
… a specified z3 solver. (p4lang#174)

- Add ConstraintSolver::ExportConstraintsToTargetSolver that adds P4-Constraints constraints to a z3 solver, renaming variables according to a given SymbolicEnvironment if necessary.

PUBLIC: Added ConstraintSolver::ExportConstraintsToTargetSolver to export constraints to a specified z3 solver.
PiperOrigin-RevId: 780137491

Signed-off-by: Bili Dong <[email protected]>
Co-authored-by: Shaan Nagy <[email protected]>
Shoooooon added a commit to Shoooooon/p4-constraints that referenced this pull request Sep 15, 2025
… a specified z3 solver. (p4lang#174)

- Add ConstraintSolver::ExportConstraintsToTargetSolver that adds P4-Constraints constraints to a z3 solver, renaming variables according to a given SymbolicEnvironment if necessary.

PUBLIC: Added ConstraintSolver::ExportConstraintsToTargetSolver to export constraints to a specified z3 solver.
PiperOrigin-RevId: 780137491

Signed-off-by: Bili Dong <[email protected]>
Co-authored-by: Shaan Nagy <[email protected]>
Shoooooon added a commit to Shoooooon/p4-constraints that referenced this pull request Sep 15, 2025
… a specified z3 solver. (p4lang#174)

- Add ConstraintSolver::ExportConstraintsToTargetSolver that adds P4-Constraints constraints to a z3 solver, renaming variables according to a given SymbolicEnvironment if necessary.

PUBLIC: Added ConstraintSolver::ExportConstraintsToTargetSolver to export constraints to a specified z3 solver.
PiperOrigin-RevId: 780137491

Signed-off-by: Bili Dong <[email protected]>
Co-authored-by: Shaan Nagy <[email protected]>
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.

3 participants