Abstract
Given an ML function f : (int->int)->int how can we rigorously specify that f is pure, i.e., produces no side-effects other than those arising from calling its functional argument? We show that existing methods based on preservation of invariants and relational parametricity are insufficient for this purpose and thus define a new notion that captures purity in the sense that for any functional F that is pure in this sense there exists a corresponding question-answer strategy. This research is motivated by an attempt to prove algorithms correct that take such supposedly pure functionals as input and apply them to stateful arguments in order to inspect intensional aspects of their behaviour.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Abramsky, S., Jagadeesan, R., Malacaria, P.: Full abstraction for PCF (extended abstract). 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)
Le Charlier, B., Van Hentenryck, P.: A Universal Top-Down Fixpoint Algorithm. Technical Report CS-92-25, Brown University, Providence, RI 02912 (1992)
Berry, G., Curien, P.-L.: Sequential algorithms on concrete data structures. Theor. Comput. Sci. 20, 265–321 (1982)
Fecht, C.: GENA - A Tool for Generating Prolog Analyzers from Specifications. In: Mycroft, A. (ed.) SAS 1995. LNCS, vol. 983, pp. 418–419. Springer, Heidelberg (1995)
Fecht, C., Seidl, H.: A faster solver for general systems of equations. Sci. Comput. Program. 35(2), 137–161 (1999)
Hermenegildo, M.V., Puebla, G., Marriott, K., Stuckey, P.J.: Incremental analysis of constraint logic programs. ACM Trans. Program. Lang. Syst. 22(2), 187–223 (2000)
Hyland, J.M.E., Luke Ong, C.-H.: On full abstraction for pcf: I, ii, and iii. Inf. Comput. 163(2), 285–408 (2000)
Jorgensen, N.: Finding Fixpoints in Finite Function Spaces Using Neededness Analysis and Chaotic Iteration. In: LeCharlier, B. (ed.) SAS 1994. LNCS, vol. 864, pp. 329–345. Springer, Heidelberg (1994)
Longley, J.: When is a functional program not a functional program? In: ICFP, pp. 1–7 (1999)
Nielson, H.R., Nielson, F.: Flow logics for constraint based analysis. In: Koskimies, K. (ed.) CC 1998. LNCS, vol. 1383, pp. 109–127. Springer, Heidelberg (1998)
O’Hearn, P.W., Reynolds, J.C.: From algol to polymorphic linear lambda-calculus. J. ACM 47(1), 167–223 (2000)
Reynolds, J.: Types, abstraction and parametric polymorphism. In: Information Processing, IFIP. North-Holland, Amsterdam (1983)
Reynolds, J.C., Plotkin, G.D.: On functors expressible in the polymorphic typed lambda calculus. Technical Report ECS-LFCS-88-53, University of Edinburgh (May 1988)
Rudich, A., Darvas, Á., Müller, P.: Checking well-formedness of pure-method specifications. In: Cuellar, J., Maibaum, T., Sere, K. (eds.) FM 2008. LNCS, vol. 5014, pp. 68–83. Springer, Heidelberg (2008)
Seidl, H., Vojdani, V.: Region analysis for race detection. In: Palsberg, J., Su, Z. (eds.) Static Analysis. LNCS, vol. 5673, pp. 171–187. Springer, Heidelberg (2009)
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)
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
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hofmann, M., Karbyshev, A., Seidl, H. (2010). What Is a Pure Functional?. In: Abramsky, S., Gavoille, C., Kirchner, C., Meyer auf der Heide, F., Spirakis, P.G. (eds) Automata, Languages and Programming. ICALP 2010. Lecture Notes in Computer Science, vol 6199. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14162-1_17
Download citation
DOI: https://doi.org/10.1007/978-3-642-14162-1_17
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-14161-4
Online ISBN: 978-3-642-14162-1
eBook Packages: Computer ScienceComputer Science (R0)