ABSTRACT
HipHop.js is a synchronous reactive DSL for JavaScript built on top of Hop.js. HipHop.js follows the model of perfect synchrony introduced in the Esterel programming language, this may lead to classical causality error cycles, which might be difficult to isolate and to fix. In this work, we discuss in detail the support for debugging causality errors in HipHop.js. First, we provide illustrative examples explaining the origin and formation of causality errors and the difficulties faced in debugging them. Then, we present the techniques and algorithms used to construct precise error messages that direct programmers to the source of errors. We illustrate the effectiveness of the proposed methods on a real world example. Recent reactive technologies and programming languages like FRP, ReactiveX, etc., used in game and GUI development too encounter causality errors, and we feel that our approach used in HipHop.js can help them in debugging in a better way.
- Herman Banken, Erik Meijer, and Georgios Gousios. 2018. Debugging data flows in reactive programs. In 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE). IEEE, 752–763.Google ScholarDigital Library
- Albert Benveniste, Paul Le Guernic, and Christian Jacquemot. 1991. Synchronous programming with events and relations: the SIGNAL language and its semantics. Science of computer programming 16, 2 (1991), 103–149.Google Scholar
- Gérard Berry. 1989. Real time programming: Special purpose or general purpose languages. (1989).Google Scholar
- Gerard Berry. 1999. The constructive semantics of pure Esterel. Draft version 3. Draft Version 3(1999).Google Scholar
- Gérard Berry. 2007. SCADE: Synchronous design and validation of embedded control software. In Next Generation Design and Verification Methodologies for Distributed Embedded Control Systems. Springer, 19–33.Google Scholar
- Gérard Berry and Georges Gonthier. 1992. The Esterel synchronous programming language: Design, semantics, implementation. Science of computer programming 19, 2 (1992), 87–152.Google Scholar
- Gérard Berry and Manuel Serrano. 2020. HipHop.js:(A) Synchronous reactive web programming. In PLDI. 533–545.Google Scholar
- Stephen Blackheath and Anthony Jones. 2016. Functional reactive programming. Manning Publications Co.Google Scholar
- François Bourdoncle. 1993. Efficient chaotic iteration strategies with widenings. In Formal Methods in Programming and their Applications. Springer, 128–141.Google Scholar
- Frédéric Boussinot. 1991. Reactive C: An extension of C to program reactive systems. Software: Practice and Experience 21, 4 (1991), 401–428.Google ScholarDigital Library
- Frédéric Boussinot. 1998. SugarCubes implementation of causality. (1998).Google Scholar
- Frédéric Boussinot and Robert De Simone. 1991. The ESTEREL language. Proc. IEEE 79, 9 (1991), 1293–1304.Google ScholarCross Ref
- Frédéric Boussinot and Jean-Ferdy Susini. 1998. The SugarCubes tool box: a reactive Java framework. Software: Practice and Experience 28, 14 (1998), 1531–1550.Google ScholarDigital Library
- Paul Caspi, Daniel Pilaud, Nicolas Halbwachs, and John A Plaice. 1987. LUSTRE: a declarative language for real-time programming. In Proceedings of the 14th ACM SIGACT-SIGPLAN symposium on Principles of programming languages. 178–188.Google ScholarDigital Library
- Matt Elder. 2010. Bourdoncle Components. (2010).Google Scholar
- Nicholas Halbwachs, Paul Caspi, Pascal Raymond, and Daniel Pilaud. 1991. The synchronous data flow programming language LUSTRE. Proc. IEEE 79, 9 (1991), 1305–1320.Google ScholarCross Ref
- N. Halbwachs and F. Maraninchi. 1995. On the symbolic analysis of combinational loops in circuits and synchronous programs. In Euromicro’95. Como (Italy).Google Scholar
- David Harel, Amir Pnueli, and KR Apt. 1985. Logics and models of concurrent systems. NATO Advanced Study Institute. chapter On the development of reactive systems 471(1985), 498.Google ScholarDigital Library
- Edward A. Lee and Haiyang Zheng. 2007. Leveraging Synchronous Language Principles for Heterogeneous Modeling and Design of Embedded Systems. In Proceedings of the 7th ACM & IEEE International Conference on Embedded Software (Salzburg, Austria) (EMSOFT ’07). Association for Computing Machinery, New York, NY, USA, 114–123. https://doi.org/10.1145/1289927.1289949Google ScholarDigital Library
- Marten Lohstroh, Christian Menard, Alexander Schulz-Rosengarten, Matthew Weber, Jeronimo Castrillon, and Edward A. Lee. 2020. A Language for Deterministic Coordination Across Multiple Timelines. In 2020 Forum for Specification and Design Languages (FDL). 1–8. https://doi.org/10.1109/FDL50818.2020.9232939Google Scholar
- Louis Mandel and Marc Pouzet. 2005. ReactiveML: a reactive extension to ML. In Proceedings of the 7th ACM SIGPLAN international conference on Principles and practice of declarative programming. 82–93.Google ScholarDigital Library
- Girish Keshav Palshikar. 2001. An introduction to Esterel. Embedded Systems Programming 14, 11 (2001).Google Scholar
- Erik Pasternak, Rachel Fenichel, and Andrew N Marshall. 2017. Tips for creating a block language with blockly. In 2017 IEEE Blocks and Beyond Workshop (B&B). IEEE, 21–24.Google ScholarCross Ref
- Bertrand Petit and Manuel Serrano. 2019. Composing and Performing Interactive Music using the HipHop. js language. In NIME 2019-New Interfaces for Musical Expression.Google Scholar
- Bertrand Petit and Manuel Serrano. 2020. Interactive Music and Synchronous Reactive Programming. arXiv preprint arXiv:2006.03102(2020).Google Scholar
- Dumitru Potop-Butucaru, Stephen A Edwards, and Gérard Berry. 2007. Compiling esterel. Vol. 86. Springer Science & Business Media.Google Scholar
- Guido Salvaneschi and Mira Mezini. 2016. Debugging for reactive programming. In 2016 IEEE/ACM 38th International Conference on Software Engineering (ICSE). IEEE, 796–807.Google ScholarDigital Library
- Klaus Schneider. 2009. The synchronous programming language Quartz. Technical Report. Internal Report 375, Department of Computer Science, University of Kaiserslautern.Google Scholar
- Manuel Serrano and Vincent Prunet. 2016. A glimpse of Hop.js. ACM SIGPLAN Notices 51, 9 (2016), 180–192.Google ScholarDigital Library
- Thomas R. Shiple. 1996. Formal Analysis of Synchronous Circuits. Ph.D. Dissertation. EECS Department, University of California, Berkeley. http://www2.eecs.berkeley.edu/Pubs/TechRpts/1996/3126.htmlGoogle ScholarDigital Library
- Thomas R Shiple, Gérard Berry, and Herve Touati. 1996. Constructive analysis of cyclic circuits. In Proceedings ED&TC European Design and Test Conference. IEEE, 328–333.Google ScholarCross Ref
- Thibault Suzanne. [n.d.]. Weak Topological. http://ocamlgraph.lri.fr/doc/WeakTopological.html. Accessed: 2021-05-18.Google Scholar
- Robert Tarjan. 1972. Depth-first search and linear graph algorithms. SIAM journal on computing 1, 2 (1972), 146–160.Google Scholar
Index Terms
- Causality Error Tracing in HipHop.js
Recommendations
Tracing data errors with view-conditioned causality
SIGMOD '11: Proceedings of the 2011 ACM SIGMOD International Conference on Management of dataA surprising query result is often an indication of errors in the query or the underlying data. Recent work suggests using causal reasoning to find explanations for the surprising result. In practice, however, one often has multiple queries and/or ...
Complexity results for structure-based causality
We give a precise picture of the computational complexity of causal relationships in Pearl's structural models, where we focus on causality between variables, event causality, and probabilistic causality. As for causality between variables, we consider ...
Granular Causality Applications: Using Part-of Relations for Discovering Causality
Causal markers, syntactic structures and connectives have been the sole identifying features for automatically extracting causal relations in natural language discourse. However, various connectives such as "and", prepositions such as "as", and other ...
Comments