Reference. Shoggoth: A Formal Foundation for Strategic Rewriting

Rewriting is a versatile and powerful technique used in many domains. Strategic rewriting allows programmers to control the application of rewrite rules by composing individual rewrite rules into complex rewrite strategies. These strategies are semantically complex, as they may be nondeterministic, they may raise errors that trigger backtracking, and they may not terminate. Given such semantic complexity, it is necessary to establish a formal understanding of rewrite strategies and to enable reasoning about them in order to answer questions like: How do we know that a rewrite strategy terminates? How do we know that a rewrite strategy does not fail because we compose two incompatible rewrites? How do we know that a desired property holds after applying a rewrite strategy? In this paper, we introduce Shoggoth: a formal foundation for understanding, analysing and reasoning about strategic rewriting that is capable of answering these questions. We provide a denotational semantics of System S, a core language for strategic rewriting, and prove its equivalence to our big-step operational semantics, which extends existing work by explicitly accounting for divergence. We further define a location-based weakest precondition calculus to enable formal reasoning about rewriting strategies, and we prove this calculus sound with respect to the denotational semantics. We show how this calculus can be used in practice to reason about properties of rewriting strategies, including termination, that they are well-composed, and that desired postconditions hold. The semantics and calculus are formalised in Isabelle/HOL and all proofs are mechanised.

Cite

Cite as @qin-2024-shoggoth (helia, typst) · \cite{qin-2024-shoggoth} (LaTeX)
BibTeX
bibtex · 1 line
@article{qin-2024-shoggoth, title={Shoggoth: A Formal Foundation for Strategic Rewriting}, volume={8}, ISSN={2475-1421}, url={http://dx.doi.org/10.1145/3633211}, DOI={10.1145/3633211}, number={POPL}, journal={Proceedings of the ACM on Programming Languages}, publisher={Association for Computing Machinery (ACM)}, author={Qin, Xueying and O’Connor, Liam and van Glabbeek, Rob and Höfner, Peter and Kammar, Ohad and Steuwer, Michel}, year={2024}, month=Jan, pages={61–89} }
hayagriva YAML (typst)
yaml · 24 lines
qin-2024-shoggoth:
  type: article
  title: 'Shoggoth: A Formal Foundation for Strategic Rewriting'
  author:
  - Qin, Xueying
  - O’Connor, Liam
  - name: Glabbeek
    given-name: Rob
    prefix: van
  - Höfner, Peter
  - Kammar, Ohad
  - Steuwer, Michel
  date: 2024-01
  page-range: 61-89
  url: http://dx.doi.org/10.1145/3633211
  serial-number:
    doi: 10.1145/3633211
    issn: 2475-1421
  parent:
    type: periodical
    title: Proceedings of the ACM on Programming Languages
    publisher: Association for Computing Machinery (ACM)
    issue: POPL
    volume: 8
Cites 50 works (2 here)
With notes (2)

NetKAT: Semantic foundations for networks anderson2014netkat

Recent years have seen growing interest in high-level languages for programming networks. But the design of these languages has been largely ad hoc, driven more by the needs of applications and the capabilities of network hardware than by foundational principles. The lack of a semantic foundation has left language designers with little guidance in determining how to incorporate new features, and programmers without a means to reason precisely about their code. This paper presents NetKAT, a new network programming language that is based on a solid mathematical foundation and comes equipped with a sound and complete equational theory. We describe the design of NetKAT, including primitives for filtering, modifying, and transmitting packets; union and sequential composition operators; and a Kleene star operator that iterates programs. We show that NetKAT is an instance of a canonical and well-studied mathematical structure called a Kleene algebra with tests (KAT) and prove that its equational theory is sound and complete with respect to its denotational semantics. Finally, we present practical applications of the equational theory including syntactic techniques for checking reachability, proving non-interference properties that ensure isolation between programs, and establishing the correctness of compilation algorithms.
PDF · DOI · pldb

Kleene algebra with tests kozen1997kleene

We introduce Kleene algebra with tests, an equational system for manipulating programs. We give a purely equational proof, using Kleene algebra with tests and commutativity conditions, of the following classical result: every while program can be simulated by a while program with at most one while loop. The proof illustrates the use of Kleene algebra with tests and commutativity conditions in program equivalence proofs.
PDF · DOI · pldb
External (48)
qin-2024-shoggoth reference entries/refs/qin-2024-shoggoth/qin-2024-shoggoth.hel