paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Conflict-Driven Synthesis for Layout Engines

面向布局引擎的冲突驱动合成
PLDI 7(PLDI)2023匹配度 2/10 · 该论文属于程序合成与增量布局引擎领域,虽涉及正确性保证和工业浏览器场景,但未触及静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析等用户核心研究方向。其问题与方法均与用户当前追踪的 PL 与 AI 交叉主题无关。引用 4 inbox
Junrui Liu, Yanju Chen, Eric Atkinson, Yu Feng, Rastislav Bodik
crossref: 2026-09-10

AI 速览

一句话:提出 Medea 框架,通过冲突驱动的程序合成自动生成正确且高效的增量布局引擎。

现代浏览器依赖布局引擎将 HTML 文档转换为布局树,但 Web 标准复杂使增量布局引擎难以维护。本文提出 Medea,一个自动生成增量布局引擎的框架。Medea 将布局规约与增量实现分离,并用冲突驱动的迭代合成算法,通过检测阻碍最优性的冲突来精化实现,从而保证正确性。作者在包含 margin collapse、浮动布局和绝对定位等特性的 HTML 布局片段上评估,成功合成出正确高效的增量布局引擎。该引擎避免了 Chrome、Firefox 和 Safari 中已报告的真实 bug,比朴素增量基线最高快 1.82 倍;冲突驱动算法生成的引擎比无冲突分析基线快 2.74 倍。

问题
如何自动生成既正确又高效的增量布局引擎,以应对 Web 标准复杂、增量实现难以维护的问题。
方法
Medea 将布局规约与增量实现分离,通过冲突驱动的迭代合成算法检测阻碍最优性的冲突并精化实现,保证合成引擎正确。
评估
在包含 margin collapse、浮动布局和绝对定位的 HTML 布局片段上合成引擎,验证其正确高效,避免 Chrome/Firefox/Safari 真实 bug,并获得最高 1.82× 和 2.74× 的加速。
原文摘要(Abstract)

Modern web browsers rely on layout engines to convert HTML documents to layout trees that specify color, size, and position. However, existing layout engines are notoriously difficult to maintain because of the complexity of web standards. This is especially true for incremental layout engines, which are designed to improve performance by updating only the parts of the layout tree that need to be changed. In this paper, we propose Medea, a new framework for automatically generating incremental layout engines. Medea separates the specification of the layout engine from its incremental implementation, and guarantees correctness through layout engine synthesis. The synthesis is driven by a new iterative algorithm based on detecting conflicts that prevent optimality of the incremental algorithm. We evaluated Medea on a fragment of HTML layout that includes challenging features such as margin collapse, floating layout, and absolute positioning. Medea successfully synthesized an incremental layout engine for this fragment. The synthesized layout engine is both correct and efficient. In particular, we demonstrated that it avoids real-world bugs that have been reported in the layout engines of Chrome, Firefox, and Safari. The incremental layout engine synthesized by Medea is up to 1.82× faster than a naive incremental baseline. We also demonstrated that our conflict-driven algorithm produces engines that are 2.74× faster than a baseline without conflict analysis.

链接与引用

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

BibTeX
@article{paperbot1999,
  title = {Conflict-Driven Synthesis for Layout Engines},
  author = {Junrui Liu and Yanju Chen and Eric Atkinson and Yu Feng and Rastislav Bodik},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {PLDI},
  year = {2023},
  doi = {10.1145/3591246}
}