Papers
Topics
Authors
Recent
Search
2000 character limit reached

ASP-FZN: CASP Solver via FlatZinc

Updated 7 July 2026
  • ASP-FZN is a translation-based solver for Constraint Answer Set Programming that extends ASP with linear and global constraints.
  • It translates CASP programs into FlatZinc using ranking and supportedness constraints, enabling integration with CP, lazy clause, and MIP backends.
  • Empirical evaluations show ASP-FZN performs competitively on plain ASP and CASP benchmarks, with trade-offs between strict and non-strict ranking approaches.

Searching arXiv for the specified paper to ground the article in the current record. ASP-FZN is a translation-based solver for Constraint Answer Set Programming (CASP) that extends Answer Set Programming (ASP) with linear constraints and translates CASP programs into the solver-independent FlatZinc language, thereby enabling the use of several Constraint Programming and Integer Programming backend solvers (Eiter et al., 30 Jul 2025). In the formulation presented by Eiter et al., the system combines ASP grounding through gringo’s theory interface with a FlatZinc compilation pipeline and backend solving via MiniZinc, while supporting a rich language of linear constraints, some common global constraints, and optimization over both ASP atoms and linear terms (Eiter et al., 30 Jul 2025).

1. Formal CASP framework

A CASP program PP in ASP-FZN extends ordinary ground ASP by three classes of constructs: domain constraints of the form v[l,u]v \in [l,u] for a linear integer variable vv; linear constraints of the form aw1v1++wnvnga \leftrightarrow w_1 \cdot v_1 + \cdots + w_n \cdot v_n \circ g, where aa is a Boolean atom, the viv_i are integer variables, wi,gZw_i,g \in \mathbb{Z}, and {<,>,=,,,}\circ \in \{<,>,=,\neq,\le,\ge\}; and global constraints represented as theory atoms via gringo’s interface, namely alldifferent, disjoint, and cumulative (Eiter et al., 30 Jul 2025).

Semantically, ASP-FZN uses an extended interpretation I=(I,δ)\mathcal{I}=(I,\delta), where IAtomsI \subseteq \mathrm{Atoms} assigns truth values to propositional atoms and v[l,u]v \in [l,u]0 assigns integers to CASP variables. The semantics requires that every domain constraint v[l,u]v \in [l,u]1 holds, that each linear constraint v[l,u]v \in [l,u]2 satisfies the stated equivalence between atom membership and arithmetic truth, and that v[l,u]v \in [l,u]3 is an answer set of the propositional part v[l,u]v \in [l,u]4 obtained by treating each linear constraint as a theory atom (Eiter et al., 30 Jul 2025). When minimization statements are present, either in the form min a₁:w₁, …, aₖ:wₖ or min v₁·w₁+⋯+vₙ·wₙ, ASP-FZN selects an extended interpretation minimizing the corresponding weighted sum (Eiter et al., 30 Jul 2025).

This design places ASP-FZN within the CASP line of work in which stable-model reasoning over propositional structure is coupled to numeric feasibility over integer variables. A plausible implication is that the formal split between v[l,u]v \in [l,u]5 and v[l,u]v \in [l,u]6 is central to the translation architecture, because it permits propositional supportedness and ranking conditions to be expressed alongside reified arithmetic constraints in FlatZinc.

2. Translation into FlatZinc

ASP-FZN first uses gringo’s theory interface to ground a program into ASPIF with theory atoms for linear and global constraints, and then applies the translation

v[l,u]v \in [l,u]7

into a low-level FlatZinc model (Eiter et al., 30 Jul 2025). The translation therefore combines ranking constraints, per-rule encodings, and supportedness constraints in a single target representation.

The ranking component v[l,u]v \in [l,u]8 introduces, for each atom v[l,u]v \in [l,u]9 in a non-trivial SCC, an integer variable vv0 and enforces

vv1

so that vv2 exactly when vv3 (Eiter et al., 30 Jul 2025). For each positive dependency vv4 in the SCC, a Boolean vv5 is added together with

vv6

