Update treewidth - #7
Merged
Merged
Conversation
…ator) wired to CTest
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>
Contributor
There was a problem hiding this comment.
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 newsrc/main.cppCLI.
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.
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
added a commit
that referenced
this pull request
Jul 14, 2026
Reorganisation, up-to-date CI and tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated treewidth: