Skip to content

Deduplicate C logical operators from int domains#1963

Draft
sim642 wants to merge 1 commit intoint-predicatesfrom
int-c-ops
Draft

Deduplicate C logical operators from int domains#1963
sim642 wants to merge 1 commit intoint-predicatesfrom
int-c-ops

Conversation

@sim642
Copy link
Member

@sim642 sim642 commented Mar 13, 2026

This is on top of #1962.

I was first going to also change these to return bool option in #1962 but then I realized how silly all of this is.
Each one of the int domains implements these in a slightly different way but they all boil down to going through to_bool and of_bool.
So we had six implementations of the same thing, with some being slightly worse than others by not doing annihilation.

This can also be defined one and for all in base where the expressions are actually evaluated. And these int domain operations aren't used for anything else, nor can they do anything more precise in a particular domain.

Extracted to base instead.

@sim642 sim642 added this to the v2.8.0 Clumsy Clurichaun milestone Mar 13, 2026
@sim642 sim642 added cleanup Refactoring, clean-up type-safety Type-safety improvements pr-dependency Depends or builds on another PR, which should be merged before labels Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Refactoring, clean-up pr-dependency Depends or builds on another PR, which should be merged before type-safety Type-safety improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant