LOJun 3

Diamonds Are Forever: Stabilization Semantics for Unrestricted Aggregation and Recursion in Logica

arXiv:2606.029268.6Has Code
Predicted impact top 65% in LO · last 90 daysOriginality Highly original
AI Analysis

Provides a foundational semantic framework for nonmonotonic logic programs with aggregation and recursion, addressing a long-standing problem in logic programming.

Logica, a logic programming language compiling to SQL, combines recursion and aggregation but lacks clear semantics for programs that converge without fixpoints. The authors propose Defendant-Opponent (DO) semantics, a stabilization-based framework that provides rigorous meaning to such programs, matching least fixpoint semantics for positive Datalog and being compatible with Well-Founded and Stable Model Semantics.

Logica is an open-source logic programming language that compiles to SQL and runs on DuckDB, SQLite, PostgreSQL, and BigQuery. Unlike classic Datalog, it freely combines recursion and aggregation, concisely expressing algorithms from shortest paths to PageRank. This expressiveness raises semantic challenges: aggregates update by replacement rather than accumulation, evaluation depends on rule scheduling, and programs may converge to meaningful results without reaching a fixpoint, placing them outside traditional fixpoint semantics. We address this with Defendant-Opponent (DO) semantics, a stabilization-based framework for nonmonotonic logic programs. Evaluation is modeled as a rewrite system over derivation states, and a ground atom is true if, from every reachable state, some continuation makes the atom persist in all further derivations. This admits two equivalent characterizations: game-theoretically, truth is what a Defendant can defend against any Opponent in a three-turn game; and modally, truth corresponds to []<>[]t in the derivation graph viewed as a Kripke structure, placing nonmonotonic reasoning within S4. DO semantics coincides with least fixpoint semantics for positive Datalog and is compatible with both Well-Founded and Stable Model Semantics. For programs that converge without a fixpoint, ω-limit interpretations give rigorous meaning to iterative computations such as PageRank.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes