Plover is an embedded Haskell DSL for compiling linear algebra into robust, efficient C code suitable for running on embedded systems.
Plover generates code free of dynamic memory allocation and provides compile time checking of matrix and vector shapes using a lightweight dependant type system.
Plover also aims to make use of sparse structure present in many real world linear algebra problems to generate more efficient code.
Plover.Types
contains the AST for the DSL.Plover.Expressions
contains a number of example expressions.Plover.Reduce
contains the main compiler.Plover.Macros
contains DSL utilities.
First, install Stack or Haskell Platform. Key is having GHC 7.10+ available.
Check out the plover
source:
$ git clone https://github.com/swift-nav/plover.git
$ cd plover
Then use one of the two available build methods.
$ stack build
Run the test suite (requires gcc):
$ stack test
Installation of the plover
binary into ~/.local/bin
$ stack build --copy-bins
or
# (equivalent to previous command)
$ stack install
Using a cabal sandbox keeps any dependencies isolated so you don't have to worry about conflicts with other versions you may have on your system.
$ cabal sandbox init
Install the dependencies into the sandbox:
$ cabal install happy alex
$ cabal install --only-dependencies --enable-tests
Run the test suite (requires gcc):
$ cabal test --show-details=streaming