pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/math/cadical3



Module Name:    pkgsrc
Committed By:   drixter
Date:           Sun Nov 22 12:10:51 UTC 2026

Modified Files:
        pkgsrc/math/cadical3: Makefile distinfo
Added Files:
        pkgsrc/math/cadical3/patches: patch-src_mobical.cpp

Log Message:
cadical3: Update to version 3.1.0

Version 3.1.0
User Facing Changes:

Removed the logsort option (for sorting logging output) as it produced
issues in combination with memory fuzzing (configure --memory ...).

Build configuration change: -a and --all now imply -l, -c, and
-s but remain in Release build, i.e., the default optimizing build.
Before it changed the build to Debug build (actually as using -g).
There is further a new -r resp. --release option which corresponds to
the default Release and thus is the opposite of -g or --debug which
yields a Debug build configuration. The new -s or --symbols option
now only sets -g as compiler-flag not the GNU specific -ggdb3 (supported
by LLVM too) anymore to include a symbol table. That latter compiler option
can still be set explicitly (using also -ggdb3 as configuration option).

We finally gave up on compressed file writing as we were not able to keep it
working in a multi-threaded context in a portable way. Note, that due to
security issues we had to use a 'fork/exec' approach (for writing) which is
difficult to combine with multi-threading and signal handling. On MacOS it
stopped earlier to work but now also we have issues on Ubuntu and thus we
decided to remove that feature (and the corresponding test) completely.

Major rework of the literal importing mechanism, making it lazy everywhere.
Unused variables are not created anymore (more information below).

For models CaDiCaL now outputs only the literals that are present
in the problem. The modelalllits option allows to get all literals.

Walk and lucky are now fully compatible with assumptions
(literals propagated by the assumptions cannot be flipped anymore).

Lucky will now run if you have assumptions. For frequent incremental short
calls, this can be prohibitive. Use --no-luckyassumptions in that case as
follows. To limit that effect, when lucky is not effective, it will not be
executed for the next luckymininterval conflicts (and then still only at the
beginning of the solve call). Set this option to 0, if you want to make sure
that lucky is executed in each.

Lucky is now also limited in its runtime (in number of ticks per clauses).
Set luckylimitpercls to a higher value if needed. This limit is mostly
important for some very large instances (like
baseballcover12with23_and2positions) where lucky has a prohibitive cost.

Fixed accidental deactivation of local search initially (off by default,
activation with -L), due to a ticks limit of 0. Only noticeable if you run
the solver with -L1.

By default, all solver techniques support LRUP resolution checking (enabling
for instance interpolation directly). Exceptions are factor which requires
LRAT with extended resolution (and therefore does not interpolation) and
cover, instantiate and vivifyinst which all require less strict LRAT
checking where the antecedents subsume the learned clause.

Option '-O' accepts negative argument to decrease the amount of inprocessing.
Before only positive value were supported. Value '0' has no effect.

The output of the statistics has changed. stats now has multiple values, 0
(few statistics as previously), 1-3 (more statistics), 4 (all statistics,
similar to old default), 5 (statistics on API calls). Increasing verbosity
also increases the given stats value by that much.
Related to this, you can now deactivate some metrics with ./configure --no-metrics.

The limit and ccadical_limit API calls now takes a 64-bit integers as
argument instead of int. Only ticks, conflicts, and decisions support integers
larger than 32-bits. The options local search and preprocessing do not (by API
contract).

The option restoreflush has been removed, as flushing root-level satisfied
clauses from the reconstruction stack is not generally correct.

New and Improved Techniques:

Stronger congruence algorithm by taking more binary clauses into
account, to produce a few more units.

Improved performance of congruence closure thanks to a new hash
table instead of relying on the C++ standard one.

Improved BVA (factor), now includes XOR and ITE factorization
(factorxor[ite]) and considers learned clauses (factorredundant).

New DDFW algorithm for walking. Also removed the walk based on full
occurrences presented at POS'26, due to its limited effect.

Equivalent literals substitution (decompose) now also works on frozen
literals: those literals are replaced (but are kept via binary clauses).

Major rework of literal import:

The option reverse was renamed varprioritizefirst.

The function resize () does not declare the variables anymore, it only
reserves the space (to make allocations more efficient). The variables are
only declared if you use them (either by adding them or by some other API
operation like observe ()). This means that the behavior does not change
anymore by calling resize with more variables than expected.

Variable names do not have to be kept anymore internally. There are two
options controlling the behavior: (i) varindexorder uses the order given
by the input with potentially a different name and (ii) varkeepname
attempts to keep the names given by the input (mostly useful for
debugging). The order of decision is controlled by varprioritizefirst
(first imported variable = first decision).

Major rework of the reconstruction stack:

Improved performance of restoration and extension by separating clause data
from witness data.

Multiple clauses can now share the same witness cube.

Added the option restoredefraglim to control when clause data is
defragmented.

Major improvements to mobical:

Deterministic replaying of traces with user propagator.

Statistic summary of mobical runs (--summary).

API contract fuzzing with ./configure --except-contracts
and mobical --violate.

