Run Harmony wherever
This repository contains a Dockerfile to build a Docker image, which can be used to run Harmony programs in a container.
- Install Docker and Python.
- Clone or download this repository.
- Navigate to cloned/downloaded repository on your command line.
- Run
sh setup.sh(This might take some time). - All set to go!
Harmony programs are run via the harmony.py. Assuming we have a Harmony file named main.hny in the current directory as harmony.py, we can run the following command.
python3 harmony.py test.hnyRunning the above command will run the model checker on the Harmony program and output any additional files, such as charm.json and harmony.html.
Like in the actual Harmony compiler, you can also pass in options/flags to the command, e.g.:
python3 harmony.py -c V=21 test.hnyFor easier use, you can add an alias for python3 harmony.py, e.g.:
alias harmony=python3 /path/to/harmony.py