Abstract
How can one rigorously specify that a given ML functional \(f : (\texttt{int} \to \texttt{int}) \to \texttt{int}\) is pure, i.e., f produces no computational effects except those produced by evaluation of its functional argument? In this paper, we introduce a semantic notion of monadic parametricity for second-order functionals which is a form of purity. We show that every monadically parametric f admits a question-answer strategy tree representation. We discuss possible applications of this notion, e.g., to the verification of generic fixpoint algorithms. The results are presented in two settings: a total set-theoretic setting and a partial domain-theoretic one. All proofs are formalized by means of the proof assistant Coq.
Chapter PDF
Similar content being viewed by others
References
Abramsky, S., Malacaria, P., Jagadeesan, R.: Full Abstraction for PCF. In: Hagiya, M., Mitchell, J.C. (eds.) TACS 1994. LNCS, vol. 789, pp. 1–15. Springer, Heidelberg (1994)
Abramsky, S., McCusker, G.: Linearity, sharing and state: a fully abstract game semantics for idealized algol with active expressions. Electr. Notes Theor. Comput. Sci. 3 (1996)
Benton, N., Kennedy, A., Varming, C.: Formalizing domains, ultrametric spaces and semantics of programming languages. Submitted to Math. Struct. in Comp. Science (2010)
Charlier, B.L., Hentenryck, P.V.: A universal top-down fixpoint algorithm. Technical Report CS-92-25, Brown University, Providence, RI 02912 (1992)
Fecht, C., Seidl, H.: A faster solver for general systems of equations. Sci. Comput. Program. 35(2), 137–161 (1999)
Filinski, A.: Representing monads. In: Boehm, H.-J., Lang, B., Yellin, D.M. (eds.) POPL, pp. 446–457. ACM Press (1994)
Hofmann, M., Karbyshev, A., Seidl, H.: Verifying a Local Generic Solver in Coq. In: Cousot, R., Martel, M. (eds.) SAS 2010. LNCS, vol. 6337, pp. 340–355. Springer, Heidelberg (2010)
Hofmann, M., Karbyshev, A., Seidl, H.: What Is a Pure Functional? In: Abramsky, S., Gavoille, C., Kirchner, C., Meyer auf der Heide, F., Spirakis, P.G. (eds.) ICALP 2010. LNCS, vol. 6199, pp. 199–210. Springer, Heidelberg (2010)
Hyland, J.M.E., Ong, C.-H.L.: On full abstraction for PCF: I, ii, and iii. Inf. Comput. 163(2), 285–408 (2000)
Jung, A., Tiuryn, J.: A New Characterization of Lambda Definability. In: Bezem, M., Groote, J.F. (eds.) TLCA 1993. LNCS, vol. 664, pp. 245–257. Springer, Heidelberg (1993)
Karbyshev, A.: The accompanying Coq implementation (2013), https://github.com/karbyshev/purity/
Katsumata, S.-Y.: A Semantic Formulation of ⊤ ⊤-Lifting and Logical Predicates for Computational Metalanguage. In: Ong, L. (ed.) CSL 2005. LNCS, vol. 3634, pp. 87–102. Springer, Heidelberg (2005)
Keuchel, S., Schrijvers, T.: Modular monadic reasoning, a (co-)routine. IFL 2012, pre-proceedings, RR-12-06 (August 2012)
Loader, R.: The undecidability of lambda-definability
Longley, J.: When is a functional program not a functional program? In: ICFP, pp. 1–7 (1999)
O’Hearn, P.W., Reynolds, J.C.: From algol to polymorphic linear lambda-calculus. J. ACM 47(1), 167–223 (2000)
Reynolds, J.C.: Types, abstraction and parametric polymorphism. In: IFIP Congress, pp. 513–523 (1983)
Reynolds, J.C., Plotkin, G.D.: On functors expressible in the polymorphic typed lambda calculus. Inf. Comput. 105(1), 1–29 (1993)
Seidl, H., Vene, V., Müller-Olm, M.: Global invariants for analyzing multithreaded applications. Proc. of the Estonian Academy of Sciences: Phys. Math. 52(4), 413–436 (2003)
Simpson, A.K.: Lazy Functional Algorithms for Exact Real Functionals. In: Brim, L., Gruska, J., Zlatuška, J. (eds.) MFCS 1998. LNCS, vol. 1450, pp. 456–464. Springer, Heidelberg (1998)
The Coq Development Team. The Coq proof assistant reference manual. TypiCal Project (formerly LogiCal), Version 8.4 (2012)
Voigtländer, J.: Free theorems involving type constructor classes: functional pearl. In: Hutton, G., Tolmach, A.P. (eds.) ICFP, pp. 173–184. ACM (2009)
Vojdani, V., Vene, V.: Goblint: Path-sensitive data race analysis. In: Annales Univ. Sci. Budapest. Sect. Comp., vol. 30, pp. 141–155 (2009)
Wadler, P.: Theorems for free! In: FPCA, pp. 347–359 (1989)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bauer, A., Hofmann, M., Karbyshev, A. (2013). On Monadic Parametricity of Second-Order Functionals. In: Pfenning, F. (eds) Foundations of Software Science and Computation Structures. FoSSaCS 2013. Lecture Notes in Computer Science, vol 7794. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-37075-5_15
Download citation
DOI: https://doi.org/10.1007/978-3-642-37075-5_15
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-37074-8
Online ISBN: 978-3-642-37075-5
eBook Packages: Computer ScienceComputer Science (R0)