Dissertação de Mestrado

A Reference Implementation of ECMAScript Built-in Objects

David Manuel Sales Gonçalves2021

Informações chave

Autores:

David Manuel Sales Gonçalves (David Manuel Sales Gonçalves)

Orientadores:

José Faustino Fragoso Femenin dos Santos (José Faustino Fragoso Femenin dos Santos)

Publicado em

24/11/2021

Resumo

ECMAScript (ES), commonly known as JavaScript, is one of the most important programming languages today because it is the de facto option when it comes to dynamic front-end web development. Throughout the years, ES has become an increasingly complex language, making it a difficult target for static analyses. This project is part of a wider project that aims to build a trustworthy reference interpreter for ES, which will, among other things, enable the development of precise static analysis tools for modern ES applications through the use of a novel intermediate language called ECMA-SL. This work focuses on implementing three built-in objects of ECMA-262 Edition 5.1: Array (15.4), RegExp (15.10), and JSON (15.12). It also implements a few methods of the String (15.5) built-in object and implements the Promise (25.4) built-in object of the ECMA-262 6th Edition. This implementation scrupulously follows the ES standard’s pseudo-code line-by-line, thus ensuring that our interpreter is correct with respect to the standard and allowing us to regard the interpreter as the standard itself in the context of static analysis. To this end, we also extend the ECMA-SL execution engine with new programming constructs, including UTF-8 support. Furthermore, our reference implementation is thoroughly tested against Test262, the official ECMAScript test suite. Finally, in order to assist with the transition from the current HTML representation of the standard to ECMA-SL, we introduce HTML2ECMA-SL, a tool that aims to generate the ECMA-SL code for any given function described in the standard.

Detalhes da publicação

Autores da comunidade :

Orientadores desta instituição:

Domínio Científico (FOS)

electrical-engineering-electronic-engineering-information-engineering - Engenharia Eletrotécnica, Eletrónica e Informática

Idioma da publicação (código ISO)

eng - Inglês

Acesso à publicação:

Embargo levantado

Data do fim do embargo:

22/09/2022

Nome da instituição

Instituto Superior Técnico