CrossHair icon indicating copy to clipboard operation
CrossHair copied to clipboard

Add symbolic support for `not`

Open pschanely opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. At present, using the not operator realizes symbolic booleans - ideally, it would produce an inverted symbolic boolean. We haven't prioritized this because booleans often end up getting used in a conditional (or with short-circuiting "and"/"or"), where they'll need to be realized anyway. That said, symbolic negation would make our branch decision heuristics more accurate (for reasons that I won't get into here), so it might be worthwhile.

Describe the solution you'd like The not operation sadly doesn't correspond to a special method (there is no __not__() method), so it's harder to intercept. But not impossible; we also intercept behavior at the opcode level, and that could be used to preserve the symbolic boolean.

pschanely avatar May 31 '22 13:05 pschanely

An implementation for this is in 340c66907834f95af92c47a75d2b7745d1d867b3! Will close this out when it's released.

pschanely avatar Nov 26 '22 00:11 pschanely