Explainability in Spack concretization
10-26, 15:15–15:40 (Europe/Berlin), Main stage

Modern package managers often use logic solvers (SAT, ASP, SMT, CDCL, etc) for dependency resolution. Logic solvers are highly efficient at solving NP-complete problems, but often give very little information when a solve is impossible. This talk explains the solver methods used in Spack to introduce legible error messages for users, including generating full causality chains for facts involved in determining an unsolvable state. It shows how this method allows users to bypass incompatible software combinations, and the performance issues and mitigations involved in bringing this work to production. We will also compare this solution to solutions like pubgrub and libsolv and discuss how different underlying solvers require fundamentally different solutions in this space.


Spack uses the Clingo ASP solver from the POTASSCO group for dependency resolution. Clingo can provide unsatisfiable cores, which are useful for determining causality of errors, but unsatisfiable cores from Clingo are not guaranteed to be minimal and can be too large to be useful. Spack uses the prioritization guarantees in Clingo to instead deduce “error” facts as valid states, and prioritize against them in the solve. Treating error conditions as highly unoptimal successful solves, Spack uses its generalized expression of conditions in the logic program to create causal chains of facts, which can be traced from error fact back through all intermediate states to the user conditions that triggered it. By triggering full causal explainability only when requested, Spack bypasses the small but unpleasant performance penalties of these rules in the logic program in the default case, allowing both fast dependency resolution in the common case and explainability of errors.

Gregory Becker is a computer scientist at Lawrence Livermore National Laboratory. His focus is on bridging the gap between research and production software at LLNL. He works on Spack, a package manager for high performance computing, and on research projects around ABI compatibility and software modeling. Gregory has been at LLNL since 2015. He received his B.A. in Computer Science and Mathematics from Williams College in 2015.