Developer only:

We introduced two new options (elimaggressiveGC and walkbinarylimit) that
are debug only. There are just useful to trigger more behaviors from
mobical. The effect is debug only, even if the options exists during in
release mode for mobical to behave the same.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/math/cadical3/Makefile \
    pkgsrc/math/cadical3/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/math/cadical3/patches/patch-src_mobical.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/math/cadical3/Makefile
diff -u pkgsrc/math/cadical3/Makefile:1.2 pkgsrc/math/cadical3/Makefile:1.3
--- pkgsrc/math/cadical3/Makefile:1.2   Fri Jul 24 20:27:54 2026
+++ pkgsrc/math/cadical3/Makefile       Sun Nov 22 12:10:50 2026
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.2 2026/07/24 20:27:54 wiz Exp $
+# $NetBSD: Makefile,v 1.3 2026/11/22 12:10:50 drixter Exp $
 
-DISTNAME=      cadical-3.0.1
+DISTNAME=      cadical-3.1.0
 CATEGORIES=    math
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=arminbiere/}
 GITHUB_TAG=    rel-${PKGVERSION_NOREV}
Index: pkgsrc/math/cadical3/distinfo
diff -u pkgsrc/math/cadical3/distinfo:1.2 pkgsrc/math/cadical3/distinfo:1.3
--- pkgsrc/math/cadical3/distinfo:1.2   Fri Jul 24 20:27:54 2026
+++ pkgsrc/math/cadical3/distinfo       Sun Nov 22 12:10:50 2026
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.2 2026/07/24 20:27:54 wiz Exp $
+$NetBSD: distinfo,v 1.3 2026/11/22 12:10:50 drixter Exp $
 
-BLAKE2s (cadical-3.0.1.tar.gz) = 871fd58882d77725d02be3fd6f225318f631500ae42c198a10ee4fead935d479
-SHA512 (cadical-3.0.1.tar.gz) = aa1838b58cce726776fc73cd9c54b55af2faf4389b97f672a4dcff007e62aed795ebe3f5862fd292b082e47747eb7672e076e1d5f849ff9cf6ab81210ca2b1f4
-Size (cadical-3.0.1.tar.gz) = 889912 bytes
+BLAKE2s (cadical-3.1.0.tar.gz) = bb89a61bd7918f27a1fa1c2eb4525d9ac9e202a6d9bfda9702968d29c479adb3
+SHA512 (cadical-3.1.0.tar.gz) = 457fe10eef2e1bd2756a38c7ee45c22a64f3699ec7d6fe704d962fe6592bbe79b1ddeb5994a96609d17fb2dbe56398e505e03ff31bf5833d17a0c9b985537f7c
+Size (cadical-3.1.0.tar.gz) = 1016016 bytes
+SHA1 (patch-src_mobical.cpp) = dce8e13c51e87de193aafb60092860807ea19c06

Added files:

Index: pkgsrc/math/cadical3/patches/patch-src_mobical.cpp
diff -u /dev/null pkgsrc/math/cadical3/patches/patch-src_mobical.cpp:1.1
--- /dev/null   Sun Nov 22 12:10:51 2026
+++ pkgsrc/math/cadical3/patches/patch-src_mobical.cpp  Sun Nov 22 12:10:51 2026
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_mobical.cpp,v 1.1 2026/11/22 12:10:51 drixter Exp $
+
+Use POSIX feature detection instead of APPLE checks. 
+
+--- /usr/work/amd64/wip/cadical3/work/cadical-rel-3.1.0/src/mobical.cpp.orig   2026-11-22 11:51:03.375061575 +0000
++++ /usr/work/amd64/wip/cadical3/work/cadical-rel-3.1.0/src/mobical.cpp
+@@ -269,7 +269,7 @@ void initialize_allocators () {
+   libc_realloc = reinterpret_cast<realloc_t> (dlsym (RTLD_NEXT, "realloc"));
+   libc_free = reinterpret_cast<free_t> (dlsym (RTLD_NEXT, "free"));
+ }
+-#ifdef __APPLE__
++#ifdef _POSIX_VERSION
+ __attribute__ ((section ("__DATA,__mod_init_func")))
+ #else
+ __attribute__ ((section (".preinit_array")))
+@@ -7146,7 +7146,7 @@ void Trace::child_signal_handler (int si
+ #endif
+   struct rusage u;
+   if (!getrusage (RUSAGE_SELF, &u)) {
+-#ifndef __APPLE__
++#ifndef _POSIX_VERSION
+     if ((int64_t) u.ru_maxrss >> 10 >= mobical.space_limit) {
+ #else
+     if ((int64_t) u.ru_maxrss >> 20 >= mobical.space_limit) {
+@@ -7361,7 +7361,7 @@ int Trace::fork_and_execute () {
+ 
+     // disable core dumps for faster delta-debugging.
+ #ifndef _WIN32
+-#ifdef __APPLE__
++#ifdef _POSIX_VERSION
+     rlimit limit;
+     limit.rlim_cur = 0;
+     limit.rlim_max = 0;



Home | Main Index | Thread Index | Old Index