To guarantee that rankings are strict and gap-free, ASP-FZN further introduces auxiliary atoms vv7 and vv8 via

vv9

The body translation distinguishes several rule classes. For a constraint rule with normal body, ASP-FZN emits the clausal FlatZinc constraint

aw1v1++wnvnga \leftrightarrow w_1 \cdot v_1 + \cdots + w_n \cdot v_n \circ g0

For a weighted-body constraint

aw1v1++wnvnga \leftrightarrow w_1 \cdot v_1 + \cdots + w_n \cdot v_n \circ g1

the translation uses the pseudo-Boolean constraint

aw1v1++wnvnga \leftrightarrow w_1 \cdot v_1 + \cdots + w_n \cdot v_n \circ g2

When the rule has a nonempty head, an auxiliary Boolean aw1v1++wnvnga \leftrightarrow w_1 \cdot v_1 + \cdots + w_n \cdot v_n \circ g3 is introduced. In the tight case, ASP-FZN applies Clark completion through

aw1v1++wnvnga \leftrightarrow w_1 \cdot v_1 + \cdots + w_n \cdot v_n \circ g4

or, for weighted bodies,

aw1v1++wnvnga \leftrightarrow w_1 \cdot v_1 + \cdots + w_n \cdot v_n \circ g5

In the non-tight case, the translation refines aw1v1++wnvnga \leftrightarrow w_1 \cdot v_1 + \cdots + w_n \cdot v_n \circ g6 into internal and external support booleans and combines them with ranking-based conditions through formulas (12)–(14), including an auxiliary aw1v1++wnvnga \leftrightarrow w_1 \cdot v_1 + \cdots + w_n \cdot v_n \circ g7, the disjunctive condition aw1v1++wnvnga \leftrightarrow w_1 \cdot v_1 + \cdots + w_n \cdot v_n \circ g8, and the definition aw1v1++wnvnga \leftrightarrow w_1 \cdot v_1 + \cdots + w_n \cdot v_n \circ g9 (Eiter et al., 30 Jul 2025).

For heads, ASP-FZN introduces support atoms aa0 for each aa1. In normal, disjunctive, or choice heads, it uses

aa2

when the head is singleton or aa3 is locally tight, and

aa4

for disjunctions (Eiter et al., 30 Jul 2025). It also imposes the rule-satisfaction condition

aa5

Finally, supportedness is enforced globally by

aa6

The paper states that Theorems 4.6–4.8 prove that, for head-cycle-free aa7, the models of aa8 correspond one-to-one to the CASP answer sets of aa9 under this reified, ranking, and completion embedding (Eiter et al., 30 Jul 2025). This establishes the translation not merely as an implementation device but as a semantic reduction.

3. Supported language and encodings

ASP-FZN’s input language, exposed via gringo theory syntax, supports integer variables and domain constraints through &dom{l..u}=v; linear constraints through &sum{…}=g or the relations ≤, ≥, ≠, <, >; minimization on ASP atoms with #minimize{…}; minimization on linear sums with &minimize{…}; and the global constraints &distinct{v₁,…,vₙ}, &disjoint{start(J)@dur(J)}, and &cumulative{(s,l,r)} ≤ G (Eiter et al., 30 Jul 2025).

These constructs are compiled into FlatZinc via reified primitives. Each &sum is expanded into reified linear constraints as in formulas (9)–(11). Each &distinct becomes a sequence of pairwise inequality constraints viv_i0. Each &disjoint is flattened into the FlatZinc global propagator constraint disjoint(...), and each &cumulative into cumulative(...) (Eiter et al., 30 Jul 2025). Minimization objectives over atoms and variables are collected into a single FlatZinc objective by summing weak-constraint weights and linear terms.

The following table summarizes the language features explicitly listed in the source.

Construct Input form FlatZinc-oriented encoding
Domain constraint &dom{l..u}=v Integer variable with domain
Linear constraint &sum{…}=g, ≤, ≥, ≠, <, > Reified linear constraints
Atom minimization #minimize{…} Single summed objective
Linear minimization &minimize{…} Single summed objective
Distinctness &distinct{v₁,…,vₙ} Pairwise inequalities
Disjointness &disjoint{start(J)@dur(J)} constraint disjoint(...)
Cumulative resource bound &cumulative{(s,l,r)} ≤ G cumulative(...)

