Executable formal semantics for the POSIX shell
Michael Greenberg, Austin J. Blatt
摘要
The POSIX shell is a widely deployed, powerful tool for managing computer systems. The shell is the expert's 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.
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-the POSIX test suite, the Modernish test suite and shell diagnosis, and a test suite of our own device-we found Smoosh's semantics to be the most conformant to the POSIX standard. Modernish judges Smoosh to have the fewest bugs (just one, from using dash's 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.
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.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper6
- Petr4: formal foundations for p4 data planesRyan Doenges, Mina Tahmasbi Arashloo, Santiago Bautista, Alexander Chang 等POPL 2021 · 被引用 24 次
- The Koala Benchmarks for the Shell: Characterization and ImplicationsEvangelos Lamprou, Ethan Williams, Georgios Kaoukis, Zhuoxuan Zhang 等USENIX ATC 2025 · 被引用 12 次
- Fractal: Fault-Tolerant Shell-Script DistributionZhicheng Huang, Ramiz Dundar, Yizheng Xie, Konstantinos Kallas 等NSDI 2026 · 被引用 4 次
- hS: Speculative Script Reordering at Subprocess GranularityGeorgios Liargkovas, Di Jin, Tianyu (Ezri) Zhu, Dan Liu 等OSDI 2026 · 被引用 3 次
- Feature-Sensitive Coverage for Conformance Testing of Programming Language ImplementationsJihyeok Park, Dongjun Youn, Kanguk Lee, Sukyoung RyuPLDI 2023 · 被引用 3 次
相关 Paper
- PaSh: light-touch data-parallel shell processingNikos Vasilakis, Konstantinos Kallas, Konstantinos Mamouras, Achilles Benetopoulos 等EuroSys 2021 · 被引用 12 次
- Practically Correct, Just-in-Time Shell Script ParallelizationKonstantinos Kallas, Tammam Mustafa, Jan Bielak, Dimitris Karnikis 等OSDI 2022 · 被引用 13 次
- Ahead-of-Time Analysis of Shell Program EffectsLukas Lazarek, Evangelos Lamprou, George Kapetanakis, Anirudh Narsipur 等SOSP 2026
- DiSh: Dynamic Shell-Script DistributionTammam Mustafa, Konstantinos Kallas, Pratyush Das, Nikos VasilakisNSDI 2023 · 被引用 11 次
- POSH: A Data-Aware ShellDeepti Raghavan, Sadjad Fouladi, Philip Alexander Levis, Matei ZahariaUSENIX ATC 2020 · 被引用 33 次
