Using Solver-Aided Languages to Build Package Managers

03/25/2022
by   Donald Pinckney, et al.
0

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 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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/23/2021

Präzi: From Package-based to Call-based Dependency Networks

Software reuse has emerged as one of the most crucial elements of modern...
research
11/16/2020

Dependency Solving Is Still Hard, but We Are Getting Better at It

Dependency solving is a hard (NP-complete) problem in all non-trivial co...
research
05/13/2020

Many-Objective Software Remodularization using NSGA-III

Software systems nowadays are complex and difficult to maintain due to c...
research
02/10/2022

Reliabuild: Searching for High-Fidelity Builds Using Active Learning

Modern software is incredibly complex. A typical application may compris...
research
11/15/2017

IKBT: solving closed-form Inverse Kinematics with Behavior Tree

Serial robot arms have complicated kinematic equations which must be sol...
research
10/16/2022

Using Answer Set Programming for HPC Dependency Solving

Modern scientific software stacks have become extremely complex, using m...
research
04/24/2018

Learning Software Constraints via Installation Attempts

Modern software systems are expected to be secure and contain all the la...

Please sign up or login with your details

Forgot password? Click here to reset