Fully abstract compilation to JavaScript
Fully abstract compilation to JavaScript
复制标题
完全抽象编译为 JavaScript
DOI:
--
复制
发表时间:
2013
期刊:
影响因子:
--
通讯作者:
B. Livshits
中科院分区:
文献类型:
--
作者:
C. Fournet;N. Swamy;Juan Chen;Pierre;Pierre;B. Livshits
Many tools allow programmers to develop applications in high-level languages and deploy them in web browsers via compilation to JavaScript. While practical and widely used, these compilers are ad hoc: no guarantee is provided on their correctness for whole programs, nor their security for programs executed within arbitrary JavaScript contexts. This paper presents a compiler with such guarantees. We compile an ML-like language with higher-order functions and references to JavaScript, while preserving all source program properties. Relying on type-based invariants and applicative bisimilarity, we show full abstraction: two programs are equivalent in all source contexts if and only if their wrapped translations are equivalent in all JavaScript contexts. We evaluate our compiler on sample programs, including a series of secure libraries.