Formal specification of a JavaScript module system

Formal specification of a JavaScript module system
复制标题

JavaScript 模块系统的正式规范

DOI:
--
复制
发表时间:
2012
期刊:
Conference on Object-Oriented Programming Systems, Languages, and Applications
影响因子:
--
通讯作者:
Sukyoung Ryu
Sukyoung Ryu
中科院分区:
--
文献类型:
--
作者:
Seonghoon Kang;Sukyoung Ryu

文献摘要

参考文献

被引文献

相似文献

最初作为一种简单的脚本语言开发的JavaScript编程语言,现在是Web应用程序的首选语言。网络上排名前100位的网站都使用了脚本,而且在网页之外的使用也在迅速增长。然而,对于大规模编程来说,JavaScript还没有做好准备:它不支持模块系统。缺少命名空间会引入模块模式,并使同时使用多个JavaScript框架变得困难。 在这篇文章中,我们提出了一个形式化的规格说明的一个JavaScript模块系统。一个用于JavaScript的模块系统将允许安全和增量地开发JavaScript Web应用程序。虽然下一个版本的JavaScript标准提出了一个模块系统,但它以散文的形式非正式地描述了它的设计。我们正式指定了一个模块系统作为对现有的JavaScript语言的扩展,并通过对LambdaJS的去丑化严格地描述了它的语义,LambdaJS是一个先前的Java语言的核心演算。我们实现了去糖化过程,并使用真实世界的测试套件展示了它的真实性。最后,我们使用模块为有效的Java程序定义了一组属性,并形式化地证明了所提出的模块系统满足有效性属性。
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 LambdaJS, 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.
基于语言的不可信 JavaScript 隔离
DOI: 10.1109/csf.2009.11
发表时间: 2009
期刊: --
影响因子: --
作者:
Maffeis S
通讯作者: Maffeis S