Abstract
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.
- Andrew W. Appel. 2014. Program Logics-for Certified Compilers. Cambridge University Press. http://www.cambridge.org/de/academic/subjects/computer-science/ programming-languages-and-applied-logic/programlogics-certified-compilers?format=HBGoogle Scholar
- Venanzio Capretta. 2005. General Recursion via Coinductive Types. Logical Methods in Computer Science 1, 2 ( 2005 ), 1-18. https://doi.org/10.2168/LMCS-1( 2 :1) 2005 Google Scholar
Cross Ref
- Quentin Carbonneaux, Jan Hofmann, Thomas Reps, and Zhong Shao. 2017. Automated resource analysis with Coq proof objects. In International Conference on Computer Aided Verification. Springer, 64-85.Google Scholar
Cross Ref
- Edsger W. Dijkstra. 1975. Guarded Commands, Nondeterminacy and Formal Derivation of Programs. Commun. ACM 18, 8 (Aug. 1975 ), 453-457. https://doi.org/10.1145/360933.360975 Google Scholar
Digital Library
- Robert W. Floyd. 1967. Assigning Meanings to Programs. Proceedings of Symposium on Applied Mathematics 19 ( 1967 ), 19-32. http://laser.cs.umass.edu/courses/cs521-621.Spr06/papers/Floyd.pdfGoogle Scholar
Cross Ref
- Ronghui Gu, Zhong Shao, Hao Chen, Jieung Kim, Jérémie Koenig, Xiongnan (Newman) Wu, Vilhelm Sjöberg, and David Costanzo. 2019. Building Certified Concurrent OS Kernels. Commun. ACM 62, 10 (Sept. 2019 ), 89-99. https://doi.org/10. 1145/3356903 Google Scholar
Digital Library
- Ronghui Gu, Zhong Shao, Hao Chen, Xiongnan (Newman) Wu, Jieung Kim, Vilhelm Sjöberg, and David Costanzo. 2016. CertiKOS: An Extensible Architecture for Building Certified Concurrent OS Kernels. In 12th USENIX Symposium on Operating Systems Design and Implementation, OSDI 2016, Savannah, GA, USA, November 2-4, 2016. 653-669. https: //www.usenix.org/conference/osdi16/technical-sessions/presentation/guGoogle Scholar
Digital Library
- C. A. R. Hoare. 1969. An Axiomatic Basis for Computer Programming. Commun. ACM 12, 10 ( 1969 ), 576-580. https: //doi.org/10.1145/363235.363259 Google Scholar
Digital Library
- Chung-Kil Hur, Georg Neis, Derek Dreyer, and Viktor Vafeiadis. 2013. The Power of Parameterization in Coinductive Proof. SIGPLAN Not. 48, 1 (Jan. 2013 ), 193-206. https://doi.org/10.1145/2480359.2429093 Google Scholar
Digital Library
- Ralf Jung, Jacques-Henri Jourdan, Robbert Krebbers, and Derek Dreyer. 2017. RustBelt: Securing the Foundations of the Rust Programming Language. Proc. ACM Program. Lang. 2, POPL, Article 66 ( Dec. 2017 ), 34 pages. https://doi.org/10. 1145/3158154 Google Scholar
Digital Library
- Ralf Jung, Robbert Krebbers, LArs Birkedal, and Derek Dreyer. 2016. Higher-order ghost state. In Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming, ICFP 2016, Nara, Japan, September 18-22, 2016, Jacques Garrigue, Gabriele Keller, and Eijiro Sumii (Eds.). ACM, 256-269. https://doi.org/10.1145/2951913.2951943 Google Scholar
Digital Library
- Leonidas Lampropoulos and Benjamin C. Pierce. 2018. QuickChick: Property-Based Testing in Coq. Electronic textbook. https://softwarefoundations.cis.upenn.edu/qc-current/index.htmlGoogle Scholar
- Thomas Letan, Yann Régis-Gianas, Pierre Chiflier, and Guillaume Hiet. 2018. Modular Verification of Programs with Efects and Efect Handlers in Coq. In Formal Methods-22nd International Symposium, FM 2018, Held as Part of the Federated Logic Conference, FloC 2018, Oxford, UK, July 15-17, 2018, Proceedings. 338-354. https://doi.org/10.1007/978-3-319-95582-7_20 Google Scholar
Cross Ref
- Kenji Maillard, Danel Ahman, Robert Atkey, Guido Martínez, Cătălin Hriţcu, Exequiel Rivas, and Éric Tanter. 2019. Dijkstra Monads for All. Proc. ACM Program. Lang. 3, ICFP, Article Article 104 (July 2019 ), 29 pages. https://doi.org/10.1145/3341708 Google Scholar
Digital Library
- Gregory Malecha, Greg Morrisett, and Ryan Wisnesky. 2011. Trace-based Verification of Imperative Programs with I/O. J. Symb. Comput. 46, 2 (Feb. 2011 ), 95-118. https://doi.org/10.1016/j.jsc. 2010. 08.004 Google Scholar
Digital Library
- Conor McBride. 2015. Turing-Completeness Totally Free. In Mathematics of Program Construction-12th International Conference, MPC 2015, Königswinter, Germany, June 29-July 1, 2015. Proceedings. 257-275. https://doi.org/10.1007/978-3-319-19797-5_13 Google Scholar
Cross Ref
- Aleksandar Nanevski, Greg Morrisett, and Lars Birkedal. 2006. Polymorphism and Separation in Hoare Type Theory. SIGPLAN Not. 41, 9 (Sept. 2006 ), 62-73. https://doi.org/10.1145/1160074.1159812 Google Scholar
Digital Library
- Ulf Norell. 2007. Towards a practical programming language based on dependent type theory.Google Scholar
- Benjamin C. Pierce, Arthur Azevedo de Amorim, Chris Casinghino, Marco Gaboardi, Michael Greenberg, Caˇtaˇlin Hriţcu, Vilhelm Sjöberg, and Brent Yorgey. 2018. Logical Foundations. Electronic textbook. Version 5.5. http://www.cis.upenn. edu/~bcpierce/sf.Google Scholar
- Jonathan Protzenko, Bryan Parno, Aymeric Fromherz, Chris Hawblitzel, Marina Polubelova, Karthikeyan Bhargavan, Benjamin Beurdouche, Joonwon Choi, Antoine Delignat-Lavaud, Cédric Fournet, Natalia Kulatova, Tahina Ramananandro, Aseem Rastogi, Nikhil Swamy, Christoph M. Wintersteiger, and Santiago Zanella-Beguelin. 2020. EverCrypt: A Fast, Verified, Cross-Platform Cryptographic Provider. In IEEE Symposium on Security and Privacy. IEEE. https://www. microsoft.com/en-us/research/publication/evercrypt-a-fast-verified-cross-platform-cryptographic-provider/Google Scholar
- Ilya Sergey, Aleksandar Nanevski, and Anindya Banerjee. 2015. Mechanized Verification of Fine-Grained Concurrent Programs. SIGPLAN Not. 50, 6 ( June 2015 ), 77-87. https://doi.org/10.1145/2813885.2737964 Google Scholar
Digital Library
- Nikhil Swamy, Juan Chen, Cédric Fournet, Pierre-Yves Strub, Karthikeyan Bhargavan, and Jean Yang. 2011. Secure distributed programming with value-dependent types. In Proceeding of the 16th ACM SIGPLAN international conference on Functional Programming, ICFP 2011, Tokyo, Japan, September 19-21, 2011. 266-278. https://doi.org/10.1145/2034773.2034811 Google Scholar
Digital Library
- Nikhil Swamy, Joel Weinberger, Cole Schlesinger, Juan Chen, and Benjamin Livshits. 2013. Verifying higher-order programs with the dijkstra monad. In ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI '13, Seattle, WA, USA, June 16-19, 2013. 387-398. https://doi.org/10.1145/2491956.2491978 Google Scholar
Digital Library
- Wouter Swierstra. 2008. Data Types à la Carte. Journal of Functional Programming 18, 4 ( 2008 ), 423-436.Google Scholar
Digital Library
- Li-yao Xia, Yannick Zakowski, Paul He, Chung-Kil Hur, Gregory Malecha, Benjamin C. Pierce, and Steve Zdancewic. 2020. Interaction Trees. Proceedings of the ACM on Programming Languages 4, POPL (Jan. 2020 ).Google Scholar
Index Terms
Dijkstra monads forever: termination-sensitive specifications for interaction trees
Recommendations
Dijkstra and Hoare monads in monadic computation
The Dijkstra and Hoare monads have been introduced recently for capturing weakest precondition computations and computations with pre- and post-conditions, within the context of program verification, supported by a theorem prover. Here we give a more ...
Substructural logic and partial correctness
We formulate a noncommutative sequent calculus for partial correctness that subsumes propositional Hoare Logic. Partial correctness assertions are represented by intuitionistic linear implication. We prove soundness and completeness over relational and ...
A Relatively Complete Generic Hoare Logic for Order-Enriched Effects
LICS '13: Proceedings of the 2013 28th Annual ACM/IEEE Symposium on Logic in Computer ScienceMonads are the basis of a well-established method of encapsulating side-effects in semantics and programming. There have been a number of proposals for monadic program logics in the setting of plain monads, while much of the recent work on monadic ...






Comments