Formal Specification of a Java']JavaScript Module System

被引:6
|
作者
Kang, Seonghoon [1 ]
Ryu, Sukyoung [1 ]
机构
[1] Korea Adv Inst Sci & Technol, Taejon, South Korea
基金
新加坡国家研究基金会;
关键词
Languages; !text type='Java']Java[!/text]Script; module system; desugaring; formalization;
D O I
10.1145/2398857.2384661
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The JavaScript programming language, originally developed as a simple scripting language, is now the language of choice for web applications. All the top 100 sites on the web use JavaScript and its use outside web pages is rapidly growing. However, JavaScript is not yet ready for programming in the large: it does not support a module system. Lack of namespaces introduces module patterns, and makes it difficult to use multiple JavaScript frameworks together. In this paper, we propose a formal specification of a JavaScript module system. A module system for JavaScript will allow safe and incremental development of JavaScript web applications. While the next version of the JavaScript standard proposes a module system, it informally describes its design in prose. We formally specify a module system as an extension to the existing JavaScript language, and rigorously describe its semantics via desugaring to lambda(JS), a prior core calculus for JavaScript. We implement the desugaring process and show its faithfulness using real-world test suites. Finally, we define a set of properties for valid JavaScript programs using modules and formally prove that the proposed module system satisfies the validity properties.
引用
收藏
页码:621 / 638
页数:18
相关论文
共 50 条
  • [1] A Trusted Mechanised Java']JavaScript Specification
    Bodin, Martin
    Chargueraud, Arthur
    Filaretti, Daniele
    Gardner, Philippa
    Maffeis, Sergio
    Naudziuniene, Daiva
    Schmitt, Alan
    Smith, Gareth
    ACM SIGPLAN NOTICES, 2014, 49 (01) : 87 - 100
  • [2] A formal specification of Java']Java™ class leading
    Qian, ZY
    Goldberg, A
    Coglio, A
    ACM SIGPLAN NOTICES, 2000, 35 (10) : 325 - 336
  • [3] Formal specification and verification of Java']Java refactorings
    Garrido, Alejandra
    Meseguer, Jose
    SIXTH IEEE INTERNATIONAL WORKSHOP ON SOURCE CODE ANALYSIS AND MANIPULATION, PROCEEDINGS, 2006, : 165 - +
  • [4] A Trusted Mechanised Specification of Java']JavaScript: One Year On
    Gardner, Philippa
    Smith, Gareth
    Watt, Conrad
    Wood, Thomas
    COMPUTER AIDED VERIFICATION, PT I, 2015, 9206 : 3 - 10
  • [5] A formal specification in JML of Java']Java security package
    Agarwal, Poonam
    Rubio-Medrano, Carlos E.
    Cheon, Yoonsik
    Teller, Patricia. J.
    ADVANCES AND INNOVATIONS IN SYSTEMS, COMPUTING SCIENCES AND SOFTWARE ENGINEERING, 2007, : 363 - 368
  • [6] A formal specification of Java™ class loading
    Kestrel Institute, 3260 Hillview Avenue, Palo Alto, CA 94304, United States
    Proc Cinf Object Orient Program Syst Lang Appl OOPSLA, 1600, 10 (325-336): : 325 - 336
  • [7] KJS']JS: A Complete Formal Semantics of Java']JavaScript
    Park, Daejun
    Stefanescu, Andrei
    Rosu, Grigore
    ACM SIGPLAN NOTICES, 2015, 50 (06) : 346 - 356
  • [8] Discovering anomalies in access modifiers in Java']Java with a formal specification
    Yang, W
    JOOP-JOURNAL OF OBJECT-ORIENTED PROGRAMMING, 2001, 13 (10): : 12 - 18
  • [9] A Formal Model for Checking Cryptographic API Usage in Java']JavaScript
    Mitchell, Duncan
    Kinder, Johannes
    COMPUTER SECURITY - ESORICS 2019, PT I, 2019, 11735 : 341 - 360
  • [10] jDSSAT: A Java']JavaScript Module for DSSAT-CSM integration
    Resenes, Jonas de Abreu
    Pavan, Willingthon
    Holbig, Carlos Amaral
    Cunha Fernandes, Jose Mauricio
    Shelia, Vakhtang
    Porter, Cheryl
    Hoogenboom, Gerrit
    SOFTWAREX, 2019, 10