TRANSMISSION // 2605.24845v2
A declarative route to exact combinatorial counts
Source published
Cofola translates structured counting problems into weighted first-order logic, aiming to make exact counting reusable and less error-prone. Its reported benchmarks cover a particular test set, and its proof applies only to a supported fragment.

How many ways can choices satisfy a web of constraints? A system called Cofola aims to answer such questions by translating problem descriptions into a formal language that existing exact-counting algorithms can process.
Counting valid arrangements is harder than it may sound. Choices often depend on one another: an assignment must obey rules, a sequence may have ordering constraints, or a collection may contain repeated items. Writing a separate counting method for each problem can be fragile, especially when a specification changes.
In an arXiv preprint, Yuanhong Wang and colleagues introduce Cofola, a declarative language for describing counting problems involving sets, bags (collections that allow duplicates), tuples, sequences, partitions and compositions. The goal is to describe what counts as a valid object, then translate that description into a reusable mathematical framework rather than build a new counting procedure for every problem.
That framework is weighted first-order model counting, or WFOMC. In plain terms, it represents objects and their relationships using logical statements, then computes a weighted count of the satisfying interpretations: the weights attached to possible interpretations contribute to the result. Some WFOMC algorithms can exploit symmetry among interchangeable elements, avoiding the need to enumerate every possible assignment. The abstract says these algorithms can run in polynomial time as the domain grows for fixed logical sentences in tractable fragments. That is not a promise of fast performance for every counting problem.
The central technical challenge is translation: the logical representation must preserve exactly the number of objects in the original problem. The authors describe compiling Cofola specifications into symbolic WFOMC using relational encodings, polynomial weights and decoding rules. They report a proof of exact count preservation for a supported fragment, assuming exact symbolic computation. For multisets, they also propose an optional factorization that shares multiplicity symbols across interchangeable entities, and report that it preserves counts under their method.
The abstract reports tests on 695 real, synthetic and growing-domain instances. The WFOMC pipeline solved 675 within a limit of 100 seconds per run and, according to the authors, outperformed four alternative counting pipelines. In a separate controlled test, the bag factorization increased coverage from 13 cases to all 32 expanded multi-type bag instances. These are results on the tested instances, not evidence that Cofola handles every form of combinatorial counting or will be faster on other workloads.
The promise is a more systematic bridge between a specification and exact counting. But the evidence available for this article is the paper’s abstract, not its full methods, benchmark details or comparison results. The source is an arXiv preprint; the abstract alone does not establish its review history. The proof is explicitly limited to a supported fragment and exact symbolic computation, and the reported tests do not establish practical performance beyond the cases described.
- combinatorial counting
- weighted first-order model counting
- WFOMC
- Cofola
- formal methods
- exact algorithms
Reviewed cross-references
These connections were reviewed by a model, not independently fact-checked by a human. Similarity does not imply agreement; consult the original papers and the evidence below.
Adding rules to AI does not guarantee it understands them
Supporting evidence: Both papers qualify the practical cost of exact symbolic counting: Cofola reports runtime gaps and notes that polynomial data complexity for fixed sentences does not bound symbolic polynomial arithmetic, while the neurosymbolic-AI perspective notes that exact weighted model counting is #P-hard and compilation can incur exponential growth. These are compatible cautions, not a direct performance comparison; they concern different methods and settings.
Model review: · openai-codex/gpt-6-luna
Evidence and provenance
Selected excerpts, not complete papers. PDF extraction can omit figures or damage equations, tables and reading order; sources may be preprints.
2605.24845v2 — Original paper
Excerpt reference:
static/papers/2605.24845v2.md:3904-3923
Basis: Paper text
Source file SHA-256:da41783b91d82ae1ac035a5012c0e7a31ef0a580fecc70ed64a241286b15fab72611.09356v1 — Original paper
Excerpt reference:
static/papers/2611.09356v1.md:260-277
Basis: Paper text
Source file SHA-256:ebff41d050b789272addcb3fc2630ac50dcd7170328a0719b743018c7cb41045
Related reading
Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.
One mathematical representation for quantum loops
Source published
Shared keywords: formal methods
How symbolic memory can support safe strategy synthesis
Source published
Shared keywords: formal methods
A mathematical framework for spatial reasoning in biomedical images
Source published
Shared keywords: formal methods
A New SAT/SMT Framework for Quantum Programs
Source published
Shared keywords: formal methods
Teaching AI teams to react to adversaries with logic
Source published
Shared keywords: formal methods