Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
b155a71
Remove Autoconf and maintained Makefile builds
zayenz Oct 28, 2026
9a36525
Require C++23 for Gecode and its consumers
zayenz Oct 28, 2026
0f26f6b
Adopt LLVM 22 formatting and repository check commands
zayenz Oct 28, 2026
3bf69ce
Normalize API identifiers and resolve Clang diagnostics
zayenz Oct 28, 2026
2df82f6
Complete extended checks and document modernization validation
zayenz Oct 28, 2026
61ca3c8
Rename strict-less relation constants from LE to LT
zayenz Oct 28, 2026
e356124
Expand performance checks and reduce copying and flushing
zayenz Oct 28, 2026
bc57fb9
Update the Gecode 7 plan after rebasing onto 6.5.0
zayenz Nov 1, 2026
b672acc
Add zdev areas for the remaining Gecode 7 work
zayenz Nov 1, 2026
bee07a6
Add tasks to config-header
zayenz Nov 1, 2026
f40b682
Add tasks to boost
zayenz Nov 1, 2026
8b16d5c
Add tasks to empty-arrays
zayenz Nov 1, 2026
783e7a7
Add tasks to value-params
zayenz Nov 1, 2026
eb366ff
Add tasks to scoped-enums
zayenz Nov 1, 2026
8542109
Add tasks to source-cleanup
zayenz Nov 1, 2026
d1adf23
Generate config.hpp with configure_file
zayenz Nov 1, 2026
56fb265
Use <bit> for bitset scans and population counts
zayenz Nov 1, 2026
a0070d8
Remove MSVC auto-linking
zayenz Nov 1, 2026
8b58035
Post nothing for empty no_overlap
zayenz Nov 1, 2026
d58081c
Add tasks to empty-arrays
zayenz Nov 1, 2026
99f382a
Post nothing for empty GCC and bin-packing input
zayenz Nov 1, 2026
a5fff6e
Branch with empty symmetries and relax empty arrays
zayenz Nov 1, 2026
f607570
Decide empty set channel, element, rel-op and weights at posting
zayenz Nov 1, 2026
050a4e8
Skip empty term buffers in linear posting and minimodel expressions
zayenz Nov 1, 2026
fb4b935
Add tasks to empty-arrays
zayenz Nov 1, 2026
125d62b
Skip empty buffers in open-list distinct
zayenz Nov 1, 2026
3fe8b45
Audit empty-array posting and record the fixes
zayenz Nov 1, 2026
094791b
Record the value-parameter inventory
zayenz Nov 1, 2026
d75db80
Add tasks to value-params
zayenz Nov 1, 2026
0d9efbc
Pass branch configuration handles by const& and move stored callbacks
zayenz Nov 2, 2026
448837f
Move brancher filter and print callbacks into SharedData storage
zayenz Nov 2, 2026
069b7fd
Fix CBS hooks, shared posting data, execution callbacks, open lists, …
zayenz Nov 2, 2026
3feb220
Fix value parameters in FlatZinc, Gist, search, tests, and examples
zayenz Nov 2, 2026
a79cd23
Pass FloatVal by const&
zayenz Nov 2, 2026
08202ff
Record value-parameter repair results
zayenz Nov 2, 2026
7c17bb4
Enable performance-unnecessary-value-param and document the parameter…
zayenz Nov 2, 2026
d71183a
Record the directed-rounding probe results
zayenz Nov 2, 2026
c1b759d
Add tasks to boost
zayenz Nov 2, 2026
a319987
Keep directed rounding sound under compiler optimization
zayenz Nov 2, 2026
d47910b
Record the nextafter outward-rounding study
zayenz Nov 2, 2026
c8b0796
Record the interval-arithmetic approach study
zayenz Nov 2, 2026
1c2c037
Plan modern classes, the heap size contract, and a native float spike
zayenz Nov 3, 2026
205ce78
Record zero-size heap requests and null-pointer library calls
zayenz Nov 3, 2026
f944da1
Give empty Action and CHB objects no element buffer and no recorder
zayenz Nov 3, 2026
df72e33
Fix the remaining zero-size heap requests and null-pointer library calls
zayenz Nov 3, 2026
299ff82
State and assert the heap size contract
zayenz Nov 3, 2026
4bf4e08
Make the shallow handles trivially copyable
zayenz Nov 3, 2026
be3e387
Inventory defaultable members, comparisons, and overload pairs
zayenz Nov 3, 2026
739a6da
Default and delete special members by tool run
zayenz Nov 4, 2026
e04916e
Use operator<=> and defaulted operator== where they keep semantics
zayenz Nov 4, 2026
90b4fc0
State when to merge overload pairs with deducing this
zayenz Nov 4, 2026
82cfd43
Spike a Gecode-native float interval library
zayenz Nov 4, 2026
3f88990
Decide on the Gecode-native interval library
zayenz Nov 4, 2026
bf8a01b
Add tasks to boost
zayenz Nov 4, 2026
30ea9ad
Add a Gecode-native interval core beside the Boost copy
zayenz Nov 4, 2026
8e0e267
Switch FloatVal and the rounding layer to the native interval
zayenz Nov 4, 2026
4bdd5e2
Remove the vendored Boost copy
zayenz Nov 4, 2026
ed1b536
Record the native interval library in the changelog
zayenz Nov 4, 2026
fff223a
Validate the native interval library across builds
zayenz Nov 4, 2026
0dcaf2c
Inventory the unscoped public enums
zayenz Nov 4, 2026
3f9a169
Record the approved enum inventory and renames
zayenz Nov 4, 2026
c9a38aa
Add tasks for the bugs the Gecode 7 areas found
zayenz Nov 4, 2026
387e693
Fix the float and set test harness slips
zayenz Nov 4, 2026
50707a2
Fix the failures from the first CI run of this branch
zayenz Nov 5, 2026
5dfcbfa
Fix realloc shrinking and failed relaxation
zayenz Nov 5, 2026
04a66b1
Reject invalid bin packing and matrix element arguments
zayenz Nov 5, 2026
e595a7d
Define the declared functions and honour assign selections
zayenz Nov 5, 2026
247514a
Fix the FlatZinc branching bugs
zayenz Nov 5, 2026
34d0e88
Clear the Doxygen warnings and explain the sanitizer overflow
zayenz Nov 5, 2026
eb36d24
Scope the public enums
zayenz Nov 5, 2026
2c1c616
Give abbreviated constants descriptive names
zayenz Nov 5, 2026
ef31fe0
Remove the (void) parameter lists
zayenz Nov 5, 2026
a53bfb5
Enable the clang-tidy checks that already pass
zayenz Nov 6, 2026
853e253
Round the TSP distances with llround
zayenz Nov 6, 2026
255251b
Reject reserved identifiers
zayenz Nov 6, 2026
0ff555b
Enable the pointer iteration order check
zayenz Nov 6, 2026
987e38b
Copy region heap blocks with std::copy_n
zayenz Nov 6, 2026
4a884ac
Compare strcmp results explicitly
zayenz Nov 6, 2026
32d35e1
Mark the deliberate grandparent calls in set LDSB
zayenz Nov 6, 2026
33d832d
Make the CRTP base constructors private
zayenz Nov 6, 2026
1ae3dbe
Move assignments out of if conditions
zayenz Nov 6, 2026
7d78422
Return a non-const reference to *this from assignment
zayenz Nov 6, 2026
10c5a58
Handle self-assignment explicitly
zayenz Nov 6, 2026
817dbb3
Point at const data in the sparse tuple loops
zayenz Nov 6, 2026
aa85993
Define header functions and variables inline
zayenz Nov 6, 2026
1075257
Drop the anonymous namespace from the cumulatives header
zayenz Nov 6, 2026
09664bb
Keep overrides at the visibility of the base
zayenz Nov 6, 2026
10505ba
Remove expressions with equivalent operands
zayenz Nov 6, 2026
48e0e73
Say why catch blocks are empty
zayenz Nov 6, 2026
7a10d3a
Enable the exception escape check for destructors
zayenz Nov 6, 2026
38c17e8
Drop static from anonymous namespaces
zayenz Nov 6, 2026
7d516e7
Test containers with empty
zayenz Nov 6, 2026
cf7c995
Test membership with contains
zayenz Nov 6, 2026
c105474
Remove casts to the same type
zayenz Nov 6, 2026
a2c1e4d
Use ifdef and ifndef for single macros
zayenz Nov 6, 2026
a2c9e41
Call static members through their class
zayenz Nov 6, 2026
eaab0d7
Remove redundant member initializers
zayenz Nov 6, 2026
1072599
Remove redundant parentheses
zayenz Nov 6, 2026
2d91c3f
Remove empty string initializers
zayenz Nov 6, 2026
a44934b
Remove const from returned values
zayenz Nov 6, 2026
5e011c7
Remove const from parameters in declarations
zayenz Nov 6, 2026
9c6b9ae
Use data() for the address of container contents
zayenz Nov 6, 2026
7831095
Remove redundant control flow
zayenz Nov 6, 2026
ab7ae1f
Write literal suffixes in upper case
zayenz Nov 6, 2026
3a80815
Spell out auto pointers
zayenz Nov 6, 2026
7215280
Remove redundant smart pointer get calls
zayenz Nov 6, 2026
bd07442
Clamp with std::min and std::max
zayenz Nov 6, 2026
80d0865
Do not return void expressions
zayenz Nov 6, 2026
f71c57d
Brace the branches of an if consistently
zayenz Nov 6, 2026
c299c39
Remove repeated access specifiers
zayenz Nov 6, 2026
310bfd8
Use the trait aliases and variable templates
zayenz Nov 6, 2026
4a3d260
Create unique pointers with make_unique
zayenz Nov 6, 2026
324b32a
Create shared pointers with make_shared
zayenz Nov 6, 2026
fa8f28f
Construct container elements in place
zayenz Nov 6, 2026
feb81b6
Use raw string literals for escaped text
zayenz Nov 6, 2026
4a2847b
Use starts_with and ends_with
zayenz Nov 6, 2026
74300d6
Use range-based for loops
zayenz Nov 6, 2026
e3f71ae
Keep generated tables free of redundant expressions
zayenz Nov 6, 2026
19e45b0
Default special members made trivial by earlier changes
zayenz Nov 6, 2026
88d8c33
Compare mixed-sign integers with std::cmp functions
zayenz Nov 6, 2026
cdd420b
Replace typedef with using
zayenz Nov 6, 2026
8be6b0b
Drop typename where C++20 no longer needs it
zayenz Nov 6, 2026
9255c21
Use range algorithms
zayenz Nov 6, 2026
a1e3142
Use transparent functors
zayenz Nov 6, 2026
1b3c4fd
Use initializer lists for nested min and max
zayenz Nov 6, 2026
b83078b
Constrain the Boolean expression templates with a concept
zayenz Nov 6, 2026
abf9b08
Take read-only array parameters as pointers to const
zayenz Nov 6, 2026
38185ba
Drop else after return
zayenz Nov 6, 2026
ed20217
Simplify Boolean returns and assignments
zayenz Nov 6, 2026
df01fa0
Use the same parameter names in declarations and definitions
zayenz Nov 6, 2026
d926cd3
Check call arguments for likely swaps
zayenz Nov 6, 2026
f1aa11a
Use nested namespace definitions
zayenz Nov 6, 2026
97f0ac6
Replace C-style casts
zayenz Nov 6, 2026
1421089
Make the LDSB test helper a variadic template
zayenz Nov 6, 2026
fab2e8a
Enable checks from other groups that already pass
zayenz Nov 6, 2026
3493c9c
Keep malloc inside the heap allocator
zayenz Nov 6, 2026
6c60a7b
Remove the default argument from a virtual function
zayenz Nov 6, 2026
c009ea0
Discard unused C library results explicitly
zayenz Nov 6, 2026
26af9e5
Check that rvalue reference parameters are moved
zayenz Nov 6, 2026
c846b63
Derive exceptions from std::exception
zayenz Nov 6, 2026
71dfb36
Give BranchPlugin a virtual destructor
zayenz Nov 6, 2026
d9375ab
Give file-local functions internal linkage
zayenz Nov 6, 2026
03352bb
Enable the analyzer groups that fit
zayenz Nov 7, 2026
60a12cb
Fix what the full lint found in sources and headers
zayenz Nov 7, 2026
dea50d0
Lint the FlatZinc parser and lexer actions
zayenz Nov 7, 2026
704e4fd
Document the clang-tidy check selection
zayenz Nov 7, 2026
306ca4a
Remove a stray blank line from the unary test
zayenz Nov 7, 2026
31ee3ed
Fix the MSVC builds
zayenz Nov 7, 2026
4b17630
Qualify the matrix slice conversion for MSVC again
zayenz Nov 7, 2026
e93f565
Build the manual Windows consumer as C++23
zayenz Nov 7, 2026
bb0af29
Remove the zdev records from the pull request
zayenz Nov 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 17 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Use clang-format 22; see docs/code-style.md.
BasedOnStyle: LLVM
IndentWidth: 4
ContinuationIndentWidth: 4
AccessModifierOffset: -4
ColumnLimit: 120
NamespaceIndentation: All
CompactNamespaces: true
BreakBeforeBraces: Attach
BreakAfterReturnType: AllDefinitions
PointerAlignment: Left
ReferenceAlignment: Left
SortIncludes: Never
ReflowComments: IndentOnly
AllowShortFunctionsOnASingleLine: Empty
BreakTemplateDeclarations: Yes
AttributeMacros: [forceinline]
125 changes: 125 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Use clang-tidy 22. Each group below is enabled as a whole, and a line that
# starts with a minus excludes a check that was tried and does not fit. The
# reasons are in docs/code-style.md. Checks from other groups are named one by
# one, because most of those groups are aliases of checks enabled here.
Checks: >-
-*,
clang-analyzer-core.*,
clang-analyzer-cplusplus.*,
-clang-analyzer-cplusplus.NewDeleteLeaks,
clang-analyzer-deadcode.*,
clang-analyzer-nullability.*,
clang-analyzer-optin.*,
-clang-analyzer-optin.core.EnumCastOutOfRange,
-clang-analyzer-optin.cplusplus.UninitializedObject,
-clang-analyzer-optin.performance.Padding,
clang-analyzer-security.*,
-clang-analyzer-security.ArrayBound,
clang-analyzer-unix.*,
-clang-analyzer-unix.Malloc,
clang-analyzer-valist.*,
cert-err33-c,
google-default-arguments,
cppcoreguidelines-no-malloc,
cppcoreguidelines-rvalue-reference-param-not-moved,
cppcoreguidelines-misleading-capture-default-by-value,
cppcoreguidelines-missing-std-forward,
google-build-explicit-make-pair,
google-global-names-in-headers,
hicpp-exception-baseclass,
bugprone-*,
-bugprone-branch-clone,
-bugprone-derived-method-shadowing-base-method,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-inc-dec-in-conditions,
-bugprone-macro-parentheses,
-bugprone-multi-level-implicit-pointer-conversion,
-bugprone-narrowing-conversions,
-bugprone-signed-char-misuse,
-bugprone-switch-missing-default-case,
-bugprone-throwing-static-initialization,
-bugprone-unchecked-string-to-number-conversion,
concurrency-*,
-concurrency-mt-unsafe,
misc-*,
-misc-confusable-identifiers,
-misc-const-correctness,
-misc-header-include-cycle,
-misc-include-cleaner,
-misc-multiple-inheritance,
-misc-new-delete-overloads,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-static-assert,
-misc-use-anonymous-namespace,
modernize-*,
-modernize-avoid-c-arrays,
-modernize-pass-by-value,
-modernize-return-braced-init-list,
-modernize-use-auto,
-modernize-use-default-member-init,
-modernize-use-designated-initializers,
-modernize-use-nodiscard,
-modernize-use-std-numbers,
-modernize-use-trailing-return-type,
performance-*,
-performance-enum-size,
-performance-no-int-to-ptr,
portability-*,
-portability-template-virtual-member-function,
readability-*,
-readability-avoid-nested-conditional-operator,
-readability-braces-around-statements,
-readability-convert-member-functions-to-static,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-identifier-length,
-readability-implicit-bool-conversion,
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-make-member-function-const,
-readability-math-missing-parentheses,
-readability-named-parameter,
-readability-redundant-declaration,
-readability-use-anyofallof
WarningsAsErrors: '*'
HeaderFilterRegex: '(gecode|test|examples|tools)/'
ExcludeHeaderFilterRegex: 'gecode/flatzinc/(parser\.tab\.(cpp|hpp)|lexer\.yy\.cpp)$'
FormatStyle: file

