A set of benchmarks to compare a new prototype MiniZinc implementation
1======================
2# MiniZinc Changelog #
3======================
4
5All bug numbers refer to the issue tracker at
6https://github.com/MiniZinc/libminizinc/issues
7
8Version 2.3.2
9=============
10
11Changes:
12- Add warm starts and subtour cuts to CBC interface.
13- Add documentation and assertion requiring that mdds are deterministic,
14 and add nondeterministic variant of mdd constraint.
15- Add -s to the standard flags supported by MIP interfaces.
16- Add flag --output-output-item to include user specified output item in
17 the formatted JSON and DZN output.
18
19Bug fixes:
20- Fix a bug that could leave unused variables in the resulting FlatZinc.
21- bounded_dpath should rewrite to fzn_bounded_dpath. Fixes #300.
22- Fix definition of sum_set.
23- Check if overloaded function required for output. Fixes #303.
24- Move regular constraint with set argument to its own file.
25- Flatten assignment generators if necessary.
26- Simplify fzn_value_precede_chain_int and avoid use of element predicate.
27 Fixes #307.
28- Only initialise par opt variables as absent if they are not arrays.
29- Fix the description of the neural_net predicate.
30- Fix regular constraint with regular expressions (stopped working in 2.3.0).
31- Fix the model interface output to include the same variables as the generated
32 output statement.
33- Fix CSE for removed variable declarations. Could lead to reified constraints
34 not being compiled correctly when the control variable got fixed to true.
35
36Version 2.3.1
37=============
38
39Bug fixes:
40
41- Report error when trying to assign an array literal to an array variable with incompatible index set.
42- Fix partial evaluation of expressions, so that only par expressions are fully evaluated. Fixes #298.
43- Remove carriage returns when reading piped solver output on Windows.
44- Canonicalize paths of executables to avoid spurious warnings about multiple executables for the same solver.
45- Add implementations for != on arrays.
46- Compute quotient bounds before decomposition of int_div in linearisation library.
47- Propagate domain constraints on variables that are aliased (previously domain constraints could get lost).
48- Propagate domain constraints from left-hand-side to right-hand-side in variable assignments.
49- piecewise-linear: reuse decomposition for X when only Y-values change.
50- nosets: add set_in_imp(var set) and simplify set_in_reif, set_eq(var set, var set).
51- linearisation: improved compilation of set_in constraints.
52
53Version 2.3
54===========
55
56Major Changes:
57
58- The compiler can now generate FlatZinc with half reified constraints. See
59 https://www.minizinc.org/doc-2.3.0/en/fzn-spec.html#reified-and-half-reified-predicates
60 for more details.
61- The standard library of global constraints has been reorganised, making it
62 easier for solvers to override just the bits that they support. See
63 https://www.minizinc.org/doc-2.3.0/en/fzn-spec.html#solver-specific-libraries
64 for more details.
65- There is experimental support for solvers that can read AMPL NL files.
66
67Minor Changes:
68
69- The JSON input and output has been improved, with full support for enums and
70 optional types.
71- A new compiler option -g has been added, which turns variable domain changes
72 into constraints (useful for debugging models).
73- The SCIP interface has been updated, with support for indicator constraints,
74 bounds disjunctions and a native cumulative constraint.
75- Error reporting has been improved, with location information available for
76 errors in par float expressions as well as include items.
77- The timeout command line parameter now also applies to compilation itself
78 (#281).
79- Operations on par float values are now checked for overflows.
80- The arg_min/arg_max constraints have been improved, with new special versions
81 for Boolean variables, and a better standard decomposition.
82- if-then-else-endif expressions with variable conditions are now compiled to a
83 predicate call (rather than handled by the compiler), which enables solver
84 libraries to implement these as native constraints or special decompositions.
85- Dividing a variable by a constant is now translated as a multiplication (to
86 keep the constraints linear).
87- A new piecewise_linear predicate has been added to the library to make it
88 easier to specify piecewise linear constraints.
89- Print number of solutions as mzn-stat after solving (#244).
90- Make search annotations work for arbitrary array index sets.
91
92Bug fixes:
93
94- Translate let expressions that contain constraints or variables as var
95 type-inst. Fixes #263.
96- Fix JSON array parsing by counting elements instead of commas.
97- Fix parsing of the -p flag (#271).
98- Fix type checking for array declarations with single enum type inst
99 identifier. E.g. array[$$T] of $U previously matched any multi-dimensional
100 array, and now only matches one-dimensional arrays with any enum index set.
101- Fix computation of function return type when using type inst variables (#272).
102- Evaluate each variable declaration only once in a par let expression.
103- Check domain constraints on variable declarations in par let expressions.
104- Try .exe/.bat on windows when using (constructed) absolute paths.
105- Fix array slicing to support empty slices (#275).
106- Fix a bug in the parser that could cause crashes on certain syntax errors.
107- Fix the type of bool2int for arrays.
108- Initialise counter for introduced variable ids based on names in original
109 model. This avoids reusing variable names if the user model contains names
110 such as X_INTRODUCED_0_.
111- Fix compilation of nested clause/exist constraints, and improve handling of
112 negation. Tries to use primitive negation instead of creating negated
113 constraints. Should help with half-reification by creating more positive
114 contexts.
115- Reorder fields in basic data structures to reduce padding on 64 bit platforms
116 (improved memory footprint).
117- Perform type coercion after desugaring array slicing.
118- Translate arguments to bool2int, exists, forall in positive context even if
119 those functions are redefined.
120- Don't evaluate par array literals twice (inefficient, and can lead to
121 incorrect results when using random number generators).
122- Terminate child processes when minizinc process is terminated by signal.
123- Fix function return value array index check for empty arrays (#286).
124- Fix translation of constant false where clause in array comprehension.
125- Report error when json multi-dimensional array is not rectangular.
126- Check index sets of function arguments (#273).
127- Ignore partiality variables from CSE table when compiling _reif and _imp
128 predicates (#269).
129- Flatten comprehensions with variable generators or where conditions before
130 evaluating any par functions on them (#259).
131- Add missing redefinitions of basic operators and search annotations for
132 optional integers.
133- Resolve filenames given on the command line relative to working directory,
134 and warn if file in working directory has same name as included file from the
135 library. Fixes #276.
136- Update nosets library with a valid redefinition of set_less over booleans.
137- Fix translation of showJSON (#294).
138- Only apply set2array coercion for supported types, otherwise report error
139 (#295).
140- Improve special case reasoning for abs on strictly negative variables.
141- Add bounds for floating point min/max result in the standard library.
142
143
144Version 2.2.3
145=============
146
147Bug fixes:
148 - Fix some typos in the library documentation.
149 - Fix solution checking.
150 - Fix line numbers in parsed locations on 64 bit platforms. Fixes #255.
151 - Fix bounds computation for calls. Partially fixes #255.
152 - Fix translation of var where clauses with more than 3 par components.
153 Fixes #253.
154
155Version 2.2.2
156=============
157
158Changes:
159 - Some changes to the optimisation phase of the compiler, to take into account
160 more variables and constraints.
161 - Preliminary support for MIP cuts based on graph algorithms (only available
162 when compiled with boost C++ libraries; not part of the binary distribution).
163 - Set Release as default build type when nothing is specified (for CMake
164 platforms that do not support multiple build types, like Makefiles).
165 - Add builtins outputJSON() and outputJSONParameters() for creating an
166 array of strings that capture the output and parameters of the model as JSON.
167 - On Linux and macOS, add /usr/share/minizinc/solvers and
168 /usr/local/share/minizinc/solvers to list of paths where solver configuration files
169 can be placed.
170 - Add OSICBC_INCLUDEDIR and OSICBC_LIBDIR cmake flags. Fixes #247.
171 - Output search paths for solver configurations using --solvers command line option.
172 - Add support for Gurobi 8.1
173 - Support parsing from stdin and files at the same time. Fixes #242.
174
175Bug fixes:
176 - Fix crash when flattening top-level array comprehensions with var where
177 clauses. Fixes #250.
178 - Support input files with more than 1M lines. Fixes #245.
179 - Special case handling for array literals in top-level foralls: flatten in root context.
180 - Fix translation of if-then-else for branches with undefined right hand sides.
181 - Only propagate defines_var annotation to the variable that's actually being defined
182 (not others that arise from the same decomposition).
183 - Don't flatten arguments of predicates like symmetry_breaking_constraint.
184 - Remove output_var and output_array annotations from user models (these
185 could cause crashes).
186 - Fix precedences for weak operators (~+, ~-, ~=, ~*).
187 - Fix min and max for opt var arrays to work when the bounds of the arrays are unknown.
188 - Fix a bug in bounds computations for function calls.
189 - Add missing superset FlatZinc builtin.
190 - Fix includes in file values.hh for some platforms.
191 - Fix a garbage collection issue when printing solutions.
192 - Deal with the case that a variable that's required for output is assigned to a par variable.
193 - Throw type error when an array has only absent values. Fixes #239.
194 - Flatten all arrays in FlatZinc, also those coming from functional definitions. Fixes #240.
195 - Use list of strings as mzn_solver_path entry in the preferences json file. Fixes #241.
196 - Fix crash when output variable is defined using recursive function
197
198Version 2.2.1
199=============
200
201Changes:
202 - all_different, all_equal, {int,set,float,bool}_search now accept
203 multi-dimensional arrays.
204 - Add exponentiation operator (^).
205 - Improve layout of generated library documentation for some constraints.
206 - Relax typechecking to allow assignment of empty array ([]) to
207 multi-dimensional array variables. This is required to make empty
208 arrays work in JSON data files.
209 - Enumerated types can now be initialised using lists of strings.
210 This enables enumerated type support in JSON.
211
212Bug fixes:
213 - Cumulative constraint for linear solvers now accepts empty arrays.
214 - show2d/show3d functions now do not add quotes around array elements and
215 work for empty arrays.
216 - Add support for slicing of arrays with enumerated types. Fixes #229.
217 - Fix slicing of 1d arrays.
218 - Fix bounds computation for float variable declarations. Fixes #225.
219 - When FlatZinc solver is terminated due to a timeout, do not report this
220 as an error.
221 - Fix pretty-printing of multi-dimensional arrays where dimensions other than
222 the first one are empty. Fixes #236.
223 - Add support for where clauses on generator assignment expressions. Fixes #237.
224
225Version 2.2.0
226=============
227This is a major release of MiniZinc, introducing many new features and improvements.
228
229Major new features:
230 - New minizinc command line tool
231 Previous releases contained a minizinc command line tool that was not much more
232 than a simple script that could execute the compiler, solver and output processor.
233 The minizinc executable in version 2.2.0 is now the main frontend to compilation and
234 solving and integrates all of the functionality. It has access to all installed MiniZinc
235 solvers (both internal solvers and those interfaced through FlatZinc files), and can
236 automatically select the required options (e.g., to include the solver-specific MiniZinc
237 globals library).
238 You can get a list of available solvers using the --solvers command line option, and
239 select a solver using --solver. The minizinc executable can now also be used as a replacement
240 for mzn2fzn (using -c) and solns2out (using --ozn-file).
241 - Multi-pass compilation
242 The compiler can now perform multiple passes in order to improve the target FlatZinc code.
243 This can be controlled using the -O command line flags (-O0 to -O4). Multi-pass compilation
244 is particularly useful when the target solver requires sophisticated decomposition of
245 global constraints (such as for MIP solvers).
246 - Solution checking
247 You can now supply an additional model that will be used to check each solution produced by
248 your main model. This can be useful for teaching MiniZinc (to give students automatic feedback)
249 and if your main model is very complex but checking that a solution is correct is easy.
250 - MIP solvers: support for FICO Xpress, and loading IBM ILOG CPLEX as a plugin
251 We have added support for FICO Xpress (this requires compiling MiniZinc from sources).
252 CPLEX can now be loaded as a plugin, which means that the binary distribution of
253 MiniZinc has built-in CPLEX support (just bring your own CPLEX dll).
254 - Language extensions
255 The MiniZinc language has been extended with two new features.
256 * Array slicing introduces syntax to conveniently select rows, columns or entire slices
257 of arrays. For example, x[3,..] selects the third row of array x, while x[..,4] selects
258 the fourth column, and x[3..5,2..7] selects a slice of rows 3 to 5 and columns 2 to 7.
259 * Generator expressions can now contain multiple where clauses, e.g.
260 forall (i in S where foo(i), j in T where i<j) (bar(i,j))
261 This enables more efficient compilation compared to evaluating all where clauses in the
262 inner-most generator. In addition to iteration (i in S), generators can now contain
263 assignment expressions (j=foo(i)). This enables intermediate definitions that can then
264 be used in further generators.
265
266Changes and minor features:
267 - The value of the objective can now be added automatically to the
268 output using the --output-objective command line option. Using --output-mode dzn,
269 this allows automatic output of all the free variables of the model.
270 - Models that do not contain a solve item are now accepted and treated as "solve satisfy"
271 - Support for naming constraints and expressions (using ::"name" syntax)
272 - Error messages have been improved, they now contain more accurate location
273 information.
274 - The compiler can be instructed to accept multiple assignments to the same parameter
275 (as long as they are all identical), using the --allow-multiple-assignments
276 command line option.
277 - Annotations for supplying warm start values have been added to the
278 standard library (currently supported by the MIP solvers Gurobi and IBM ILOG CPLEX).
279 - The compiler now accepts multiple .mzn files as input.
280 - Memory consumption and garbage collection performance has been improved.
281 - The conditional expression has been extended to support
282 "if <cond> then <exp> endif" (where <exp> is bool)
283 - Decomposition of one variable type to another (e.g. set into array of bool)
284 has been improved.
285 - MIP solvers Gurobi and IBM ILOG CPLEX use node files when over 3GB working memory
286 - Gurobi and CPLEX support the MIPfocus parameter
287 - Gurobi supports MiniZinc search annotations by setting fixed branching priorities
288
289Bug fixes:
290 - Consult the bug tracker at https://github.com/MiniZinc/libminizinc/issues
291
292Version 2.1.7
293=============
294
295Changes:
296 - Improved linearisation for some element constraints.
297 - Improve performance of optimisation phase by using a queue instead of a
298 stack.
299 - Add --dll option for Gurobi backend to specify the Gurobi DLL to load.
300 - Add more defines_var annotations.
301
302Bug fixes:
303 - Fix generation of variable names in output model (sometimes could contain
304 duplicates).
305 - Fix enum type inference for array literals with empty sets as their first
306 arguments. Fixes #180.
307 - Fix incorrect simplification of float domain constraints. Fixes #159.
308 - Fix ceil builtin for float values.
309 - Add superset decomposition for solvers that do not support set variables.
310 - Fix three bugs in the garbage collector.
311 - Fix a bug in flattening that would create duplicate variables when a
312 variable declaration referred to another one in its type-inst.
313 - Fix a crash in flattening of partial functions. Fixes #187.
314 - Add missing deopt builtins for all par types.
315 - Fix output for arrays of sets of enums.
316 - Define more functions on par opt types. Fixes #188.
317 - Fix type checker to accept arrays of opt set values.
318 - Support printing of opt enum types. Fixes #189.
319 - Fix evaluation of comprehensions in recursive functions.
320 - Fix output of Gurobi backend when used in conjunction with solns2out.
321 - Fix pthread linking for mzn-cbc.
322 - Catch type error when set literal is declared that contains another set.
323
324Version 2.1.6
325=============
326
327Bug fixes:
328
329 - Fully evaluate parameters before binding formal arguments when evaluating
330 call expressions. Fixes #177.
331 - Fix incorrect simplification of Boolean constraints assigned to variables
332 that are assigned to false
333 - Fix bug in flattening of linear equations that contain the same variable on
334 both sides
335 - Fix un-trailing for let expressions, which could sometimes cause incorrect
336 code to be emitted when lets are evaluated in nested loops. Fixes #166.
337 - Fix bug in JSON output of one-dimensional array literals
338 - Fix unification of enum type-inst variables
339
340Version 2.1.5
341=============
342
343Changes:
344 - Some improvements to the linearisation library.
345 - Make parser read multiple .mzn files correctly.
346 - Enable better bounds computation for array access expressions on
347 fixed arrays.
348 - Perform better constant folding during optimisation phase. Fixes #155.
349 - Don't rewrite pow function into multiplication in the case of power of 2.
350 - Save some memory by making certain internal data structures more compact.
351 - Improve source code location of identifiers in generator calls (should give
352 more precise error messages).
353 - Produce an error message when a comprehension attempts to iterate over an
354 infinite set.
355 - Produce better error messages for operations on infinite values (previously
356 some errors did not contain a source code location).
357 - Speed up garbage collection by pre-allocating some memory.
358
359Bug fixes:
360 - Fix range check for float literals in arrays.
361 - Fix a bug where a constraint could be removed incorrectly. Fixes #150.
362 - Include variables for dzn and json output from all included models, not
363 just the main model. Fixes #153.
364 - Produce multi-dimensional arrays in json output. Fixes #156 and #157.
365 - Remove incorrect closing bracket from json output. Fixes #154.
366 - Fix bounds computation of par int and float arrays.
367 - Don't allow var access to arrays of strings or annotations (since that would
368 require an element constraint and var string / var ann types).
369 - Introduce int2float constraints where necessary for some linearisations.
370
371Version 2.1.4
372=============
373
374Changes:
375 - Add warning for MIP solvers that do not support -a option for satisfaction
376 problems.
377 - Print introduced variable names with additional underscore to make
378 debugging FlatZinc easier. Fixes #147.
379 - Add support for pow function in linearisation library.
380 - Add support for parallel solving with CBC.
381 - Flatten top-level conjunctions in the order defined in the model.
382
383Bug fixes:
384 - Fix a garbage collection bug that could cause dangling pointers when
385 expressions were copied.
386 - Fix type checker to allow empty arrays to be assigned to variables
387 declared as arrays of enums.
388 - Fix infeasibility check in MIP translation for some inequality constraints.
389 - Improved defines_var annotations for reified xor constraints. Fixes #146.
390 - Fix output of empty integer sets and deal with empty arrays in output models.
391 - Fix MIP translation when boolean variables were removed due to aliasing.
392 - Improve corner cases for linearisation of cumulative constraint.
393 - Properly report undefinedness in par bool expressions.
394 - Enable some additional constant folding during flattening. Fixes #149.
395
396Version 2.1.3
397=============
398
399Changes:
400 - Remove more internal annotations from the generated FlatZinc.
401 - Detect failure earlier if optimisation pass leads to fixing of variables
402 outside their domains.
403
404Bug fixes:
405 - Fix CBC backend to correctly print UNSAT message for models where the
406 compiler already detected unsatisfiability, and print solution separators
407 even where there is no other output.
408 - Add missing var_dom function for arrays of optional integer variables.
409 Fixes #133.
410 - Fix aliasing for optional integer variables. Fixes #132.
411 - Remove all annotations from output model.
412 - Fix computation of return type for functions that return arrays of enums.
413 - Don't output newline if user-defined solution separator or status message is empty
414 - Fix return type computation for functions where return type contains
415 enums.
416 - Check finiteness of float literals and bounds. Fixes #138.
417 - More checks for function return values. Fixes #136.
418 - Fix var int comprehensions (now triggers error message instead of crash
419 for var set of int comprehensions). Fixes #135.
420 - Fix output of variables with quoted identifiers.
421 - Fix flattening of let expressions that contain variables with undefined
422 (i.e., partial) right hand side.
423 - Make printing of error messages to stdout or stderr more consistent
424 across executables.
425 - Fix type checking of initialisation of enum types.
426 - Improve error messages for array access and index set errors. Fixes #131.
427 - Fix definition of multi-dimensional element constraints to impose
428 correct bounds on index variables.
429 - Fix binding analysis during type checking, which did not handle the
430 shadowing of top-level declarations by comprehension generators correctly.
431 Fixes #129.
432
433Version 2.1.2
434=============
435
436Bug fixes:
437 - Fix a bug in the type checking for generators that iterate over
438 arrays of enums.
439 - Fix a bug in the output handling of arrays of enums.
440 - Fix handling of multiple output items (only the last item was
441 compiled, now the concatenation is used for output as defined
442 in the specification).
443
444Version 2.1.1
445=============
446
447Changes:
448 - Add missing min/max functions for set variables. Can be redefined to solver
449 builtins using the new redefinitions-2.1.1.mzn library file.
450 - Add support for option type expressions as objective functions.
451 - Automatically coerce arrays constructed using ++ to any enum index set
452 (in addition to array literals and comprehensions).
453
454Bug fixes:
455 - Include cmath header to fix compilation issues with some compilers. Fixes #125.
456 - Fix a garbage collection bug in the type checking for enumerated types that would
457 sometimes lead to crashes or incorrect error messages.
458 - Fix type checking of comprehensions that involve enumerated types.
459 - Fix bounds computation for var sets of enumerated types.
460 - Support anon_enum function as documented.
461
462Version 2.1.0
463=============
464
465Changes:
466 - MiniZinc now supports enumerated types.
467 - Solvers can be interfaced directly to the MiniZinc library, and MiniZinc
468 comes with direct support for the CBC, Gurobi and CPLEX MIP solvers.
469 - The linearisation library has been updated, resulting in much better FlatZinc
470 being generated for MIP solvers.
471 - Data files can be in JSON format, and MiniZinc can produce JSON output
472 (using the --output-mode command line option).
473 - Variables can be annotated as ::add_to_output instead of writing an output
474 item.
475 - The compiler can output information about the parameters and output variables
476 of a model (using the --model-interface-only option).
477 - Floats are handled better (detecting infinities and handling sets of floats).
478 - Bounds can be computed for more expressions (instead of failing with an error
479 message).
480
481Bug fixes:
482 - Fix a bug in optimization that could remove variables even if they are used.
483 Fixes #123.
484 - Fix float variable declarations with sets of floats as domains.
485 Fixes #117 and #98.
486 - Fix type checking and evaluation of asserts with array arguments. Fixes #109.
487 - Fix abs(var float) declaration to work on floats without declared bounds.
488 Fixes #106.
489 - Fix a bug in the computation of int and float bounds that could result in
490 incorrect bounds in some cases. Fixes #94.
491 - Fix garbage collection when creating output models. Fixes #77.
492 - Fix binary operators on optional variables (in some cases comparison
493 operators were reversed).
494 - Fix optimization of unconstrained variables (could sometimes lead to
495 constraints being removed although they were not subsumed).
496
497
498Version 2.0.14
499==============
500
501Changes:
502
503 - Less aggressive aggregation of linear expressions in cases where it
504 leads to much less efficient FlatZinc.
505 - Don't create temporary variable for an array literal if it is discarded
506 immediately anyway.
507 - Only create new partiality variable for if-then-else expression if there's
508 at least one var condition.
509 - Replace recursive definitions of array_intersect and array_union with
510 iterative ones.
511
512Bug fixes:
513 - Don't report warnings about partiality when using extended generator
514 expressions.
515 - Include cmath to enable building with some versions of gcc.
516 - Constrain result of function call based on function return type if necessary.
517 - Make sure linear expressions generated during binding of variables are
518 properly flattened (including simplification of the linear expression)
519
520
521Version 2.0.13
522==============
523
524Bug fixes:
525
526 - Fix a bug in the Common Subexpression Elimination table of the compiler,
527 which could lead to some constraints being dropped (especially when using
528 linear redefinitions).
529 - The output model sometimes did not include all required definitions,
530 in particular when array declarations used identifiers to specify the
531 dimensions.
532 - The generated FlatZinc sometimes still contained bool variables that were
533 not connected to the rest of the model, which could produce incorrect
534 solutions being printed.
535 - Fix a bug where warnings (e.g. about partial functions) could lead to
536 crashes.
537 - Fix the bounds computation for integer and float variables, which could
538 produce incorrect bounds for linear expressions. Fixes #94.
539
540Version 2.0.12
541==============
542
543Changes:
544
545 - Partial functions are now always evaluated in their Boolean context,
546 independent of whether they are par or var. If the result of a partial
547 function is statically known to be undefined (such as division by zero or
548 array access out of bounds), and it is used in a constraint expression,
549 this now results in a warning instead of an
550 error. Warnings can be turned off using the ::maybe_partial annotation.
551 Fixes #43 and #74.
552
553Bug fixes:
554
555 - Fix a bug in the optimisation phase related to unification of aliased
556 variables.
557 - Fix short-circuit evaluation of Boolean expressions.
558 - Fix a bug in the optimisation phase related to repeated simplification of
559 some Boolean expressions.
560 - Handle errors in output produced by solver without solns2out crashing.
561 Fixes #80.
562 - Fix a bug in the integer bounds computation that caused bool2int with an
563 embedded conditional to crash.
564 - Fix a problem with short-circuit compilation of == expressions when one
565 side was a var opt bool.
566 - Stop compilation when model is failed. Fixes a bug where mzn2fzn would
567 sometimes not clean up the FlatZinc enough for the solver.
568
569Version 2.0.11
570==============
571
572Bug fixes:
573
574 - Fix parsing of hex and octal literals. Fixes #71.
575 - Fix compilation of extended comprehensions. Fixes #72.
576 - Fix computation of float array access bounds.
577 - Fix aggregation of clauses (could sometimes ignore the negative literals).
578
579Version 2.0.10
580==============
581
582Bug fixes:
583
584 - Fix a bug in the optimiser that could lead to undefined variables in the
585 generated FlatZinc. Fixes #70.
586
587Version 2.0.9
588=============
589
590Bug fixes:
591
592 - Need to take return type into account when copying functions to output
593 model. Fixes #55.
594 - Evaluate calls that result in arrays using eval_arraylit. Fixes #57.
595 - Move inverse function to its own library file, so that it remains available
596 when a solver provides an alternative for the inverse predicate.
597 - Optimisation phase now recursively checks constraints when elements in an
598 array become fixed.
599 - Fix CMakeLists file to work for paths that contain spaces.
600 - Distinguish between infix operators and regular functions in the generated
601 html documentation. Fixes #61.
602 - Made parser more robust against incorrect code.
603 - Fix increment/decrement operators for IntVals and make all operations throw
604 correct overflow exceptions.
605 - Fix automatic type coercion for variables declared in let expressions.
606 - Fix a crash when printing some error messages.
607 - Fix compute_div_bounds builtin to return correct result for a division by
608 zero.
609 - Fix optimisation of Boolean constraints to use pointer equality instead of
610 structural equality (same expression can occur multiple times in the
611 FlatZinc).
612 - Only optimise constraints that have not been removed yet.
613 - Fix declaration of functional version of bin_packing_load. Fixes #64.
614 - Set type of arrays returned from polymorphic functions. Fixes #65.
615 - Fix parsing of quoted unary operator calls.
616 - Only compute set functions when bounds are valid. Fixes #66.
617 - Compute proper bounds for if-then-else expressions.
618 - Report error when no reified version of a constraint is available. Fixes #67.
619 - Fix type checking of annotations on binary operators.
620 - Keep annotations when rewriting linear constraints and remove is_defined_var
621 annotations from fixed variables. Fixes #69.
622
623Changes:
624
625 - Integer, Boolean and float literals are now cached to achieve better memory
626 performance for some models.
627 - Improve performance of parsing integer literals.
628 - Improve handling of clause constraints.
629 - Add source files of MiniZinc specification to the repository.
630 - Limit maximum array size to enable better error messages.
631 - Add implied_constraint predicate as a synonym for redundant_constraint.
632
633Version 2.0.8
634=============
635
636Bug fixes:
637
638 - Fix incorrect negation of some reified comparisons.
639 - Make lb/ub functions work in more cases.
640 - Fix several bugs in the optimisation phase (could lead to incorrect
641 FlatZinc and crashes).
642 - Fix a problem with reverse mapper functions when the result of the reverse
643 mapper can be fixed to a constant.
644
645Version 2.0.7
646=============
647
648Changes:
649 - Improved propagation of Boolean constants in the optimisation phase. This
650 should result in far fewer aliases and improves simplification of
651 conjunctions, disjunctions and clauses.
652 - Add special case handling for integer division by 1.
653
654Bug fixes:
655
656 - Fix FlatZinc generator phase, need to turn all array literal arguments into
657 1-based single dimensional arrays.
658 - Fix compilation of if-then-else expressions with var conditions (which didn't
659 implement proper partiality/totality semantics). Fixes #42.
660 - Provide correct bounds for weak opt var arithmetic. Fixes #51.
661 - Need to be able to handle unflattened annotations. Fixes #53.
662 - Fix generation of output model (needs to ignore items that have been removed
663 previously).
664 - Add missing lb(var set of int) builtin. Fixes #47.
665 - Check that var set declarations have a finite element type. Fixes #46.
666 - Fix translation context for binary operators on arrays.
667 - Need to access IntVal::infinity as a function, otherwise depending on linker
668 etc it may become 0 in some cases. Fixes #40.
669 - Change pretty printer to use one less digit when printing float literals.
670 This fixes #41 (or at least provides a workaround), but some double
671 constants may still be rounded incorrectly when pretty printing and reading
672 them back in. The real fix will be to output hex float literals (coming
673 soon).
674 - Distinguish between generalised comprehensions (iterating over sets) and
675 iterating over arrays. Fixes compilation of comprehensions where iteration
676 over an array is combined with var where clauses. Fixes #45.
677 - Fix bug in creation of output model where sometimes chains of variable
678 definitions could lead to crashes.
679 - Avoi creating mutually recursive definitions in some corner cases, which
680 could cause the compiler to run into infinite loops.
681 - Don't copy vardecl items to output model that are already there. Fixes #44.
682 - Remove domain from array declarations in FlatZinc (avoids problems with
683 domains where holes need to be removed and when there are infinities in the
684 domains)
685 - Fix flattening of equality operator between non-opt and opt vars
686 - Check that model contains a single solve and output item during type
687 checking (previously, multiple output items were not detected and resulted
688 in incorrect .ozn files).
689 - Fix flattening of xor (arguments need to be in mixed context).
690 - Use is_fixed in cumulative definition.
691 - Fix bug where a par right hand side of a variable mentioned in the output
692 would cause a crash.
693 - Fix variable dependency tracking during rewriting in the optimisation phase.
694 Could previously lead to variables being removed that are still required.
695 Fixes #54.
696
697Version 2.0.6
698=============
699
700Changes:
701 - Add parser support for hexadecimal floating point constants.
702
703Bug fixes:
704 - Fix bounds computation for some calls (abs, int_times).
705 - Fix flattening of some array declarations (when right hand side is
706 an identifier).
707 - Add four missing GC locks (could lead to incorrect garbage collection).
708 - Compact output model only after optimisation phase (could lead to
709 incorrect items being removed from output model).
710
711Version 2.0.5
712=============
713
714Changes:
715 - Improve the standard decomposition for the cumulative constraint.
716 - Better handling of binary operators during type checking and flattening,
717 can sometimes avoid stack overflows (e.g. for large conjunctions).
718 - Make ++ operator left associative (avoid stack overflows in the parser).
719 - Add ::domain annotations to linear constraints generated from
720 multi-dimensional element constraints.
721 - Greatly improved linearisation library.
722
723Bug fixes:
724 - Fix recursive function calls that contain let expressions.
725 - Fix compilation of comprehensions inside parametric functions.
726 - Fix a memory leak in solns2out.
727 - Fix a problem in the evaluation of binary operators.
728 - Fix a bug in the flattening of array literals.
729 - Fix a bug that would crash the parser on certain syntax errors in let
730 expressions.
731
732Version 2.0.4
733=============
734
735Changes:
736 - Models can now be read from standard input (using the "-" or
737 "--input-from-stdin" command line options). Thanks to Sebastian Kosch.
738 - Improved handling of bool2int during FlatZinc generation.
739
740Bug fixes:
741 - Fix unification of aliased variables which could sometimes result in
742 variables being removed although had a constraining right hand side.
743 - Fix evaluation of set comprehensions.
744 - Fix command line flag --no-output-ozn
745 - Fix performance problem when evaluating array expressions inside lets.
746 - Fix flattening of bool_xor redefinitions.
747 - Fix partial evaluation of some array access expressions with var indexes.
748 - Fix definition of geost constraint.
749 - User-defined functions are now copied correctly into the output model
750 if they are referenced in the output item.
751 - Set comprehensions are fully evaluated.
752
753Version 2.0.3
754=============
755
756 (Internal release that did not contain some essential fixes)
757
758Version 2.0.2
759=============
760
761Changes:
762 - The optimiser now removes simple domain constraints from the FlatZinc
763 - The compiler now checks for integer overflows in all built-in operations
764 - Report an error when the FlatZinc or ozn file cannot be opened for writing
765 - Add support for 3d array literals (e.g. [| |1,2|3,4|,|5,6|7,8| |] )
766 - Add show2d and show3d functions for formatting array output
767 - Add row/col functions for variable arrays (github issue #2)
768 - Introduce builtins for creating random distributions
769 - Add reverse library function
770 - Postpone flattening of some reified constraints
771 - Slightly improved compilation of partial function calls when it can be
772 inferred at compile time that their result is undefined
773 - Allow functions with empty argument lists to be declared as
774 function int: foo(); instead of just function int: foo;
775 - Improve error reporting, in particular for errors in comprehensions
776 - Enable expressions a..b where a and b are integer variables
777 - Add redundant_constraint and symmetry_breaking_constraint builtins, these
778 can be rewritten by solver libraries to allow e.g. local search solvers to
779 ignore redundant constraints.
780 - Improve flattening of predicates that simply return their arguments (makes
781 the redundant_constraint and symmetry_breaking_constraint predicates work
782 in more situations).
783 - Replace command line option --only-range-domains by optional boolean value
784 so that solver libraries can set the flag directly in their redefinitions
785 file.
786 - Stop flattening immediately when a model has been found to contain an
787 inconsistency.
788 - Improve flattening of array access expressions, in particular for nested
789 array accesses that can be combined into a single element constraint
790 - Add command line option -s or --statistics to print statistics about the
791 generated FlatZinc
792 - Improve bounds computation for if-then-else expressions
793 - Clause arguments are compiled in positive and negative contexts instead of
794 mixed. That means that predicates that introduce free variables can now
795 be used in the positive part of a clause.
796
797Bug fixes:
798 - Fix simplification of linear expressions, negative coefficients could
799 sometimes result in incorrect bounds
800 - Fix bounds computation for unary minus operator
801 - Add missing par set comparison builtins
802 - Fix bounds computation for extended comprehension syntax
803 - Fix a bug in the garbage collector that could sometimes lead to premature
804 deletion of expressions
805 - Fix bounds computation for set difference
806 - Fix duplication of some arrays in the FlatZinc (github issue #3)
807 - Fix bounds inference for variables bound to empty sets (github bug #3)
808 - Fix bug in error reporting function, which would sometimes not report the
809 entire call stack
810 - Fix the generation of fresh variable names for generator expressions
811 - Fix subtype check to allow empty arrays as subtype of arrays of sets
812 - Fix crash when using assert/2
813 - Fix bug when function used in output referred to par variable
814 - Fix bug in type checker, the detection of cyclic definitions was not
815 correct and could lead to stack overflows
816 - Fix parser to accept expressions with two consecutive array accesses
817 (like x[3][4], which are valid MiniZinc if x is an array of sets)
818 - Fix error reporting when an evaluation error occurs within a comprehension
819 generator
820 - Report type error on some ambiguous function calls
821 - Report type error on var sets with element type other than int
822 - Report type error when trying to coerce a var set into an array
823 - Report error when calling function with a value that is outside the
824 declared parameter bounds
825 - Fix arg_sort builtin to implement the correct semantics
826 - Fix sort_by builtin to sort in non-decreasing order, and work with floats
827 - Fix bug in type checker, now automatic coercions in functions defined with
828 type variables (like the comparison operators) work correctly
829 - Check that index sets match for arrays assigned in let expressions
830 - Fix bug in bounds inference for integer expressions with annotations
831 - Fix propagation of defines_var annotation to be pushed through calls
832 - Fix parser to accept empty 2d and 3d array literals
833 - Fix flattening to remove defines_var annotations with par argument, e.g.
834 defines_var(2), which could be introduced by the optimisation pass
835 - Fix output model creation for variables that have been redefined, and
836 remove more unused variables from the FlatZinc.
837 - Fix bug in the garbage collector that could result in function items not
838 being kept alive in rare cases.
839
840
841Version 2.0.1
842=============
843
844Major bugs and changes:
845 - Fix optimisation phase, which was previously incorrectly removing variables
846 - Add support for trigonometric functions (built-ins were missing in 2.0.0)
847 and pow (var versions were missing)
848 - Fix equality operator on par arrays
849 - All expressions in output model are now made par
850 - Improve bounds computation for float variables
851 - Fix translation of functions that need automatic coercion of their return
852 value
853 - Fix the array_lb and array_ub builtins, which would return incorrect bounds
854 in some cases
855
856Minor bugs and changes:
857 - Add space between "array" and "[" in the pretty printer, to be compatible
858 with 1.6 output
859 - Output all par declarations before the var declarations in FlatZinc
860 - Fix parser, which could sometimes crash on invalid input
861 - Improve efficiency of bounds computation on some float expressions
862 - Add special case handling for division by 1
863 - Add missing float_times definition to the flatzinc builtins
864 - Use correct version of var_dom for float variables
865 - Output information about which files are included in verbose mode
866 - Only compute bounds for "then" expressions if the "if" is not fixed to false
867
868Version 2.0.0
869=============
870
871MiniZinc 2.0 contains many new features and is based on a complete rewrite of
872the MiniZinc-to-FlatZinc compiler. If you are currently using the previous
873version 1.6, the new tools can be used as drop-in replacements. The generated
874FlatZinc is compatible with version 1.6, so all FlatZinc solvers should work
875without changes.
876
877** MiniZinc language changes **
878
879 - MiniZinc now supports user-defined functions. Details have been published
880 in the paper "MiniZinc with Functions". Both functions and predicates can
881 be recursive.
882 - MiniZinc now supports option types. Details have been published in the
883 paper "Modelling with Option Types in MiniZinc".
884 - Let expressions have been generalised. They can now contain constraint
885 items in addition to variable declarations.
886 - Array index sets can be declared using arbitrary set expressions as long as
887 they evaluate to contiguous ranges.
888 - The if-then-else expression has been generalised to allow the condition to
889 be a var bool expression (instead of only par bool).
890 - Array and set comprehensions as well as generator calls can now iterate
891 over variables and use var bool where conditions.
892 - Any bool expression can now automatically coerce to an int expression,
893 likewise for int and float. This means that you don't have to write
894 bool2int or int2float in your models any more.
895 - Equality constraints can now be posted between array expressions.
896 - Arbitrary expressions can now be included ("interpolated") into strings,
897 using the syntax "some text \(e) some more text", where e is any
898 expression. It is the same as writing "some text "++show(e)++" some more
899 text".
900
901** New built-in functions **
902
903Array functions: array1d, arrayXd, row, col, has_index, has_element, sort_by,
904sort, arg_sort, arg_min, arg_max
905
906** New global constraints **
907
908 - arg_max, arg_min
909 - arg_sort
910 - k-dimensional diffn
911 - disjunctive
912 - geost
913 - knapsack
914 - network_flow
915 - regular with NFAs
916 - symmetric all different
917 - optional scheduling constraints: alternative, span, disjunctive, cumulative
918 - functional versions of many global constraints
919
920** New tool chain **
921
922 - There are a few new builtins that solvers can reimplement, these are listed
923 in the redefinitions-2.0 file.
924 - Include items use a different method for finding included files. Paths are
925 now interpreted as relative to the file that has the include item. That
926 way, the mzn2fzn compiler can be called from a different working directory.
927 - A new tool, mzn2doc, can produce html output from the documentation
928 comments. The MiniZinc distribution contains the documentation for global
929 constraints and builtins generated directly from the library source code.