A notable aspect of the language support is that some global constraints are preserved at the FlatZinc level rather than decomposed entirely into primitive linear constraints. This suggests that ASP-FZN is designed to leverage backend propagators where available, while still expressing propositional ASP structure through a uniform reified encoding.

4. Architecture and backend integration

ASP-FZN is implemented in Rust and consists of three stages: grounding from non-ground files to ASPIF plus theory atoms via gringo; translation from ASPIF plus theory atoms to FlatZinc via viv_i1; and solving from FlatZinc through MiniZinc to a chosen backend solver (Eiter et al., 30 Jul 2025). Supported backends include CP-SAT from OR-Tools, Chuffed as a lazy-clause-generation CP solver, and Gurobi as a MIP backend (Eiter et al., 30 Jul 2025).

By default, ASP-FZN invokes MiniZinc 2.9.2 to drive the selected solver, with solver identifiers such as --solver-id cp-sat, org.chuffed.chuffed, and gurobi (Eiter et al., 30 Jul 2025). The system supports both strict and non-strict ranking. Strict ranking enforces a one-to-one mapping, whereas non-strict ranking may collapse multiple rankings to one flat solution (Eiter et al., 30 Jul 2025). Minimization is handled through the FlatZinc objective, and output can take the form of enumeration of all answer sets or optimization search (Eiter et al., 30 Jul 2025).

This architecture is solver-independent at the FlatZinc interface, but not solver-agnostic in performance terms. The availability of CP, lazy-clause-generation CP, and MIP backends implies that ASP-FZN can expose the same translated model to substantially different solving paradigms. A plausible implication is that the quality of the translation, particularly the amount of auxiliary structure induced by rankings and supportedness, strongly influences which backend performs best.

5. Empirical performance

The evaluation reported for ASP-FZN has two parts: plain ASP benchmarks from recent ASP competitions and several CASP problems from the literature (Eiter et al., 30 Jul 2025). For plain ASP, the benchmark set consists of 31 domains and 772 instances, and the comparison includes ASP-FZN with CP-SAT, Chuffed, and Gurobi backends against clingo 5.7.1 and DLV 2.1.0 on decision and optimization variants (Eiter et al., 30 Jul 2025). The reported aggregate measures are Score₁ = fraction of instances solved (×100), Score₂ = fraction where solver ties best known, and PAR10 = average runtime with 10× penalty for timeouts (Eiter et al., 30 Jul 2025).

Solver Score₁ Score₂ PAR10
clingo (1 thread) 1890.4 1992.1 147786.8
asp-fzn(cp-sat, strict) 1840.0 1888.3 153738.5
asp-fzn(cp-sat, non-strict) 1871.7 1978.3 149807.9
asp-fzn(chuffed, non-strict) 812.4 812.4 275942.3
asp-fzn(gurobi, non-strict) 1265.0 1290.0 222057.8
DLV 1524.4 1604.4 191445.8

In single-threaded mode, the paper states that CP-SAT-backed ASP-FZN is competitive with clingo and only approximately 1.4% worse in PAR10, while non-strict ranking improves performance over strict ranking (Eiter et al., 30 Jul 2025). On 8 threads, clingo still leads, but ASP-FZN with CP-SAT narrows the gap (Eiter et al., 30 Jul 2025).

For CASP benchmarks, the comparison is against clingcon 5.2.1 on three representative encodings: Parallel Machine Scheduling (PMSP, 500 instances), Test Laboratory Scheduling (TLSPS, 123 instances), and Multi-Agent Path Finding (MAPF, 547 instances) (Eiter et al., 30 Jul 2025). On PMSP with one thread, ASP-FZN+CP-SAT using non-strict ranking closed 40/500, was best on 166, and had PAR10 = 11051.4; clingcon closed 36/500 with PAR10 = 11147.8 (Eiter et al., 30 Jul 2025). On 8 threads, ASP-FZN+CP-SAT closed 54/500 and was best on 167, whereas clingcon closed 31/500 and was best on 298 by finding many good incumbents in parallel (Eiter et al., 30 Jul 2025).

