Towards type inference for Java']JavaScript

被引:0
|
作者
Anderson, C
Giannini, P
Drossopoulou, S
机构
[1] Univ London Imperial Coll Sci Technol & Med, Dept Comp, London SW7 2BZ, England
[2] Univ Piemonte Orientale, Dipartimento Informat, Alessandria, Italy
关键词
D O I
暂无
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Object-oriented scripting languages like JavaScript and Python are popular partly because of their dynamic features. These include the runtime modification of objects and classes through addition of fields or updating, of methods. These features make static typing difficult and so usually dynamic typing is used. Consequently, errors such as access to non-existent members are not detected until runtime. We first develop a formalism for an object based language, JS(0), with features from JavaScript, including dynamic addition of fields and updating of methods. We give an operational semantics and static type system for JS(0) using structural types. Our types allow objects to evolve in a controlled manner by classifying members as definite or potential. We define a type inference algorithm for JS(0) that is sound with respect to the type system. If the type inference algorithm succeeds, then the program is typeable. Therefore, programmers can benefit from the safety offered by the type system, without the need to write explicitly types in their programs.
引用
收藏
页码:428 / 452
页数:25
相关论文
共 50 条
  • [41] The ABCs of Java']JavaScript
    Kelly, AG
    INTERNATIONAL JOURNAL OF INFORMATION MANAGEMENT, 1998, 18 (02) : 162 - 162
  • [42] The Rise of Java']JavaScript
    DiPierro, Massimo
    COMPUTING IN SCIENCE & ENGINEERING, 2018, 20 (01) : 9 - 10
  • [43] Brewing Java']JavaScript
    Hoque, R
    INTERNET WORLD, 1997, 8 (02): : 104 - 106
  • [44] Type-Aware Concolic Testing of Java']JavaScript Programs
    Dhok, Monika
    Ramanathan, Murali Krishna
    Sinha, Nishant
    2016 IEEE/ACM 38TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2016, : 168 - 179
  • [45] Flow: Abstract Interpretation of Java']JavaScript for Type Checking and Beyond
    Chaudhuri, Avik
    PROCEEDINGS OF THE 2016 ACM WORKSHOP ON PROGRAMMING LANGUAGES AND ANALYSIS FOR SECURITY (PLAS'16), 2016, : 1 - 1
  • [46] All about the with Statement in Java']JavaScript: Removing with Statements in Java']JavaScript Applications
    Park, Changhee
    Lee, Hongki
    Ryu, Sukyoung
    ACM SIGPLAN NOTICES, 2014, 49 (02) : 73 - 84
  • [47] JS']JSConTest: Contract-Driven Testing and Path Effect Inference for Java']JavaScript
    Heidegger, Phillip
    Thiemann, Peter
    JOURNAL OF OBJECT TECHNOLOGY, 2012, 11 (01):
  • [48] Java']Java, Java']JavaScript, network computers and healthcare
    Smith, MF
    Maclean, IW
    CURRENT PERSPECTIVES IN HEALTHCARE COMPUTING, CONFERENCE, 1997, : 219 - 226
  • [49] Web applets: Java']Java Java']JavaScript and ActiveX
    Stein, L
    TRENDS IN GENETICS, 1996, 12 (11) : 484 - 485
  • [50] Identifying Utility Functions in Java']Java and Java']JavaScript
    Mendes, Tamara
    Valente, Marco Tulio
    Hora, Andre
    PROCEEDINGS OF 2016 X BRAZILIAN SYMPOSIUM ON SOFTWARE COMPONENTS, ARCHITECTURES AND REUSE (SBCARS), 2016, : 121 - 130