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

📅 2026-06-01
📈 Citations: 0
Influential: 0
📄 PDF

career value

155K/year
🤖 AI Summary
This work addresses the semantic challenges posed by the unrestricted combination of recursion and aggregation in the Logica language, which undermines traditional fixed-point semantics and leaves non-monotonic logic programs without a rigorous foundation. To resolve this, the paper introduces Defendant-Opponent (DO) semantics, modeling program evaluation as a rewriting system over derivation states. By integrating game-theoretic principles with modal logic S4 (specifically the axiom □◇□t), the approach characterizes atomic truth via Kripke structures and ω-limit interpretations. This framework provides, for the first time, a unified semantics for logic programs featuring arbitrary recursion and aggregation, while remaining compatible with classical Datalog, well-founded models, and stable model semantics. Moreover, it endows non-fixed-point algorithms such as PageRank with a formal semantic basis. On positive Datalog, DO semantics coincides with the least fixed point and reliably determines truth values and execution behavior even for non-monotonic or non-convergent programs.
📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

aggregation
recursion
fixpoint semantics
nonmonotonic logic
stabilization
Innovation

Methods, ideas, or system contributions that make the work stand out.

Defendant-Opponent semantics
stabilization semantics
nonmonotonic logic programming
aggregation and recursion
modal logic S4
🔎 Similar Papers
No similar papers found.