Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1352678.1352690acmotherconferencesArticle/Chapter ViewAbstractPublication PagesicdlConference Proceedingsconference-collections
research-article

Practical, pluggable types

Published: 25 August 2007 Publication History

Abstract

Most languages fall into one of two camps: either they adopt a unique, static type system, or they abandon static type-checks for runtime checks. Pluggable types blur this division by (i) making static type systems optional, and (ii) supporting a choice of type systems for reasoning about different kinds of static properties. Dynamic languages can then benefit from static-checking without sacrificing dynamic features or committing to a unique, static type system. But the overhead of adopting pluggable types can be very high, especially if all existing code must be decorated with type annotations before any type-checking can be performed. We propose a practical and pragmatic approach to introduce pluggable type systems to dynamic languages. First of all, only annotated code is type-checked. Second, limited type inference is performed on unannotated code to reduce the number of reported errors. Finally, external annotations can be used to type third-party code. We present TypePlug, a Smalltalk implementation of our framework, and report on experience applying the framework to three different pluggable type systems.

References

[1]
Bracha, G.: Pluggable type systems (October 2004) OOPSLA Workshop on Revival of Dynamic Languages.
[2]
Grothoff, C., Palsberg, J., Vitek, J.: Encapsulating objects with confined types. In: OOPSLA '01: Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, New York, NY, USA, ACM Press (2001) 241--255
[3]
Smith, F., Walker, D., Morrisett, J. G.: Alias types. In: ESOP '00: Proceedings of the 9th European Symposium on Programming Languages and Systems, London, UK, Springer-Verlag (2000) 366--381
[4]
Zhao, T., Noble, J., Vitek, J.: Scoped types for real-time Java. In: RTSS '04: Proceedings of the 25th IEEE International Real-Time Systems Symposium (RTSS'04), Washington, DC, USA, IEEE Computer Society (2004) 241--251
[5]
Ekman, T., Hedin, G.: Pluggable non-null types for Java. In: Proceedings of TOOLS Europe 2007. (2007) To appear.
[6]
Allwood, T.: Fleece, pluggable type checking for dynamic programming languages. Master's thesis, Imperial College of Science, Technology and Medicine, University of London (June 2006)
[7]
Andreae, C., Noble, J., Markstrum, S., Millstein, T.: A framework for implementing pluggable type systems. In: OOPSLA '06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, New York, NY, USA, ACM Press (2006) 57--74
[8]
Ducasse, S., Nierstrasz, O., Schärli, N., Wuyts, R., Black, A.: Traits: A mechanism for fine-grained reuse. ACM Transactions on Programming Languages and Systems (TOPLAS) 28(2) (March 2006) 331--388
[9]
Denker, M., Ducasse, S., Lienhard, A., Marschall, P.: Sub-method reflection. Journal of Object Technology 6(9) (September 2007) To appear.
[10]
Marschall, P.: Persephone: Taking Smalltalk reflection to the sub-method level. Master's thesis, University of Bern (December 2006)
[11]
Palsberg, J., Schwartzbach, M. I.: Object-oriented type inference. In: Proceedings OOPSLA '91, ACM SIGPLAN Notices. Volume 26. (November 1991) 146--161
[12]
Pierce, B.: Types and Programming Languages. The MIT Press (2002)
[13]
Haldimann, N.: TypePlug---pluggable type systems for Smalltalk. Master's thesis, University of Bern (April 2007)
[14]
Alanko, L. E.: Types and Reflection. Ph.D. thesis, University of Helsinki (November 2004)
[15]
Borning, A. H., Ingalls, D. H.: A type declaration and inference system for Smalltalk. In: Proceedings POPL '82, Albuquerque, NM (1982)
[16]
Johnson, R. E.: Type-checking Smalltalk. In: Proceedings OOPSLA '86, ACM SIGPLAN Notices. Volume 21. (November 1986) 315--321
[17]
Graver, J.: Type-Checking and Type-Inference for Object-Oriented Programming Languages. Ph.D. thesis, University of Illinois at Urbana-Champaign (August 1989)
[18]
Palsberg, J., Schwartzbach, M. I.: Object-Oriented Type Systems. Wiley (1993)
[19]
Bracha, G., Griswold, D.: Strongtalk: Typechecking Smalltalk in a production environment. In: Proceedings OOPSLA '93, ACM SIGPLAN Notices. Volume 28. (October 1993) 215--230
[20]
Milner, R.: A theory of type polymorphism in programming. Journal of Computer and System Sciences 17 (1978) 348--375
[21]
Suzuki, N.: Inferring types in smalltalk. In: POPL '81: Proceedings of the 8th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, New York, NY, USA, ACM Press (1981) 187--199
[22]
Agesen, O.: Concrete Type Inference: Delivering Object-Oriented Applications. Ph.D. thesis, Stanford University (December 1996)
[23]
Spoon, S. A., Shivers, O.: Demand-driven type inference with subgoal pruning: Trading precision for scalability. In: Proceedings of ECOOP'04. (2004) 51--74
[24]
Wuyts, R.: RoelTyper, a fast type reconstructor for Smalltalk (2005) http://decomp.ulb.ac.be/roelwuyts/smalltalk/roeltyper/.

Cited By

View all
  • (2018)Practical, pluggable types for a dynamic languageComputer Languages, Systems and Structures10.1016/j.cl.2008.06.00335:1(48-62)Online publication date: 20-Dec-2018
  • (2017)Exploiting type hints in method argument names to improve lightweight type inferenceProceedings of the 25th International Conference on Program Comprehension10.1109/ICPC.2017.33(77-87)Online publication date: 20-May-2017
  • (2016)Exploring cheap type inference heuristics in dynamically typed languagesProceedings of the 2016 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/2986012.2986017(43-56)Online publication date: 20-Oct-2016
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Other conferences
ICDL '07: Proceedings of the 2007 international conference on Dynamic languages: in conjunction with the 15th International Smalltalk Joint Conference 2007
August 2007
254 pages
ISBN:9781605580845
DOI:10.1145/1352678
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 25 August 2007

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Research-article

Funding Sources

Conference

ICDL '07

Acceptance Rates

ICDL '07 Paper Acceptance Rate 11 of 16 submissions, 69%;
Overall Acceptance Rate 11 of 16 submissions, 69%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)6
  • Downloads (Last 6 weeks)2
Reflects downloads up to 22 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2018)Practical, pluggable types for a dynamic languageComputer Languages, Systems and Structures10.1016/j.cl.2008.06.00335:1(48-62)Online publication date: 20-Dec-2018
  • (2017)Exploiting type hints in method argument names to improve lightweight type inferenceProceedings of the 25th International Conference on Program Comprehension10.1109/ICPC.2017.33(77-87)Online publication date: 20-May-2017
  • (2016)Exploring cheap type inference heuristics in dynamically typed languagesProceedings of the 2016 ACM International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/2986012.2986017(43-56)Online publication date: 20-Oct-2016
  • (2016)Synthesis of Logic InterpretationsProceedings of the 2016 IEEE 17th International Symposium on High Assurance Systems Engineering (HASE)10.1109/HASE.2016.32(114-121)Online publication date: 7-Jan-2016

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media