{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,2,4]],"date-time":"2026-02-04T22:13:37Z","timestamp":1770243217434,"version":"3.49.0"},"reference-count":49,"publisher":"Association for Computing Machinery (ACM)","issue":"OOPSLA2","license":[{"start":{"date-parts":[[2024,10,8]],"date-time":"2024-10-08T00:00:00Z","timestamp":1728345600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"Hong Kong Research Grant Council","award":["17209821"],"award-info":[{"award-number":["17209821"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2024,10,8]]},"abstract":"<jats:p>Formalizations of programming languages typically adopt the substitution model from the lambda calculus. However, substitution creates notorious complications for reasoning and implementation. Furthermore, it is disconnected from practical implementations, which normally adopt environments and closures.<\/jats:p>\n                  <jats:p>\n                    In this paper we advocate for formalizing programming languages using a novel style of\n                    <jats:italic toggle=\"yes\">small-step environment-based semantics<\/jats:italic>\n                    , which avoids substitution and is closer to implementations. We present a call-by-value statically typed calculus, called\n                    <jats:inline-formula>\n                      <mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"inline\" overflow=\"scroll\">\n                        <mml:msub>\n                          <mml:mtext>\u03bb<\/mml:mtext>\n                          <mml:mi mathvariant=\"normal\">E<\/mml:mi>\n                        <\/mml:msub>\n                      <\/mml:math>\n                    <\/jats:inline-formula>\n                    , using our small-step environment semantics. With our alternative environment semantics programming language constructs for\n                    <jats:italic toggle=\"yes\">first-class environments<\/jats:italic>\n                    arise naturally, without creating significant additional complexity. Therefore,\n                    <jats:inline-formula>\n                      <mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"inline\" overflow=\"scroll\">\n                        <mml:msub>\n                          <mml:mtext>\u03bb<\/mml:mtext>\n                          <mml:mi mathvariant=\"normal\">E<\/mml:mi>\n                        <\/mml:msub>\n                      <\/mml:math>\n                    <\/jats:inline-formula>\n                    also adopts first-class environments, adding expressive power that is not available in conventional lambda calculi.\n                    <jats:inline-formula>\n                      <mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"inline\" overflow=\"scroll\">\n                        <mml:msub>\n                          <mml:mtext>\u03bb<\/mml:mtext>\n                          <mml:mi mathvariant=\"normal\">E<\/mml:mi>\n                        <\/mml:msub>\n                      <\/mml:math>\n                    <\/jats:inline-formula>\n                    is a conservative extension of the call-by-value Simply Typed Lambda Calculus (STLC), and employs de Bruijn indices for its formalization, which fit naturally with the environment-based semantics. Reasoning about\n                    <jats:inline-formula>\n                      <mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"inline\" overflow=\"scroll\">\n                        <mml:msub>\n                          <mml:mtext>\u03bb<\/mml:mtext>\n                          <mml:mi mathvariant=\"normal\">E<\/mml:mi>\n                        <\/mml:msub>\n                      <\/mml:math>\n                    <\/jats:inline-formula>\n                    is simple, and in many cases simpler than reasoning about the traditional STLC. We show an abstract machine that implements the semantics of\n                    <jats:inline-formula>\n                      <mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"inline\" overflow=\"scroll\">\n                        <mml:msub>\n                          <mml:mtext>\u03bb<\/mml:mtext>\n                          <mml:mi mathvariant=\"normal\">E<\/mml:mi>\n                        <\/mml:msub>\n                      <\/mml:math>\n                    <\/jats:inline-formula>\n                    , and has an easy correctness proof. We also extend\n                    <jats:inline-formula>\n                      <mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"inline\" overflow=\"scroll\">\n                        <mml:msub>\n                          <mml:mtext>\u03bb<\/mml:mtext>\n                          <mml:mi mathvariant=\"normal\">E<\/mml:mi>\n                        <\/mml:msub>\n                      <\/mml:math>\n                    <\/jats:inline-formula>\n                    with references. We show that\n                    <jats:inline-formula>\n                      <mml:math xmlns:mml=\"http:\/\/www.w3.org\/1998\/Math\/MathML\" display=\"inline\" overflow=\"scroll\">\n                        <mml:msub>\n                          <mml:mtext>\u03bb<\/mml:mtext>\n                          <mml:mi mathvariant=\"normal\">E<\/mml:mi>\n                        <\/mml:msub>\n                      <\/mml:math>\n                    <\/jats:inline-formula>\n                    can model a simple form of first-class modules, and suggest using first-class environments as an alternative to objects for modelling capabilities. All technical results are formalized in the Coq proof assistant. In summary, our work shows that the small-step environment semantics that we adopt has three main and orthogonal benefits: 1) it simplifies the notorious binding problem in formalizations and proof assistants; 2) it is closer to implementations; and 3) additional expressive power is obtained from first-class environments almost for free.\n                  <\/jats:p>","DOI":"10.1145\/3689800","type":"journal-article","created":{"date-parts":[[2024,10,8]],"date-time":"2024-10-08T03:23:04Z","timestamp":1728357784000},"page":"2521-2550","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":0,"title":["A Case for First-Class Environments"],"prefix":"10.1145","volume":"8","author":[{"ORCID":"https:\/\/orcid.org\/0009-0005-5779-8409","authenticated-orcid":false,"given":"Jinhao","family":"Tan","sequence":"first","affiliation":[{"name":"University of Hong Kong, Hong Kong, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-1846-7210","authenticated-orcid":false,"given":"Bruno C. d. S.","family":"Oliveira","sequence":"additional","affiliation":[{"name":"University of Hong Kong, Hong Kong, China"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"320","published-online":{"date-parts":[[2024,10,8]]},"reference":[{"key":"e_1_3_1_2_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796800000186"},{"key":"e_1_3_1_3_1","doi-asserted-by":"publisher","DOI":"10.1017\/S0956796819000170"},{"key":"e_1_3_1_4_1","doi-asserted-by":"publisher","DOI":"10.1145\/3009837.3009866"},{"key":"e_1_3_1_5_1","doi-asserted-by":"publisher","DOI":"10.1007\/11541868_4"},{"issue":"2","key":"e_1_3_1_6_1","first-page":"1","article-title":"Abella: A System for Reasoning about Relational Specifications","volume":"7","author":"Baelde David","year":"2014","unstructured":"David Baelde, Kaustuv Chaudhuri, Andrew Gacek, Dale Miller, Gopalan Nadathur, Alwen Tiu, and Yuting Wang. 2014. Abella: A System for Reasoning about Relational Specifications. J. Formaliz. Reason. 7, 2 (2014), 1\u201389.","journal-title":"J. Formaliz. Reason"},{"key":"e_1_3_1_7_1","volume-title":"The lambda calculus - its syntax and semantics","author":"Barendregt Hendrik Pieter","year":"1985","unstructured":"Hendrik Pieter Barendregt. 1985. The lambda calculus - its syntax and semantics. Studies in logic and the foundations of mathematics, Vol. 103. North-Holland."},{"key":"e_1_3_1_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/1297658.1297664"},{"key":"e_1_3_1_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/263699.263735"},{"key":"e_1_3_1_10_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10817-011-9225-2"},{"key":"e_1_3_1_11_1","volume-title":"The calculi of lambda-conversion","author":"Church Alonzo","year":"1941","unstructured":"Alonzo Church. 1941. The calculi of lambda-conversion. Princeton University Press."},{"key":"e_1_3_1_12_1","doi-asserted-by":"publisher","DOI":"10.1145\/91556.91681"},{"key":"e_1_3_1_13_1","unstructured":"Douglas Crockford. 2008. ADsafe. http:\/\/www.adsafe.org"},{"key":"e_1_3_1_14_1","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(91)90230-Y"},{"key":"e_1_3_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/226643.226675"},{"key":"e_1_3_1_16_1","doi-asserted-by":"publisher","DOI":"10.7146\/brics.v11i26.21851"},{"key":"e_1_3_1_17_1","doi-asserted-by":"publisher","DOI":"10.1016\/1385-7258(72)90034-0"},{"key":"e_1_3_1_18_1","first-page":"63","article-title":"A Calculus of Evolving Objects","volume":"18","author":"Dezani-Ciancaglini Mariangiola","year":"2008","unstructured":"Mariangiola Dezani-Ciancaglini, Paola Giannini, and Oscar Nierstrasz. 2008. A Calculus of Evolving Objects. Sci. Ann. Comput. Sci. 18 (2008), 63\u201398. http:\/\/www.info.uaic.ro\/bin\/Annals\/Article?v=XVIII&a=3","journal-title":"Sci. Ann. Comput. Sci"},{"key":"e_1_3_1_19_1","doi-asserted-by":"publisher","DOI":"10.1145\/1111037.1111062"},{"key":"e_1_3_1_20_1","first-page":"193","volume-title":"Formal Description of Programming Concepts - III: Proceedings of the IFIP TC 2\/WG 2.2 Working Conference on Formal Description of Programming Concepts - III, Ebberup, Denmark, 25-28 August 1986","author":"Felleisen Matthias","year":"1987","unstructured":"Matthias Felleisen and Daniel P. Friedman. 1987. Control operators, the SECD-machine, and the \u03bb-calculus. In Formal Description of Programming Concepts - III: Proceedings of the IFIP TC 2\/WG 2.2 Working Conference on Formal Description of Programming Concepts - III, Ebberup, Denmark, 25-28 August 1986, Martin Wirsing (Ed.). North-Holland, 193\u2013222."},{"key":"e_1_3_1_21_1","doi-asserted-by":"publisher","DOI":"10.1145\/3371095"},{"key":"e_1_3_1_22_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-66107-0_13"},{"key":"e_1_3_1_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/41625.41634"},{"key":"e_1_3_1_24_1","doi-asserted-by":"publisher","DOI":"10.1109\/ICCL.1994.288391"},{"key":"e_1_3_1_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/3294032.3294085"},{"key":"e_1_3_1_26_1","doi-asserted-by":"publisher","DOI":"10.5555\/646503.696269"},{"key":"e_1_3_1_27_1","doi-asserted-by":"publisher","DOI":"10.1093\/comjnl\/6.4.308"},{"key":"e_1_3_1_28_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.ic.2007.12.004"},{"key":"e_1_3_1_29_1","first-page":"20:1","volume-title":"ECOOP (LIPIcs, Vol. 74)","author":"Melicher Darya","year":"2017","unstructured":"Darya Melicher, Yangqingwei Shi, Alex Potanin, and Jonathan Aldrich. 2017. A Capability-Based Module System for Authority Control. In ECOOP (LIPIcs, Vol. 74). Schloss Dagstuhl - Leibniz-Zentrum f\u00fcr Informatik, 20:1\u201320:27."},{"key":"e_1_3_1_30_1","volume-title":"Proceedings of the Network and Distributed System Security Symposium, NDSS 2010, San Diego, California, USA, 28th February - 3rd March 2010","author":"Mettler Adrian","year":"2010","unstructured":"Adrian Mettler, David A. Wagner, and Tyler Close. 2010. Joe-E: A Security-Oriented Subset of Java. In Proceedings of the Network and Distributed System Security Symposium, NDSS 2010, San Diego, California, USA, 28th February - 3rd March 2010. The Internet Society. https:\/\/www.ndss-symposium.org\/ndss2010\/joe-e-security-oriented-subset-java"},{"key":"e_1_3_1_31_1","volume-title":"Robust composition: Towards a unified approach to access control and concurrency control","author":"Miller Mark","year":"2006","unstructured":"Mark Miller. 2006. Robust composition: Towards a unified approach to access control and concurrency control. Johns Hopkins University."},{"key":"e_1_3_1_32_1","first-page":"349","volume-title":"Financial Cryptography, 4th International Conference, FC 2000 Anguilla, British West Indies, February 20-24, 2000, Proceedings (Lecture Notes in Computer Science, Vol. 1962)","author":"Miller Mark S.","year":"2000","unstructured":"Mark S. Miller, Chip Morningstar, and Bill Frantz. 2000. Capability-Based Financial Instruments. In Financial Cryptography, 4th International Conference, FC 2000 Anguilla, British West Indies, February 20-24, 2000, Proceedings (Lecture Notes in Computer Science, Vol. 1962), Yair Frankel (Ed.). Springer, 349\u2013378. https:\/\/doi.org\/10.1007\/3-540-45472-1_24 10.1007\/3-540-45472-1_24"},{"key":"e_1_3_1_33_1","unstructured":"Mark S Miller Mike Samuel Ben Laurie Ihab Awad and Mike Stay. 2008. Safe active content in sanitized JavaScript. Google Inc. Tech. Rep (2008)."},{"key":"e_1_3_1_34_1","doi-asserted-by":"publisher","DOI":"10.2977\/prims\/1195164948"},{"key":"e_1_3_1_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/53990.54010"},{"key":"e_1_3_1_36_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-21401-6_18"},{"key":"e_1_3_1_37_1","doi-asserted-by":"publisher","DOI":"10.1016\/S0890-5401(03)00138-X"},{"key":"e_1_3_1_38_1","doi-asserted-by":"publisher","DOI":"10.1145\/232627.232653"},{"key":"e_1_3_1_39_1","doi-asserted-by":"publisher","DOI":"10.5555\/251167.251190"},{"key":"e_1_3_1_40_1","doi-asserted-by":"publisher","DOI":"10.1145\/2983990.2984008"},{"issue":"1","key":"e_1_3_1_41_1","first-page":"79","article-title":"Explicit Environments","volume":"45","author":"Sato Masahiko","year":"2001","unstructured":"Masahiko Sato, Takafumi Sakurai, and Rod M. Burstall. 2001. Explicit Environments. Fundam. Informaticae 45, 1-2 (2001), 79\u2013115. http:\/\/content.iospress.com\/articles\/fundamenta-informaticae\/fi45-1-2-05","journal-title":"Fundam. Informaticae"},{"key":"e_1_3_1_42_1","unstructured":"Masahiko Sato Takafumi Sakurai and Yukiyoshi Kameyama. 2002. A Simply Typed Context Calculus with First-class Environments. J. Funct. Log. Program. 2002 (2002). http:\/\/danae.uni-muenster.de\/lehre\/kuchen\/JFLP\/articles\/2002\/S02-01\/JFLP-A02-04.pdf"},{"key":"e_1_3_1_43_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-319-22102-1_24"},{"key":"e_1_3_1_44_1","unstructured":"Jeremy Siek. 2013. Type safety in three easy lemmas. http:\/\/siek.blogspot.com\/2013\/05\/type-safety-in-three-easy-lemmas.html"},{"key":"e_1_3_1_45_1","doi-asserted-by":"publisher","DOI":"10.1145\/3293880.3294101"},{"key":"e_1_3_1_46_1","doi-asserted-by":"publisher","DOI":"10.2307\/2271658"},{"key":"e_1_3_1_47_1","first-page":"34:1","volume-title":"37th European Conference on Object-Oriented Programming (ECOOP 2023) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 263)","author":"Tan Jinhao","year":"2023","unstructured":"Jinhao Tan and Bruno C. d. S. Oliveira. 2023. Dependent Merges and First-Class Environments. In 37th European Conference on Object-Oriented Programming (ECOOP 2023) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 263), Karim Ali and Guido Salvaneschi (Eds.). Schloss Dagstuhl \u2013 Leibniz-Zentrum f\u00fcr Informatik, Dagstuhl, Germany, 34:1\u201334:32. https:\/\/doi.org\/10.4230\/LIPIcs.ECOOP.2023.34 10.4230\/LIPIcs.ECOOP.2023.34"},{"key":"e_1_3_1_48_1","unstructured":"Jinhao Tan and Bruno C. d. S. Oliveira. 2024. A Case for First-Class Environments (Artifact). https:\/\/doi.org\/10.5281\/zenodo.13370814 10.5281\/zenodo.13370814"},{"key":"e_1_3_1_49_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10817-008-9097-2"},{"key":"e_1_3_1_50_1","doi-asserted-by":"publisher","DOI":"10.1006\/inco.1994.1093"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3689800","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3689800","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,2,4]],"date-time":"2026-02-04T09:03:31Z","timestamp":1770195811000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3689800"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,10,8]]},"references-count":49,"journal-issue":{"issue":"OOPSLA2","published-print":{"date-parts":[[2024,10,8]]}},"alternative-id":["10.1145\/3689800"],"URL":"https:\/\/doi.org\/10.1145\/3689800","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,10,8]]},"assertion":[{"value":"2024-04-06","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-08-18","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-10-08","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}