From ea9dca72105fd371084cfb6328d65d9a4dce4935 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 6 Jun 2024 17:00:10 -0700 Subject: [PATCH 01/10] build/pkgs/tdlib: Update to 0.9.2+a494876a8b168b50fc1dfca2f26b6e10878158b6) --- build/pkgs/tdlib/checksums.ini | 7 ++++--- build/pkgs/tdlib/package-version.txt | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build/pkgs/tdlib/checksums.ini b/build/pkgs/tdlib/checksums.ini index 6f3275ad092..46f1d637b6d 100644 --- a/build/pkgs/tdlib/checksums.ini +++ b/build/pkgs/tdlib/checksums.ini @@ -1,3 +1,4 @@ -tarball=tdlib-VERSION.tar.gz -sha1=8e200d0e3ac009030f3ada6658d20717e433220f -sha256=5a40375e738e9e6dbd37f53e54deb1efa6b58f154d83b7bfeaee9f47d47b444b +tarball=treedec-0.9.2+VERSION.tar.gz +sha1=64190be3f6a43c0aaacc261a1024c8c3f7f1f42d +sha256=00809b5e87cb9a306c64827e6c946004d7a40d0318268dd010d42358b2c01595 +upstream_url=https://gitlab.com/freetdi/treedec/-/archive/a494876a8b168b50fc1dfca2f26b6e10878158b6/treedec-VERSION.tar.gz diff --git a/build/pkgs/tdlib/package-version.txt b/build/pkgs/tdlib/package-version.txt index af2629893df..c1e6aa23792 100644 --- a/build/pkgs/tdlib/package-version.txt +++ b/build/pkgs/tdlib/package-version.txt @@ -1 +1 @@ -0.3.1.p0 +a494876a8b168b50fc1dfca2f26b6e10878158b6 From 20bc9990b745c84e4e2267165555ae35dfa9f9ff Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 6 Jun 2024 17:02:42 -0700 Subject: [PATCH 02/10] src/sage/graphs/graph_decompositions/sage_tdlib.cpp: Apply https://gitlab.archlinux.org/archlinux/packaging/packages/sagemath/-/blob/main/sagemath-tdlib-0.9.patch\?ref_type\=heads --- src/sage/graphs/graph_decompositions/sage_tdlib.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/sage/graphs/graph_decompositions/sage_tdlib.cpp b/src/sage/graphs/graph_decompositions/sage_tdlib.cpp index 3644edf6ac7..886859e8d74 100644 --- a/src/sage/graphs/graph_decompositions/sage_tdlib.cpp +++ b/src/sage/graphs/graph_decompositions/sage_tdlib.cpp @@ -4,8 +4,8 @@ #include #include -#include "tdlib/TD_combinations.hpp" -#include "tdlib/TD_misc.hpp" +#include +#include #ifndef TD_STRUCT_VERTEX #define TD_STRUCT_VERTEX @@ -18,13 +18,6 @@ struct Vertex{ typedef boost::adjacency_list TD_graph_t; -struct bag{ - std::set bag; -}; - -typedef boost::adjacency_list TD_tree_dec_t; - - void make_tdlib_graph(TD_graph_t &G, std::vector &V, std::vector &E){ unsigned int max = 0; for(unsigned int i = 0; i < V.size(); i++) From 2a584341a98a32f99de4ae9dd2fcb745fbf38d3c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 6 Jun 2024 17:23:38 -0700 Subject: [PATCH 03/10] build/pkgs/tdlib: It is autotools, use release tarball 0.9.1 --- build/pkgs/tdlib/checksums.ini | 8 ++++---- build/pkgs/tdlib/package-version.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/pkgs/tdlib/checksums.ini b/build/pkgs/tdlib/checksums.ini index 46f1d637b6d..d31605aaa9f 100644 --- a/build/pkgs/tdlib/checksums.ini +++ b/build/pkgs/tdlib/checksums.ini @@ -1,4 +1,4 @@ -tarball=treedec-0.9.2+VERSION.tar.gz -sha1=64190be3f6a43c0aaacc261a1024c8c3f7f1f42d -sha256=00809b5e87cb9a306c64827e6c946004d7a40d0318268dd010d42358b2c01595 -upstream_url=https://gitlab.com/freetdi/treedec/-/archive/a494876a8b168b50fc1dfca2f26b6e10878158b6/treedec-VERSION.tar.gz +tarball=treedec-VERSION.tar.gz +sha1=acc463e762abb4e0138d3f0aff5886f31948644b +sha256=6df60cb7ad70f74b15db4345b78def661a999704c007d1e2fccc513ebd8e657b +upstream_url=https://gitlab.com/-/project/9712987/uploads/ca9da22b60395758e07a463cef3c17c6/treedec-VERSION.tar.gz diff --git a/build/pkgs/tdlib/package-version.txt b/build/pkgs/tdlib/package-version.txt index c1e6aa23792..f374f6662e9 100644 --- a/build/pkgs/tdlib/package-version.txt +++ b/build/pkgs/tdlib/package-version.txt @@ -1 +1 @@ -a494876a8b168b50fc1dfca2f26b6e10878158b6 +0.9.1 From 9841f9536b5d57d8b128174982d9f9a627f149ff Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 6 Jun 2024 17:41:34 -0700 Subject: [PATCH 04/10] build/pkgs/tdlib/dependencies: Add boost_cropped --- build/pkgs/tdlib/dependencies | 1 + 1 file changed, 1 insertion(+) create mode 100644 build/pkgs/tdlib/dependencies diff --git a/build/pkgs/tdlib/dependencies b/build/pkgs/tdlib/dependencies new file mode 100644 index 00000000000..d568ea3cf53 --- /dev/null +++ b/build/pkgs/tdlib/dependencies @@ -0,0 +1 @@ +boost_cropped From 5dbf340dfc411c6312aa56b00c1b90249836af7c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 6 Jun 2024 17:41:43 -0700 Subject: [PATCH 05/10] build/pkgs/tdlib/spkg-install.in: Use --without-python --- build/pkgs/tdlib/spkg-install.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/tdlib/spkg-install.in b/build/pkgs/tdlib/spkg-install.in index 9ee5b9f1566..09c5e4899a0 100644 --- a/build/pkgs/tdlib/spkg-install.in +++ b/build/pkgs/tdlib/spkg-install.in @@ -1,5 +1,5 @@ cd src -sdh_configure +sdh_configure --with-python=no sdh_make sdh_make_install -j1 From ff2a3606bbb462ec4eccf9c6b7b457de59fdfe48 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 7 Jun 2024 09:17:20 -0700 Subject: [PATCH 06/10] build/pkgs/tdlib: Update to 0.9.3 --- build/pkgs/tdlib/checksums.ini | 6 +++--- build/pkgs/tdlib/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/tdlib/checksums.ini b/build/pkgs/tdlib/checksums.ini index d31605aaa9f..36ade31259e 100644 --- a/build/pkgs/tdlib/checksums.ini +++ b/build/pkgs/tdlib/checksums.ini @@ -1,4 +1,4 @@ tarball=treedec-VERSION.tar.gz -sha1=acc463e762abb4e0138d3f0aff5886f31948644b -sha256=6df60cb7ad70f74b15db4345b78def661a999704c007d1e2fccc513ebd8e657b -upstream_url=https://gitlab.com/-/project/9712987/uploads/ca9da22b60395758e07a463cef3c17c6/treedec-VERSION.tar.gz +sha1=355930ce66a14afed89d32ead280bfdd801d53d7 +sha256=16f9683af4c33e3e79fe36439cb4bb4b63216ad88d59f5dc00dd3fb9256aa4ae +upstream_url=https://www.algok.uni-bamberg.de/treedec/treedec-VERSION.tar.gz diff --git a/build/pkgs/tdlib/package-version.txt b/build/pkgs/tdlib/package-version.txt index f374f6662e9..965065db5b8 100644 --- a/build/pkgs/tdlib/package-version.txt +++ b/build/pkgs/tdlib/package-version.txt @@ -1 +1 @@ -0.9.1 +0.9.3 From 7b5750fea27eeadf71550a5f8f575ae1256c4cd2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 7 Jun 2024 09:23:18 -0700 Subject: [PATCH 07/10] build/pkgs/tdlib/SPKG.rst: Update --- build/pkgs/tdlib/SPKG.rst | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/build/pkgs/tdlib/SPKG.rst b/build/pkgs/tdlib/SPKG.rst index ebcdd1213e0..9f4c30a3d01 100644 --- a/build/pkgs/tdlib/SPKG.rst +++ b/build/pkgs/tdlib/SPKG.rst @@ -1,32 +1,23 @@ -tdlib: Algorithms for computing tree decompositions -=================================================== +tdlib: Algorithms for computing tree decompositions of graphs +============================================================= Description ----------- -Providing algorithms concerning treedecompositions +This library, now known as treedec, +provides algorithms concerning tree decompositions. -website: https://github.com/freetdi/tdlib License ------- -GNU General Public License v2 - - -SPKG Maintainers ----------------- - -Lukas Larisch (lukas.larisch@kaust.edu.sa) +- GNU General Public License v2 +- GNU General Public License v3 Upstream Contact ---------------- -- Lukas Larisch (lukas.larisch@kaust.edu.sa) -- git-repo: https://github.com/freetdi/tdlib - -Dependencies ------------- - -- None +- https://gitlab.com/freetdi/treedec +- https://github.com/freetdi/tdlib +- https://github.com/felix-salfelder From f7d67f13e0db43ef0fd81bb8284399e9c32fc577 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 7 Jun 2024 12:23:29 -0700 Subject: [PATCH 08/10] build/pkgs/tdlib: Patch out 'incomplete' message --- build/pkgs/tdlib/package-version.txt | 2 +- ...tset.hpp-Suppress-incomplete-message.patch | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 build/pkgs/tdlib/patches/0001-src-exact_cutset.hpp-Suppress-incomplete-message.patch diff --git a/build/pkgs/tdlib/package-version.txt b/build/pkgs/tdlib/package-version.txt index 965065db5b8..998ed53f13a 100644 --- a/build/pkgs/tdlib/package-version.txt +++ b/build/pkgs/tdlib/package-version.txt @@ -1 +1 @@ -0.9.3 +0.9.3.p0 diff --git a/build/pkgs/tdlib/patches/0001-src-exact_cutset.hpp-Suppress-incomplete-message.patch b/build/pkgs/tdlib/patches/0001-src-exact_cutset.hpp-Suppress-incomplete-message.patch new file mode 100644 index 00000000000..9369b84d496 --- /dev/null +++ b/build/pkgs/tdlib/patches/0001-src-exact_cutset.hpp-Suppress-incomplete-message.patch @@ -0,0 +1,25 @@ +From f9bea896a49ef909aeb910c140661ab06b3b6a0b Mon Sep 17 00:00:00 2001 +From: Matthias Koeppe +Date: Fri, 7 Jun 2024 12:21:28 -0700 +Subject: [PATCH] src/exact_cutset.hpp: Suppress 'incomplete' message + +--- + src/exact_cutset.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/exact_cutset.hpp b/src/exact_cutset.hpp +index 782bb96..2caa7bd 100755 +--- a/src/exact_cutset.hpp ++++ b/src/exact_cutset.hpp +@@ -994,7 +994,7 @@ bool exact_cutset::try_it(T_t &T, unsigned bagsize) + }else{ + // incomplete(); //no// + // messes up random tests, send to cerr instead +- std::cerr << "incomplete ../../src/exact_cutset.hpp:978:try_it\n"; ++ // std::cerr << "incomplete ../../src/exact_cutset.hpp:978:try_it\n"; + } + + typename boost::graph_traits::vertex_iterator vIt, vEnd; +-- +2.42.0 + From 94e367160988e13e53c6c3464eb80726bc42870c Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Thu, 13 Jun 2024 12:32:13 +0100 Subject: [PATCH 09/10] test to check that #38159 is fixed --- .../graphs/graph_decompositions/tree_decomposition.pyx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sage/graphs/graph_decompositions/tree_decomposition.pyx b/src/sage/graphs/graph_decompositions/tree_decomposition.pyx index 740b07fc40b..eaf99ab9964 100644 --- a/src/sage/graphs/graph_decompositions/tree_decomposition.pyx +++ b/src/sage/graphs/graph_decompositions/tree_decomposition.pyx @@ -87,7 +87,6 @@ The treewidth of a clique is `n-1` and its treelength is 1:: - Approximation of treelength based on :meth:`~sage.graphs.graph.Graph.lex_M` - Approximation of treelength based on BFS Layering - - upgrade tdlib to 0.9.0 :issue:`30813` Methods @@ -619,6 +618,12 @@ def treewidth(g, k=None, kmin=None, certificate=False, algorithm=None, nice=Fals sage: g.treewidth(algorithm='sage', certificate=True, kmin=4) Tree decomposition: Graph on 4 vertices + Check that :issue:`38159` is fixed :: + + sage: G = Graph('I~~}vPlr_') + sage: G.treewidth(algorithm='sage') == G.treewidth(algorithm='tdlib') # optional - tdlib + True + Trivially true:: sage: graphs.PetersenGraph().treewidth(k=35) From 6b236b38bbacacdacdc76c619086c6d47a1c46af Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Thu, 13 Jun 2024 17:13:03 +0100 Subject: [PATCH 10/10] two spaces before #optional tag --- src/sage/graphs/graph_decompositions/tree_decomposition.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/graphs/graph_decompositions/tree_decomposition.pyx b/src/sage/graphs/graph_decompositions/tree_decomposition.pyx index eaf99ab9964..ce61d6e457a 100644 --- a/src/sage/graphs/graph_decompositions/tree_decomposition.pyx +++ b/src/sage/graphs/graph_decompositions/tree_decomposition.pyx @@ -621,7 +621,7 @@ def treewidth(g, k=None, kmin=None, certificate=False, algorithm=None, nice=Fals Check that :issue:`38159` is fixed :: sage: G = Graph('I~~}vPlr_') - sage: G.treewidth(algorithm='sage') == G.treewidth(algorithm='tdlib') # optional - tdlib + sage: G.treewidth(algorithm='sage') == G.treewidth(algorithm='tdlib') # optional - tdlib True Trivially true::