On TLSPS, ASP-FZN+CP-SAT, where strict and non-strict coincide in the reported setting, closed 55 instances, was best on 76, and had PAR10 = 6741.5; clingcon closed 7 and was best on 22 (Eiter et al., 30 Jul 2025). With 8 threads, clingcon leads with 77 closed, 90 best, and PAR10 = 4553.3 versus ASP-FZN+CP-SAT with 64 closed and 76 best (Eiter et al., 30 Jul 2025). On MAPF, ASP-FZN+CP-SAT closed 224 instances with PAR10 = 7116.6 in one thread and 233 with PAR10 = 6913.4 in 8 threads, while clingcon closed 177 with PAR10 = 8138.1 in one thread and 209 with PAR10 = 7428.2 in 8 threads (Eiter et al., 30 Jul 2025).

The reported summary is that ASP-FZN with CP-SAT is competitive on plain ASP, outperforms clingcon on TLSPS and MAPF, especially in single-threaded PAR10, and is promising on PMSP when proving optimality, although clingcon’s multi-thread search often finds good incumbents faster (Eiter et al., 30 Jul 2025). This suggests that ASP-FZN’s translation overhead does not preclude strong performance even on plain ASP workloads, despite being designed for CASP.

6. Worked example and operational behavior

The paper presents a running example program viv_i2 consisting of the rules

viv_i6

together with the command

viv_i7

(Eiter et al., 30 Jul 2025). The described execution flow is that ASP-FZN calls gringo, grounds with theory atoms, applies viv_i3, emits FlatZinc, invokes CP-SAT, and produces all extended answer sets (Eiter et al., 30 Jul 2025). The example outputs include { d, val(y,1) }, { d, val(x,1), val(y,1) }, { c, val(x,2), val(y,1) }, and { c,a,val(x,2),val(y,1) } (Eiter et al., 30 Jul 2025).

The auxiliary predicate val(v,V) is introduced to enumerate viv_i4 (Eiter et al., 30 Jul 2025). In operational terms, this makes the numeric component of an extended interpretation explicit in answer-set output. A plausible implication is that the output format is intended to preserve a conventional ASP-facing interface even though the underlying solving step is delegated to a FlatZinc backend.

7. Limitations and prospective extensions

The paper identifies several limitations. First, memory footprint can be significant: CP-SAT in particular may use large amounts of memory on big FlatZinc models, and ASP-FZN occasionally hits system limits where native ASP systems do not (Eiter et al., 30 Jul 2025). Second, performance degrades as disjunction and non-tightness increase, although the completion and ranking translation remains competitive in many cases and works best for head-cycle-free programs (Eiter et al., 30 Jul 2025). Third, the current support for global constraints is limited to alldifferent, disjoint, and cumulative (Eiter et al., 30 Jul 2025).

The distinction between strict and non-strict ranking is also presented as a trade-off. Non-strict ranking yields somewhat better pruning in practice, but it breaks one-to-one correspondence when the goal is to enumerate all distinct rankings rather than just all sets viv_i5 (Eiter et al., 30 Jul 2025). This clarifies a potential misconception: non-strict ranking is not merely an implementation tweak, but a choice that affects correspondence properties at the level of translated solutions.

Several future avenues are explicitly listed: vertex elimination techniques attributed to Rankooh and Janhunen (2024) to reduce auxiliary variables; integration of local-search or hybrid MiniZinc solvers, including CP-SAT used purely heuristically; translations for alternative CASP semantics such as ASP(AC) and hybrid semantics by Cabalar et al.; and incremental and multi-shot CASP solving leveraging gringo multishot (Eiter et al., 30 Jul 2025). These directions indicate that ASP-FZN is situated both as a concrete solver and as a platform for exploring alternative semantic embeddings and backend combinations within CASP.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to asp-fzn.