Up Next

Preface

FaCiLe is a constraint programming library over integer finite domains written in OCaml [7]. It offers all usual constraints system facilities to create and handle finite domain variables, arithmetic expressions and constraints (possibly non-linear), built-in global constraints and search goals. FaCiLe allows to easily build user-defined constraints and goals (including recursive ones) from scratch or by combining simple primitives, making pervasive use of OCaml higher-order functionals to provide a simple and flexible user interface. As FaCiLe is an OCaml library and not ``yet another language'', the user benefits from type inference and strong typing discipline, high level of abstraction, modules and objects system, as well as native code compilation efficiency, garbage collection and replay debugger. All these features of OCaml (among many others) allow to prototype and experiment quickly: modeling, data processing and interface are implemented with the same powerful and efficient language.

This manual is not a document about constraint programming techniques but only a tool description. Users should be familiar with other constraint systems to easily apprehend FaCiLe through the reading of this manual. Beginners can easily find comprehensive information on the Web (e.g. http://www.cs.unh.edu/ccc/archive/). This manual is neither a course about functional programming and users should refer to the official Caml Web site at http://caml.inria.fr/ and the OCaml manual [7] to obtain introductory (as well as advanced) material about the host language of FaCiLe. Hurried readers may also take a look at a short overview appearing in the ALP Newsletter [2]. Thorough ones may find deeper insights on FaCiLe implementation details unveiled in the second part of one of the author PhD thesis [1].

Since OCaml forbids overloading, FaCiLe unusual looking operators might be a little disconcerting at first sight. Moreover, there is no implicit casting, so explicit conversions between variables (or integer) and arithmetic expressions are compulsory. These features lead to less concise expressions than with poorly typed languages, however the user precisely knows which operation is executed by the system and cannot erratically mix values of different types. Furthermore, ML style higher-order functionals and powerful type system ease the design and processing of complex data structures without the need of syntactic sugar (iterators, mapping and folding are ``native'' in OCaml). So FaCiLe does not endlessly provide more and more ad hoc functions for each particular case to exhibit the smallest possible code for toy examples, but rather aims at featuring simple building blocks and operators to combine them efficiently.

This manual is structured in two main parts:
  1. The user's manual which starts with basic examples to give a taste of FaCiLe, then details the main concepts and eventually discusses more advanced subjects like the design of constraints and goals from scratch.
  2. The reference manual which describes module by module all the functionalities of FaCiLe. This part of the documentation is automatically generated from the source code interface files (.mli), which may be directly consulted.
Numerous examples are provided all along the user's manual and more complete ones are available within the standard distribution in the examples directory, as well as a generic Makefile do build FaCiLe / OCaml softwares.

Eventually, we would like to thank our early known beta-testers, Mattias Waldau and Pal-Kristian Engstad, whose suggestions helped us to improve FaCiLe.

Good reading.




Up Next