Skip to main content Accessibility help
×
Home

Constructive Galois Connections

  • DAVID DARAIS (a1) and DAVID VAN HORN (a2)

Abstract

Galois connections are a foundational tool for structuring abstraction in semantics, and their use lies at the heart of the theory of abstract interpretation. Yet, mechanization of Galois connections using proof assistants remains limited to restricted modes of use, preventing their general application in mechanized metatheory and certified programming. This paper presents constructive Galois connections, a variant of Galois connections that is effective both on paper and in proof assistants; is complete with respect to a large subset of classical Galois connections; and enables more general reasoning principles, including the “calculational” style advocated by Cousot. To design constructive Galois connections, we identify a restricted mode of use of classical ones which is both general and amenable to mechanization in dependently typed functional programming languages. Crucial to our metatheory is the addition of monadic structure to Galois connections to control a “specification effect.” Effectful calculations may reason classically, while pure calculations have extractable computational content. Explicitly moving between the worlds of specification and implementation is enabled by our metatheory. To validate our approach, we provide two case studies in mechanizing existing proofs from the literature: the first uses calculational abstract interpretation to design a static analyzer, and the second forms a semantic basis for gradual typing. Both mechanized proofs closely follow their original paper-and-pencil counterparts, employ reasoning principles not captured by previous mechanization approaches, support the extraction of verified algorithms, and are novel.

Copyright

References

