paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Tree traversal synthesis using domain-specific symbolic compilation

基于领域特定符号编译的树遍历合成
ASPLOS Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems2022匹配度 2/10 · 论文属于程序合成、DSL 与符号编译方向,偏编译优化和树遍历调度;不涉及用户关注的静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析,仅在 PL/形式化方法上有间接关联。引用 7 inbox
Yanju Chen, Junrui Liu, Yu Feng, Rastislav Bodik
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 Hecate,将树遍历 DSL 编译为 ILP 编码,自动合成串行与并行树遍历。

高效处理树结构在编译器、数值计算与浏览器布局引擎中很重要:需将计算静态调度为少量遍历并尽量并行。手工设计易出错,现有自动调度器难以探索合法遍历空间,无法权衡并行度与遍历次数。本文提出 Hecate,可合成串行与并行树遍历,并允许程序员定义新遍历模板以扩展。Hecate 是求解器辅助的领域特定语言:将树遍历 DSL 翻译至求解器来自动生成合成器;进一步用面向调度的符号求值生成高效 ILP 编码。在 Grafter 问题集和 CSS 引擎遍历调度中,Hecate 权衡遍历融合与并行,支持任意子节点树;树渲染加速 2×,合成加速 3×,ILP 调度快数个数量级。

问题
如何自动生成既减少遍历次数又可利用并行的树遍历,并让程序员可扩展新遍历类型,避免手工设计错误。
方法
将树遍历 DSL 通过面向调度的符号编译翻译为 ILP/SMT 编码,由求解器合成串行或并行遍历。
评估
在 Grafter 问题集、树渲染和 CSS 引擎遍历调度上评估,展示并行/融合权衡、任意子节点树支持及 2×/3×/数量级加速。
原文摘要(Abstract)

Efficient computation on tree data structures is important in compilers, numeric computations, and web browser layout engines. Efficiency is achieved by statically scheduling the computation into a small number of tree traversals and by performing the traversals in parallel when possible. Manual design of such traversals leads to bugs, as observed in web browsers. Automatic schedulers avoid these bugs but they currently cannot explore a space of legal traversals, which prevents exploring the trade-offs between parallelism and minimizing the number of traversals. We describe Hecate, a synthesizer of tree traversals that can produce both serial and parallel traversals. A key feature is that the synthesizer is extensible by the programmer who can define a template for new kinds of traversals. Hecate is constructed as a solver-aided domain-specific language, meaning that the synthesizer is generated automatically by translating the tree traversal DSL to an SMT solver that synthesizes the traversals. We improve on the general-purpose solver-aided architecture with a scheduling-specific symbolic evaluation that maintains the engineering advantages solver-aided design but generates efficient ILP encoding that is much more efficient to solve than SMT constraints. On the set of Grafter problems, Hecate synthesizes traversals that trade off traversal fusion to exploit parallelism. Additionally, Hecate allows defining a tree data structure with an arbitrary number of children. Together, parallelism and data structure improvements accelerate the computation 2× on a tree rendering problem. Finally, Hecate’s domain-specific symbolic compilation accelerates synthesis 3× compared to the general-purpose compilation to an SMT solver; when scheduling a CSS engine traversal, this ILP-based synthesis executes orders of magnitude faster.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@inproceedings{ChenLFB22,
  title = {Tree traversal synthesis using domain-specific symbolic compilation},
  author = {Yanju Chen and Junrui Liu and Yu Feng and Rastislav Bodik},
  booktitle = {ASPLOS},
  year = {2022},
  doi = {10.1145/3503222.3507751}
}