ruff
d6f92e18 - [ty] Go back to reduced BDDs for constraint sets (#26142)

Commit
10 days ago
[ty] Go back to reduced BDDs for constraint sets (#26142) I've been wanting to do this for awhile! Several months ago, https://github.com/astral-sh/ruff/pull/21744 updated our BDDs to be "quasi-reduced", as a way to eliminate some nondeterminism in our diagnostic output, but at the cost of creating larger BDDs. We now have enough other protections in place to eliminate the nondeterminism in other ways (in particular, the `source_order`s that we store in our BDD nodes, and the fact that we assign constraint IDs locally in each `ConstraintSetBuilder` in a way that depends only on source order). So this PR reverts back to the more standard reduction semantics. This is complicated by the fact that we migrated to _ternary_ decision diagrams (TDD) in https://github.com/astral-sh/ruff/pull/23881, which means the standard BDD reduction rule (`if_true == if_false → return if_true`) isn't valid. But there are some other locally checkable reduction rules that we can still implement.
Author
Parents
Loading