当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
LaForge: Always-Correct and Fast Incremental Builds from Simple Specifications
arXiv - CS - Programming Languages Pub Date : 2021-08-27 , DOI: arxiv-2108.12469
Charlie CurtsingerGrinnell College, Daniel W. BarowyWilliams College

Developers rely on build systems to generate software from code. At a minimum, a build system should produce build targets from a clean copy of the code. However, developers rarely work from clean checkouts. Instead, they rebuild software repeatedly, sometimes hundreds of times a day. To keep rebuilds fast, build systems run incrementally, executing commands only when built state cannot be reused. Existing tools like make present users with a tradeoff. Simple build specifications are easy to write, but limit incremental work. More complex build specifications produce faster incremental builds, but writing them is labor-intensive and error-prone. This work shows that no such tradeoff is necessary; build specifications can be both simple and fast. We introduce LaForge, a novel build tool that eliminates the need to specify dependencies or incremental build steps. LaForge builds are easy to specify; developers write a simple script that runs a full build. Even a single command like gcc src/*.c will suffice. LaForge traces the execution of the build and generates a transcript in the TraceIR language. On later builds, LaForge evaluates the TraceIR transcript to detect changes and perform an efficient incremental rebuild that automatically captures all build dependencies. We evaluate LaForge by building 14 software packages, including LLVM and memcached. Our results show that LaForge automatically generates efficient builds from simple build specifications. Full builds with LaForge have a median overhead of 16.1% compared to a project's default full build. LaForge's incremental builds consistently run fewer commands, and most take less than 3.08s longer than manually-specified incremental builds. Finally, LaForge is always correct.

中文翻译:

LaForge:从简单的规范中始终正确且快速的增量构建

开发人员依靠构建系统从代码生成软件。至少,构建系统应该从干净的代码副本中生成构建目标。但是,开发人员很少从干净的结帐开始工作。相反,他们会反复重建软件,有时一天要重建数百次。为了保持快速重建,构建系统以增量方式运行,仅在构建状态无法重用时才执行命令。现有的工具,例如让当前用户进行权衡。简单的构建规范易于编写,但限制了增量工作。更复杂的构建规范会产生更快的增量构建,但编写它们是劳动密集型且容易出错的。这项工作表明没有必要进行这种权衡。构建规范既简单又快速。我们介绍 LaForge,一种新颖的构建工具,无需指定依赖项或增量构建步骤。LaForge 构建很容易指定;开发人员编写一个运行完整构建的简单脚本。即使像 gcc src/*.c 这样的单个命令也足够了。LaForge 跟踪构建的执行并生成 TraceIR 语言的副本。在以后的构建中,LaForge 评估 TraceIR 记录以检测更改并执行有效的增量重建,自动捕获所有构建依赖项。我们通过构建 14 个软件包来评估 LaForge,包括 LLVM 和 memcached。我们的结果表明,LaForge 从简单的构建规范自动生成高效的构建。与项目的默认完整构建相比,使用 LaForge 进行完整构建的平均开销为 16.1%。拉福吉' s 增量构建始终运行更少的命令,并且大多数比手动指定的增量构建花费的时间少于 3.08 秒。最后,LaForge 总是正确的。
更新日期:2021-08-31
down
wechat
bug