/GRACe

The CFP DSL for the GenericLibrary

Primary LanguageHaskellBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

GRACe - a domain specific language for GRACeFUL Concept Maps

A DSL for GRACeFUL components.

Installing

In order to use GRACe, the following software dependencies must be met:

To ensure that library dependencies are exactly met, we recommend that you use stack. stack handles the entire toolchain (including GHC), library dependencies, building and executing. Instructions for installing stack on macOS, Linux and Windows can be found here.

Installing MiniZinc: Linux

Patrik has provided an install script for Linux.

Installing MiniZinc: macOS

  1. Download and install the complete MiniZinc distribution from the MiniZinc page.

  2. The MiniZinc binaries will now be located under /Applications/MiniZincIDE.app/Contents/Resources. Add this directory to your path, like so:

    export PATH="$PATH:/Applications/MiniZincIDE.app/Contents/Resources"

Running a constraint program

Using sandboxes

Create a new sandbox and install the required dependencies.

cabal sandbox init
cabal install --dependencies-only

Build and execute using

cabal build
cabal run examples

Using stack

Stack will automatically take care of dependencies. Build and execute using

stack build
stack exec examples

Copy executables to ~/.local/bin (put them on PATH) with

stack install

The executables will then be available from the command line. For example

example

Testing using stack

Run entire test suite with

stack test

Load test modules in ghci by

stack ghci GRACe:test:test

Run test suite for a single module with

stack runghc test/TestModule.hs

This assumes there is a main function in TestModule.hs.

Generate project documentation

Run haddock to generate project documentation

stack haddock --haddock-arguments --hyperlink-source

To open the documentation directly append --open.

Find the path to the documentation by running

stack path --local-doc-root