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
来源
ECOOP 2005 - OBJECT-ORIENTED PROGRAMMING, PROCEEDINGS | 2005年 / 3586卷
关键词
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 条
  • [21] More Type Inference in Java']Java 8
    Pluemicke, Martin
    PERSPECTIVES OF SYSTEM INFORMATICS, PSI 2014, 2015, 8974 : 248 - 256
  • [22] Towards Logic-Based Verification of Java']JavaScript Programs
    Santos, Jose Fragoso
    Gardner, Philippa
    Maksimovic, Petar
    Naudziuniene, Daiva
    AUTOMATED DEDUCTION - CADE 26, 2017, 10395 : 8 - 25
  • [23] TypeDevil: Dynamic Type Inconsistency Analysis for Java']JavaScript
    Pradel, Michael
    Schuh, Parker
    Sen, Koushik
    2015 IEEE/ACM 37TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, VOL 1, 2015, : 314 - 324
  • [24] Improving Java']JavaScript Performance by Deconstructing the Type System
    Ahn, Wonsun
    Choi, Jiho
    Shull, Thomas
    Garzaran, Maria J.
    Torrellas, Josep
    ACM SIGPLAN NOTICES, 2014, 49 (06) : 496 - 507
  • [25] CSRF protection in Java']JavaScript frameworks and the security of Java']JavaScript applications
    Peguero, Ksenia
    Cheng, Xiuzhen
    HIGH-CONFIDENCE COMPUTING, 2021, 1 (02):
  • [26] The Essence of Java']JavaScript
    Guha, Arjun
    Saftoiu, Claudiu
    Krishnamurthi, Shriram
    ECOOP 2010: OBJECT-ORIENTED PROGRAMMING, 2010, 6183 : 126 - 150
  • [27] Java']JavaScript.
    Gillespie, T
    LIBRARY JOURNAL, 2000, 125 (13) : 146 - 146
  • [28] The Java']JavaScript Ecosystem
    Frankston, Bob
    IEEE CONSUMER ELECTRONICS MAGAZINE, 2020, 9 (06) : 84 - 89
  • [29] Java']Javanni: A Verifier for Java']JavaScript
    Nordio, Martin
    Calcagno, Cristiano
    Furia, Carlo Alberto
    FUNDAMENTAL APPROACHES TO SOFTWARE ENGINEERING, FASE 2013, 2013, 7793 : 231 - 234
  • [30] Java与Javascript
    张光业
    微电脑世界, 1996, (11) : 62 - 65