Skip to content

Conversation

@aszady
Copy link
Contributor

@aszady aszady commented Jan 22, 2026

[ A small extract from a larger change #153 ]


For each package we had this set of implication over all provided: one provided is on ⇒ all provided are on as well.

This is effectively the equivalence between all these variables, and therefore can be represented by bf.Eq instead.

Such formulation is easier for the used SAT solver, as example runs show:

before:
//pkg/sat:sat_determinsitic_test PASSED in 20.3s
//pkg/sat:sat_test PASSED in 118.7s

after:
//pkg/sat:sat_determinsitic_test PASSED in 8.9s
//pkg/sat:sat_test PASSED in 6.8s

Note that tests under sat/loader_test.go guarantee that we're still solving the same problem.

This change focuses on improving the performance.
Follow-up changes are recommended to cleanup the code from these redundant variables.

@aszady aszady marked this pull request as ready for review January 22, 2026 12:53
For each package we had this set of implication over all `provided`:
one `provided` is on ⇒  all `provided` are on as well.

This is effectively the equivalence between all these variables,
and therefore can be represented by `bf.Eq` instead.

Such formulation is easier for the used SAT solver, as example runs show:

before:
//pkg/sat:sat_determinsitic_test                                         PASSED in 20.3s
//pkg/sat:sat_test                                                       PASSED in 118.7s

after:
//pkg/sat:sat_determinsitic_test                                         PASSED in 8.9s
//pkg/sat:sat_test                                                       PASSED in 6.8s

Note that tests under `sat/loader_test.go` guarantee that we're still solving the same problem.

This change focuses on improving the performance.
Follow-up changes are recommended to cleanup the code from these redundant variables.
@github-actions
Copy link

⚠️ Optional job e2e-bzlmod-toolchain-circular-dependencies failed ⚠️

  • exit status: 1

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.

1 participant