Computer Science > Software Engineering
[Submitted on 25 Mar 2022 (this version), latest version 24 Aug 2023 (v4)]
Title:Using Solver-Aided Languages to Build Package Managers
View PDFAbstract:Open-source software is critical for modern development, but most open-source packages require large networks of prerequisite packages, or dependencies, in order to function correctly. Modern software development workflows use package managers to ease this burden. Given a set of constraints, these systems use dependency solving to select compatible versions of dependencies before installing. However, many dependency solvers make ad hoc implementation choices and use heuristics that affect the set of chosen dependencies, and thus affect correctness, code size, and other factors of the final bundled software in ways that are opaque and confusing to programmers.
We present PacSolve, a unifying formal semantics of dependency solving. PacSolve can compactly represent the key features and differences between NPM, PIP and Cargo, and express a wide variety of alternative semantics for dependency solving. PacSolve lends itself to a solver-aided implementation in Rosette, which we use to build a drop-in replacement for NPM called MinNPM. MinNPM allows the user to customize the dependency solving semantics to choose between different objectives and consistency criteria. We show empirically that PacSolve is performant and effective on real-world code. For example, on the top 1000 most downloaded NPM packages, we show that MinNPM can shrink the footprint of 20% of packages and produce a newer set of dependencies for 14% of packages. Moreover, MinNPM only takes 1.7s longer than NPM on average. We also use MinNPM to show that NPM's tree-solving semantics is only necessary for 3% of these packages.
Submission history
From: Donald Pinckney [view email][v1] Fri, 25 Mar 2022 16:11:51 UTC (190 KB)
[v2] Tue, 12 Jul 2022 17:10:10 UTC (183 KB)
[v3] Thu, 15 Dec 2022 00:09:36 UTC (969 KB)
[v4] Thu, 24 Aug 2023 04:20:31 UTC (968 KB)
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer (What is the Explorer?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)
Code, Data and Media Associated with this Article
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower (What are Influence Flowers?)
Connected Papers (What is Connected Papers?)
CORE Recommender (What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.