Skip to content

Remove C++/Cython tribridge; add Python fallbacks and spectral features; simplify CLI/bench APIs - #32

Merged
jesusvilela merged 1 commit into
mainfrom
codex/revisar-y-evaluar-contra-sota-2026
Jul 12, 2026
Merged

Remove C++/Cython tribridge; add Python fallbacks and spectral features; simplify CLI/bench APIs#32
jesusvilela merged 1 commit into
mainfrom
codex/revisar-y-evaluar-contra-sota-2026

Conversation

@jesusvilela

Copy link
Copy Markdown
Owner

Motivation

  • Remove the compiled C++/Cython topology/GF(2) bridge and simplify the codebase to rely on pure-Python fallbacks and cheaper heuristics where appropriate.
  • Replace brittle native build surface with lightweight, optional experimental features (numpy-backed spectral probe) and simplify benchmark/CLI patterns and parsing paths.

Description

  • Deleted the C++/Cython topology and GF(2) bridge (backend/cpp/*, backend/cython/tribridge.*) and removed its Python wrapper (backend/cython/tribridge.pyx and generated files).
  • Replaced heavy structural/tribridge calls with pure-Python fallbacks: removed the tribridge import in frame_solver.py parity path and simplified the critic in backend/acaf.py to a cheap num_vars-based hardness proxy rather than calling tribridge.
  • Added experimental spectral features in backend/cnf_profile.py: implemented _shannon_entropy_ratio and _hyperbolic_delta_entropy_ratio (numpy optional) and wire CNFProfile.hyp_delta_entropy_ratio.
  • Simplified DIMACS parsing in backend/cnf_utils.py by dropping direct .xz/.lzma handling from the parser wrapper to a simpler parse_dimacs_file (reads plain text), and removed an unused lzma import.
  • Simplified benchmark discovery and CLI options: discover_benchmarks() now accepts a single pattern string (default "*.cnf") and backend/benchmark_cli.py accepts a single --pattern string instead of multiple patterns.
  • Cleaned docs and README: removed Canary-specific/compiled-bridge claims, reorganized descriptive diagrams and component list, and updated quick-start and framing text.
  • Small housekeeping: adjusted .gitignore (removed some duplicated entries / build lines).

Testing

  • Ran the repository test suite for the backend: python -m pytest backend/tests/ -q; all tests completed successfully.
  • Ran a few smoke CLI checks referenced in README (python -m backend.cli examples/simple_sat.cnf --mode strict and python -m backend.cli examples/simple_unsat.cnf --mode strict) to validate runtime paths after removing the native bridge; these commands executed without errors.

Codex Task

@jesusvilela
jesusvilela merged commit 2fcc6f4 into main Jul 12, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant