A DSL for generating GR(1) problems
Haskell Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
doc
examples
salty
scripts
src
.gitignore
.travis.yml
LICENSE
README.md
Setup.hs
cabal.project
salty.cabal
stack.yaml

README.md

The Salty DSL

Salty is a domain specific language for describing GR(1) synthesis problems.

Current State

Salty is currently under active development, and can be used to produce Java source from a GR(1) specification.

Language Goals

  • Make controller specifications easier to read by
    • Allowing macro definitions to give a name to complex behavior
    • Adding syntactic-sugar for things like if-then-else
    • Allowing state variables to range over values of an enumeration, rather than just integer values
  • Integrate with the slugs GR(1) synthesizer for the heavy lifting
  • Generate controller implementations in python, and potentially java

Building Salty

Dependencies

Stack

It's easiest to build salty using the stack tool. Stack will manage the installation of all haskell dependencies, as well as the GHC compiler itself. One downside to using stack is that it won't automatically pull changes from the language-slugs repository.

Slugs

You will need to build and install the slugs GR(1) synthesis tool. Once installed, you can tell salty where to find the slugs executable by passing the -s or --slugs flag. There is no installation target in the slugs Makefile, however the slugs executable has no runtime dependencies, and can just be copied into your $PATH.

Z3 (Optional)

If z3 is installed, salty will do some additional sanity checking of specifications before sending them to slugs. On linux, z3 is likely available in your package manager, and on OSX it's available through homebrew

Building

Once stack and slugs are installed, salty can be built:

$ stack build
$ stack exec -- salty -h

Optionally, you can install salty globally using the stack install command, which will place the salty binary in $HOME/.local/bin.

The examples can be built by running make in the examples/ directory, and will place all of the generated Java code in the examples/build directory.