Practical, pluggable types for a dynamic language

被引:8
|
作者
Haldiman, Niklaus [1 ]
Denker, Marcus [1 ]
Nierstrasz, Oscar [1 ]
机构
[1] Univ Bern, IAM, Software Composit Grp, CH-3012 Bern, Switzerland
关键词
Dynamic languages; Type systems; Programming languages; CHECKING;
D O I
10.1016/j.cl.2008.06.003
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Most languages fall into one of two camps: either they adopt a unique, static type system, or they abandon static type-checks for run-time 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. (c) 2008 Elsevier Ltd. All rights reserved.
引用
收藏
页码:48 / 62
页数:15
相关论文
共 50 条
  • [11] Practical Interruptible Conversations Distributed Dynamic Verification with Session Types and Python']Python
    Hu, Raymond
    Neykova, Rumyana
    Yoshida, Nobuko
    Demangeon, Romain
    Honda, Kohei
    RUNTIME VERIFICATION, RV 2013, 2013, 8174 : 130 - 148
  • [12] Practical interruptible conversations: distributed dynamic verification with multiparty session types and Python
    Romain Demangeon
    Kohei Honda
    Raymond Hu
    Rumyana Neykova
    Nobuko Yoshida
    Formal Methods in System Design, 2015, 46 : 197 - 225
  • [13] Practical Affine Types
    Tov, Jesse A.
    Pucella, Riccardo
    POPL 11: PROCEEDINGS OF THE 38TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2011, : 447 - 458
  • [14] Practical Affine Types
    Tov, Jesse A.
    Pucella, Riccardo
    ACM SIGPLAN NOTICES, 2011, 46 (01) : 447 - 458
  • [15] Pluggable Micronetwork for Layer Configuration Relay in a Dynamic Deep Neural Surface
    Khan, Farhat Ullah
    Aziz, Izzatdin B.
    Akhir, Emilia Akashah P.
    IEEE ACCESS, 2021, 9 : 124831 - 124846
  • [16] Practical interruptible conversations: distributed dynamic verification with multiparty session types and Python']Python
    Demangeon, Romain
    Honda, Kohei
    Hu, Raymond
    Neykova, Rumyana
    Yoshida, Nobuko
    FORMAL METHODS IN SYSTEM DESIGN, 2015, 46 (03) : 197 - 225
  • [17] PRACTICAL LANGUAGE TESTING
    Ginther, April
    STUDIES IN SECOND LANGUAGE ACQUISITION, 2011, 33 (04) : 639 - 639
  • [18] The practical: a language for curriculum
    Schwab, Joseph J.
    JOURNAL OF CURRICULUM STUDIES, 2013, 45 (05) : 591 - 621
  • [19] Practical language testing
    Read, John
    LANGUAGE TESTING, 2011, 28 (02) : 302 - 304
  • [20] Practical Knowledge of Language
    Cheng-hung Tsai
    Philosophia, 2010, 38 : 331 - 341