Formalizing a Syntax-Directed Graph Rewriting Language in Rocq
Abstract
Graph rewriting has emerged as a computational paradigm for handling dynamically evolving graph structures, which play an increasingly central role in programming and modeling languages. Whereas most graph rewriting formalisms are based on algebraic graph transformation, LMNtal is a text-based graph rewriting language with syntax-directed semantics, making it accessible to programmers and amenable to standard programming-language techniques; however, a formally certified basis for LMNtal has been missing. In this paper, we formalize the syntax and semantics of LMNtal in the Rocq Proof Assistant, validate the implementation with illustrative examples, and prove several fundamental properties of LMNtal programs, including the admissibility of two structural congruence rules. Building on this formalization, we give the first formal proof that LMNtal's structural congruence coincides with graph isomorphism on the corresponding port graphs, for arbitrary well-formed (not only closed) terms with the same free links and in both directions, depending only on the standard classical-logic axioms of Rocq's standard library.
Create a lesson
Metadata
- Comments
- 16 pages, 15 figures. Rocq development available at https://github.com/lmntal/coq-lmntal
Related papers
From Sequential to Dataflow: Formally-verified Compilation for Concurrent and Distributed Architectures
Shared title terminologycs.PLSebastian Ertel, Mohamed Elsheikh, Carmine Abate
sail-x86: Formalizing x86-64 for Full-System Execution and Machine-Code Verification
Shared title terminologycs.PLRui Ueyama, Takahiro Shinagawa
Seizing the Means of Direct Manipulation
Shared title terminologycs.PLDavid Minh-Duy Cao, Justin Lubin, Sarah E. Chasins
A View from the Bridge: Detecting Boundary Type Errors in Native Extensions of Dynamic Languages
Shared title terminologycs.PLThodoris Sotiropoulos, Georgios Alexopoulos, Dimitris Mitropoulos
SentryWard: Formal Verification of Warp-Specialized GPU Kernels
Shared title terminologycs.PLMengdi Wu, Sreeram Vennam, Stephen Mell et al.
Vx: A Programming Language for Scalable, Maintainable and Secure Systems
Shared title terminologycs.PLAditya Kumar