Hide All
Assaf, M., Naumann, D. A., Signoles, J., Totel, É., & Tronel, F. (2017). Hypercollecting semantics and its application to static analysis of information flow. In Principles of Programming Languages (POPL). New York, NY, USA: ACM.
Barthe, G., Pichardie, D., & Rezk, T. (2007). A certified lightweight non-interference Java bytecode verifier. In European Symposium on Programming (ESOP). Berlin, Heidelberg: Springer-Verlag.
Bird, R. (1990). A calculus of functions for program derivation. In Research Topics in Functional Programming. Boston, MA, USA: Addison-Wesley Longman Publishing Co.
Bird, R. & de Moor, O. (1996). The algebra of programming. Upper Saddle River, NJ, USA: Prentice Hall.
Blanchet, B., Cousot, P., Cousot, R., Feret, J., Mauborgne, L., Miné, A., Monniaux, D., & Rival, X. (2003). A static analyzer for large safety-critical software. InProgramming Language Design and Implementation (PLDI). New York, NY, USA: ACM.
Blazy, S., Laporte, V., Maroneze, A., & Pichardie, D. (2013). Formal verification of a C value analysis based on abstract interpretation. In Static Analysis Symposium (SAS). Berlin, Heidelberg: Springer-Verlag.
Cachera, D. & Pichardie, D. (2010). A certified denotational abstract interpreter. Interactive Theorem Proving (ITP). Berlin, Heidelberg: Springer-Verlag.
Cousot, P. (1999). The calculational design of a generic abstract interpreter. In Calculational System Design. NATO ASI Series F. Amsterdam: IOS Press.
Cousot, P. (2005). Abstract interpretation. MIT course 16.399, http://web.mit.edu/16.399/ www/.
Cousot, P. (2008). Abstract interpretation. http://www.di.ens.fr/~cousot/AI/.
Cousot, P. & Cousot, R. (1976). Static determination of dynamic properties of programs. In International Symposium on Programming (ISOP). Paris, France: Dunod.
Cousot, P. & Cousot, R. (1977). Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Principles of Programming Languages (POPL). New York, NY, USA: ACM.
Cousot, P. & Cousot, R. (1979). Systematic design of program analysis frameworks. In Principles of Programming Languages (POPL). New York, NY, USA: ACM.
Cousot, P. & Cousot, R. (1992). Inductive definitions, semantics and abstract interpretations. In Principles of Programming Languages (POPL). New York, NY, USA: ACM.
Cousot, P. & Cousot, R. (1994). Higher-order abstract interpretation (and application to comportment analysis generalizing strictness, termination, projection and PER analysis of functional languages), invited paper. In International Conference on Computer Languages (ICCL). Los Alamitos, CA, USA: IEEE Computer Society Press, pp. 95112.
Cousot, P. & Cousot, R. (2014). A Galois connection calculus for abstract interpretation. In Principles of Programming Languages (POPL). New York, NY, USA: ACM.
Cousot, P. & Halbwachs, N. (1978). Automatic discovery of linear restraints among variables of a program. In Principles of Programming Languages (POPL). New York, NY, USA: ACM.
Danielsson, N. A., Norell, U., Mu, S. C., Bronson, S., Doel, D., Jansson, P., & Chen, L. T. (2011). The Agda standard library. Url: http://www.cs.nott.ac.uk/~nad/repos/lib.
Darais, D. & Van Horn, D. (2016). Constructive Galois connections: Taming the Galois connection framework for mechanized metatheory. In International Conference on Functional Programming (ICFP). New York, NY, USA: ACM.
Darais, D., Might, M., & Van Horn, D. (2015). Galois transformers and modular abstract interpreters: Reusable metatheory for program analysis. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA). New York, NY, USA: ACM.
Delaware, B., Pit-Claudel, C., Gross, J., & Chlipala, A. (2015). Fiat: Deductive synthesis of abstract data types in a proof assistant. In Principles of Programming Languages (POPL). New York, NY, USA: ACM.
Garcia, R., Clark, A. M., & Tanter, É. (2016). Abstracting gradual typing. In Principles of Programming Languages (POPL). New York, NY, USA: ACM.
Jourdan, J.-H., Laporte, V., Blazy, S., Leroy, X., & Pichardie, D. (2015). A formally-verified C static analyzer. In Principles of Programming Languages (POPL). New York, NY, USA: ACM.
Leroy, X. (2009). Formal verification of a realistic compiler. In Communications of the ACM (CACM). New York, NY, USA: ACM.
Malecha, G. & Bengtson, J. (2016). Extensible and efficient automation through reflective tactics. In Programming Languages and Systems (PLAS). New York, NY, USA: Springer-Verlag.
Martin-Löf, P. (1984). Intuitionistic type theory. Studies in proof theory. Naples, Italy: Bibliopolis.
Midtgaard, J. & Jensen, T. (2008). A calculational approach to control-flow analysis by abstract interpretation. In Static Analysis Symposium (SAS). Berlin, Heidelberg: Springer-Verlag.
Miné, A. (2006). The octagon abstract domain. In Higher Order and Symbolic Computation (HOSC). Hingham, MA, USA: Kluwer Academic Publishers.
Moggi, E. (1989). An abstract view of programming languages. Tech. rept. University of Edinburgh.
Monniaux, D. (1998). Réalisation mécanisée d’interpréteurs abstraits. Rapport de DEA, Université Paris VII. In French.
Nielson, F, Nielson, H. R., & Hankin, C. (1999). Principles of program analysis. New York, NY, USA: Springer-Verlag.
Norell, U. (2007). Towards a practical programming language based on dependent type theory. PhD thesis, Chalmers University of Technology.
Pichardie, D. (2005). Interprétation abstraite en logique intuitionniste: Extraction d’analyseurs Java certifiés. PhD thesis, Université Rennes 1. In French.
Scott, D. (1975). Data types as lattices. ISILC Logic Conference. Berlin, Heidelberg: Springer Berlin Heidelberg.
Sergey, I., Midtgaard, J., & Clarke, D. (2012). Calculating graph algorithms for dominance and shortest path. In Mathematics of Program Construction (MPC). Berlin, Heidelberg: Springer-Verlag.
Sergey, I., Devriese, D., Might, M., Midtgaard, J., Darais, D., Clarke, D., & Piessens, F. (2013). Monadic abstract interpreters. In Programming Language Design and Implementation (PLDI). New York, NY, USA: ACM.
Silva, P. F., & Oliveira, J. N. (2008). Galculator: Functional prototype of a Galois-connection based proof assistant. In Principles and Practice of Declarative Programming (PPDP). New York, NY, USA: ACM.
Tesson, J., Hashimoto, H., Hu, Z., Loulergue, F., & Takeichi, M. (2011). Program calculation in Coq. In Algebraic Methodology and Software Technology (AMAST). Berlin, Heidelberg: Springer-Verlag.
The Univalent Foundations Program. (2013). Homotopy type theory: Univalent foundations of mathematics. Institute for Advanced Study. https://homotopytypetheory.org/book.

Metrics

Altmetric attention score

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed

Constructive Galois Connections

  • DAVID DARAIS (a1) and DAVID VAN HORN (a2)
Submit a response

Discussions

No Discussions have been published for this article.

×

Reply to: Submit a response


Your details


Conflicting interests

Do you have any conflicting interests? *