haskelzinc: CP in Haskell through MiniZinc

[ bsd3, interfaces, library ] [ Propose Tags ]

This package was created in the context of the GRACeFUL project.

The haskelzinc library defines an interface to the MiniZinc 2.1 constraint proramming language. It provides a Haskell abstract syntax tree for the MiniZinc language, with which one can represent MiniZinc models in Haskell, a pretty printer to print the representation of a MiniZinc model in MiniZinc, a parser that returns a representation of the solutions obtained by running the MiniZinc model and a set of functions useful for building a custom FlatZinc solutions parser.

An additional module gives the possibility to directly get the solutions of a MiniZinc finite domain model. Option for interactive interface is provided, as well as choice between two solvers: the G12/FD built-in solver of FlatZinc and choco3.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1, 0.2.0.3, 0.3.0.9, 0.3.1.0, 0.3.1.1
Change log changelog
Dependencies base (>=4.8 && <5), containers (>=0.5.6), filepath (>=1.4.1), parsec3 (>=1.0.0.8), pretty (>=1.1.3), process (>=1.4) [details]
License BSD-3-Clause
Author Klara Marntirosian
Maintainer klara.mar@cs.kuleuven.be
Category Interfaces
Source repo head: git clone https://github.com/GRACeFUL-project/haskelzinc.git
Uploaded by klara_mar at 2017-03-02T16:10:29Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 3949 total (20 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-03-02 [all 1 reports]

Readme for haskelzinc-0.3.0.9

[back to package description]

Description

This package was created in the context of the GRACeFUL project.

The haskelzinc library defines an interface to the MiniZinc constraint proramming language. It provides

  • a Haskell abstract syntax tree for the MiniZinc language, with which one can represent MiniZinc models in Haskell
  • a human-friendly DSL for building MiniZinc model representations
  • a pretty printer to print the representation of a MiniZinc model in MiniZinc
  • a parser that returns a representation of the solutions obtained by running the MiniZinc model
  • a set of functions useful for building a custom FlatZinc solutions parser.

An additional module gives the possibility to directly get the solutions of a MiniZinc finite domain model. Option for interactive interface is provided, as well as choice between two solvers: the G12/FD built-in solver of FlatZinc and choco3.

Requirements

  • GHC 7.10.3 or 8
  • MiniZinc 2.0 or 2.1

Optional

To use choco solver, also required:

Installation

This library is available on hackage. Use cabal install.

Configuration

  1. Create a file HZconf/conf.txt in the same directory level where you want to run your code.
  2. Fill in the corresponding paths by adding the equal sign (=) and the correct path. * MINIZINC_DIR: the directory where mzn2fzn and flatzinc executables are located * CHOCO_PARSER: the path of the choco parser java library * CHOCO_SOLVER: the path of the choco solver java library * ANTLR: the path of the antlr java library

Example:

MINIZINC_DIR = path/to/dir

Not yet supported

  • MiniZinc enumerated types
  • Set constraints with the choco solver