forked from pool/libminizinc
- update to 2.8.5:
* Fix specification for constraint items and annotations in FlatZinc JSON. * Fix flattening of negated let expressions with constraints. * Fix crash when equating identifiers to tuples/records in if- then-else expressions. * Fix string_length function to return the number of Unicode code points rather than the number of bytes (i.e., to interpret the string as UTF-8). * Emit type error for opt tuples and records created through type aliases. * Fix evaluation of par partial functions returning arrays. * Fix type inference for if-then-else expressions with different tuple or record types in the branches. * Fix evaluation error caused by removal of fixed FlatZinc variables without fixing them in the output model. * Fix computed type when flattening cv comprehensions containing tuple or record types. * Fix unsatisfiability caused by reification in negated boolean context (:bugref:`813`). * Fix bug in computation of common type of incompatible record types. * Fix crash when type checking nested arrays of tuples or records. * Fix incorrect unification of flattened tuple/record fields with paths enabled. * Add string_split function that splits a string into an array of strings based on a separator. * Add json_section annotation to mark an output item as a JSON section (:bugref:`816`). OBS-URL: https://build.opensuse.org/package/show/science/libminizinc?expand=0&rev=11
This commit is contained in:
commit
3d1d9f345a
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.osc
|
41
0001-Disambiguate-UNKNOWN-EXCEPTION.patch
Normal file
41
0001-Disambiguate-UNKNOWN-EXCEPTION.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From 9fce2c1f83b89ce8cbef585ccfc3c19c55cc16f6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||||
|
Date: Tue, 19 Jul 2022 03:30:09 +0200
|
||||||
|
Subject: [PATCH 1/3] Disambiguate UNKNOWN EXCEPTION
|
||||||
|
|
||||||
|
minizinc.cpp and solns2out.cpp have the exact same error message in case of
|
||||||
|
an unhandled/unknown exception, add a suffix to notify where it is catched.
|
||||||
|
---
|
||||||
|
lib/solns2out.cpp | 2 +-
|
||||||
|
minizinc.cpp | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/solns2out.cpp b/lib/solns2out.cpp
|
||||||
|
index 1e0ec4c6..6f9fdfe5 100644
|
||||||
|
--- a/lib/solns2out.cpp
|
||||||
|
+++ b/lib/solns2out.cpp
|
||||||
|
@@ -403,7 +403,7 @@ void Solns2Out::checkSolution(std::ostream& oss) {
|
||||||
|
} catch (const exception& e) {
|
||||||
|
oss << e.what() << std::endl;
|
||||||
|
} catch (...) {
|
||||||
|
- oss << " UNKNOWN EXCEPTION." << std::endl;
|
||||||
|
+ oss << " UNKNOWN EXCEPTION in checker." << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
diff --git a/minizinc.cpp b/minizinc.cpp
|
||||||
|
index 0cb11667..a62478e9 100644
|
||||||
|
--- a/minizinc.cpp
|
||||||
|
+++ b/minizinc.cpp
|
||||||
|
@@ -72,7 +72,7 @@ int run(const std::string& exe, const std::vector<std::string>& args, bool jsonS
|
||||||
|
if (slv.getFlagVerbose()) {
|
||||||
|
std::cerr << std::endl;
|
||||||
|
}
|
||||||
|
- std::cerr << " UNKNOWN EXCEPTION." << std::endl;
|
||||||
|
+ std::cerr << " UNKNOWN EXCEPTION in solver." << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (slv.getFlagVerbose()) {
|
||||||
|
--
|
||||||
|
2.37.0
|
||||||
|
|
33
0002-Catch-std-exception-by-const-reference.patch
Normal file
33
0002-Catch-std-exception-by-const-reference.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From c1e1cc1f76cac901752a870ac44a2ebc45729d96 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||||
|
Date: Tue, 19 Jul 2022 19:31:23 +0200
|
||||||
|
Subject: [PATCH 2/3] Catch std::exception by const-reference
|
||||||
|
|
||||||
|
Although the details are ignored and do not matter, catching
|
||||||
|
std::exception by value is in general bad due to potential slicing,
|
||||||
|
and the potentially required copy.
|
||||||
|
---
|
||||||
|
include/minizinc/flatten.hh | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/include/minizinc/flatten.hh b/include/minizinc/flatten.hh
|
||||||
|
index 2b631e82..b51c9625 100644
|
||||||
|
--- a/include/minizinc/flatten.hh
|
||||||
|
+++ b/include/minizinc/flatten.hh
|
||||||
|
@@ -87,11 +87,11 @@ struct FlatteningOptions {
|
||||||
|
try {
|
||||||
|
std::random_device rdev("/dev/urandom");
|
||||||
|
seeds.push_back(rdev());
|
||||||
|
- } catch (std::exception) {
|
||||||
|
+ } catch (const std::exception&) {
|
||||||
|
try {
|
||||||
|
std::random_device rdev;
|
||||||
|
seeds.push_back(rdev());
|
||||||
|
- } catch (std::exception) { /* NOLINT(bugprone-empty-catch) */
|
||||||
|
+ } catch (const std::exception&) { /* NOLINT(bugprone-empty-catch) */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
auto highrestime = static_cast<long unsigned int>(
|
||||||
|
--
|
||||||
|
2.37.0
|
||||||
|
|
126
0003-Try-to-get-some-more-information-when-catching.patch
Normal file
126
0003-Try-to-get-some-more-information-when-catching.patch
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
From e0a77580c7f4a9ffcbd03cfd11b9bfa3628c9fee Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
||||||
|
Date: Tue, 19 Jul 2022 19:35:10 +0200
|
||||||
|
Subject: [PATCH 3/3] Try to get some more information when catching
|
||||||
|
|
||||||
|
get_file_contents may throw int error codes, notably when inflating,
|
||||||
|
provide the filename.
|
||||||
|
|
||||||
|
Also show the error code/value for int type exceptions elsewhere.
|
||||||
|
---
|
||||||
|
lib/flattener.cpp | 9 +++++++--
|
||||||
|
lib/parser.cpp | 16 ++++++++++++++--
|
||||||
|
lib/solns2out.cpp | 24 ++++++++++++++++--------
|
||||||
|
minizinc.cpp | 5 +++++
|
||||||
|
4 files changed, 42 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/flattener.cpp b/lib/flattener.cpp
|
||||||
|
index 5bb1d69b..0fe64df2 100644
|
||||||
|
--- a/lib/flattener.cpp
|
||||||
|
+++ b/lib/flattener.cpp
|
||||||
|
@@ -624,8 +624,13 @@ void Flattener::flatten(const std::string& modelString, const std::string& model
|
||||||
|
}
|
||||||
|
}
|
||||||
|
smm->compact();
|
||||||
|
- std::string smm_compressed =
|
||||||
|
- FileUtils::encode_base64(FileUtils::deflate_string(smm_oss.str()));
|
||||||
|
+ std::string smm_compressed;
|
||||||
|
+ try {
|
||||||
|
+ smm_compressed =
|
||||||
|
+ FileUtils::encode_base64(FileUtils::deflate_string(smm_oss.str()));
|
||||||
|
+ } catch (int i) {
|
||||||
|
+ throw Error("Failed to compress, error code: " + std::to_string(i));
|
||||||
|
+ }
|
||||||
|
auto* ti = new TypeInst(Location().introduce(), Type::parstring(), nullptr);
|
||||||
|
auto* sl = new StringLit(Location().introduce(), smm_compressed);
|
||||||
|
auto* checkString =
|
||||||
|
diff --git a/lib/parser.cpp b/lib/parser.cpp
|
||||||
|
index ef4db443..aad276e1 100644
|
||||||
|
--- a/lib/parser.cpp
|
||||||
|
+++ b/lib/parser.cpp
|
||||||
|
@@ -261,7 +261,13 @@ void parse(Env& env, Model*& model, const vector<string>& filenames,
|
||||||
|
if (verbose) {
|
||||||
|
std::cerr << "processing file '" << fullname << "'" << endl;
|
||||||
|
}
|
||||||
|
- s = get_file_contents(file);
|
||||||
|
+ try {
|
||||||
|
+ s = get_file_contents(file);
|
||||||
|
+ } catch (int i) {
|
||||||
|
+ throw Error("Cannot read file '" + f + "', error: " + std::to_string(i));
|
||||||
|
+ } catch (...) {
|
||||||
|
+ throw Error("Cannot read file '" + f + "'");
|
||||||
|
+ }
|
||||||
|
|
||||||
|
if (m->filepath().empty()) {
|
||||||
|
m->setFilepath(fullname);
|
||||||
|
@@ -305,7 +311,13 @@ void parse(Env& env, Model*& model, const vector<string>& filenames,
|
||||||
|
if (verbose) {
|
||||||
|
std::cerr << "processing data file '" << f << "'" << endl;
|
||||||
|
}
|
||||||
|
- s = get_file_contents(file);
|
||||||
|
+ try {
|
||||||
|
+ s = get_file_contents(file);
|
||||||
|
+ } catch (int i) {
|
||||||
|
+ throw Error("Cannot read data file '" + f + "', error: " + std::to_string(i));
|
||||||
|
+ } catch (...) {
|
||||||
|
+ throw Error("Cannot read data file '" + f + "'");
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
ParserState pp(f, s, err, includePaths, files, seenModels, model, true, false, false,
|
||||||
|
diff --git a/lib/solns2out.cpp b/lib/solns2out.cpp
|
||||||
|
index 6f9fdfe5..b1807ff8 100644
|
||||||
|
--- a/lib/solns2out.cpp
|
||||||
|
+++ b/lib/solns2out.cpp
|
||||||
|
@@ -551,16 +551,24 @@ void Solns2Out::init() {
|
||||||
|
_outputExpr = oi->e();
|
||||||
|
} else if (auto* vdi = i->dynamicCast<VarDeclI>()) {
|
||||||
|
if (vdi->e()->id()->idn() == -1 && vdi->e()->id()->v() == "_mzn_solution_checker") {
|
||||||
|
- _checkerModel = eval_string(getEnv()->envi(), vdi->e()->e());
|
||||||
|
- if (!_checkerModel.empty() && _checkerModel[0] == '@') {
|
||||||
|
- _checkerModel = FileUtils::decode_base64(_checkerModel);
|
||||||
|
- FileUtils::inflate_string(_checkerModel);
|
||||||
|
+ try {
|
||||||
|
+ _checkerModel = eval_string(getEnv()->envi(), vdi->e()->e());
|
||||||
|
+ if (!_checkerModel.empty() && _checkerModel[0] == '@') {
|
||||||
|
+ _checkerModel = FileUtils::decode_base64(_checkerModel);
|
||||||
|
+ FileUtils::inflate_string(_checkerModel);
|
||||||
|
+ }
|
||||||
|
+ } catch (int ei) {
|
||||||
|
+ throw Error("Failed to inflate solution checker, error: " + std::to_string(ei));
|
||||||
|
}
|
||||||
|
} else if (vdi->e()->id()->idn() == -1 && vdi->e()->id()->v() == "_mzn_stats_checker") {
|
||||||
|
- _statisticsCheckerModel = eval_string(getEnv()->envi(), vdi->e()->e());
|
||||||
|
- if (!_statisticsCheckerModel.empty() && _statisticsCheckerModel[0] == '@') {
|
||||||
|
- _statisticsCheckerModel = FileUtils::decode_base64(_statisticsCheckerModel);
|
||||||
|
- FileUtils::inflate_string(_statisticsCheckerModel);
|
||||||
|
+ try {
|
||||||
|
+ _statisticsCheckerModel = eval_string(getEnv()->envi(), vdi->e()->e());
|
||||||
|
+ if (!_statisticsCheckerModel.empty() && _statisticsCheckerModel[0] == '@') {
|
||||||
|
+ _statisticsCheckerModel = FileUtils::decode_base64(_statisticsCheckerModel);
|
||||||
|
+ FileUtils::inflate_string(_statisticsCheckerModel);
|
||||||
|
+ }
|
||||||
|
+ } catch (int ei) {
|
||||||
|
+ throw Error("Failed to inflate stats checker, error: " + std::to_string(ei));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
_declmap.insert(make_pair(vdi->e()->id()->str(), DE(vdi->e(), vdi->e()->e())));
|
||||||
|
diff --git a/minizinc.cpp b/minizinc.cpp
|
||||||
|
index a62478e9..93f83b3d 100644
|
||||||
|
--- a/minizinc.cpp
|
||||||
|
+++ b/minizinc.cpp
|
||||||
|
@@ -68,6 +68,11 @@ int run(const std::string& exe, const std::vector<std::string>& args, bool jsonS
|
||||||
|
std::cerr << std::endl;
|
||||||
|
}
|
||||||
|
std::cerr << e.what() << std::endl;
|
||||||
|
+ } catch (int i) {
|
||||||
|
+ if (slv.getFlagVerbose()) {
|
||||||
|
+ std::cerr << std::endl;
|
||||||
|
+ }
|
||||||
|
+ std::cerr << " UNKNOWN EXCEPTION in solver, errorcode: " << i << std::endl;
|
||||||
|
} catch (...) {
|
||||||
|
if (slv.getFlagVerbose()) {
|
||||||
|
std::cerr << std::endl;
|
||||||
|
--
|
||||||
|
2.37.0
|
||||||
|
|
3
libminizinc-2.8.2.tar.gz
Normal file
3
libminizinc-2.8.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e8b5c037e1d9711803e05ef6eaf416d5ed080f57cc0867d3c6ec3b1304bfd375
|
||||||
|
size 8026563
|
3
libminizinc-2.8.5.tar.gz
Normal file
3
libminizinc-2.8.5.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cd8aa35532191864ba5a79f8755e0e24c329b1b887305f89d5f7b33eca9f96db
|
||||||
|
size 8050297
|
444
libminizinc.changes
Normal file
444
libminizinc.changes
Normal file
@ -0,0 +1,444 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Sep 8 15:51:24 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 2.8.5:
|
||||||
|
* Fix specification for constraint items and annotations in
|
||||||
|
FlatZinc JSON.
|
||||||
|
* Fix flattening of negated let expressions with constraints.
|
||||||
|
* Fix crash when equating identifiers to tuples/records in if-
|
||||||
|
then-else expressions.
|
||||||
|
* Fix string_length function to return the number of Unicode
|
||||||
|
code points rather than the number of bytes (i.e., to
|
||||||
|
interpret the string as UTF-8).
|
||||||
|
* Emit type error for opt tuples and records created through
|
||||||
|
type aliases.
|
||||||
|
* Fix evaluation of par partial functions returning arrays.
|
||||||
|
* Fix type inference for if-then-else expressions with
|
||||||
|
different tuple or record types in the branches.
|
||||||
|
* Fix evaluation error caused by removal of fixed FlatZinc
|
||||||
|
variables without fixing them in the output model.
|
||||||
|
* Fix computed type when flattening cv comprehensions
|
||||||
|
containing tuple or record types.
|
||||||
|
* Fix unsatisfiability caused by reification in negated boolean
|
||||||
|
context (:bugref:`813`).
|
||||||
|
* Fix bug in computation of common type of incompatible record
|
||||||
|
types.
|
||||||
|
* Fix crash when type checking nested arrays of tuples or
|
||||||
|
records.
|
||||||
|
* Fix incorrect unification of flattened tuple/record fields
|
||||||
|
with paths enabled.
|
||||||
|
* Add string_split function that splits a string into an array
|
||||||
|
of strings based on a separator.
|
||||||
|
* Add json_section annotation to mark an output item as a JSON
|
||||||
|
section (:bugref:`816`).
|
||||||
|
* Add -w and --disable-warnings flags that will suppress all
|
||||||
|
warnings emitted by the flattening process.
|
||||||
|
* Add option for solver libraries to set
|
||||||
|
mzn_opt_annotate_computed_domains such that the compiler will
|
||||||
|
signal domains that are enforced by separate constraints
|
||||||
|
using a computed_domain annotation.
|
||||||
|
* Always output multidimensional arrays as nested arrays when
|
||||||
|
using showJSON for consistency.
|
||||||
|
* Add missing implementation for default for sets expressions.
|
||||||
|
* Add missing optional versions of unary mathematical
|
||||||
|
functions/operators.
|
||||||
|
* Improve special-case handling of boolean <-> and xor
|
||||||
|
operators.
|
||||||
|
* Fix bundled OpenSSL libraries on Windows.
|
||||||
|
* Allow MOOC submission window to be scrolled.
|
||||||
|
* Increase hard process termination timeout to 1s.
|
||||||
|
* Fix crash when using records inside solution checker modules.
|
||||||
|
* Fix pretty printing of record literals and types with unicode
|
||||||
|
field names.
|
||||||
|
* Fix creation of par versions functions containing var
|
||||||
|
binary/unary operators (:bugref:`792`).
|
||||||
|
* Fix potential crash when printing of output model involving
|
||||||
|
records.
|
||||||
|
* Fix computation of supertype of tuples/records involving <>
|
||||||
|
fields.
|
||||||
|
* Fix a bug where the compiler would incorrectly set variable
|
||||||
|
domains as computed when processing linear constraints.
|
||||||
|
* Fix invalid JSON produced by MIP interfaces due to infinite
|
||||||
|
values for statistics.
|
||||||
|
* Fix possible crash during type specialisation involving array
|
||||||
|
[_] of $$T types.
|
||||||
|
* Fix output of structured types containing arrays of enums
|
||||||
|
(:bugref:`793`).
|
||||||
|
* Fix justified formatting to work with arrays of enums.
|
||||||
|
* Fix incorrect unification of arrays of reverse mapped
|
||||||
|
variables with paths enabled.
|
||||||
|
* Fix problem where incorrect type errors would occur when
|
||||||
|
merging records or tuples types in an array declaration.
|
||||||
|
* Fix bug where unused reverse-mapped variables were removed
|
||||||
|
from the output model while still being marked as output in
|
||||||
|
the FlatZinc.
|
||||||
|
* Fix decomposition of set variables with empty domains when
|
||||||
|
using nosets.mzn.
|
||||||
|
* Fix a problem where the reduced range syntax in combination
|
||||||
|
with enums would produce an error when the resulting range
|
||||||
|
was empty.
|
||||||
|
* Fix incorrect unification of tuple/record fields in array
|
||||||
|
accesses with paths enabled (:bugref:`802`).
|
||||||
|
* Fix crash when using tuples/records in par arrays or calls
|
||||||
|
containing var expressions.
|
||||||
|
* Fix bug where variables could be removed from the FlatZinc
|
||||||
|
but not the output model when optimising bool2int
|
||||||
|
(:bugref:`803`).
|
||||||
|
* Add missing coercions for comprehension where clauses and
|
||||||
|
assignment generators (:bugref:`807`).
|
||||||
|
* Fix bug in handling of domains for structured types during
|
||||||
|
type specialisation.
|
||||||
|
* Fix handling of search annotations when reading FlatZinc
|
||||||
|
files.
|
||||||
|
* Fix bug during optimisation which could cause the compiler to
|
||||||
|
hang due to not updating hashes of identifiers
|
||||||
|
(:bugref:`805`).
|
||||||
|
* Fix incorrect definition of all_different in the
|
||||||
|
gecode_presolver library where it was not enforced that fixed
|
||||||
|
values be all different (:bugref:`798`).
|
||||||
|
* Fix crash when resolving type aliases for function parameters
|
||||||
|
with $T array dimensions (:bugref:`806`).
|
||||||
|
* Fix default operator for par opt set parameters
|
||||||
|
(:bugref:`809`).
|
||||||
|
* Fix output of par opt set enumerated types.
|
||||||
|
* Fix pretty printing of records when using the document
|
||||||
|
printer.
|
||||||
|
* Fix internal error when binding numeric literals to
|
||||||
|
declarations with existing right-hand sides.
|
||||||
|
* Fix contexts of arguments of double-negated integer
|
||||||
|
comparisons (:bugref:`810`).
|
||||||
|
* Fix context of indices in array access expressions
|
||||||
|
(:bugref:`719`).
|
||||||
|
* Fix problem where specialised flattening for some forms of
|
||||||
|
binary operators would not correctly forward the partiality
|
||||||
|
of its arguments (:bugref:`766`).
|
||||||
|
* Remove internal duplicate functionality that could sometimes
|
||||||
|
cause problems when assigning variables in constraints
|
||||||
|
(:bugref:`769`).
|
||||||
|
* Do not try to check right hand side of parameter variable
|
||||||
|
declarations that are par because of singular domains
|
||||||
|
(:bugref:`771`).
|
||||||
|
* Fix a problem in the parser where anonymous enumerated types
|
||||||
|
could not be used in DZN files (:bugref:`776`).
|
||||||
|
* Fix identifier lookup bug in internal Chuffed interface
|
||||||
|
(:bugref:`782`).
|
||||||
|
* Fix some minor inconsistencies in the FlatZinc JSON schema
|
||||||
|
and generation.
|
||||||
|
* Fix crash involving var comprehensions with set types by
|
||||||
|
rejecting unsupported type (:bugref:`779`).
|
||||||
|
* Fix internal error during evaluation of par opt set
|
||||||
|
expressions.
|
||||||
|
* Fix invalid FlatZinc produced when search annotations are
|
||||||
|
passed non-1-based arrays (:bugref:`768`).
|
||||||
|
* Fix bug in evaluation of annotations causing invalid FlatZinc
|
||||||
|
to be produced (:bugref:`768`, :bugref:`788`).
|
||||||
|
* Fix substitution of fixed objective variable value into solve
|
||||||
|
item (:bugref:`773`).
|
||||||
|
* Fix check for presence of set2iter redefinition
|
||||||
|
(:bugref:`778`).
|
||||||
|
* Fix incorrect removal of constraint due to use of
|
||||||
|
redefinition of bool_clause_reif when constraint is not
|
||||||
|
reified (:bugref:`785`).
|
||||||
|
* Remove documentation of strictly_increasing (and decreasing)
|
||||||
|
for bool types, and change definition from a solver redefined
|
||||||
|
global, to a simple library definition with user warning
|
||||||
|
(:bugref:`784`).
|
||||||
|
* Add version of strictly_increasing (and decreasing) for
|
||||||
|
float, opt float, and set of int types.
|
||||||
|
* Automatically detect SCIP 8.1.0 and potential future versions
|
||||||
|
on Windows.
|
||||||
|
* Fix crash when using type aliases with -O2 (:bugref:`783`).
|
||||||
|
* Automatically detect Gurobi 11.0 and potential future
|
||||||
|
versions.
|
||||||
|
* Allow array literals with all <> members (:bugref:`747`).
|
||||||
|
* Increase maximum number of threads from default Qt limit
|
||||||
|
(:idebugref:`196`).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Dec 30 05:08:48 UTC 2023 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||||
|
|
||||||
|
- update to 2.8.2:
|
||||||
|
* Bug fixes:
|
||||||
|
+ Fix incorrect FlatZinc definition in the gecode_presolver
|
||||||
|
solver library.
|
||||||
|
+ Fix type specialisation for function with an polymorphic
|
||||||
|
array argument and a non-array return type with the same
|
||||||
|
type-inst identifier.
|
||||||
|
+ Fix crash during typechecking of overloaded functions
|
||||||
|
differing only by inst returning structured types.
|
||||||
|
+ Fix incorrect type checking of polymorphic functions with
|
||||||
|
type-inst IDs inside structured types.
|
||||||
|
+ Fix evaluation error when boolean variables are fixed during
|
||||||
|
flattening.
|
||||||
|
+ Fix incorrect call names output when generating .ozn files.
|
||||||
|
+ Fix incorrect output of record access as tuple access in
|
||||||
|
.ozn files.
|
||||||
|
+ Fix definition of array_intersect so that it can be used in
|
||||||
|
non-positive contexts.
|
||||||
|
+ Fix standards definitions of increasing variants to correct
|
||||||
|
be ignored when the argument array is empty.
|
||||||
|
+ Fix a problem where exceptions thrown for undefined
|
||||||
|
expressions were not caught during the aggregation of linear
|
||||||
|
expressions, breaking relational semantics.
|
||||||
|
+ Fix crash when calculating computed domain of a declaration.
|
||||||
|
+ Fix x-y line/scatter visualisations.
|
||||||
|
* Changes:
|
||||||
|
+ Support var set``s of enums for ``array_union and
|
||||||
|
array_intersect.
|
||||||
|
+ Support var enums for the .. range operator.
|
||||||
|
+ Always perform substitution of fixed values before outputting
|
||||||
|
FlatZinc for consistency.
|
||||||
|
* Changes in the IDE:
|
||||||
|
+ Make process handling more robust to failures.
|
||||||
|
- update to 2.8.1:
|
||||||
|
* Bug fixes:
|
||||||
|
+ Fix incorrect message for par array out of bounds indicating
|
||||||
|
that array is empty
|
||||||
|
+ Fix incorrect propagation of Boolean variables potentially
|
||||||
|
causing output not accepted by Gecode and Chuffed.
|
||||||
|
+ Fix a problem where the usage of lb on a Boolean expression
|
||||||
|
would return -infinity..
|
||||||
|
+ Fix omission of error location when there is no stack trace
|
||||||
|
available.
|
||||||
|
+ Fix type specialisation to always make par versions of
|
||||||
|
functions available for output.
|
||||||
|
+ Fix internal error when checking return value of functions
|
||||||
|
involving arrays of optional values.
|
||||||
|
+ Fix incorrect false values for has_output_item when running
|
||||||
|
with --model-interface-only
|
||||||
|
+ Fix translation of search annotations with multi-dimensional
|
||||||
|
arrays as arguments.
|
||||||
|
+ Fix bug in output generation for some visualisation functions.
|
||||||
|
+ Fix problem where tuple or record assignments would sometimes
|
||||||
|
trigger segmentation faults.
|
||||||
|
+ Fix context when binding the result of flattening a
|
||||||
|
concatenation operation, resolving a possible segmentation
|
||||||
|
fault.
|
||||||
|
+ Fix incorrect possible evaluation error for in operator
|
||||||
|
involving an array RHS.
|
||||||
|
* Changes:
|
||||||
|
+ Add --solution-checker option to allow specifying the
|
||||||
|
solution checker (allowing use from a parameter configuration
|
||||||
|
.mpc file).
|
||||||
|
+ Produce tighter bounds in compute_mod_bounds for the
|
||||||
|
mod operator.
|
||||||
|
* Changes in the IDE:
|
||||||
|
+ Fix command used to run findMUS and Globalizer.
|
||||||
|
+ Add ability to set the ports used for the visualisation
|
||||||
|
server.
|
||||||
|
+ Add option for printing the visualisation server URL for
|
||||||
|
debugging purposes.
|
||||||
|
+ Add more information to subprocess error messages.
|
||||||
|
- update to 2.8.0:
|
||||||
|
* Changes in interfaces to solvers:
|
||||||
|
+ OR-Tools is now bundled with the MiniZinc IDE on all
|
||||||
|
platforms.
|
||||||
|
+ HiGHS is now loaded as a dynamic plugin instead of statically
|
||||||
|
linked, and now supports outputting intermediate solutions
|
||||||
|
for optimisation problems.
|
||||||
|
+ Add support for producing a JSON-based version of FlatZinc as
|
||||||
|
the output format of the MiniZinc compiler.
|
||||||
|
+ Replace supportsMzn, supportsFzn and supportsNL solver
|
||||||
|
configuration flags with new option inputType. The old flags
|
||||||
|
are still supported for backwards compatibility.
|
||||||
|
+ Add experimental support for restart based meta-search
|
||||||
|
specification for the Gecode and Chuffed solvers, as first
|
||||||
|
explored in Solver-Independent Large Neighbourhood Search and
|
||||||
|
A Modern Architecture for Constraint Modelling Languages.
|
||||||
|
+ Automatically detect current versions of CPLEX.
|
||||||
|
* Changes in the MiniZinc Library:
|
||||||
|
+ Add cumulatives scheduling global constraint.
|
||||||
|
+ Add the opt variants of the global_cardinality functions, and
|
||||||
|
add enumerated type typesafety between the values of the
|
||||||
|
decision variables and the cover parameters.
|
||||||
|
+ Add optional versions of count_* global constraints.
|
||||||
|
+ (strictly_)decreasing will now always be rewritten into
|
||||||
|
(strictly_)increasing and has support for option types.
|
||||||
|
+ Allow libraries to define how to iterate over var set of int
|
||||||
|
using the function set2iter, useful for different set
|
||||||
|
representations.
|
||||||
|
+ Stabilise the IDE visualisation library, allowing all
|
||||||
|
visualisation functions to be used from output statements,
|
||||||
|
and removing the need for manual calls to showJSON in custom
|
||||||
|
visualisations. This is a breaking change for users of the
|
||||||
|
previous experimental API.
|
||||||
|
+ Add mzn_half_reify_clause compiler option to allow solvers to
|
||||||
|
disable the half reification of bool_clause constraints.
|
||||||
|
+ Update the reflection functions ub, lb, and dom to return
|
||||||
|
enum values.
|
||||||
|
+ Use tuples to implement the decomposition of optional
|
||||||
|
variables, avoiding possible CSE aliasing problems.
|
||||||
|
* Changes in the compiler:
|
||||||
|
+ CSE has been adjusted to handle commutative functions when
|
||||||
|
annotated using the promise_commutative annotation.
|
||||||
|
+ mzn_reverse_map_var is now only called on output variables
|
||||||
|
that do not yet have reverse mappers after initial
|
||||||
|
flattening, but are required by the output model.
|
||||||
|
+ Improve error messaging for invalid parameter configuration
|
||||||
|
(.mpc) files.
|
||||||
|
+ Add a list of messages generated by solution checkers to the
|
||||||
|
checker message when using --json-stream.
|
||||||
|
+ Support output of command line argument parsing errors in
|
||||||
|
--json-stream mode.
|
||||||
|
* Bug fixes:
|
||||||
|
+ Fix restoration of tuple/record domains when flattening let
|
||||||
|
expressions.
|
||||||
|
+ Fix type checking error due to creation of incorrect par
|
||||||
|
versions of functions involving tuples/records.
|
||||||
|
+ Ensure that when --solver is used, the given solver
|
||||||
|
configuration file is always selected even when it collides
|
||||||
|
with a solver in the search paths.
|
||||||
|
+ Fix error when running satisfaction problems using the Gecode
|
||||||
|
presolver where an output variable is also an
|
||||||
|
introduced variable.
|
||||||
|
+ Resolve a problem where unification in the optimization phase
|
||||||
|
might remove variables part of the output.
|
||||||
|
+ Fix possible crash when printing the final solution using the
|
||||||
|
built-in Chuffed interface.
|
||||||
|
+ Don’t print the final status line from solution checkers.
|
||||||
|
+ Fix typechecking of par type-inst identifiers when
|
||||||
|
instantiated using structured types involving var types.
|
||||||
|
+ Implement fix and is_fixed for strucutred types.
|
||||||
|
+ Ensure reverse mappers are created when flattening
|
||||||
|
tuple/record literals. This resolves certain errors during
|
||||||
|
output processing in models using these types.
|
||||||
|
+ Fix problem where certain strings in exceptions might be
|
||||||
|
garbage collected before they are output.
|
||||||
|
+ Fix problem where argument names of generated functions could
|
||||||
|
conflict with model declared names.
|
||||||
|
+ Fix problem where the common type of complex records or
|
||||||
|
tuples was not correctly determined in the array literals.
|
||||||
|
+ Fix a problem in the parser where a nullptr would be used
|
||||||
|
before a syntax error was thrown.
|
||||||
|
+ Fix error management when reading preference files.
|
||||||
|
+ Fix segmentation fault caused by the creation of invalid
|
||||||
|
domain constraints generated for functions with arrays of
|
||||||
|
tuples or records parameters.
|
||||||
|
+ Fix crash when instantiating a type-inst identifier using
|
||||||
|
only <>.
|
||||||
|
+ Fix evaluation of comprehensions containing opt string.
|
||||||
|
+ Fix crash when instantiating polymorphic functions using
|
||||||
|
tuples/records with many var or opt fields.
|
||||||
|
+ Do not generate default DZN output when there are only
|
||||||
|
sectioned output items present.
|
||||||
|
+ Fix the edge indexing of the edges for the final node in the
|
||||||
|
neural_net global constraint.
|
||||||
|
+ Add better error messaging when an index set mismatch is
|
||||||
|
encountered in the standard library.
|
||||||
|
+ Fix evaluation error when indexing into an array using <>.
|
||||||
|
+ Fix incorrect unsatisfiability when equating optional
|
||||||
|
variables with non-intersecting domains.
|
||||||
|
+ Fix array access using optional indices for multidimensional
|
||||||
|
arrays.
|
||||||
|
+ Fix output of zero length arrays of optional variables.
|
||||||
|
+ Fix output processing performance degradation when printing
|
||||||
|
arrays in DZN output mode.
|
||||||
|
+ Fix card function on set of floats and bools.
|
||||||
|
+ Make set literals containing strings or annotations a
|
||||||
|
type error.
|
||||||
|
* Changes in the IDE:
|
||||||
|
+ Fix unreadable cheat sheet font colour in dark mode.
|
||||||
|
+ Add option to output objective value and enable by default.
|
||||||
|
+ Show manually input parameters in output window.
|
||||||
|
+ Fix missing checker messages.
|
||||||
|
+ Fix incorrect OpenSSL version in Linux packages.
|
||||||
|
- Add minimal checks
|
||||||
|
- Add patches:
|
||||||
|
* 0001-Disambiguate-UNKNOWN-EXCEPTION.patch
|
||||||
|
* 0002-Catch-std-exception-by-const-reference.patch
|
||||||
|
* 0003-Try-to-get-some-more-information-when-catching.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 9 09:14:34 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 2.7.6:
|
||||||
|
* Change the library and solver configuration path of builtin
|
||||||
|
version of Chuffed to prevent file conflicts
|
||||||
|
* Use the verbose compilation flag to control the verbosity of
|
||||||
|
the MIP domains stage
|
||||||
|
* Introduces the ``arg_val`` and ``arg_val_weak`` globals that
|
||||||
|
return the index of the first occurrence of a value in a given
|
||||||
|
array.
|
||||||
|
* Introduces the ``var_perm_sym`` and ``var_sqr_sym`` symmetry
|
||||||
|
breaking globals.
|
||||||
|
* Enable parallel search for the built-in Gecode presolver.
|
||||||
|
* Use native Qt dark mode on Windows where supported.
|
||||||
|
* Improve behaviour of the custom solver parameter dialog.
|
||||||
|
* ``ASTString`` constructor that uses ``std::string`` is now
|
||||||
|
explicit to avoid unexpected or unnecessary GC allocation.
|
||||||
|
* Circular definitions through the use of annotations will now
|
||||||
|
be reported as type errors, rather incurring infinite recursion
|
||||||
|
* Optimize the compilation of identical calls in different
|
||||||
|
contexts by recursively changing the contexts of the (uncompiled)
|
||||||
|
dependent calls, instead of flattening multiple times.
|
||||||
|
* Change domains of set variables when encountering (par)
|
||||||
|
equalities, or negated ``in`` constraints at the root level.
|
||||||
|
* Calls to ``min`` and ``max`` with ``par set of int`` type
|
||||||
|
argument will now be undefined (becoming ``false`` in the
|
||||||
|
closest Boolean context). This makes them consistent with
|
||||||
|
the calls with an argument of type ``var set of int``.
|
||||||
|
* Note that previous behaviour would have returned ``infinity``
|
||||||
|
or ``-infinity`` respectively (:bugref:`661`).
|
||||||
|
* Only show MOOC error code when response is actually an error
|
||||||
|
* Add documentation for ``--input-is-flatzinc`` flag
|
||||||
|
* Add ``ceil``, ``floor`` and ``round`` functions for ``var
|
||||||
|
float``, and corresponding FlatZinc builtins ``float_ceil``,
|
||||||
|
``float_floor`` and ``float_round`` that can be overridden
|
||||||
|
by solvers in the new ``redefinitions-2.7.1.mzn`` library file
|
||||||
|
* Fix highlighting of multiline comments starting with ``/*/``
|
||||||
|
* Fix bundling of incompatible OpenSSL version in linux
|
||||||
|
packages.
|
||||||
|
* Support for tuple and record types as well as type-inst
|
||||||
|
synonyms has been added.
|
||||||
|
* Extended enumerated types can now be constructed from non-
|
||||||
|
contiguous sets.
|
||||||
|
* WebAssembly is now fully supported as a target platform.
|
||||||
|
* MiniZinc now includes a solver interface for the `HiGHS
|
||||||
|
linear optimisation suite. HiGHS is included by default in
|
||||||
|
the MiniZincIDE package, and available using ``--solver highs``.
|
||||||
|
* The SCIP interface has been updated and is now compatible
|
||||||
|
with version 7 and 8 only.
|
||||||
|
* A solver's globals library specified in a configuration file
|
||||||
|
will now always be passed to the compiler using the ``-G``
|
||||||
|
flag. This allows users to easily override this library from
|
||||||
|
command line when required.
|
||||||
|
* Automatically detect Gurobi 10.0 and potential future
|
||||||
|
versions.
|
||||||
|
* Avoid loading all solver plugin DLLs on startup, instead
|
||||||
|
loading when required.
|
||||||
|
* The non-FlatZinc interfaces now also accept the ``--free-
|
||||||
|
search`` flag in addition to the ``-f`` flag.
|
||||||
|
* Ensure user config directory is created when modifying
|
||||||
|
solver search paths (:idebugref:`167`).
|
||||||
|
* Add tooltips to the CP-Profiler status bar legend.
|
||||||
|
* Add support for mooc submissions which include file editing
|
||||||
|
history.
|
||||||
|
* bugfixes
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Jul 16 21:50:27 UTC 2022 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||||
|
|
||||||
|
- Update to version 2.6.4
|
||||||
|
https://github.com/MiniZinc/libminizinc/blob/2.6.4/changes.rst
|
||||||
|
- Drop upstream patches:
|
||||||
|
* 0001-Fix-missing-return-in-non-void-function.patch
|
||||||
|
* 0001-Add-memory-include-required-for-unique_ptr.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat May 21 10:47:50 UTC 2022 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||||
|
|
||||||
|
- Update to version 2.6.3
|
||||||
|
https://github.com/MiniZinc/libminizinc/blob/2.6.3/changes.rst
|
||||||
|
- Fix build with GCC 12.1.0, add
|
||||||
|
0001-Add-memory-include-required-for-unique_ptr.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 28 12:47:40 UTC 2022 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||||
|
|
||||||
|
- Depend on gecode for building the presolver, and recommend the
|
||||||
|
gecode-minizinc solver plugin.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 26 20:51:53 UTC 2022 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
|
||||||
|
|
||||||
|
- Initial package version (2.6.2)
|
98
libminizinc.spec
Normal file
98
libminizinc.spec
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
#
|
||||||
|
# spec file for package libminizinc
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: libminizinc
|
||||||
|
Version: 2.8.5
|
||||||
|
Release: 0
|
||||||
|
Summary: A high-level constraint modelling language
|
||||||
|
Group: Productivity/Scientific/Math
|
||||||
|
License: MPL-2.0
|
||||||
|
URL: https://www.minizinc.org/
|
||||||
|
Source: https://github.com/MiniZinc/libminizinc/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||||
|
# PATCH-FEATURE-OPENSUSE - Be more verbose on thrown exceptions
|
||||||
|
Patch0: 0001-Disambiguate-UNKNOWN-EXCEPTION.patch
|
||||||
|
Patch1: 0002-Catch-std-exception-by-const-reference.patch
|
||||||
|
Patch2: 0003-Try-to-get-some-more-information-when-catching.patch
|
||||||
|
BuildRequires: cmake >= 3.4.0
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: gecode-devel
|
||||||
|
BuildRequires: gecode-minizinc
|
||||||
|
BuildRequires: pkgconfig(mpfr)
|
||||||
|
|
||||||
|
%description
|
||||||
|
MiniZinc is a free and open-source constraint modeling language.
|
||||||
|
|
||||||
|
%package -n minizinc
|
||||||
|
Summary: A high-level constraint modelling language
|
||||||
|
Recommends: gecode-minizinc
|
||||||
|
|
||||||
|
%description -n minizinc
|
||||||
|
You can use MiniZinc to model constraint satisfaction and optimisation
|
||||||
|
problems in a high-level, solver-independent way, taking advantage of
|
||||||
|
a large library of pre-defined constraints. Your model is then
|
||||||
|
compiled into FlatZinc, a solver input language that is understood
|
||||||
|
by a wide range of solvers.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: A high-level constraint modelling language
|
||||||
|
Group: Development/Libraries/C and C++
|
||||||
|
Requires: minizinc = %{version}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
MiniZinc is a free and open-source constraint modeling language.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cmake
|
||||||
|
%cmake_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%cmake_install
|
||||||
|
|
||||||
|
%check
|
||||||
|
cat > t.mzn <<EOF
|
||||||
|
var 1..5: x;
|
||||||
|
EOF
|
||||||
|
cat > t1.mzc.mzn <<EOF
|
||||||
|
output["SIMPLE CHECK"];
|
||||||
|
EOF
|
||||||
|
cat > t2.mzc.mzn <<EOF
|
||||||
|
int: data :: add_to_output = 2;
|
||||||
|
EOF
|
||||||
|
export LD_LIBRARY_PATH=./build/
|
||||||
|
./build/minizinc --solvers
|
||||||
|
./build/minizinc t1.mzc.mzn t.mzn --output-mode json --output-time --output-objective --output-output-item --statistics
|
||||||
|
./build/minizinc t2.mzc.mzn t.mzn --output-mode json --output-time --output-objective --output-output-item --statistics
|
||||||
|
|
||||||
|
%post -n minizinc -p /sbin/ldconfig
|
||||||
|
%postun -n minizinc -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%files -n minizinc
|
||||||
|
%license LICENSE.txt
|
||||||
|
%doc changes.rst README.md
|
||||||
|
%{_bindir}/*
|
||||||
|
%{_datadir}/minizinc
|
||||||
|
%{_libdir}/libmzn*
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_includedir}/minizinc
|
||||||
|
%{_libdir}/cmake/libminizinc
|
||||||
|
|
||||||
|
%changelog
|
Loading…
Reference in New Issue
Block a user