Abstract
Hofmann’s LFPL is a functional language with constructs which can be interpreted as referring to heap locations. In this view, the language is suitable for expressing and verifying in-place update algorithms. Correctness of this semantics is achieved by a linear typing. We introduce a non-linear typing of first-order LFPL programs which is more permissive than the recent effect-based typing of Aspinall and Hofmann. The system efficiently infers separation assertions as well as destruction and re-use effects for individual layers of recursive-type values. Thus it is suitable for in-place update algorithms with complicated data aliasing.
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
Hofmann, M.: A type system for bounded space and functional in-place update. Nordic Journal of Computing 7 (2000) 258–289
Hofmann, M.: The strength of non size-increasing computation. In: 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’02). (2002) 260–269
Aspinall, D., Hofmann, M.: Another type system for in-place update. In Métayer, D.L., ed.: Programming Languages and Systems, Proceedings of 11th European Symposium on Programming, Springer-Verlag (2002) 36–52 Lecture Notes in Computer Science 2305.
Appel, A.W.: Modern Compiler Implementation in Java. Cambridge University Press (1998)
Konečný, M.: LFPL with types for deep sharing. Technical Report EDI-INF-RR-157, LFCS, Division of Informatics, University of Edinburgh (2002)
Konečný, M.: Typing with conditions and guarantees for functional in-place update. In: TYPES 2002 Workshop, Nijmegen, Proceedings. (2003) to appear.
Hofmann, M., Jost, S.: Static prediction of heap space usage for first-order functional programs. In: 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’ 03). (2003) 185–197
Jost, S.: Static prediction of dynamic space usage of linear functional programs. Master’s thesis, Technische Universität Darmstadt, Fachbereich Mathematik (2002)
Atkey, R., Konečný, M.: A prototype LFPL compiler (frontend DEEL). An interface available at: http://www.dcs.ed.ac.uk/home/resbnd/prototypes/by_Robert_Atkey/deel/ (2003)
Jay, C.B.: A semantics for shape. Science of Computer Programming 25 (1995) 251–283
Shao, Z.: Flexible representation analysis. In: Proc. 1997 ACM SIGPLAN International Conference on Functional Programming (ICFP’97), Amsterdam, The Netherlands (1997) 85–98
League, C., Shao, Z.: Formal semantics of the FLINT intermediate language. Technical Report Yale-CS-TR-1171, Department of Computer Science, Yale University (1998)
Smith, F., Walker, D., Morrisett, G.: Alias types. In Smolka, G., ed.: 9th European Symposium on Programming (ESOP’2000), Springer-Verlag (2000) 366–381 Lecture Notes in Computer Science 1782.
Walker, D., Morrisett, G.: Alias types for recursive data structures. In: Types in Compilation 2000. (2001) 177–206 Lecture Notes in Computer Science 2071.
Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: Proceedings of 17th Annual IEEE Symposium on Logic in Computer Science (LICS’02), Copenhagen, Denmark (2002) 55–74
Tofte, M., Talpin, J.P.: Region-based memory management. Information and Computation 132 (1997) 109–176
Guzmán, J.C., Hudak, P.: Single-threaded polymorphic lambda calculus. In: Proceedings of the Fifth Annual IEEE Symposium on Logic in Computer Science. (1990) 333–343
O’Hearn, P.W., Power, A.J., Takeyama, M., Tennent, R.D.: Syntactic control of interference revisited. Theoretical Computer Science 228 (1999) 211–252
Reynolds, J.C.: Syntactic control of interference. In: Proceedings of the 5th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL), ACM Press (1978) 39–46
Reynolds, J.C.: Syntactic control of interference, part 2. In Ausiello, G., Dezani-Ciancaglini, M., Rocca, S.R.D., eds.: Automata, Languages and Programming, 16th International Colloquium, Springer-Verlag (1989) 704–722 Lecture Notes in Computer Science 372.
Lucassen, J.M., Gifford, D.K.: Polymorphic effect systems. In: Proceedings of the 15th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, ACM Press (1988) 47–57
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Konečný, M. (2003). Functional In-Place Update with Layered Datatype Sharing. In: Hofmann, M. (eds) Typed Lambda Calculi and Applications. TLCA 2003. Lecture Notes in Computer Science, vol 2701. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44904-3_14
Download citation
DOI: https://doi.org/10.1007/3-540-44904-3_14
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40332-6
Online ISBN: 978-3-540-44904-1
eBook Packages: Springer Book Archive