{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,6,24]],"date-time":"2026-06-24T16:18:37Z","timestamp":1782317917022,"version":"3.54.5"},"reference-count":66,"publisher":"Association for Computing Machinery (ACM)","issue":"ICFP","license":[{"start":{"date-parts":[[2018,7,30]],"date-time":"2018-07-30T00:00:00Z","timestamp":1532908800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2018,7,30]]},"abstract":"<jats:p>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.<\/jats:p>\n          <jats:p>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.<\/jats:p>\n          <jats:p>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.<\/jats:p>","DOI":"10.1145\/3236794","type":"journal-article","created":{"date-parts":[[2018,7,31]],"date-time":"2018-07-31T19:41:18Z","timestamp":1533066078000},"page":"1-31","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":40,"title":["Functional programming for compiling and decompiling computer-aided design"],"prefix":"10.1145","volume":"2","author":[{"given":"Chandrakana","family":"Nandi","sequence":"first","affiliation":[{"name":"University of Washington, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"James R.","family":"Wilcox","sequence":"additional","affiliation":[{"name":"University of Washington, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Pavel","family":"Panchekha","sequence":"additional","affiliation":[{"name":"University of Washington, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Taylor","family":"Blau","sequence":"additional","affiliation":[{"name":"University of Washington, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Dan","family":"Grossman","sequence":"additional","affiliation":[{"name":"University of Washington, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Zachary","family":"Tatlock","sequence":"additional","affiliation":[{"name":"University of Washington, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2018,7,30]]},"reference":[{"key":"e_1_2_2_1_1","doi-asserted-by":"publisher","DOI":"10.1145\/2957276.2957301"},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.5555\/2540128.2540412"},{"key":"e_1_2_2_3_1","unstructured":"M. Artin. 2011. Algebra. Pearson Prentice Hall. https:\/\/books.google.com\/books?id=S6GSAgAAQBAJ  M. Artin. 2011. Algebra. Pearson Prentice Hall. https:\/\/books.google.com\/books?id=S6GSAgAAQBAJ"},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3075222"},{"key":"e_1_2_2_5_1","doi-asserted-by":"publisher","DOI":"10.1145\/2513383.2513445"},{"key":"e_1_2_2_6_1","volume-title":"https:\/\/www.blender.org\/","year":"2018","unstructured":"Blender. 2018. Blender. ( 2018 ). https:\/\/www.blender.org\/ . Blender. 2018. Blender. (2018). https:\/\/www.blender.org\/ ."},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/2914770.2837666"},{"key":"e_1_2_2_8_1","volume-title":"https:\/\/www.cgal.org","author":"CGAL.","year":"2018","unstructured":"CGAL. 2018. CGAL. ( 2018 ). https:\/\/www.cgal.org . CGAL. 2018. CGAL. (2018). https:\/\/www.cgal.org ."},{"key":"e_1_2_2_9_1","volume-title":"Special Interest Group on Computer Graphics and Interactive Techniques Conference, SIGGRAPH \u201915","author":"Anthony\u2019 Chen Xiang","year":"2015","unstructured":"Xiang \u2018 Anthony\u2019 Chen , Stelian Coros , Jennifer Mankoff , and Scott E. Hudson . 2015. Encore: 3D printed augmentation of everyday objects with printed-over, affixed and interlocked attachments . In Special Interest Group on Computer Graphics and Interactive Techniques Conference, SIGGRAPH \u201915 , Los Angeles, CA, USA , August 9-13, 2015 , Posters Proceedings. 3:1. Xiang \u2018Anthony\u2019 Chen, Stelian Coros, Jennifer Mankoff, and Scott E. Hudson. 2015. Encore: 3D printed augmentation of everyday objects with printed-over, affixed and interlocked attachments. In Special Interest Group on Computer Graphics and Interactive Techniques Conference, SIGGRAPH \u201915, Los Angeles, CA, USA, August 9-13, 2015, Posters Proceedings. 3:1."},{"key":"e_1_2_2_10_1","doi-asserted-by":"publisher","DOI":"10.1145\/2984511.2984512"},{"key":"e_1_2_2_11_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-662-03427-9"},{"key":"e_1_2_2_12_1","volume-title":"Optimized build orientation of additive manufactured parts for improved surface quality and build time. Additive Manufacturing 12, Part B","author":"Delfs P.","year":"2016","unstructured":"P. Delfs , M. \u00a8 Tows , and H.-J. Schmid . 2016. Optimized build orientation of additive manufactured parts for improved surface quality and build time. Additive Manufacturing 12, Part B ( 2016 ), 314 \u2013 320. P. Delfs, M. \u00a8 Tows, and H.-J. Schmid. 2016. Optimized build orientation of additive manufactured parts for improved surface quality and build time. Additive Manufacturing 12, Part B (2016), 314 \u2013 320."},{"key":"e_1_2_2_13_1","volume-title":"Fast and Accurate Floating Point Summation with Application to Computational Geometry. Numerical Algorithms 37, 1 (01","author":"Demmel James","year":"2004","unstructured":"James Demmel and Yozo Hida . 2004. Fast and Accurate Floating Point Summation with Application to Computational Geometry. Numerical Algorithms 37, 1 (01 Dec 2004 ), 101\u2013112. James Demmel and Yozo Hida. 2004. Fast and Accurate Floating Point Summation with Application to Computational Geometry. Numerical Algorithms 37, 1 (01 Dec 2004), 101\u2013112."},{"key":"e_1_2_2_14_1","doi-asserted-by":"publisher","DOI":"10.1145\/2766984"},{"key":"e_1_2_2_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/1236463.1236468"},{"key":"e_1_2_2_16_1","volume-title":"New Opportunities to Optimize Structural Designs in Metal by Using Additive Manufacturing","author":"Galjaard Salom\u00e9","unstructured":"Salom\u00e9 Galjaard , Sander Hofman , and Shibo Ren . 2015. New Opportunities to Optimize Structural Designs in Metal by Using Additive Manufacturing . Springer International Publishing , Cham , 79\u201393. Salom\u00e9 Galjaard, Sander Hofman, and Shibo Ren. 2015. New Opportunities to Optimize Structural Designs in Metal by Using Additive Manufacturing. Springer International Publishing, Cham, 79\u201393."},{"key":"e_1_2_2_17_1","unstructured":"Geomagic Design X. 2018. Geomagic Design X. (2018). https:\/\/www.3dsystems.com\/software\/geomagic- design- x .  Geomagic Design X. 2018. Geomagic Design X. (2018). https:\/\/www.3dsystems.com\/software\/geomagic- design- x ."},{"key":"e_1_2_2_18_1","doi-asserted-by":"publisher","DOI":"10.1145\/103162.103163"},{"key":"e_1_2_2_19_1","volume-title":"https:\/\/grabcad.com\/","author":"CAD.","year":"2018","unstructured":"Grab CAD. 2018. GrabCAD. ( 2018 ). https:\/\/grabcad.com\/ . GrabCAD. 2018. GrabCAD. (2018). https:\/\/grabcad.com\/ ."},{"key":"e_1_2_2_20_1","volume-title":"User\u2019s Guide to Rapid Prototyping","author":"Grimm T.","unstructured":"T. Grimm . 2004. User\u2019s Guide to Rapid Prototyping . Society of Manufacturing Engineers . T. Grimm. 2004. User\u2019s Guide to Rapid Prototyping. Society of Manufacturing Engineers."},{"key":"e_1_2_2_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/3025453.3025845"},{"key":"e_1_2_2_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/2982142.2982181"},{"key":"e_1_2_2_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/2858036.2858340"},{"key":"e_1_2_2_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/2700648.2811323"},{"key":"e_1_2_2_25_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0925-7721(01)00012-8"},{"key":"e_1_2_2_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/2858036.2858266"},{"key":"e_1_2_2_27_1","unstructured":"ImplicitCAD. 2018. ImplicitCAD. (2018). http:\/\/www.implicitcad.org\/ .  ImplicitCAD. 2018. ImplicitCAD. (2018). http:\/\/www.implicitcad.org\/ ."},{"key":"e_1_2_2_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/1806799.1806833"},{"key":"e_1_2_2_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/512529.512566"},{"key":"e_1_2_2_30_1","doi-asserted-by":"publisher","DOI":"10.1145\/3064663.3064690"},{"key":"e_1_2_2_31_1","volume-title":"Rigid Body Dynamics for Beginners: Euler Angles &amp","author":"Kim P.","unstructured":"P. Kim . 2013. Rigid Body Dynamics for Beginners: Euler Angles &amp ; Quaternions. CreateSpace Independent Publishing Platform . https:\/\/books.google.com\/books?id=bJEengEACAAJ P. Kim. 2013. Rigid Body Dynamics for Beginners: Euler Angles &amp; Quaternions. CreateSpace Independent Publishing Platform. https:\/\/books.google.com\/books?id=bJEengEACAAJ"},{"key":"e_1_2_2_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/237170.237270"},{"key":"e_1_2_2_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/2897824.2925940"},{"key":"e_1_2_2_34_1","doi-asserted-by":"publisher","DOI":"10.1145\/2642918.2647388"},{"key":"e_1_2_2_35_1","unstructured":"Autodesk. Meshmixer. 2018. Autodesk. Meshmixer. (2018). http:\/\/www.meshmixer.com\/ .  Autodesk. Meshmixer. 2018. Autodesk. Meshmixer. (2018). http:\/\/www.meshmixer.com\/ ."},{"key":"e_1_2_2_36_1","doi-asserted-by":"publisher","DOI":"10.1145\/2642918.2647359"},{"key":"e_1_2_2_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/2556288.2557005"},{"key":"e_1_2_2_38_1","volume-title":"2nd Summit on Advances in Programming Languages (SNAPL 2017) (Leibniz International Proceedings in Informatics (LIPIcs)), Benjamin S. Lerner, Rastislav Bod\u00edk, and Shriram Krishnamurthi (Eds.)","volume":"71","author":"Nandi Chandrakana","year":"2017","unstructured":"Chandrakana Nandi , Anat Caspi , Dan Grossman , and Zachary Tatlock . 2017 . Programming Language Tools and Techniques for 3D Printing . In 2nd Summit on Advances in Programming Languages (SNAPL 2017) (Leibniz International Proceedings in Informatics (LIPIcs)), Benjamin S. Lerner, Rastislav Bod\u00edk, and Shriram Krishnamurthi (Eds.) , Vol. 71 . Schloss Dagstuhl\u2013 Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 10:1\u201310:12. Chandrakana Nandi, Anat Caspi, Dan Grossman, and Zachary Tatlock. 2017. Programming Language Tools and Techniques for 3D Printing. In 2nd Summit on Advances in Programming Languages (SNAPL 2017) (Leibniz International Proceedings in Informatics (LIPIcs)), Benjamin S. Lerner, Rastislav Bod\u00edk, and Shriram Krishnamurthi (Eds.), Vol. 71. Schloss Dagstuhl\u2013 Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, 10:1\u201310:12."},{"key":"e_1_2_2_39_1","unstructured":"OFF. 2018. OFF Files. (2018). http:\/\/www.geomview.org\/docs\/html\/OFF.html .  OFF. 2018. OFF Files. (2018). http:\/\/www.geomview.org\/docs\/html\/OFF.html ."},{"key":"e_1_2_2_40_1","unstructured":"OpenSCAD. 2018. OpenSCAD. (2018). http:\/\/www.openscad.org\/ .  OpenSCAD. 2018. OpenSCAD. (2018). http:\/\/www.openscad.org\/ ."},{"key":"e_1_2_2_41_1","doi-asserted-by":"publisher","DOI":"10.1145\/2737924.2737959"},{"key":"e_1_2_2_42_1","doi-asserted-by":"publisher","DOI":"10.1145\/2594291.2594339"},{"key":"e_1_2_2_43_1","doi-asserted-by":"publisher","DOI":"10.1145\/2954679.2872387"},{"key":"e_1_2_2_44_1","volume-title":"https:\/\/www.autodesk.com\/products\/powershape\/overview","year":"2018","unstructured":"Powershape. 2018. Powershape. ( 2018 ). https:\/\/www.autodesk.com\/products\/powershape\/overview . Powershape. 2018. Powershape. (2018). https:\/\/www.autodesk.com\/products\/powershape\/overview ."},{"key":"e_1_2_2_45_1","volume-title":"https:\/\/www.rhino3d.com\/","year":"2018","unstructured":"Rhinoceros. 2018. Rhinoceros. ( 2018 ). https:\/\/www.rhino3d.com\/ . Rhinoceros. 2018. Rhinoceros. (2018). https:\/\/www.rhino3d.com\/ ."},{"key":"e_1_2_2_46_1","doi-asserted-by":"publisher","DOI":"10.1145\/2490301.2451150"},{"key":"e_1_2_2_47_1","doi-asserted-by":"publisher","DOI":"10.1145\/2601097.2601127"},{"key":"e_1_2_2_48_1","volume-title":"Adaptive precision floating-point arithmetic and fast robust geometric predicates. 18 (10","author":"Shewchuk J.R.","year":"1997","unstructured":"J.R. Shewchuk . 1997. Adaptive precision floating-point arithmetic and fast robust geometric predicates. 18 (10 1997 ), 305\u2013363. J.R. Shewchuk. 1997. Adaptive precision floating-point arithmetic and fast robust geometric predicates. 18 (10 1997), 305\u2013363."},{"key":"e_1_2_2_49_1","unstructured":"SketchUp. 2018. SketchUp. (2018). http:\/\/www.sketchup.com\/ .  SketchUp. 2018. SketchUp. (2018). http:\/\/www.sketchup.com\/ ."},{"key":"e_1_2_2_50_1","volume-title":"CNC Programming Handbook: A Comprehensive Guide to Practical CNC Programming","author":"Smid P.","unstructured":"P. Smid . 2003. CNC Programming Handbook: A Comprehensive Guide to Practical CNC Programming . Industrial Press . https:\/\/books.google.com\/books?id=JNnQ8r5merMC P. Smid. 2003. CNC Programming Handbook: A Comprehensive Guide to Practical CNC Programming. Industrial Press. https:\/\/books.google.com\/books?id=JNnQ8r5merMC"},{"key":"e_1_2_2_52_1","unstructured":"Solidworks. 2018. Solidworks. (2018). http:\/\/www.solidworks.com\/ .  Solidworks. 2018. Solidworks. (2018). http:\/\/www.solidworks.com\/ ."},{"key":"e_1_2_2_53_1","unstructured":"SpaceClaim. 2018. SpaceClaim. (2018). http:\/\/www.spaceclaim.com\/en\/Solutions\/ReverseEngineering.aspx .  SpaceClaim. 2018. SpaceClaim. (2018). http:\/\/www.spaceclaim.com\/en\/Solutions\/ReverseEngineering.aspx ."},{"key":"e_1_2_2_54_1","doi-asserted-by":"publisher","DOI":"10.1145\/2185520.2185544"},{"key":"e_1_2_2_55_1","doi-asserted-by":"publisher","DOI":"10.1145\/800265.810742"},{"key":"e_1_2_2_56_1","doi-asserted-by":"publisher","DOI":"10.1145\/2807442.2807467"},{"key":"e_1_2_2_57_1","unstructured":"Enabling The Future. 2018. Enabling The Future. (2018). http:\/\/enablingthefuture.org .  Enabling The Future. 2018. Enabling The Future. (2018). http:\/\/enablingthefuture.org ."},{"key":"e_1_2_2_58_1","unstructured":"Thingiverse. 2018a. Hexagonal Candle Holder. (2018). https:\/\/www.thingiverse.com\/thing:756968 .  Thingiverse. 2018a. Hexagonal Candle Holder. (2018). https:\/\/www.thingiverse.com\/thing:756968 ."},{"key":"e_1_2_2_59_1","unstructured":"Thingiverse. 2018b. Thingiverse. (2018). http:\/\/www.thingiverse.com\/ .  Thingiverse. 2018b. Thingiverse. (2018). http:\/\/www.thingiverse.com\/ ."},{"key":"e_1_2_2_60_1","unstructured":"Thingiverse. 2018c. Ultimate 22 Hex-Wrench Holder. (2018). https:\/\/www.thingiverse.com\/thing:1752602 .  Thingiverse. 2018c. Ultimate 22 Hex-Wrench Holder. (2018). https:\/\/www.thingiverse.com\/thing:1752602 ."},{"key":"e_1_2_2_61_1","unstructured":"Thingiverse. 2018d. Welcome To Customizer. (2018). https:\/\/www.thingiverse.com\/customizer .  Thingiverse. 2018d. Welcome To Customizer. (2018). https:\/\/www.thingiverse.com\/customizer ."},{"key":"e_1_2_2_62_1","doi-asserted-by":"publisher","DOI":"10.1145\/2499370.2462174"},{"key":"e_1_2_2_63_1","doi-asserted-by":"publisher","DOI":"10.1145\/2542355.2542361"},{"key":"e_1_2_2_64_1","doi-asserted-by":"publisher","DOI":"10.1145\/2461912.2461993"},{"key":"e_1_2_2_65_1","doi-asserted-by":"publisher","DOI":"10.1145\/3140587.3062365"},{"key":"e_1_2_2_66_1","doi-asserted-by":"publisher","DOI":"10.1145\/2461912.2461967"},{"key":"e_1_2_2_67_1","doi-asserted-by":"publisher","DOI":"10.5555\/1888390.1888400"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3236794","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3236794","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T21:41:28Z","timestamp":1750282888000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3236794"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2018,7,30]]},"references-count":66,"journal-issue":{"issue":"ICFP","published-print":{"date-parts":[[2018,7,30]]}},"alternative-id":["10.1145\/3236794"],"URL":"https:\/\/doi.org\/10.1145\/3236794","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2018,7,30]]},"assertion":[{"value":"2018-07-30","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}