Skip to main content

Undoing Dynamic Typing (Declarative Pearl)

  • Conference paper
Functional and Logic Programming (FLOPS 2008)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4989))

Included in the following conference series:

Abstract

We propose undoable versions of the projection operations used when programs written in higher-order statically-typed languages interoperate with dynamically typed ones, localizing potential runtime errors to the point at which a dynamic value is projected to a static type. The idea is demonstrated by using control operators to implement backtracking projections from an untyped Scheme-like language to ML.

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Abadi, M., Cardelli, L., Pierce, B., Plotkin, G.: Dynamic typing in a statically-typed language. ACM Transactions on Programming Languages and Systems (TOPLAS) 13(2) (1991)

    Google Scholar 

  2. Benton, N.: Embedded interpreters. Journal of Functional Programming 15(4) (2005)

    Google Scholar 

  3. Blume, M., McAllester, D.: Sound and complete models of contracts. Journal of Functional Programming 16(4/5) (2006)

    Google Scholar 

  4. Danvy, O.: Type-directed partial evaluation. In: Proceedings of the 23rd ACM Symposium on Principles of Programming Languages (POPL), ACM Press, New York (1996)

    Google Scholar 

  5. Danvy, O.: Functional unparsing. Journal of Functional Programming 8(6) (1998)

    Google Scholar 

  6. Danvy, O.: A Simple Solution to Type Specialization. In: Larsen, K.G., Skyum, S., Winskel, G. (eds.) ICALP 1998. LNCS, vol. 1443, Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  7. Findler, R.B., Blume, M.: Contracts as Pairs of Projections. In: Hagiya, M., Wadler, P. (eds.) FLOPS 2006. LNCS, vol. 3945, pp. 226–241. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  8. Findler, R., Felleisen, M.: Contracts for higher-order functions. In: Proceedings of the International Conference on Functional Programming (ICFP) (2002)

    Google Scholar 

  9. Haines, N., Kindred, D., Morrisett, J.G., Nettles, S.M., Wing, J.M.: Composing first-class transactions. ACM Transactions on Programming Languages and Systems (TOPLAS) 16(6) (1994)

    Google Scholar 

  10. Henglein, F.: Dynamic typing. In: Krieg-Brückner, B. (ed.) ESOP 1992. LNCS, vol. 582, Springer, Heidelberg (1992)

    Google Scholar 

  11. Jeuring, J., Hinze, R., Löh, A.: Typed Contracts for Functional Programming. In: Hagiya, M., Wadler, P. (eds.) FLOPS 2006. LNCS, vol. 3945, pp. 208–225. Springer, Heidelberg (2006)

    Google Scholar 

  12. Kennedy, A.: Functional pearl: Pickler combinators. Journal of Functional Programming 14(6) (2004)

    Google Scholar 

  13. Matthews, J., Findler, R.B.: Operational semantics for multi-language programs. In: Proceedings of the 34th ACM Symposium on Principles of Programming Languages (POPL) (2007)

    Google Scholar 

  14. Meyer, B.: Eiffel: The Language. Prentice-Hall, Englewood Cliffs (1992)

    MATH  Google Scholar 

  15. Ramsey, N.: Embedding an interpreted language using higher-order functions and types. Journal of Functional Programming (to appear, 2008)

    Google Scholar 

  16. Rose, K.: Type-directed partial evaluation in Haskell. In: Preliminary Proceedings of the 1998 APPSEM Workshop on Normalization by Evaluation, number NS-98-1 in BRICS Notes (1998)

    Google Scholar 

  17. Scott, D.: Data types as lattices. SIAM Journal of Computing 4 (1976)

    Google Scholar 

  18. Stoy, J.E.: Denotational Semantics: The Scott-Strachey Approach to Programming Language Theory. MIT Press, Cambridge (1977)

    Google Scholar 

  19. Wadler, P., Findler, R.B.: Well-typed programs can’t be blamed. In: ACM Workshop on Scheme and Functional Programming (2007)

    Google Scholar 

  20. Yang, Z.: Encoding types in ML-like languages. In: Proceedings of the 3rd ACM SIGPLAN International Conference on Functional Programming (ICFP) (September 1998)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jacques Garrigue Manuel V. Hermenegildo

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Benton, N. (2008). Undoing Dynamic Typing (Declarative Pearl). In: Garrigue, J., Hermenegildo, M.V. (eds) Functional and Logic Programming. FLOPS 2008. Lecture Notes in Computer Science, vol 4989. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-78969-7_17

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-78969-7_17

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-78968-0

  • Online ISBN: 978-3-540-78969-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics