MiniZinc version 1.0 released!
MiniZinc version is now official, i.e. version 1.0. Congratulations to the G12 team!
This version can be downloaded from here.
Comparing to the beta version 0.9 (released Christmas last year) the following has changed:
G12 MiniZinc Distribution version 1.0
-------------------------------------* Licence change
The source code in the G12 MiniZinc distribution has now been released
under a BSD-style licence. See the files README and COPYING in the
distribution for details.The MiniZinc examples, global constraint definitions and libraries
have been placed in the public domain.* XML-FlatZinc
We have defined an XML representation for FlatZinc called XML-FlatZinc.
Two new tools, fzn2xml and xml2fzn, can be used to convert between FlatZinc
and XML-FlatZinc.* FlatZinc Conformance Test Suite
We have added a suite of conformance tests for FlatZinc implementations.
It includes tests for built-in constraints, output and the behaviour of the
standard search annotations.Changes to the MiniZinc language:
* Reification has been fixed. It is now a top-down process that correctly
handles partial functions such as integer division. Users can now also
supply alternative definitions for reified forms of predicates (this is
useful if a backend does not provide reified forms of all predicates).* Users can supply alternative definitions for FlatZinc built-in constraints
(e.g., one can force the generated FlatZinc to use just int_lt rather than
int_lt and int_gt).* A new variable annotation has been added: is_output is used to indicate
variables to be printed as part of the solution if no output item is
supplied. This annotation is converted to output_var or output_array as
appropriate by mzn2fzn.Changes to the FlatZinc language:
* The outdomain_min and outdomain_max value choice methods are now supported
in the finite-domain solver backend.* A new search annotation, seq_search, allows a sequential ordering to
be imposed on search annotations.* The standard solve annotations now use nested annotations instead of
strings to describe variable selection strategies, value choice methods,
and exploration strategies.* FlatZinc model instances may now contain bodyless predicate declarations.
This is to allow tools to type check FlatZinc that contains non-standard
built-in predicates.* Two new annotations have been added that allow functional relationships
between variables to be defined: is_view_var on a variable declaration
states that this var is defined as a function of some other variables by
a constraint; defines_view_var(x) on a constraint states that the
constraint provides a definition for the view variable x.* The FlatZinc specification now specifies how multiple solutions should be
output.* Two new variable annotations have been added to indicate which variables
should be printed if a solution is found: output_var is used
for non-array variables; output_array([IndexSet1, IndexSet2, ...]) is used
for array variables.* Output items are no longer supported in FlatZinc. The built-in string
operations, show/1 and show_cond/3 have also been removed from the
language.Changes to the G12 MiniZinc-to-FlatZinc converter:
* The converter now outputs array_xxx_element constraints instead of
array_var_xxx_element constraints when the array argument is a
constant.* An error is now reported if a variable is defined in a let expression
in a negated or reified context.* The ZINC_STD_SEARCH_DIRS environment variable is no longer supported.
The new environment variable MZN_STDLIB_DIR or the command line option
``--stdlib-dir'' can be used to set the MiniZinc library directory.* String array lookups are now supported.
* Comparison of fixed string expressions is now supported.
* Bodyless predicates in MiniZinc are now emitted at the head of the
generated FlatZinc. For backwards compatibility this behaviour
can be disabled using the ``--no-output-pred-decls'' command line
option.
Changes to the G12 MiniZinc and FlatZinc interpreters:* There is a new solver backend for the FlatZinc interpreter based upon
the G12 lazy clause generation solver. This backend is selected with
the ``lazy'' or ``lazyfd'' argument to the interpreter's ``--backend''
option.* The implementation of the int_negate/2 builtin constraint has been
fixed.* The interpreters now take a flag (--solver-statistics or --solver-stats)
causing any statistical information gathered by the solver to be appended to
the output in the form of a Zinc comment.* The interpreters now take a flag (-a or --all-solutions) that causes
then to return all solutions.* The interpreters now take a flag (-n or --num-solutions) taking an
integer argument giving the maximum number of solutions to display.* The MiniZinc interpreter behaviour has changed for models with no
output item: now only the values of variables annotated with
is_output are printed.Other Changes:
* The following global constraints have been added to the MiniZinc library:
at_most1
nvalue
precedence
table
For developers of FlatZinc solvers there is a transition guide to the changes.
Some comments
One of the greatest news is that it is now possible to state the number of solutions:-a
for all solutions, or -n
or --num-solutions
for some fixed number of solutions. I have missed that feature for the distributed solvers since day one. Other solvers, e.g. Gecode/FlatZinc, ECLiPSe's, and, SICStus Prolog supported this feature already.
I'm also excited that string array lookups is supported. And there are other stuff which I will now test more in detail.