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