Skip to main content

Functional In-Place Update with Layered Datatype Sharing

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2701))

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Hofmann, M.: A type system for bounded space and functional in-place update. Nordic Journal of Computing 7 (2000) 258–289

    MATH  MathSciNet  Google Scholar 

  2. 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

    Google Scholar 

  3. 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.

    Chapter  Google Scholar 

  4. Appel, A.W.: Modern Compiler Implementation in Java. Cambridge University Press (1998)

    Google Scholar 

  5. Konečný, M.: LFPL with types for deep sharing. Technical Report EDI-INF-RR-157, LFCS, Division of Informatics, University of Edinburgh (2002)

    Google Scholar 

  6. Konečný, M.: Typing with conditions and guarantees for functional in-place update. In: TYPES 2002 Workshop, Nijmegen, Proceedings. (2003) to appear.

    Google Scholar 

  7. 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

    Google Scholar 

  8. Jost, S.: Static prediction of dynamic space usage of linear functional programs. Master’s thesis, Technische Universität Darmstadt, Fachbereich Mathematik (2002)

    Google Scholar 

  9. 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)

  10. Jay, C.B.: A semantics for shape. Science of Computer Programming 25 (1995) 251–283

    Article  MATH  MathSciNet  Google Scholar 

  11. Shao, Z.: Flexible representation analysis. In: Proc. 1997 ACM SIGPLAN International Conference on Functional Programming (ICFP’97), Amsterdam, The Netherlands (1997) 85–98

    Google Scholar 

  12. League, C., Shao, Z.: Formal semantics of the FLINT intermediate language. Technical Report Yale-CS-TR-1171, Department of Computer Science, Yale University (1998)

    Google Scholar 

  13. 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.

    Google Scholar 

  14. Walker, D., Morrisett, G.: Alias types for recursive data structures. In: Types in Compilation 2000. (2001) 177–206 Lecture Notes in Computer Science 2071.

    Chapter  Google Scholar 

  15. 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

    Google Scholar 

  16. Tofte, M., Talpin, J.P.: Region-based memory management. Information and Computation 132 (1997) 109–176

    Article  MATH  MathSciNet  Google Scholar 

  17. 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

    Google Scholar 

  18. O’Hearn, P.W., Power, A.J., Takeyama, M., Tennent, R.D.: Syntactic control of interference revisited. Theoretical Computer Science 228 (1999) 211–252

    Article  MATH  MathSciNet  Google Scholar 

  19. 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

    Google Scholar 

  20. 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.

    Chapter  Google Scholar 

  21. 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

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics