Citations
To cite the HipHopSec software, please use the following Biblatex entry.
@software{ HipHop.js title = {(A)Sychronous {R}eactive {W}eb {P}rogramming}, author = {Berry, G{\'e}rard and Serrano, Manuel}, year = {2020}, institution = {Inria}, url = {http://hop.inria.fr/hiphop} }
References
Krishnamurthy Jayanth
Techniques de débogage statique et dynamique pour le langage HipHop.js
,
Sophia-Antipolis, France,
Apr,
2023
Many of the modern day computer applications are reactive in nature, continuously reacting to the stimulus from its environment. IoT controllers for orchestration, responsive GUIs, collaborative video games are some of those reactive applications. HipHop.js, a synchronous reactive DSL inspired by Esterel for JavaScript can be used to build reactive applications. The objective of this thesis is to provide supporting infrastructure for building error free reactive applications using HipHop.js. There are two main contributions in this thesis. First one is the support for debugging a special class of errors - causal errors, typical to synchronous reactive systems,and the second one is to provide a software infrastructure for HipHop.js programmers to understand, and test the temporal behavior of their programs, aiding infault localization and improved debugging experience of HipHop.js programs. HipHop.js follows the model of perfect synchrony introduced in the Esterel programming language, and this may lead to classical causality error cycles during execution. These are generally difficult to isolate and to fix. In this thesis, the support for debugging causality errors in compile time and run time is presented in detail. First, illustrative examples explaining the origin and formation of causality errors in HipHop.js and the difficulties faced in debugging them are presented. Then, the techniques based on graph based algorithms that are used to construct better error messages directing programmers to the source of causal errors are presented. The effectiveness of the proposed methods is demonstrated with a realworld example. As a second contribution, a program analyzer with utilities that can be usedto understand the temporal behavior of HipHop.js programs, right from the early stages of program development is presented. The program analyzer aims to provide HipHop.js programmers easy to use interface that can simplify and automate error identification and localization. The presentation in the thesis has introduction to the program analyzer, detailing the motivation behind the various utilities it has. Then, illustrative examples explaining the usage of utilities and their advantages are presented. The implementation details including the tools and relevant theoryis the final part of the thesis on the program analyzer. The thesis also includes a brief introduction to reactive programming using HipHop.js to make the thesis self-contained and also provide a basic introduction to readers from non-reactive background. The illustrative examples on HipHop.js include control flow visualization for better understanding. The thesis concludes with a review on related literature and future work that can be carried on the infrastructure presented in this thesis.
Hoeflich Joshua, Findler Robert Bruce, Serrano Manuel
Highly Illogical, Kirk: Spotting Type Mismatches in the Large despite Broken Contracts, Unsound Types, and Too Many Linters
Proceedings of the ACM on Programming Languages (OOPSLA),
New York, NY, USA,
Oct,
2022
The DefinitelyTyped repository hosts type declarations for thousands of JavaScript libraries. Given the lack of formal connection between the types and the corresponding code, a natural question is are the types right? An equally important question, as DefinitelyTyped and the libraries it supports change over time, is how can we keep the types from becoming wrong? In this paper we offer Scotty, a tool that detects mismatches between the types and code in the Definitely-Typed repository. More specifically, Scotty checks each package by converting its types into contracts and installing the contracts on the boundary between the library and its test suite. Running the test suite in this environment can reveal mismatches between the types and the JavaScript code. As automation and generality are both essential if such a tool is going to remain useful in the long term, we focus on techniques that sacrifice completeness, instead preferring to avoid false positives. Scotty currently handles about 26% of the 8006 packages on DefinitelyTyped (61% of the packages whose code is available and whose test suite passes). Perhaps unsurprisingly, running the tests with these contracts in place revealed many errors in Definitely-Typed. More surprisingly, despite the inherent limitations of the techniques we use, this exercise led to one hundred accepted pull requests that fix errors in DefinitelyTyped, demonstrating the value of this approach for the long-term maintenance of DefinitelyTyped. It also revealed a number of lessons about working in the JavaScript ecosystem and how details beyond the semantics of the language can be surprisingly important. Best of all, it also revealed a few places where programmers preferred incorrect types, suggesting some avenues of research to improve TypeScript.
Serrano M., Findler R.
Dynamic Property Caches, a Step towards Faster JavaScripts Proxy Objects
Proceedings of the 29th Compiler Construction Conference (CC'20),
San Dieo, USA,
feb,
2020
Inline caches and hidden classes are two essential components for closing the performance gap between static languages such as Java, Scheme, or ML and dynamic languages such as JavaScript or Python. They rely on the observation that for a particular object access located at a particular point of the program, the shapes, usually referred to as the hidden classes, of accessed objects are likely to be the same. Taking benefit of that invariant, they replace the expensive lookup the semantics of these languages normally demand with one test, the inline cache, and a memory read indexed by an offset computed during the last cache miss. These optimizations are essential but they are not general enough to cope with JavaScript's proxies. In particular, when the property name is itself unknown statically, inline cache-based optimizations always take a slow path. In this paper, we show how to generalize inline caches to cope with an unknown property name. The paper first discusses the general principle of the extension and then presents the experimental results we collected using a modified version of the Hop JavaScript compiler, demonstrating how the optimization is crucial for improving the performance of proxy objects (as they naturally use dynamic property names extensively). The evaluation report shows that the modified Hop outperforms all other implementations of the language, including the most efficient commercial ones, by a factor ranging from 2 times to 100 times. Even better, our optimizations are applicable to existing compilers as they require only straightforward changes to runtime data structures; no complex analyses are required.
Berry. G. , Serrano M.
HipHop.js: (A)Synchronous Web Reactive Programming
Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI 2020),
London, UK,
,
2020
We present HipHop.js, a synchronous reactive language that adds synchronous concurrency and preemption to Inspired from Esterel, HipHop.js simplifies the programming of non-trivial temporal behaviors as found in complex web interfaces or IoT controllers and the cooperation between synchronous and asynchronous activities. HipHop.js is compiled into plain sequential and executes on unmodified runtime environments. We use three examples to present and discuss HipHop.js: a simple web login form to introduce the language and show how it differs from and two real life examples, a medical prescription pillbox and an interactive music system that show why concurrency and preemption help programming such temporal applications.