Verified Self-Explaining Computation
Pith reviewed 2026-05-24 22:06 UTC · model grok-4.3
The pith
Forward and backward dynamic slicing form a Galois connection verified in Coq for a simple imperative language.
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
Core claim
The authors define forward and backward dynamic slicing for an imperative language and establish that the two functions are adjoint, forming a Galois connection; the entire development, including the proof of the connection, is carried out and verified inside Coq.
What carries the argument
The Galois connection between the forward slicing function and the backward slicing function.
If this is right
- The verified duality supplies a reliable mathematical link between forward and backward slicing results.
- One slicing direction can be derived from the other via the adjoint property.
- The Coq development provides a reusable, machine-checked foundation for dynamic program analysis.
- Slicing-based tools built on this language can inherit the verified duality property.
Where Pith is reading between the lines
- The same adjoint structure may simplify the construction of programs that can explain their own runtime behavior.
- The verification method could be lifted to richer languages that include procedures or concurrency.
- Adjoint-based slicing might connect to other program analyses that rely on Galois connections, such as abstract interpretation.
- Tool builders could extract executable slicing code directly from the verified Coq definitions.
Load-bearing premise
The simple imperative language used in the formalization captures the essential features of slicing that matter for the Galois connection to hold.
What would settle it
A concrete program and input in the formalized language for which forward slicing followed by backward slicing fails to recover the original slice (or the converse) would show the claimed Galois connection does not hold.
Figures
read the original abstract
Common programming tools, like compilers, debuggers, and IDEs, crucially rely on the ability to analyse program code to reason about its behaviour and properties. There has been a great deal of work on verifying compilers and static analyses, but far less on verifying dynamic analyses such as program slicing. Recently, a new mathematical framework for slicing was introduced in which forward and backward slicing are dual in the sense that they constitute a Galois connection. This paper formalises forward and backward dynamic slicing algorithms for a simple imperative programming language, and formally verifies their duality using the Coq proof assistant.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper formalizes forward and backward dynamic slicing algorithms for a simple imperative programming language and formally verifies (in Coq) that the two algorithms are dual in the sense that they form a Galois connection, thereby confirming a recently proposed mathematical framework for slicing.
Significance. If the result holds, the machine-checked Coq development supplies reusable, formally verified evidence for the Galois-connection duality of dynamic slicing. This is a concrete advance for the verification of dynamic program analyses, an area that has received far less attention than verified compilers or static analyses. The explicit use of an external proof assistant eliminates circularity and provides a reusable artifact.
minor comments (2)
- The abstract and introduction would benefit from a single-sentence statement of the main theorem (e.g., “Theorem 3.12 states that …”) so that readers can locate the verified claim immediately.
- Notation for the slicing functions and the Galois connection (e.g., the order on slices) should be introduced once in a dedicated “Notation” paragraph rather than piecemeal.
Simulated Author's Rebuttal
We thank the referee for their positive assessment of the work and their recommendation to accept the paper. We are pleased that the contribution of the machine-checked Coq development for the Galois-connection duality of dynamic slicing is viewed as a concrete advance.
Circularity Check
No significant circularity; machine-checked Coq verification is independent
full rationale
The paper defines a simple imperative language, specifies forward and backward dynamic slicing algorithms, and proves they form a Galois connection. This proof is performed and machine-checked inside Coq, which constitutes external verification against the formalized semantics rather than any reduction of the claim to its own fitted inputs or self-citations. No load-bearing step relies on an unverified self-citation chain or renames a result by construction; the Galois connection is established directly by the Coq development for the given model.
Axiom & Free-Parameter Ledger
axioms (1)
- domain assumption The semantics of the simple imperative language are correctly modeled in Coq.
Reference graph
Works this paper leans on
-
[1]
In: Backhouse, R.C., Crole, R.L., Gibbons, J
Backhouse, R.C.: Galois connections and fixed point calculus. In: Backhouse, R.C., Crole, R.L., Gibbons, J. (eds.) Algebraic and Coalgebraic Methods in the Mathematics of Program Construction, International Summer School and Workshop, Oxford, UK, April 10-14, 2000, Revised Lectures. Lecture Notes in Com- puter Science, vol. 2297, pp. 89–148. Springer (2000...
-
[2]
Binkley, D., Danicic, S., Gyim ´othy, T., Harman, M., Kiss, A., Korel, B.: A formalisation of the relationship between forms of program slicing. Science of Computer Programming 62(3), 228–252 (2006), special issue on Source code analysis and manipulation (SCAM 2005)
work page 2006
-
[3]
In: Proceedings of the 2015 Conference on Certified Programs and Proofs
Blazy, S., Maroneze, A., Pichardie, D.: Verified validation of program slicing. In: Proceedings of the 2015 Conference on Certified Programs and Proofs. pp. 109–117. CPP ’15, ACM, New York, NY, USA (2015)
work page 2015
-
[4]
Cheney, J., Acar, U.A., Perera, R.: Toward a theory of self-explaining computation. In: In search of elegance in the theory and practice of computation: a Festschrift in honour of Peter Buneman. pp. 193–216. No. 8000 in LNCS, Springer-Verlag (2013)
work page 2013
-
[5]
Chiang, Y., Mu, S.: Formal derivation of greedy algorithms from relational specifications: A tutorial. J. Log. Algebr. Meth. Program. 85(5), 879–905 (2016). https://doi.org/10.1016/j.jlamp.2015.12.003
-
[6]
Cambridge University Press (2002)
Davey, B.A., Priestley, H.A.: Introduction to Lattices and Order. Cambridge University Press (2002)
work page 2002
-
[7]
Gibbons, J.: Fission for program comprehension. In: Mathematics of Program Construction, 8th Inter- national Conference, MPC 2006, Kuressaare, Estonia, July 3-5, 2006, Proceedings. pp. 162–179 (2006). https://doi.org/10.1007/11783596 12
-
[8]
Information Processing Letters 29(3), 155–163 (1988)
Korel, B., Laski, J.: Dynamic program slicing. Information Processing Letters 29(3), 155–163 (1988)
work page 1988
-
[9]
Formal Aspects of Computing 30(1), 107–131 (Jan 2018)
L ´echenet, J., Kosmatov, N., Gall, P .L.: Cut branches before looking for bugs: certifiably sound verification on relaxed slices. Formal Aspects of Computing 30(1), 107–131 (Jan 2018)
work page 2018
-
[10]
In: ERTS 2016: Embedded Real Time Software and Systems
Leroy, X., Blazy, S., K ¨astner, D., Schommer, B., Pister, M., Ferdinand, C.: Compcert – a formally verified optimizing compiler. In: ERTS 2016: Embedded Real Time Software and Systems. SEE (2016)
work page 2016
-
[11]
Mu, S., Ko, H., Jansson, P .: Algebra of programming in Agda: Dependent types for relational program derivation. J. Funct. Program. 19(5), 545–579 (2009). https://doi.org/10.1017/S0956796809007345
-
[12]
Mu, S., Oliveira, J.N.: Programming from Galois connections. J. Log. Algebr. Program. 81(6), 680–704 (2012). https://doi.org/10.1016/j.jlap.2012.05.003
-
[13]
Springer-Verlag, Berlin, Heidelberg (1999) 17
Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer-Verlag, Berlin, Heidelberg (1999) 17
work page 1999
-
[14]
Perera, R., Garg, D., Cheney, J.: Causally consistent dynamic slicing. In: CONCUR. pp. 18:1–18:15 (2016)
work page 2016
- [15]
-
[16]
Electronic textbook (2017), version 5.0
Pierce, B.C., de Amorim, A.A., Casinghino, C., Gaboardi, M., Greenberg, M., Hrit ¸cu, C., Sj ¨oberg, V ., Yorgey, B.: Software Foundations. Electronic textbook (2017), version 5.0. http://www.cis.upenn. edu/˜bcpierce/sf
work page 2017
-
[17]
Proceedings of the ACM on Programming Languages (PACMPL)1(ICFP) (Sep 2017)
Ricciotti, W., Stolarek, J., Perera, R., Cheney, J.: Imperative functional programs that explain their work. Proceedings of the ACM on Programming Languages (PACMPL)1(ICFP) (Sep 2017)
work page 2017
-
[18]
Silva, J.: An analysis of the current program slicing and algorithmic debugging based techniques. Tech. rep., Technical University of Valencia (2008)
work page 2008
-
[19]
Stolarek, J.: Verified self-explaining computation (May 2019), https://bitbucket.org/jstolarek/ gc_imp_slicing/src/mpc_2019_submission/
work page 2019
-
[20]
https://doi.org/10.5281/zenodo.1028037
The Coq Development Team: The Coq proof assistant, version 8.7.0 (Oct 2017). https://doi.org/10.5281/zenodo.1028037
- [21]
-
[22]
MIT Press, Cambridge, MA, USA (1993) 18
Winskel, G.: The Formal Semantics of Programming Languages: An Introduction. MIT Press, Cambridge, MA, USA (1993) 18
work page 1993
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.