{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,29]],"date-time":"2026-09-29T17:00:26Z","timestamp":1790701226598,"version":"4.1.0"},"reference-count":41,"publisher":"Association for Computing Machinery (ACM)","issue":"POPL","license":[{"start":{"date-parts":[[2019,12,20]],"date-time":"2019-12-20T00:00:00Z","timestamp":1576800000000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by-sa\/4.0\/"}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["Proc. ACM Program. Lang."],"published-print":{"date-parts":[[2020,1]]},"abstract":"<jats:p>The POSIX shell is a widely deployed, powerful tool for managing computer systems. The shell is the expert\u2019s control panel, a necessary tool for configuring, compiling, installing, maintaining, and deploying systems. Even though it is powerful, critical infrastructure, the POSIX shell is maligned and misunderstood. Its power and its subtlety are a dangerous combination.<\/jats:p>\n                  <jats:p>We define a formal, mechanized, executable small-step semantics for the POSIX shell, which we call Smoosh. We compared Smoosh against seven other shells that aim for some measure of POSIX compliance (bash, dash, zsh, OSH, mksh, ksh93, and yash). Using three test suites\u2014the POSIX test suite, the Modernish test suite and shell diagnostic, and a test suite of our own device\u2014we found Smoosh\u2019s semantics to be the most conformant to the POSIX standard. Modernish judges Smoosh to have the fewest bugs (just one, from using dash\u2019s parser) and no quirks. To show that our semantics is useful beyond yielding a conformant, executable shell, we also implemented a symbolic stepper to illuminate the subtle behavior of the shell.<\/jats:p>\n                  <jats:p>Smoosh will serve as a foundation for formal study of the POSIX shell, supporting research on and development of new shells, new tooling for shells, and new shell designs.<\/jats:p>","DOI":"10.1145\/3371111","type":"journal-article","created":{"date-parts":[[2019,12,20]],"date-time":"2019-12-20T14:45:25Z","timestamp":1576853125000},"page":"1-30","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":17,"title":["Executable formal semantics for the POSIX shell"],"prefix":"10.1145","volume":"4","author":[{"given":"Michael","family":"Greenberg","sequence":"first","affiliation":[{"name":"Pomona College, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Austin J.","family":"Blatt","sequence":"additional","affiliation":[{"name":"Puppet Labs, USA"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2019,12,20]]},"reference":[{"key":"e_1_2_2_1_1","volume-title":"The Open Group Base Specifications Issue 7","author":"The Austin Group","year":"2008"},{"key":"e_1_2_2_2_1","doi-asserted-by":"publisher","DOI":"10.1007\/s10817-009-9148-3"},{"key":"e_1_2_2_3_1","unstructured":"Andy Chu. 2019. Oil Shell. https:\/\/www.oilshell.org\/  Andy Chu. 2019. Oil Shell. https:\/\/www.oilshell.org\/"},{"key":"e_1_2_2_4_1","doi-asserted-by":"publisher","DOI":"10.1017\/S135577180300030X"},{"key":"e_1_2_2_5_1","volume-title":"NoFAQ: Synthesizing Command Repairs from Examples. CoRR abs\/1608.08219","author":"D\u2019Antoni Loris","year":"2016"},{"key":"e_1_2_2_6_1","unstructured":"Martijn Dekker. 2019. Modernish. https:\/\/github.com\/modernish\/modernish  Martijn Dekker. 2019. Modernish. https:\/\/github.com\/modernish\/modernish"},{"key":"e_1_2_2_7_1","doi-asserted-by":"publisher","DOI":"10.1145\/365230.365252"},{"key":"e_1_2_2_8_1","doi-asserted-by":"publisher","DOI":"10.1145\/2103656.2103719"},{"key":"e_1_2_2_9_1","doi-asserted-by":"publisher","DOI":"10.1145\/2034773.2034814"},{"key":"e_1_2_2_10_1","volume-title":"and Steven Strassman (Ed.)","author":"Garfinkel Simson","year":"1994"},{"key":"e_1_2_2_11_1","unstructured":"Gabriel Gonzalez. 2018. Turtle: shell programming Haskell style. https:\/\/github.com\/Gabriel439\/Haskell- Turtle- Library  Gabriel Gonzalez. 2018. Turtle: shell programming Haskell style. https:\/\/github.com\/Gabriel439\/Haskell- Turtle- Library"},{"key":"e_1_2_2_12_1","unstructured":"Michael Greenberg. 2018a. The POSIX shell is an interactive DSL for concurrency. DSLDI.  Michael Greenberg. 2018a. The POSIX shell is an interactive DSL for concurrency. DSLDI."},{"key":"e_1_2_2_13_1","doi-asserted-by":"publisher","DOI":"10.1145\/3191697.3214336"},{"key":"e_1_2_2_14_1","volume-title":"ECOOP, Theo D\u2019Hondt (Ed.)","author":"Guha Arjun"},{"key":"e_1_2_2_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/3278122.3278129"},{"key":"e_1_2_2_16_1","volume-title":"Tov","author":"Heller Alec","year":"2008"},{"key":"e_1_2_2_17_1","volume-title":"JFLA 2017 - Vingt-huiti\u00e8me Journ\u00e9es Francophones des Langages Applicatifs","author":"Jeannerod Nicolas","year":"2017"},{"key":"e_1_2_2_18_1","volume-title":"Verified Software: Theories, Tools, and Experiments (VSTTE) (Lecture Notes in Computer Science)","author":"Jeannerod Nicolas"},{"key":"e_1_2_2_19_1","volume-title":"Having Fun With 31.521 Shell Scripts. (April","author":"Jeannerod Nicolas","year":"2017"},{"key":"e_1_2_2_20_1","doi-asserted-by":"publisher","DOI":"10.1145\/3158154"},{"key":"e_1_2_2_21_1","unstructured":"Idan Kamara. 2016. explainshell. http:\/\/explainshell.com\/  Idan Kamara. 2016. explainshell. http:\/\/explainshell.com\/"},{"key":"e_1_2_2_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/2737924.2738005"},{"key":"e_1_2_2_23_1","volume-title":"Formal C Semantics: CompCert and the C Standard","author":"Krebbers Robbert"},{"key":"e_1_2_2_24_1","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-89330-1_22"},{"key":"e_1_2_2_25_1","doi-asserted-by":"publisher","DOI":"10.1145\/1255329.1255347"},{"key":"e_1_2_2_26_1","doi-asserted-by":"publisher","DOI":"10.1145\/2908080.2908081"},{"key":"e_1_2_2_27_1","volume-title":"Shill: A Secure Shell Scripting Language. In USENIX Symposium on Operating Systems Design and Implementation (OSDI). USENIX.","author":"Moore Scott","year":"2014"},{"key":"e_1_2_2_28_1","doi-asserted-by":"publisher","DOI":"10.1145\/2628136.2628143"},{"key":"e_1_2_2_29_1","doi-asserted-by":"publisher","DOI":"10.1145\/1328438.1328465"},{"key":"e_1_2_2_31_1","doi-asserted-by":"publisher","DOI":"10.4230\/LIPIcs.ECOOP.2018.4"},{"key":"e_1_2_2_32_1","doi-asserted-by":"publisher","DOI":"10.1145\/2384577.2384579"},{"key":"e_1_2_2_33_1","doi-asserted-by":"publisher","DOI":"10.1145\/3276604.3276615"},{"key":"e_1_2_2_34_1","doi-asserted-by":"crossref","volume-title":"The Eval That Men Do","author":"Richards Gregor","DOI":"10.1007\/978-3-642-22655-7_4"},{"key":"e_1_2_2_35_1","doi-asserted-by":"publisher","DOI":"10.1145\/2815400.2815411"},{"key":"e_1_2_2_36_1","doi-asserted-by":"publisher","DOI":"10.1016\/j.jlap.2010.03.012"},{"key":"e_1_2_2_37_1","unstructured":"Henry Schreiner Tomer Filiba etal 2018. Plumbum: shell combinators. http:\/\/plumbum.readthedocs.io\/en\/latest\/  Henry Schreiner Tomer Filiba et al. 2018. Plumbum: shell combinators. http:\/\/plumbum.readthedocs.io\/en\/latest\/"},{"key":"e_1_2_2_38_1","unstructured":"Anthony Scopatz et al. 2019. Xonsh. https:\/\/xon.sh\/  Anthony Scopatz et al. 2019. Xonsh. https:\/\/xon.sh\/"},{"key":"e_1_2_2_39_1","unstructured":"Olin Shivers. 2006. SCSH manual 0.6.7. https:\/\/scsh.net\/docu\/html\/man.html  Olin Shivers. 2006. SCSH manual 0.6.7. https:\/\/scsh.net\/docu\/html\/man.html"},{"key":"e_1_2_2_40_1","unstructured":"Philipp Emanuel Weidmann. 2016. maybe. https:\/\/github.com\/p- e- w\/maybe  Philipp Emanuel Weidmann. 2016. maybe. https:\/\/github.com\/p- e- w\/maybe"},{"key":"e_1_2_2_41_1","volume-title":"Rust Distilled: An Expressive Tower of Languages. CoRR abs\/1806.02693","author":"Weiss Aaron","year":"2018"},{"key":"e_1_2_2_42_1","volume-title":"Oxide: The Essence of Rust. CoRR abs\/1903.00982","author":"Weiss Aaron","year":"2019"}],"container-title":["Proceedings of the ACM on Programming Languages"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3371111","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3371111","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,18]],"date-time":"2025-06-18T15:05:43Z","timestamp":1750259143000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3371111"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2019,12,20]]},"references-count":41,"journal-issue":{"issue":"POPL","published-print":{"date-parts":[[2020,1]]}},"alternative-id":["10.1145\/3371111"],"URL":"https:\/\/doi.org\/10.1145\/3371111","relation":{},"ISSN":["2475-1421"],"issn-type":[{"value":"2475-1421","type":"electronic"}],"subject":[],"published":{"date-parts":[[2019,12,20]]},"assertion":[{"value":"2019-12-20","order":2,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}