Formal specification of a JavaScript module system
Formal specification of a JavaScript module system
复制标题
JavaScript 模块系统的正式规范
DOI:
--
复制
发表时间:
2012
期刊:
影响因子:
--
通讯作者:
Sukyoung Ryu
中科院分区:
文献类型:
--
作者:
Seonghoon Kang;Sukyoung Ryu
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.
DOI:
10.1109/csf.2009.11
发表时间:
2009
期刊:
--
影响因子:
--
作者:
Maffeis S
通讯作者:
Maffeis S