Abstract
Bhat et al. developed an inductive compiler that computes density functions for probability spaces described by programs in a probabilistic functional language. We implement such a compiler for a modified version of this language within the theorem prover Isabelle and give a formal proof of its soundness w. r. t. the semantics of the source and target language. Together with Isabelle’s code generation for inductive predicates, this yields a fully verified, executable density compiler. The proof is done in two steps: First, an abstract compiler working with abstract functions modelled directly in the theorem prover’s logic is defined and proved sound. Then, this compiler is refined to a concrete version that returns a target-language expression.
Chapter PDF
Similar content being viewed by others
References
Audebaud, P., Paulin-Mohring, C.: Proofs of randomized algorithms in Coq. In: Uustalu, T. (ed.) MPC 2006. LNCS, vol. 4014, pp. 49–68. Springer, Heidelberg (2006), http://dx.doi.org/10.1007/11783596_6
Avigad, J., Hölzl, J., Serafin, L.: A formally verified proof of the Central Limit Theorem. CoRR abs/1405.7012 (2014)
Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions. Springer (2004)
Bhat, S., Agarwal, A., Vuduc, R., Gray, A.: A type theory for probability density functions. In: Proceedings of the 39th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2012, pp. 545–556. ACM, New York (2012), http://doi.acm.org/10.1145/2103656.2103721
Bhat, S., Borgström, J., Gordon, A.D., Russo, C.: Deriving probability density functions from probabilistic functional programs. In: Piterman, N., Smolka, S.A. (eds.) TACAS 2013. LNCS, vol. 7795, pp. 508–522. Springer, Heidelberg (2013), http://dx.doi.org/10.1007/978-3-642-36742-7_35
Bhat, S., Borgström, J., Gordon, A.D., Russo, C.: Deriving probability density functions from probabilistic functional programs (full version, submitted for publication)
de Bruijn, N.G.: Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem. Indagationes Mathematicae 34, 381–392 (1972)
Cock, D.: Verifying probabilistic correctness in Isabelle with pGCL. In: Proceedings of the 7th Systems Software Verification, pp. 1–10 (November 2012)
Cock, D.: pGCL for Isabelle. Archive of Formal Proofs Formal proof development (July 2014), http://afp.sf.net/entries/pGCL.shtml
Doberkat, E.E.: Stochastic relations: foundations for Markov transition systems. Studies in Informatics. Chapman & Hall/CRC (2007)
Doberkat, E.E.: Basing Markov transition systems on the Giry monad (2008), http://www.informatics.sussex.ac.uk/events/domains9/Slides/Doberkat_GiryMonad.pdf
Eberl, M.: A Verified Compiler for Probability Density Functions. Master’s thesis, Technische Universität München (2014), https://in.tum.de/~eberlm/pdfcompiler.pdf
Eberl, M., Hölzl, J., Nipkow, T.: A verified compiler for probability density functions. Archive of Formal Proofs, Formal proof development (October 2014), http://afp.sf.net/entries/Density_Compiler.shtml ,
Giry, M.: A categorical approach to probability theory. In: Mosses, P.D., Nielsen, M. (eds.) CAAP 1995, FASE 1995, and TAPSOFT 1995. LNCS, vol. 915, pp. 68–85. Springer, Heidelberg (1995), http://dx.doi.org/10.1007/BFb0092872 , doi:10.1007/BFb0092872
Hölzl, J.: Construction and stochastic applications of measure spaces in Higher-Order Logic. PhD thesis, Technische Universität München, Institut für Informatik (2012)
Hurd, J.: Formal Verification of Probabilistic Algorithms. Ph.D. thesis, University of Cambridge (2002)
Hurd, J., McIver, A., Morgan, C.: Probabilistic guarded commands mechanized in HOL. Electron. Notes Theor. Comput. Sci. 112, 95–111 (2005), http://dx.doi.org/10.1016/j.entcs.2004.01.021
Nipkow, T., Klein, G.: Concrete Semantics with Isabelle/HOL. Springer (2014), http://www.concrete-semantics.org
Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL. LNCS, vol. 2283. Springer, Heidelberg (2002)
Park, S., Pfenning, F., Thrun, S.: A probabilistic language based upon sampling functions. In: Proceedings of the 32Nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2005, pp. 171–182. ACM, New York (2005), http://doi.acm.org/10.1145/1040305.1040320
Urban, C.: Nominal techniques in Isabelle/HOL. Journal of Automated Reasoning 40, 327–356 (2008)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Eberl, M., Hölzl, J., Nipkow, T. (2015). A Verified Compiler for Probability Density Functions. In: Vitek, J. (eds) Programming Languages and Systems. ESOP 2015. Lecture Notes in Computer Science(), vol 9032. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-46669-8_4
Download citation
DOI: https://doi.org/10.1007/978-3-662-46669-8_4
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-46668-1
Online ISBN: 978-3-662-46669-8
eBook Packages: Computer ScienceComputer Science (R0)