Skip to content
The Symbolic, Mechanized, Observable, Operational SHell: an executable formalization of the POSIX shell standard.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lem @ 54e1c03
libdash @ 000b291
src
tests
web
.dockerignore
.gitattributes
.gitignore
.gitmodules
.travis.yml
Dockerfile
Dockerfile.test
Dockerfile.web
LICENSE
README.md
TODO.md
build.sh
builtin.local.export.test
builtin.local.getopts.test
builtin.local.inherit.test
builtin.local.nested.test
builtin.local.readonly.inside.test
builtin.local.readonly.test
builtin.local.special.test
builtin.local.unset.test
builtin.readonly.getopts.test
builtin.readonly.local.test
test.env
test.user

README.md

Build Status

Smoosh (the Symbolic, Mechanized, Observable, Operational SHell) is a formalization of the POSIX shell standard; Smoosh is one part of Michael Greenberg's broader project on the POSIX shell.

Smoosh is written in a mix of Lem and OCaml, using libdash to parse shell code.

Fetch the submodules

  • The best way to clone this repository is via git clone --recurse-submodules https://github.com/mgree/smoosh.
  • If you didn't use --recursive or --recurse-submodules, before trying anything, run: git submodule update --init --recursive

If you don't load the git submodules, the libdash and Lem references won't resolve properly---the directories will be empty!

Whenever you pull, remember to run git submodule update to make sure that the submodules are at the correct versions.

How to build and test it

  • Run: ./build.sh

Building in more detail

  • Run: docker build -t smoosh .

To build by hand, you should more or less follow the steps in the Dockerfile, adapting to your system. (For example, on OS X, you'll probably want to install directly to /usr/local.)

Testing in more detail

  • To run the test suite after building, run: docker build -t smoosh-test -f Dockerfile.test . && docker run smoosh-test
  • To explore the built image, run: docker run -it smoosh

To test by hand, there are three sets of relevant tests: the libdash tests (in libdash/test), the unit tests for symbolic smoosh (in src), and the shell test suite (in tests). All three directories have Makefiles with appropriate test targets, so you can test both by running the following:

make -C libdash/test test
make -C src/ test
make -C tests test

You can do so by running docker run -it smoosh to get an interactive environment.

How to use the web interface

  • After building the smoosh image, build the web image: docker build -t smoosh-web -f Dockerfile.web .
  • To run the web image docker run -p 80:2080 --name smoosh-web -t smoosh-web and go to http://localhost/.
You can’t perform that action at this time.