Dijkstra monads forever: termination-sensitive specifications for interaction trees

This paper extends the Dijkstra monad framework, designed for writing specifications over effectful programs using monadic effects, to handle termination sensitive specifications over interactive programs. We achieve this by introducing base specification monads for non-terminating programs with uninterpreted events. We model such programs using interaction trees, a coinductive datatype for representing programs with algebraic effects in Coq, which we further develop by adding trace semantics. We show that this approach subsumes typical, simple proof principles. The framework is implemented as an extension of the Interaction Trees Coq library.

[1]  Lars Birkedal,et al.  Higher-order ghost state , 2016, ICFP.

[2]  Zhong Shao,et al.  CertiKOS: An Extensible Architecture for Building Certified Concurrent OS Kernels , 2016, OSDI.

[3]  Conor McBride Turing-Completeness Totally Free , 2015, MPC.

[4]  Zhong Shao,et al.  Building certified concurrent OS kernels , 2019, Commun. ACM.

[5]  Nikhil Swamy,et al.  EverCrypt: A Fast, Verified, Cross-Platform Cryptographic Provider , 2020, 2020 IEEE Symposium on Security and Privacy (SP).

[6]  Juan Chen,et al.  Secure distributed programming with value-dependent types , 2011, Journal of Functional Programming.

[7]  Ilya Sergey,et al.  Mechanized verification of fine-grained concurrent programs , 2015, PLDI.

[8]  B. Pierce,et al.  QuickChick: Property-based testing for Coq , 2014 .

[9]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[10]  Robert Atkey,et al.  Dijkstra monads for all , 2019, Proc. ACM Program. Lang..

[11]  Zhong Shao,et al.  Automated Resource Analysis with Coq Proof Objects , 2017, CAV.

[12]  Venanzio Capretta,et al.  General recursion via coinductive types , 2005, Log. Methods Comput. Sci..

[13]  Lauretta O. Osho,et al.  Axiomatic Basis for Computer Programming , 2013 .

[14]  Chung-Kil Hur,et al.  The power of parameterization in coinductive proof , 2013, POPL.

[15]  Wouter Swierstra,et al.  Data types à la carte , 2008, Journal of Functional Programming.

[16]  Derek Dreyer,et al.  RustBelt: securing the foundations of the rust programming language , 2017, Proc. ACM Program. Lang..

[17]  U. Norell,et al.  Towards a practical programming language based on dependent type theory , 2007 .

[18]  Juan Chen,et al.  Verifying higher-order programs with the dijkstra monad , 2013, PLDI.

[19]  Edsger W. Dijkstra,et al.  Guarded commands, nondeterminacy and formal derivation of programs , 1975, Commun. ACM.

[20]  Lars Birkedal,et al.  Polymorphism and separation in hoare type theory , 2006, ICFP '06.

[21]  Andrew W. Appel,et al.  Program Logics for Certified Compilers , 2014 .

[22]  Yann Régis-Gianas,et al.  Modular Verification of Programs with Effects and Effect Handlers in Coq , 2018, FM.

[23]  J. Gregory Morrisett,et al.  Trace-based verification of imperative programs with I/O , 2011, J. Symb. Comput..