CheckOptions:
# Explicit discards document intentional ownership handoffs.
bugprone-unused-return-value.AllowCastToVoid: true
bugprone-empty-catch.IgnoreCatchWithKeywords: 'Expected;Ignored'
# main reports nothing useful by catching, and the move members this
# reports are implicit ones of value types and lambdas.
bugprone-exception-escape.CheckMain: false
bugprone-exception-escape.CheckMoveMemberFunctions: false
# glibc needs this feature macro defined before any system header.
bugprone-reserved-identifier.AllowedIdentifiers: '_GNU_SOURCE'
cert-err33-c.AllowCastToVoid: true
# Checking functions finds the real cases; classes and test registration
# objects in .cpp files would only need wrapping in anonymous namespaces.
misc-use-internal-linkage.AnalyzeTypes: false
misc-use-internal-linkage.AnalyzeVariables: false
# De Morgan rewrites do not make these conditions easier to read.
readability-simplify-boolean-expr.SimplifyDeMorgan: false
# Sites without a fix-it declare variables in the condition.
readability-else-after-return.WarnOnUnfixable: false
readability-identifier-naming.FunctionCase: lower_case
readability-identifier-naming.MethodCase: lower_case
readability-identifier-naming.VariableCase: lower_case
readability-identifier-naming.MemberCase: lower_case
readability-identifier-naming.ParameterCase: lower_case
readability-identifier-naming.EnumConstantCase: UPPER_CASE
readability-identifier-naming.ConstantCase: lower_case
# Constants and functions standing for constant values, such as
# ME_INT_VAL, ES_SUBSUMED, and INT_VAR_SIZE_MIN, may use UPPER_CASE.
readability-identifier-naming.ConstantIgnoredRegexp: '^(_?[a-z][a-z0-9_]*|[a-z][a-z0-9_]*_|[A-Z][A-Z0-9_]*)$'
readability-identifier-naming.FunctionIgnoredRegexp: '^(_[a-z][a-z0-9_]*|[A-Z][A-Z0-9_]*)$'
readability-identifier-naming.MethodIgnoredRegexp: '^(_[a-z][a-z0-9_]*|[A-Z][A-Z0-9_]*)$'
readability-identifier-naming.VariableIgnoredRegexp: '^(_[a-z][a-z0-9_]*|[a-z][a-z0-9_]*_)$'
readability-identifier-naming.MemberIgnoredRegexp: '^(_[a-z][a-z0-9_]*|[a-z][a-z0-9_]*_)$'
readability-identifier-naming.ParameterIgnoredRegexp: '^(_[a-z][a-z0-9_]*|[a-z][a-z0-9_]*_)$'
readability-identifier-naming.EnumConstantIgnoredRegexp: '^[A-Z][A-Z0-9_]*_$'
17 changes: 9 additions & 8 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# EditorConfig file for Gecode
# See https://EditorConfig.org for more information about the .editorconfig format

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
Expand All @@ -13,6 +8,12 @@ charset = utf-8
indent_style = space
indent_size = 2

