Executable formal semantics for the POSIX shell

Author:

Greenberg Michael1,Blatt Austin J.2

Affiliation:

1. Pomona College, USA

2. Puppet Labs, USA

Abstract

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 diagnostic, 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.

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference41 articles.

1. Mechanized Semantics for the Clight Subset of the C Language

2. Andy Chu. 2019. Oil Shell. https://www.oilshell.org/ Andy Chu. 2019. Oil Shell. https://www.oilshell.org/

3. Live coding in laptop performance

Cited by 11 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Low-Power Lane Detection Unit With Sliding-Based Parallel Segment Detection Accelerator for FPGA;IEEE Access;2024

2. Systematic Literature Review on Machine Learning and its Impact on APIs Deployment;Computación y Sistemas;2023-12-27

3. An Executable Semantics for Faster Development of Optimizing Python Compilers;Proceedings of the 16th ACM SIGPLAN International Conference on Software Language Engineering;2023-10-23

4. Executing Shell Scripts in the Wrong Order, Correctly;Proceedings of the 19th Workshop on Hot Topics in Operating Systems;2023-06-22

5. Feature-Sensitive Coverage for Conformance Testing of Programming Language Implementations;Proceedings of the ACM on Programming Languages;2023-06-06

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3