skip to main content
10.1145/3479394.3479408acmotherconferencesArticle/Chapter ViewAbstractPublication PagesppdpConference Proceedingsconference-collections
research-article

Causality Error Tracing in HipHop.js

Published:07 October 2021Publication History

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle Scholar
  3. Gérard Berry. 1989. Real time programming: Special purpose or general purpose languages. (1989).Google ScholarGoogle Scholar
  4. Gerard Berry. 1999. The constructive semantics of pure Esterel. Draft version 3. Draft Version 3(1999).Google ScholarGoogle Scholar
  5. 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 ScholarGoogle Scholar
  6. 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 ScholarGoogle Scholar
  7. Gérard Berry and Manuel Serrano. 2020. HipHop.js:(A) Synchronous reactive web programming. In PLDI. 533–545.Google ScholarGoogle Scholar
  8. Stephen Blackheath and Anthony Jones. 2016. Functional reactive programming. Manning Publications Co.Google ScholarGoogle Scholar
  9. François Bourdoncle. 1993. Efficient chaotic iteration strategies with widenings. In Formal Methods in Programming and their Applications. Springer, 128–141.Google ScholarGoogle Scholar
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. Frédéric Boussinot. 1998. SugarCubes implementation of causality. (1998).Google ScholarGoogle Scholar
  12. Frédéric Boussinot and Robert De Simone. 1991. The ESTEREL language. Proc. IEEE 79, 9 (1991), 1293–1304.Google ScholarGoogle ScholarCross RefCross Ref
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. Matt Elder. 2010. Bourdoncle Components. (2010).Google ScholarGoogle Scholar
  16. 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 ScholarGoogle ScholarCross RefCross Ref
  17. N. Halbwachs and F. Maraninchi. 1995. On the symbolic analysis of combinational loops in circuits and synchronous programs. In Euromicro’95. Como (Italy).Google ScholarGoogle Scholar
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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 ScholarGoogle Scholar
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. Girish Keshav Palshikar. 2001. An introduction to Esterel. Embedded Systems Programming 14, 11 (2001).Google ScholarGoogle Scholar
  23. 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 ScholarGoogle ScholarCross RefCross Ref
  24. 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 ScholarGoogle Scholar
  25. Bertrand Petit and Manuel Serrano. 2020. Interactive Music and Synchronous Reactive Programming. arXiv preprint arXiv:2006.03102(2020).Google ScholarGoogle Scholar
  26. Dumitru Potop-Butucaru, Stephen A Edwards, and Gérard Berry. 2007. Compiling esterel. Vol. 86. Springer Science & Business Media.Google ScholarGoogle Scholar
  27. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. Klaus Schneider. 2009. The synchronous programming language Quartz. Technical Report. Internal Report 375, Department of Computer Science, University of Kaiserslautern.Google ScholarGoogle Scholar
  29. Manuel Serrano and Vincent Prunet. 2016. A glimpse of Hop.js. ACM SIGPLAN Notices 51, 9 (2016), 180–192.Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle ScholarCross RefCross Ref
  32. Thibault Suzanne. [n.d.]. Weak Topological. http://ocamlgraph.lri.fr/doc/WeakTopological.html. Accessed: 2021-05-18.Google ScholarGoogle Scholar
  33. Robert Tarjan. 1972. Depth-first search and linear graph algorithms. SIAM journal on computing 1, 2 (1972), 146–160.Google ScholarGoogle Scholar

Index Terms

  1. Causality Error Tracing in HipHop.js
      Index terms have been assigned to the content through auto-classification.

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Other conferences
        PPDP '21: Proceedings of the 23rd International Symposium on Principles and Practice of Declarative Programming
        September 2021
        277 pages
        ISBN:9781450386890
        DOI:10.1145/3479394

        Copyright © 2021 ACM

        Publication rights licensed to ACM. ACM acknowledges that this contribution was authored or co-authored by an employee, contractor or affiliate of a national government. As such, the Government retains a nonexclusive, royalty-free right to publish or reproduce this article, or to allow others to do so, for Government purposes only.

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 7 October 2021

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed limited

        Acceptance Rates

        Overall Acceptance Rate230of486submissions,47%
      • Article Metrics

        • Downloads (Last 12 months)20
        • Downloads (Last 6 weeks)4

        Other Metrics

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      HTML Format

      View this article in HTML Format .

      View HTML Format