Skip to content

Update treewidth - #7

Merged
smaniu merged 12 commits into
masterfrom
modern-treewidth
Jul 14, 2026
Merged

Update treewidth#7
smaniu merged 12 commits into
masterfrom
modern-treewidth

Conversation

@smaniu

@smaniu smaniu commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Updated treewidth:

  • added CI workflows for Linux and MacOS, to replace the obsolete Travis
  • reorganised the code in folders
  • added Catch2 test and replaced make with CMake
  • added correct link to Zenodo datasets instead of the dead institutional link

smaniu and others added 10 commits July 11, 2026 17:40
Adds a macOS job matrix (build-and-test + sanitizers) alongside the
existing Linux one. GitHub Actions badges are per-workflow-file, so the
ci.yml workflow is split into ci-linux.yml and ci-macos.yml to get
separate Linux/macOS status badges in the README. Also documents how to
build and run the test suite locally.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@smaniu
smaniu requested a review from Copilot July 14, 2026 03:09
@smaniu smaniu changed the title Modern treewidth Update treewidth Jul 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the treewidth project by migrating away from Travis/Make-based builds to a CMake + GitHub Actions setup, reorganizing the code under include/treewidth/ + src/, and introducing a Catch2-based CTest suite to validate core graph operations and decomposition behavior.

Changes:

  • Replace Make/Travis with CMake build + GitHub Actions CI for Linux and macOS (including sanitizer builds).
  • Add a Catch2 test suite (graph ops, upper/lower bounds, decomposition serialization/validation).
  • Reorganize implementation into header-based components under include/treewidth/ and a new src/main.cpp CLI.

Reviewed changes

Copilot reviewed 16 out of 33 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/test_upper.cpp Adds upper-bound tests and decomposition validity checks.
tests/test_serialization.cpp Adds serialization tests for Bag and decomposition header.
tests/test_lower.cpp Adds lower-bound tests and documents excluded buggy paths.
tests/test_graph.cpp Adds unit tests for Graph operations (add/remove/fill/contract).
tests/graph_builders.h Adds deterministic in-process graph constructors for tests.
tests/decomposition_check.h Adds .dec parser + tree decomposition property validation.
tests/CMakeLists.txt Defines the Catch2 test executable and registers it with CTest.
tests/catch_main.cpp Provides the Catch2 main translation unit.
src/main.cpp Introduces the CLI entrypoint for upper/lower bound computation.
README.md Updates build/test instructions and CI badges for the new toolchain.
Makefile Removes obsolete Makefile build.
include/treewidth/TreeDecomposition.h Makes operator<< inline for header inclusion safety.
include/treewidth/PermutationStrategy.h Adds permutation strategy base for heuristics.
include/treewidth/MetaLowerBoundHeuristic.h Adds base type for meta lower-bound heuristics.
include/treewidth/MCSPermutationStrategy.h Adds MCS permutation strategy (currently problematic).
include/treewidth/LowerBoundMMD.h Adds MMD lower-bound implementation.
include/treewidth/LowerBound.h Adds lower-bound interfaces + MMD+ implementation.
include/treewidth/LBNPlus.h Adds LBN+ meta heuristic.
include/treewidth/LBN.h Adds LBN meta heuristic.
include/treewidth/Graph.h Adds Graph implementation used across algorithms and tests.
include/treewidth/FillInPermutationStrategy.h Adds min-fill-in permutation strategy.
include/treewidth/Delta2D.h Adds Delta2D lower-bound implementation.
include/treewidth/DegreePermutationStrategy.h Adds min-degree permutation strategy.
include/treewidth/DegreeFillInPermutationStrategy.h Adds degree+fill-in permutation strategy.
include/treewidth/common.h Adds timestamp helper for CLI timing output.
include/treewidth/CE.h Adds contraction engine used by some meta heuristics.
include/treewidth/Bag.h Makes operator<< inline for header inclusion safety.
CMakeLists.txt Adds top-level CMake project, library target, executable, tests, sanitizers.
.travis.yml Removes obsolete Travis CI configuration.
.gitignore Adds ignores for build outputs and local notes/docs.
.github/workflows/ci-macos.yml Adds macOS CI workflow for build/test + sanitizers.
.github/workflows/ci-linux.yml Adds Linux CI workflow (gcc/clang matrix) for build/test + sanitizers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_upper.cpp Outdated
Comment thread tests/test_upper.cpp Outdated
Comment thread tests/test_lower.cpp Outdated
Comment thread tests/graph_builders.h Outdated
smaniu and others added 2 commits July 14, 2026 11:27
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@smaniu
smaniu merged commit f2b7f8d into master Jul 14, 2026
10 checks passed
smaniu added a commit that referenced this pull request Jul 14, 2026
Reorganisation, up-to-date CI and tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants