Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 27 additions & 5 deletions changelog.in
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,30 @@
#

[RELEASE]
Version: 7.0.0
Date: unreleased
Version: 6.6.0
Date: 2026-11-16
[DESCRIPTION]
This is the development changelog for the next Gecode release.
This release fixes errors in restart-based and portfolio search and in float
propagation. Restart-based search with incomplete slave searches, such as large
neighbourhood search, posted no-goods that only hold in the restricted search
space. It could then miss better solutions and report a solution as optimal
when it was not. On AArch64, float multiplication could round its lower bound
upward, so float propagators could remove solutions.

A portfolio of restart-based engines no longer crashes when it is deleted, and
restart-based and portfolio search now report correctly whether they finished
or were stopped. Restart-based search with no-goods no longer restarts forever
on an unsatisfiable model, and FlatZinc no longer prints UNKNOWN when a proof
follows a restart limit.

Optimization over float objectives now finishes in cases where proving
optimality used to split variables down to single ulps, both in FlatZinc and
with FloatMinimizeSpace and FloatMaximizeSpace. Float propagation with MSVC is
two to four times faster.

Options can report unrecognised commandline arguments with parse_strict(),
which the examples now use. Existing calls to parse() keep their behaviour;
strict parsing will become the default in a future major release.

[ENTRY]
Module: driver
Expand All @@ -84,8 +104,10 @@ Issue: 144
Options support opt-in strict parsing through parse_strict(), which reports
unrecognised arguments, prints help, and exits with failure. The named methods
parse_strict() and parse_permissive() select the strictness of parse(). Existing
parsing calls retain their behaviour. Examples that accept only named options
use strict parsing.
parsing calls retain their behaviour. SizeOptions and InstanceOptions accept
their size or instance as the only remaining argument; with SizeOptions it must
be a number, and with InstanceOptions it must not start with a hyphen. Examples
that accept only named options use strict parsing.
Strict parsing will become the default in a future major release.

[ENTRY]
Expand Down
20 changes: 10 additions & 10 deletions configure
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Id.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.72 for GECODE 6.5.0.
# Generated by GNU Autoconf 2.72 for GECODE 6.6.0.
#
# Report bugs to <users@gecode.dev>.
#
Expand Down Expand Up @@ -605,8 +605,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='GECODE'
PACKAGE_TARNAME='gecode'
PACKAGE_VERSION='6.5.0'
PACKAGE_STRING='GECODE 6.5.0'
PACKAGE_VERSION='6.6.0'
PACKAGE_STRING='GECODE 6.6.0'
PACKAGE_BUGREPORT='users@gecode.dev'
PACKAGE_URL=''

Expand Down Expand Up @@ -1433,7 +1433,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
'configure' configures GECODE 6.5.0 to adapt to many kinds of systems.
'configure' configures GECODE 6.6.0 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1499,7 +1499,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of GECODE 6.5.0:";;
short | recursive ) echo "Configuration of GECODE 6.6.0:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1654,7 +1654,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
GECODE configure 6.5.0
GECODE configure 6.6.0
generated by GNU Autoconf 2.72

Copyright (C) 2023 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2294,7 +2294,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GECODE $as_me 6.5.0, which was
It was created by GECODE $as_me 6.6.0, which was
generated by GNU Autoconf 2.72. Invocation command line was

$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -3289,7 +3289,7 @@ ac_config_headers="$ac_config_headers gecode/support/config.hpp"



ac_gecode_soversion=52
ac_gecode_soversion=53
GECODE_SOVERSION=${ac_gecode_soversion}


Expand Down Expand Up @@ -15232,7 +15232,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by GECODE $as_me 6.5.0, which was
This file was extended by GECODE $as_me 6.6.0, which was
generated by GNU Autoconf 2.72. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -15296,7 +15296,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
GECODE config.status 6.5.0
GECODE config.status 6.6.0
configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"

