-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCHANGES.txt
358 lines (314 loc) · 16.1 KB
/
CHANGES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
======================
# MiniZinc Changelog #
======================
All bug numbers refer to the issue tracker at
https://github.com/MiniZinc/libminizinc/issues
Version 2.0.10
==============
Bug fixes:
- Fix a bug in the optimiser that could lead to undefined variables in the
generated FlatZinc. Fixes #70.
Version 2.0.9
=============
Bug fixes:
- Need to take return type into account when copying functions to output
model. Fixes #55.
- Evaluate calls that result in arrays using eval_arraylit. Fixes #57.
- Move inverse function to its own library file, so that it remains available
when a solver provides an alternative for the inverse predicate.
- Optimisation phase now recursively checks constraints when elements in an
array become fixed.
- Fix CMakeLists file to work for paths that contain spaces.
- Distinguish between infix operators and regular functions in the generated
html documentation. Fixes #61.
- Made parser more robust against incorrect code.
- Fix increment/decrement operators for IntVals and make all operations throw
correct overflow exceptions.
- Fix automatic type coercion for variables declared in let expressions.
- Fix a crash when printing some error messages.
- Fix compute_div_bounds builtin to return correct result for a division by
zero.
- Fix optimisation of Boolean constraints to use pointer equality instead of
structural equality (same expression can occur multiple times in the
FlatZinc).
- Only optimise constraints that have not been removed yet.
- Fix declaration of functional version of bin_packing_load. Fixes #64.
- Set type of arrays returned from polymorphic functions. Fixes #65.
- Fix parsing of quoted unary operator calls.
- Only compute set functions when bounds are valid. Fixes #66.
- Compute proper bounds for if-then-else expressions.
- Report error when no reified version of a constraint is available. Fixes #67.
- Fix type checking of annotations on binary operators.
- Keep annotations when rewriting linear constraints and remove is_defined_var
annotations from fixed variables. Fixes #69.
Changes:
- Integer, Boolean and float literals are now cached to achieve better memory
performance for some models.
- Improve performance of parsing integer literals.
- Improve handling of clause constraints.
- Add source files of MiniZinc specification to the repository.
- Limit maximum array size to enable better error messages.
- Add implied_constraint predicate as a synonym for redundant_constraint.
Version 2.0.8
=============
Bug fixes:
- Fix incorrect negation of some reified comparisons.
- Make lb/ub functions work in more cases.
- Fix several bugs in the optimisation phase (could lead to incorrect
FlatZinc and crashes).
- Fix a problem with reverse mapper functions when the result of the reverse
mapper can be fixed to a constant.
Version 2.0.7
=============
Changes:
- Improved propagation of Boolean constants in the optimisation phase. This
should result in far fewer aliases and improves simplification of
conjunctions, disjunctions and clauses.
- Add special case handling for integer division by 1.
Bug fixes:
- Fix FlatZinc generator phase, need to turn all array literal arguments into
1-based single dimensional arrays.
- Fix compilation of if-then-else expressions with var conditions (which didn't
implement proper partiality/totality semantics). Fixes #42.
- Provide correct bounds for weak opt var arithmetic. Fixes #51.
- Need to be able to handle unflattened annotations. Fixes #53.
- Fix generation of output model (needs to ignore items that have been removed
previously).
- Add missing lb(var set of int) builtin. Fixes #47.
- Check that var set declarations have a finite element type. Fixes #46.
- Fix translation context for binary operators on arrays.
- Need to access IntVal::infinity as a function, otherwise depending on linker
etc it may become 0 in some cases. Fixes #40.
- Change pretty printer to use one less digit when printing float literals.
This fixes #41 (or at least provides a workaround), but some double
constants may still be rounded incorrectly when pretty printing and reading
them back in. The real fix will be to output hex float literals (coming
soon).
- Distinguish between generalised comprehensions (iterating over sets) and
iterating over arrays. Fixes compilation of comprehensions where iteration
over an array is combined with var where clauses. Fixes #45.
- Fix bug in creation of output model where sometimes chains of variable
definitions could lead to crashes.
- Avoi creating mutually recursive definitions in some corner cases, which
could cause the compiler to run into infinite loops.
- Don't copy vardecl items to output model that are already there. Fixes #44.
- Remove domain from array declarations in FlatZinc (avoids problems with
domains where holes need to be removed and when there are infinities in the
domains)
- Fix flattening of equality operator between non-opt and opt vars
- Check that model contains a single solve and output item during type
checking (previously, multiple output items were not detected and resulted
in incorrect .ozn files).
- Fix flattening of xor (arguments need to be in mixed context).
- Use is_fixed in cumulative definition.
- Fix bug where a par right hand side of a variable mentioned in the output
would cause a crash.
- Fix variable dependency tracking during rewriting in the optimisation phase.
Could previously lead to variables being removed that are still required.
Fixes #54.
Version 2.0.6
=============
Changes:
- Add parser support for hexadecimal floating point constants.
Bug fixes:
- Fix bounds computation for some calls (abs, int_times).
- Fix flattening of some array declarations (when right hand side is
an identifier).
- Add four missing GC locks (could lead to incorrect garbage collection).
- Compact output model only after optimisation phase (could lead to
incorrect items being removed from output model).
Version 2.0.5
=============
Changes:
- Improve the standard decomposition for the cumulative constraint.
- Better handling of binary operators during type checking and flattening,
can sometimes avoid stack overflows (e.g. for large conjunctions).
- Make ++ operator left associative (avoid stack overflows in the parser).
- Add ::domain annotations to linear constraints generated from
multi-dimensional element constraints.
- Greatly improved linearisation library.
Bug fixes:
- Fix recursive function calls that contain let expressions.
- Fix compilation of comprehensions inside parametric functions.
- Fix a memory leak in solns2out.
- Fix a problem in the evaluation of binary operators.
- Fix a bug in the flattening of array literals.
- Fix a bug that would crash the parser on certain syntax errors in let
expressions.
Version 2.0.4
=============
Changes:
- Models can now be read from standard input (using the "-" or
"--input-from-stdin" command line options). Thanks to Sebastian Kosch.
- Improved handling of bool2int during FlatZinc generation.
Bug fixes:
- Fix unification of aliased variables which could sometimes result in
variables being removed although had a constraining right hand side.
- Fix evaluation of set comprehensions.
- Fix command line flag --no-output-ozn
- Fix performance problem when evaluating array expressions inside lets.
- Fix flattening of bool_xor redefinitions.
- Fix partial evaluation of some array access expressions with var indexes.
- Fix definition of geost constraint.
- User-defined functions are now copied correctly into the output model
if they are referenced in the output item.
- Set comprehensions are fully evaluated.
Version 2.0.3
=============
(Internal release that did not contain some essential fixes)
Version 2.0.2
=============
Changes:
- The optimiser now removes simple domain constraints from the FlatZinc
- The compiler now checks for integer overflows in all built-in operations
- Report an error when the FlatZinc or ozn file cannot be opened for writing
- Add support for 3d array literals (e.g. [| |1,2|3,4|,|5,6|7,8| |] )
- Add show2d and show3d functions for formatting array output
- Add row/col functions for variable arrays (github issue #2)
- Introduce builtins for creating random distributions
- Add reverse library function
- Postpone flattening of some reified constraints
- Slightly improved compilation of partial function calls when it can be
inferred at compile time that their result is undefined
- Allow functions with empty argument lists to be declared as
function int: foo(); instead of just function int: foo;
- Improve error reporting, in particular for errors in comprehensions
- Enable expressions a..b where a and b are integer variables
- Add redundant_constraint and symmetry_breaking_constraint builtins, these
can be rewritten by solver libraries to allow e.g. local search solvers to
ignore redundant constraints.
- Improve flattening of predicates that simply return their arguments (makes
the redundant_constraint and symmetry_breaking_constraint predicates work
in more situations).
- Replace command line option --only-range-domains by optional boolean value
so that solver libraries can set the flag directly in their redefinitions
file.
- Stop flattening immediately when a model has been found to contain an
inconsistency.
- Improve flattening of array access expressions, in particular for nested
array accesses that can be combined into a single element constraint
- Add command line option -s or --statistics to print statistics about the
generated FlatZinc
- Improve bounds computation for if-then-else expressions
- Clause arguments are compiled in positive and negative contexts instead of
mixed. That means that predicates that introduce free variables can now
be used in the positive part of a clause.
Bug fixes:
- Fix simplification of linear expressions, negative coefficients could
sometimes result in incorrect bounds
- Fix bounds computation for unary minus operator
- Add missing par set comparison builtins
- Fix bounds computation for extended comprehension syntax
- Fix a bug in the garbage collector that could sometimes lead to premature
deletion of expressions
- Fix bounds computation for set difference
- Fix duplication of some arrays in the FlatZinc (github issue #3)
- Fix bounds inference for variables bound to empty sets (github bug #3)
- Fix bug in error reporting function, which would sometimes not report the
entire call stack
- Fix the generation of fresh variable names for generator expressions
- Fix subtype check to allow empty arrays as subtype of arrays of sets
- Fix crash when using assert/2
- Fix bug when function used in output referred to par variable
- Fix bug in type checker, the detection of cyclic definitions was not
correct and could lead to stack overflows
- Fix parser to accept expressions with two consecutive array accesses
(like x[3][4], which are valid MiniZinc if x is an array of sets)
- Fix error reporting when an evaluation error occurs within a comprehension
generator
- Report type error on some ambiguous function calls
- Report type error on var sets with element type other than int
- Report type error when trying to coerce a var set into an array
- Report error when calling function with a value that is outside the
declared parameter bounds
- Fix arg_sort builtin to implement the correct semantics
- Fix sort_by builtin to sort in non-decreasing order, and work with floats
- Fix bug in type checker, now automatic coercions in functions defined with
type variables (like the comparison operators) work correctly
- Check that index sets match for arrays assigned in let expressions
- Fix bug in bounds inference for integer expressions with annotations
- Fix propagation of defines_var annotation to be pushed through calls
- Fix parser to accept empty 2d and 3d array literals
- Fix flattening to remove defines_var annotations with par argument, e.g.
defines_var(2), which could be introduced by the optimisation pass
- Fix output model creation for variables that have been redefined, and
remove more unused variables from the FlatZinc.
- Fix bug in the garbage collector that could result in function items not
being kept alive in rare cases.
Version 2.0.1
=============
Major bugs and changes:
- Fix optimisation phase, which was previously incorrectly removing variables
- Add support for trigonometric functions (built-ins were missing in 2.0.0)
and pow (var versions were missing)
- Fix equality operator on par arrays
- All expressions in output model are now made par
- Improve bounds computation for float variables
- Fix translation of functions that need automatic coercion of their return
value
- Fix the array_lb and array_ub builtins, which would return incorrect bounds
in some cases
Minor bugs and changes:
- Add space between "array" and "[" in the pretty printer, to be compatible
with 1.6 output
- Output all par declarations before the var declarations in FlatZinc
- Fix parser, which could sometimes crash on invalid input
- Improve efficiency of bounds computation on some float expressions
- Add special case handling for division by 1
- Add missing float_times definition to the flatzinc builtins
- Use correct version of var_dom for float variables
- Output information about which files are included in verbose mode
- Only compute bounds for "then" expressions if the "if" is not fixed to false
Version 2.0.0
=============
MiniZinc 2.0 contains many new features and is based on a complete rewrite of
the MiniZinc-to-FlatZinc compiler. If you are currently using the previous
version 1.6, the new tools can be used as drop-in replacements. The generated
FlatZinc is compatible with version 1.6, so all FlatZinc solvers should work
without changes.
** MiniZinc language changes **
- MiniZinc now supports user-defined functions. Details have been published
in the paper "MiniZinc with Functions". Both functions and predicates can
be recursive.
- MiniZinc now supports option types. Details have been published in the
paper "Modelling with Option Types in MiniZinc".
- Let expressions have been generalised. They can now contain constraint
items in addition to variable declarations.
- Array index sets can be declared using arbitrary set expressions as long as
they evaluate to contiguous ranges.
- The if-then-else expression has been generalised to allow the condition to
be a var bool expression (instead of only par bool).
- Array and set comprehensions as well as generator calls can now iterate
over variables and use var bool where conditions.
- Any bool expression can now automatically coerce to an int expression,
likewise for int and float. This means that you don't have to write
bool2int or int2float in your models any more.
- Equality constraints can now be posted between array expressions.
- Arbitrary expressions can now be included ("interpolated") into strings,
using the syntax "some text \(e) some more text", where e is any
expression. It is the same as writing "some text "++show(e)++" some more
text".
** New built-in functions **
Array functions: array1d, arrayXd, row, col, has_index, has_element, sort_by,
sort, arg_sort, arg_min, arg_max
** New global constraints **
- arg_max, arg_min
- arg_sort
- k-dimensional diffn
- disjunctive
- geost
- knapsack
- network_flow
- regular with NFAs
- symmetric all different
- optional scheduling constraints: alternative, span, disjunctive, cumulative
- functional versions of many global constraints
** New tool chain **
- There are a few new builtins that solvers can reimplement, these are listed
in the redefinitions-2.0 file.
- Include items use a different method for finding included files. Paths are
now interpreted as relative to the file that has the include item. That
way, the mzn2fzn compiler can be called from a different working directory.
- A new tool, mzn2doc, can produce html output from the documentation
comments. The MiniZinc distribution contains the documentation for global
constraints and builtins generated directly from the library source code.