# Makefiles need to use Tab indentation
[Makefile*]
indent_style = tab
[*.{c,cc,cpp,cxx,h,hh,hpp,hxx,lxx,yxx,vis}]
indent_size = 4
max_line_length = 120

[*.py]
indent_size = 4

[{CMakeLists.txt,*.cmake,*.yml,*.yaml}]
indent_size = 2
2 changes: 1 addition & 1 deletion .github/ci/32-bit-linkage-smoke.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ EOF
cat > "$consumer_dir/main.cpp" <<'EOF'
#include <gecode/search.hh>

int main(void) {
int main() {
Gecode::Search::Statistics statistics;
Gecode::Search::Options options;

Expand Down
118 changes: 0 additions & 118 deletions .github/ci/autoconf-install-smoke.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ci/cmake-consumer-smoke-msys2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cat > "$work/main.cpp" <<'EOF'
#include <gecode/int.hh>
#include <gecode/support/config.hpp>

int main(void) {
int main() {
Gecode::IntArgs values(1);
values[0] = 0;
return values[0];
Expand Down
6 changes: 3 additions & 3 deletions .github/ci/cmake-consumer-smoke-vcpkg.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ target_link_libraries(consumer_a PRIVATE Gecode::gecode)
'@ | Set-Content -Encoding utf8 (Join-Path $work "a\CMakeLists.txt")
@'
#include <gecode/support/config.hpp>
int main(void) { return 0; }
int main() { return 0; }
'@ | Set-Content -Encoding utf8 (Join-Path $work "a\main.cpp")

@'
Expand All @@ -61,7 +61,7 @@ target_link_libraries(consumer_b PRIVATE Gecode::gecodedriver)
'@ | Set-Content -Encoding utf8 (Join-Path $work "b\CMakeLists.txt")
@'
#include <gecode/driver.hh>
int main(void) {
int main() {
Gecode::Options options("consumer_b");
return options.model();
}
Expand Down Expand Up @@ -103,7 +103,7 @@ target_link_libraries(consumer_d PRIVATE Gecode::gecodefloat)
#error "Expected installed Gecode package to enable MPFR"
#endif
#include <gecode/float.hh>
int main(void) {
int main() {
Gecode::Float::Rounding rounding;
return rounding.exp_down(1.0) > 0.0 ? 0 : 1;
}
Expand Down
10 changes: 4 additions & 6 deletions .github/ci/cmake-consumer-smoke.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ target_link_libraries(consumer_a PRIVATE Gecode::gecode)
'@ | Set-Content -Encoding utf8 (Join-Path $work "a\CMakeLists.txt")
@'
#include <gecode/support/config.hpp>
int main(void) { return 0; }
int main() { return 0; }
'@ | Set-Content -Encoding utf8 (Join-Path $work "a\main.cpp")

@'
Expand All @@ -46,7 +46,7 @@ target_link_libraries(consumer_b PRIVATE Gecode::gecodedriver)
'@ | Set-Content -Encoding utf8 (Join-Path $work "b\CMakeLists.txt")
@'
#include <gecode/driver.hh>
int main(void) {
int main() {
Gecode::Options options("consumer_b");
return options.model();
}
Expand Down Expand Up @@ -125,15 +125,13 @@ find_library(GECODE_SUPPORT_LIBRARY
NO_DEFAULT_PATH
REQUIRED)
add_executable(manual_consumer main.cpp)
target_compile_features(manual_consumer PRIVATE cxx_std_23)
target_include_directories(manual_consumer PRIVATE "${GECODE_INCLUDE_DIR}")
target_link_libraries(manual_consumer PRIVATE "${GECODE_SUPPORT_LIBRARY}")
'@ | Set-Content -Encoding utf8 (Join-Path $work "manual\CMakeLists.txt")
@'
#include <gecode/support.hh>
#ifndef GECODE_NO_AUTOLINK
#error "CMake-installed headers must disable legacy MSVC auto-linking"
#endif
int main(void) {
int main() {
(void) Gecode::Support::hwrnd();
return 0;
}
Expand Down
Loading
Loading