Expand Down
4 changes: 2 additions & 2 deletions gecode-version.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dnl Canonical version metadata consumed by configure.ac and CMakeLists.txt.
dnl Kept at repository root so build/ can remain fully ignored as generated
dnl output.
m4_define([GECODE_M4_VERSION], [6.5.0])
m4_define([GECODE_M4_SOVERSION], [52])
m4_define([GECODE_M4_VERSION], [6.6.0])
m4_define([GECODE_M4_SOVERSION], [53])
32 changes: 30 additions & 2 deletions gecode/driver.hh
Original file line number Diff line number Diff line change
Expand Up @@ -420,8 +420,9 @@ namespace Gecode {
* overload. With \a strict set to true, any remaining argument causes
* an error message and help text to be printed, followed by exit with
* failure. Use strict parsing when no positional arguments or further
* parsing are expected. Help options are handled as in the two-argument
* overload.
* parsing are expected. SizeOptions and InstanceOptions accept their
* size or instance as the only remaining argument. Help options are
* handled as in the two-argument overload.
*/
void parse(int& argc, char* argv[], bool strict);

Expand Down Expand Up @@ -780,6 +781,19 @@ namespace Gecode {
virtual void help(void);
/// Parse options from arguments \a argv (number is \a argc)
void parse(int& argc, char* argv[]);
/**
* \brief Parse options, optionally rejecting unrecognised arguments
*
* With \a strict set to true, the only argument that may remain after
* the options is the size, which must be a decimal number. Any other
* argument causes an error message and help text to be printed,
* followed by exit with failure.
*/
void parse(int& argc, char* argv[], bool strict);
/// Parse options with strict checking (equivalent to parse() with \c true)
void parse_strict(int& argc, char* argv[]);
/// Parse options partially (equivalent to parse() with \c false)
void parse_permissive(int& argc, char* argv[]);

/// Set default size
void size(unsigned int s);
Expand Down Expand Up @@ -843,6 +857,20 @@ namespace Gecode {
virtual void help(void);
/// Parse options from arguments \a argv (number is \a argc)
void parse(int& argc, char* argv[]);
/**
* \brief Parse options, optionally rejecting unrecognised arguments
*
* With \a strict set to true, the only argument that may remain after
* the options is the instance. An argument that starts with a hyphen
* is an unrecognised option rather than an instance. Any other
* remaining argument causes an error message and help text to be
* printed, followed by exit with failure.
*/
void parse(int& argc, char* argv[], bool strict);
/// Parse options with strict checking (equivalent to parse() with \c true)
void parse_strict(int& argc, char* argv[]);
/// Parse options partially (equivalent to parse() with \c false)
void parse_permissive(int& argc, char* argv[]);

/// Set default instance name
void instance(const char* s);
Expand Down
59 changes: 53 additions & 6 deletions gecode/driver/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,15 +631,21 @@ namespace Gecode {
return;
}

namespace {
/// Report unrecognised argument \a a, print help of \a o, and exit
void
unrecognised(BaseOptions& o, const char* a) {
std::cerr << "Unrecognised argument \"" << a << "\"" << std::endl;
o.help();
exit(EXIT_FAILURE);
}
}

void
BaseOptions::parse(int& argc, char* argv[], bool strict) {
parse(argc,argv);
if (strict && (argc > 1)) {
std::cerr << "Unrecognised argument \"" << argv[1] << "\""
<< std::endl;
help();
exit(EXIT_FAILURE);
}
if (strict && (argc > 1))
unrecognised(*this,argv[1]);
}

BaseOptions::~BaseOptions(void) {
Expand Down Expand Up @@ -750,6 +756,28 @@ namespace Gecode {
size(static_cast<unsigned int>(atoi(argv[1])));
}

void
SizeOptions::parse(int& argc, char* argv[], bool strict) {
if (!strict) {
parse(argc,argv);
return;
}
Options::parse(argc,argv);
if (argc < 2)
return;
// The only remaining argument must be the size
const char* s = argv[1];
bool number = (*s != 0);
for (const char* c = s; *c != 0; c++)
if (!isdigit(static_cast<unsigned char>(*c)))
number = false;
if (!number)
unrecognised(*this,argv[1]);
if (argc > 2)
unrecognised(*this,argv[2]);
size(static_cast<unsigned int>(atoi(argv[1])));
}



InstanceOptions::InstanceOptions(const char* e)
Expand Down Expand Up @@ -811,6 +839,25 @@ namespace Gecode {
instance(argv[1]);
}

void
InstanceOptions::parse(int& argc, char* argv[], bool strict) {
if (!strict) {
parse(argc,argv);
return;
}
Options::parse(argc,argv);
// The spec file and parameters may have changed
forget();
if (argc < 2)
return;
// The only remaining argument must be the instance, not an option
if ((argv[1][0] == '-') && (argv[1][1] != 0))
unrecognised(*this,argv[1]);
if (argc > 2)
unrecognised(*this,argv[2]);
instance(argv[1]);
}

bool
InstanceOptions::builtin(unsigned int& i) const {
const char* s = instance();
Expand Down
18 changes: 18 additions & 0 deletions gecode/driver/options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,15 @@ namespace Gecode {
* Options with additional size argument
*
*/
inline void
SizeOptions::parse_strict(int& argc, char* argv[]) {
parse(argc,argv,true);
}
inline void
SizeOptions::parse_permissive(int& argc, char* argv[]) {
parse(argc,argv,false);
}

inline void
SizeOptions::size(unsigned int s) {
_size = s;
Expand All @@ -644,6 +653,15 @@ namespace Gecode {
* Options with additional string argument
*
*/
inline void
InstanceOptions::parse_strict(int& argc, char* argv[]) {
parse(argc,argv,true);
}
inline void
InstanceOptions::parse_permissive(int& argc, char* argv[]) {
parse(argc,argv,false);
}

inline const char*
InstanceOptions::instance(void) const {
return _inst;
Expand Down
Loading
Loading