Summer of Math Exposition

Presented by 3Blue1Brown 3blue1brown

SATisfying Installs: How Boolean Logic Navigates Software Dependencies

Audience:

Tags: boolean-logicboolean-sat-problemsoftware-dependenciespackage-management

In software development, programmers mostly use packages or libraries, which are existing pieces of code (that provide useful features) instead of making everything from scratch. These packages may also depend on some other packages, making a large web of dependencies, creating an extensive list of constraints. All the constraints must be satisfied for a package to get installed and work correctly. That's where package managers come in. Package managers are software that ensure all the constraints are met so that all the packages work together. Navigating via such a large web of dependencies can be daunting. This blog explores how package managers translate these dependencies into a Boolean formula and solve it as a SAT (satisfiability) problem.


Analytics

5.47 Overall score*
45 Rank
14 Votes
8 Comments

Comments

5.2

Cool connection between software and logic

6.3

This was a fun way to introduce SAT solvers to a programming audience.

I’ve seen some explanations elsewhere about using SAT solvers for dependency resolution, but I especially like how you walked through very concrete examples to make everything accessible. The game was also nice (though I got confused about how to “submit my answer” that there was no solution).

7.3

The text is generally written in a very accessible way, except I would argue, the info box about Boolean Proposition formulas at the very beginning. The content becomes completely clear with the later examples/applications of these formulas, but if it’s to remain right at the beginning it could benefit from some more additional explanation. Small suggestion about the dependency graph: Have first an arrow pointing towards the package (e.g.) beta, then have it split up to the different versions, to make clear visually that alpha does not depend on beta 1.3 AND beta 1.4. Also, importantly, the text states beta 1.3 depends on gamma 0.5, and 1.4 on gamma 0.6, but then this becomes beta 1.3 on gamma 0.5 and 0.6, and beta 1.4 on 0.7. A small delve into a solver algorithm would have been fun, but all in all great read!

7

Although not the core topic, it does a better job of explaining SAT, and P and NP problems than most resources.

4

Interesting and well explained formulation of the problem. I was keen to see a solution method. I wonder if it could be formulated as a linear optimization with inequality and equality constraints, potentially preferring newer versions for the objective function. The basics of a general purpose linear optimization solver are described here.

https://mathsfromnothing.au/simplex-method/

I expect there will be many improvements possible to make it a solver for this particular problem.

5.4

There are some mistakes, e.g. writing “Beta-1.4 is dependent on Gamma-0.6”, while showing that it depends on Gamma-0.7.

I would prefer a more contained exposition on boolean logic at the start, and then writing the remainder of the blog assuming this knowledge as given, such that both do not intertwine too much. Someone who is comfortable with boolean logic already could then more easily skip the intro, and learn about how it is applied to the specific case of package managers.

It is an interesting quick topic. The game is a nice extra to the written blog post, though it could be a bit more user friendly (finding the constraints to satisfy took a while).

6.5

I never heard of this topic, very very interesting choice. However, perhaps that a bit of interactivity or live demo would really improve what is explained, as it is a bit harsh to read. Like a little demo, step by step, based on one specific experiment.

6

It was very interesting to find out how package managers deal with import collisions.