paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Functional programming for compiling and decompiling computer-aided design

面向计算机辅助设计编译与反编译的函数式编程
ICFP 2(ICFP)2018匹配度 3/10 · 论文属于函数式编程、领域特定语言、编译器正确性与程序合成,虽与PL形式化和工程实现偏好有间接关联,但不涉及LLM/Agent、静态分析、浮点程序分析或贝叶斯程序分析,与用户核心研究方向交集有限。引用 48 inbox
Chandrakana Nandi, James R. Wilcox, Pavel Panchekha, Taylor Blau, Dan Grossman, Zachary Tatlock
crossref: 2026-09-10

AI 速览

一句话:提出函数式CAD语言LambdaCAD及语义保持编译器,并用求值上下文合成算法将网格反编译回可编辑的CAD程序。

3D打印等桌面制造技术日益普及,但现有CAD软件流水线由专有工具的变体拼凑而成,流程冗长且对创客群体不友好。本文主张把实体几何视为一种编程语言,为CAD流水线引入编程语言技术。作者定义了纯函数式CAD语言LambdaCAD与多边形表面网格中间表示,给出两者到三维实体的指称语义,并实现从CAD到网格的编译器以及相应的语义保持证明。在此基础上,论文提出一种基于求值上下文的合成算法,可将从在线创客社区下载、难以编辑的网格“逆向编译”回更易修改的CAD程序。所有原型均用OCaml实现,以支持对桌面制造中函数式编程的进一步探索。该工作体现了组合性、指称语义、编译器正确性与程序合成的协同作用。

问题
面向3D打印等桌面制造的CAD软件流水线由专有工具拼凑而成,复杂且缺乏严谨性,难以服务普通创客群体。
方法
将实体几何视为编程语言,定义纯函数式CAD语言LambdaCAD与多边形网格IR及其指称语义,构造语义保持的CAD到网格编译器,并设计基于求值上下文的合成算法实现网格到CAD的反编译。
评估
全部原型用OCaml实现,通过将在线社区下载的难编辑网格反编译为可编辑CAD程序来展示该基础的实用性。
原文摘要(Abstract)

Desktop-manufacturing techniques like 3D printing are increasingly popular because they reduce the cost and complexity of producing customized objects on demand. Unfortunately, the vibrant communities of early adopters, often referred to as "makers," are not well-served by currently available software pipelines. Users today must compose idiosyncratic sequences of tools which are typically repurposed variants of proprietary software originally designed for expert specialists. This paper proposes fundamental programming-languages techniques to bring improved rigor, reduced complexity, and new functionality to the computer-aided design (CAD) software pipeline for applications like 3D-printing. Compositionality, denotational semantics, compiler correctness, and program synthesis all play key roles in our approach, starting from the perspective that solid geometry is a programming language. Specifically, we define a purely functional language for CAD called LambdaCAD and a polygon surface-mesh intermediate representation. We then define denotational semantics of both languages to 3D solids and a compiler from CAD to mesh accompanied by a proof of semantics preservation. We illustrate the utility of this foundation by developing a novel synthesis algorithm based on evaluation contexts to "reverse compile" difficult-to-edit meshes downloaded from online maker communities back to more-editable CAD programs. All our prototypes have been implemented in OCaml to enable further exploration of functional programming for desktop manufacturing.

链接与引用

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

BibTeX
@article{paperbot282,
  title = {Functional programming for compiling and decompiling computer-aided design},
  author = {Chandrakana Nandi and James R. Wilcox and Pavel Panchekha and Taylor Blau and Dan Grossman and Zachary Tatlock},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {2},
  number = {ICFP},
  year = {2018},
  doi = {10.1145/3236794}
}