Union and intersection types to support both dynamic and static typing

被引:16
作者
Ortin, Francisco [1 ]
Garcia, Miguel [1 ]
机构
[1] Dept Comp Sci, Oviedo 33007, Spain
关键词
Programming languages; Program specification; Compilers; Formal languages; Type systems;
D O I
10.1016/j.ipl.2010.12.006
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
Although static typing provides undeniable benefits for the development of applications, dynamically typed languages have become increasingly popular for specific scenarios. Since each approach offers different benefits, the StaDyn programming language has been designed to support both dynamic and static typing. This paper describes the minimal core of the StaDyn programming language. Its type system performs type reconstruction over both dynamic and static implicitly typed references. A new interpretation of union and intersection types allows statically gathering the type information of dynamic references, which improves runtime performance and robustness. The evaluation of the generated code has shown how our approach offers an important runtime performance benefit. (C) 2010 Elsevier B.V. All rights reserved.
引用
收藏
页码:278 / 286
页数:9
相关论文
共 24 条
[1]   DYNAMIC TYPING IN A STATICALLY TYPED LANGUAGE [J].
ABADI, M ;
CARDELLI, L ;
PIERCE, B ;
PLOTKIN, G .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1991, 13 (02) :237-268
[2]  
Aiken Alexander., 1993, Proceedings of the conference on Functional programming languages and computer architecture, P31
[3]  
Ancona D, 2009, LECT NOTES COMPUT SC, V5653, P2, DOI 10.1007/978-3-642-03013-0_2
[4]  
[Anonymous], PLDI 91
[5]   INTERSECTION AND UNION TYPES - SYNTAX AND SEMANTICS [J].
BARBANERA, F ;
DEZANICIANCAGLINI, M ;
DELIGUORO, U .
INFORMATION AND COMPUTATION, 1995, 119 (02) :202-230
[6]  
Bracha Gilad, 2004, OOPSLA WORKSH REV DY
[7]  
Chiles B., 2011, DYNAMIC LANGUAGE RUN
[8]  
Damm F. M., 1994, Theoretical Aspects of Computer Software. International Symposium TACS '94 Proceedings, P687
[9]  
Flanagan C., 2006, INT WORKSH FDN DEV O
[10]   Flow-sensitive type qualifiers [J].
Foster, JS ;
Terauchi, T ;
Aiken, A .
ACM SIGPLAN NOTICES, 2002, 37 (05) :1-12