Preface
FaCiLe is a constraint programming library over integer finite domain
written in OCaml 3.00[4]. It offers all usual facilities to create
and manipulate finite domain variables, arithmetic expressions and
constraints (possibly non-linear), built-in global constraints and
search goals. FaCiLe allows as well to build easily user-defined
constraints and goals (including recursive ones), making pervasive use
of OCaml higher-order functionals to provide a simple and flexible
interface to the user. 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 [4] to obtain introductory (as well as
advanced) material about the host language of FaCiLe.
OCaml forbids overloading, such that 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, but then the user knows exactly which
operation is executed by the system and cannot mix eratically values
of different types1. 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 (that most of the time
tries to hide the weaknesses of the host language) as iterators,
mapping and folding are ``native'' in OCaml. Though FaCiLe does not
provide endlessly more and more specific functions for each particular
case to exhibit the smallest possible code for toy examples, but
rather aims at providing simple building blocks and operators to
combine them efficiently.
This manual is structured in two main parts:
-
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.
- The reference manual which describes module by module all the
functionalities of FaCiLe.
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
.
Good reading.
- 1
- Ask yourself what should be the result of
the simplest operation 0.5 + 1 / 2 with your favorite
compiler...