๐ค AI Summary
Existing Answer Set Programming (ASP) systems struggle to flexibly support rapid prototyping of diverse non-monotonic temporal logics, such as Temporal Equilibrium Logic (TEL), Modal Epistemic Logic (MEL), and Dynamic Epistemic Logic (DEL). This work proposes a unified declarative metaprogramming framework that extends the clingo theory language with a type system and nested modal guards to ensure semantic correctness during grounding and enable uniform encodings of these logics. By integrating a metaprogram transformation pipeline, stable model semantics preservation, FischerโLadner closure handling, and interval constraint management, the framework yields a general-purpose tool called metasp. This tool substantially enhances the extensibility and development efficiency of temporal ASP systems, offering a cohesive infrastructure for experimenting with and implementing a broad class of non-monotonic temporal reasoning formalisms.
๐ Abstract
The development of temporal extensions of Answer Set Programming (ASP) has led to the emergence of non-monotonic linear-time (TEL), dynamic (DEL), and metric (MEL) temporal equilibrium logics. However, the inherent rigidity of highly optimized ASP systems often hinders the rapid exploration and implementation of alternative logical designs. In this work, we propose a flexible meta-programming framework that operationalizes the semantics of varied temporal logics through a unified, declarative framework. Our approach extends standard ASP meta-programming by augmenting clingo's theory grammar with formal type specifications and nesting capabilities. To ensure semantic correctness, we introduce a transformation pipeline that protects nested modalities from stable-model-based simplifications during grounding. We demonstrate the extensibility of our framework by implementing meta-encodings for TEL, MEL, and DEL. We provide a comprehensive account of TEL and highlight the key features for managing the interval constraints of MEL and the Fischer-Ladner closure in DEL. Finally, we introduce the metasp system, a versatile tool that encapsulates this workflow.