Package managers are legion. Every programming language and operating system has its own solution, each with subtly different semantics for dependency resolution. This fragmentation prevents multilingual projects from expressing precise dependencies across language ecosystems; it leaves external system dependencies implicit and unversioned; and it obscures the full dependency graph that supply-chain analysis depends on. We present the Package Calculus, a formalism for dependency resolution that unifies the core semantics of package managers. Through a series of formal reductions, we show how this core is expressive enough to model the diversity of real-world dependency expression languages. The calculus provides the theoretical foundation for future cross-ecosystem tooling, as a lingua franca of dependency expression.
翻译:包管理器种类繁多。每种编程语言和操作系统都有各自的解决方案,它们在依赖解析的语义上存在微妙差异。这种碎片化阻碍了多语言项目跨语言生态表达精确的依赖关系;使得外部系统依赖隐含且无版本控制;并且掩盖了供应链分析所依赖的完整依赖图。我们提出了包演算(Package Calculus),一种用于依赖解析的形式化框架,统一了包管理器的核心语义。通过一系列形式化归约,我们展示了该核心框架足以表达现实世界中多样性依赖表达式语言的能力。该演算为未来跨生态系统的工具提供了理论基础,作为依赖表达领域的通用语言。