Skip to content

Conversation

bollu
Copy link
Collaborator

@bollu bollu commented Aug 25, 2025

The purpose of extract_goals is to give us clean QF_BV goals. So, we test this by running the file with open BitVec and no imports. This gives us:

(venv) bollu@grosser-7950x3d ~/m/e/s/S/P/I/t/goals (extract-goals-partition-success-and-failure)> ls failure/ | wc -l
3870
(venv) bollu@grosser-7950x3d ~/m/e/s/S/P/I/t/goals (extract-goals-partition-success-and-failure)> ls success/ | wc -l
4108
(venv) bollu@grosser-7950x3d ~/m/e/s/S/P/I/t/goals (extract-goals-partition-success-and-failure)> python3
Python 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 3870 + 4108
7978

@alexkeizer , the ball is now in your court to improve simp_alive_peephole so that poison semantics no longer remains :)

Copy link
Collaborator

@alexkeizer alexkeizer left a comment

Choose a reason for hiding this comment

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

I'm not sure what you want me to review exactly; I'm not familiar enough with the python bits to say sensible things beyond that I support the move to pure bitvector stuff.

The CI failing is presumably caused by the fact that we sometimes still have PoisonOr remaining in the goals, or is there something else to be fixed there?

@bollu
Copy link
Collaborator Author

bollu commented Aug 25, 2025

@alexkeizer Well, I wanted to see what you thought of the change, and that you agree that these goals ought to be QF_BV goals

@bollu bollu force-pushed the extract-goals-partition-success-and-failure branch from 9116c5a to 1727c7c Compare August 25, 2025 15:46
@bollu
Copy link
Collaborator Author

bollu commented Aug 25, 2025

(venv) bollu@grosser-7950x3d ~/m/e/s/S/P/I/t/goals (extract-goals-partition-success-and-failure)> ls failure/ | wc -l
2332
(venv) bollu@grosser-7950x3d ~/m/e/s/S/P/I/t/goals (extract-goals-partition-success-and-failure)> ls success/ | wc -l
5646
(venv) bollu@grosser-7950x3d ~/m/e/s/S/P/I/t/goals (extract-goals-partition-success-and-failure)> python3
Python 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 5646 + 2332
7978

@bollu bollu force-pushed the extract-goals-partition-success-and-failure branch from 1727c7c to 6c40e9e Compare August 25, 2025 16:04
@bollu
Copy link
Collaborator Author

bollu commented Aug 25, 2025

(venv) bollu@grosser-7950x3d ~/m/e/s/S/P/I/t/goals (extract-goals-partition-success-and-failure)> git rev-parse HEAD
8d4bef980608c4cc5ce7e70c975db3ee55afdc85
(venv) bollu@grosser-7950x3d ~/m/e/s/S/P/I/t/goals (extract-goals-partition-success-and-failure)> ls success/ | wc -l
7978
(venv) bollu@grosser-7950x3d ~/m/e/s/S/P/I/t/goals (extract-goals-partition-success-and-failure)> ls failure/ | wc -l
0

@tobiasgrosser
Copy link
Collaborator

I am not sure we want this split. AFAIU all goals are pure bitvector goals, no?

@bollu
Copy link
Collaborator Author

bollu commented Aug 25, 2025

@tobiasgrosser they're not necessarily: If simp_alive_peephole has a bug, we can get goal states that are not pure QF_BV, but instead goal states that contain LLVM-level concepts.

The output of the files is the goals that are produced by simp_alive_peephole. If simp_alive_peephole is incomplete, some goals that are produced could have LLVM-level semantic objects floating around.

For example, Until I paired with Alex today, the goals used to have unrelated LLVM-level PoisonOr.Refinements.

We now have every file in success, which means that simp_alive_peephole preprocessing is good enough to produce pure QF_BV goals with no LLVM leaking through. I would like to retain the split into success/ and failure. This gives @alexkeizer the flexibility to evolve simp_alive_peephole preprocessing, while allowing me to easily triage what the failures are when it comes to going from lean-mlir -> QF_BV.

@alexkeizer
Copy link
Collaborator

To be precise: the goals in question were of the form "value is-refined-by poison", which of course is equivalent to False; these goals were still solvable by bv_decide because the (contradictory) hypotheses were pure BV statements, but, these goals still required the PoisonOr stuff to be imported to make sense. The change was to add the rewrite to False to the simpset.

More generally, ensuring all goals are purely BV will make it easier to add goals that come from other dialects (e.g., LLVM + memory) without having to add all dialects to the imports of each test case, so this is a nice change!

@bollu bollu added the needs-consensus issues which affect the project as a whole, and which are currently blocked on reaching consensus label Aug 27, 2025
@bollu bollu closed this Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-consensus issues which affect the project as a whole, and which are currently blocked on reaching consensus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants