Reactors: A Deterministic Model for Composable Reactive Systems

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11971)


This paper describes a component-based concurrent model of computation for reactive systems. The components in this model, featuring ports and hierarchy, are called reactors. The model leverages a semantic notion of time, an event scheduler, and a synchronous-reactive style of communication to achieve determinism. Reactors enable a programming model that ensures determinism, unless explicitly abandoned by the programmer. We show how the coordination of reactors can safely and transparently exploit parallelism, both in shared-memory and distributed systems.



The authors thank the anonymous reviewers for their perceptive feedback on an earlier version of this paper.


  1. 1.
    Agha, G.: ACTORS: A Model of Concurrent Computation in Distributed Systems. The MIT Press Series in Artificial Intelligence. MIT Press, Cambridge (1986)Google Scholar
  2. 2.
    Armstrong, J., Virding, R., Wikström, C., Williams, M.: Concurrent programming in Erlang, 2nd edn. Prentice Hall (1996)Google Scholar
  3. 3.
    Bai, Y.: Desynchronization: From macro-step to micro-step. In: 2018 16th ACM/IEEE International Conference on Formal Methods and Models for System Design (MEMOCODE), pp. 1–10, October 2018Google Scholar
  4. 4.
    Bainomugisha, E., Carreton, A.L., Cutsem, T.V., Mostinckx, S., Meuter, W.D.: A survey on reactive programming. ACM Comput. Surv. (CSUR) 45(4), 52 (2013)CrossRefGoogle Scholar
  5. 5.
    Baker Jr., H.C., Hewitt, C.: The incremental garbage collection of processes. ACM Sigplan Not. 12(8), 55–59 (1977)CrossRefGoogle Scholar
  6. 6.
    Banken, H., Meijer, E., Gousios, G.: Debugging data flows in reactive programs. In: 2018 IEEE/ACM 40th International Conference on Software Engineering (ICSE), pp. 752–763. IEEE (2018)Google Scholar
  7. 7.
    Benveniste, A., Le Guernic, P.: Hybrid dynamical systems theory and the SIGNAL language. IEEE Trans. Autom. Control 35(5), 525–546 (1990)MathSciNetCrossRefGoogle Scholar
  8. 8.
    Berry, G., Gonthier, G.: The Esterel synchronous programming language: design, semantics, implementation. Sci. Comput. Program. 19(2), 87–152 (1992)CrossRefGoogle Scholar
  9. 9.
    Bilsen, G., Engels, M., Lauwereins, R., Peperstraete, J.A.: Static scheduling of multi-rate and cyclo-static DSP applications. In: Workshop on VLSI Signal Processing. IEEE Press (1994)Google Scholar
  10. 10.
    Bonér, J., Farley, D., Kuhn, R., Thompson, M.: The reactive manifesto (2014).
  11. 11.
    Bonér, J., Klang, V., Kuhn, R., et al.: Akka library (2011–2019).
  12. 12.
    Brooks, C., et al.: A component architecture for the Internet of Things. Proc. IEEE 106(9), 1527–1542 (2018)CrossRefGoogle Scholar
  13. 13.
    Lombide Carreton, A., Mostinckx, S., Van Cutsem, T., De Meuter, W.: Loosely-coupled distributed reactive programming in mobile ad hoc networks. In: Vitek, J. (ed.) TOOLS 2010. LNCS, vol. 6141. Springer, Heidelberg (2010). Scholar
  14. 14.
    Chapiro, D.M.: Globally-asynchronous locally-synchronous systems. Ph.D. thesis, Stanford University, October 1984Google Scholar
  15. 15.
    Cooper, G.H., Krishnamurthi, S.: Embedding dynamic dataflow in a call-by-value language. In: Sestoft, P. (ed.) ESOP 2006. LNCS, vol. 3924. Springer, Heidelberg (2006). Scholar
  16. 16.
    Corbett, J.C., et al.: Spanner: Google’s globally-distributed database. In: OSDI (2012)Google Scholar
  17. 17.
    Cremona, F., Lohstroh, M., Broman, D., Lee, E.A., Masin, M., Tripakis, S.: Hybrid co-simulation: it’s about time. Softw. Syst. Model. 18, 1622–1679 (2017)CrossRefGoogle Scholar
  18. 18.
    Czaplicki, E., Chong, S.N.: Asynchronous functional reactive programming for GUIs. In: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation-PLDI 2013. ACM Press (2013)Google Scholar
  19. 19.
    Dennis, J.B.: First version data flow procedure language. Report MAC TM61, MIT Laboratory for Computer Science (1974)Google Scholar
  20. 20.
    Edwards, J.: Coherent reaction. In: Proceedings of the 24th ACM SIGPLAN Conference Companion on Object Oriented Programming Systems Languages and Applications, pp. 925–932. ACM (2009)Google Scholar
  21. 21.
    Eidson, J., Lee, E.A., Matic, S., Seshia, S.A., Zou, J.: Distributed real-time software for cyber-physical systems. Proc. IEEE (Spec. Issue CPS) 100(1), 45–59 (2012)CrossRefGoogle Scholar
  22. 22.
    Elliott, C., Hudak, P.: Functional reactive animation. In: ACM SIGPLAN Notices, vol. 32, pp. 263–273 (1997)CrossRefGoogle Scholar
  23. 23.
    Friedman, D.P., Wise, D.S.: The impact of applicative programming on multiprocessing. Indiana University, Computer Science Department (1976)Google Scholar
  24. 24.
    Gajski, D.: SpecC: Specification Language and Methodology. Kluwer Academic Publishers, Norwell (2000)CrossRefGoogle Scholar
  25. 25.
    S.C.S.W. Group, et al.: 1666–2011-IEEE standard for standard SystemC language reference manual (2012)Google Scholar
  26. 26.
    Halbwachs, N., Caspi, P., Raymond, P., Pilaud, D.: The synchronous data flow programming language LUSTRE. Proc. IEEE 79(9), 1305–1319 (1991)CrossRefGoogle Scholar
  27. 27.
    Haller, P., Odersky, M.: Scala actors: unifying thread-based and event-based programming. Theor. Comput. Sci. 410(2–3), 202–220 (2009)MathSciNetCrossRefGoogle Scholar
  28. 28.
    Harel, D., Pnueli, A.: On the development of reactive systems. In: Apt, K.R. (ed.) Logics and Models of Concurrent Systems, vol. 13, pp. 477–498. Springer, Heidelberg (1985). Scholar
  29. 29.
    Harel, D.: Statecharts: a visual formalism for complex systems. Sci. Comput. Program. 8(3), 231–274 (1987)MathSciNetCrossRefGoogle Scholar
  30. 30.
    Hewitt, C.: Viewing control structures as patterns of passing messages. J. Artif. Intell. 8(3), 323–363 (1977)CrossRefGoogle Scholar
  31. 31.
    Hewitt, C., Bishop, P.B., Steiger, R.: A universal modular ACTOR formalism for artificial intelligence. In: Proceedings of the 3rd International Joint Conference on Artificial Intelligence. Standford, CA, USA, 20–23 August 1973, pp. 235–245 (1973)Google Scholar
  32. 32.
    Kahn, G.: The semantics of a simple language for parallel programming. In: Proceedings of the IFIP Congress 74, pp. 471–475. North-Holland Publishing Co. (1974)Google Scholar
  33. 33.
    Koopman, P.: A case study of Toyota unintended acceleration and software safety (2014).
  34. 34.
    Kuhn, R., Hanafee, B., Allen, J.: Reactive Design Patterns. Manning Publications Company (2017)Google Scholar
  35. 35.
    Lee, E., Reineke, J., Zimmer, M.: Abstract PRET machines. In: 2017 IEEE Real-Time Systems Symposium (RTSS), pp. 1–11, December 2017Google Scholar
  36. 36.
    Lee, E.A., Messerschmitt, D.G.: Synchronous data flow. Proc. IEEE 75(9), 1235–1245 (1987)CrossRefGoogle Scholar
  37. 37.
    Lee, E.A., Parks, T.M.: Dataflow process networks. Proc. IEEE 83(5), 773–801 (1995)CrossRefGoogle Scholar
  38. 38.
    Lee, E.A.: The problem with threads. Computer 39(5), 33–42 (2006)CrossRefGoogle Scholar
  39. 39.
    Lee, E.A., Sangiovanni-Vincentelli, A.: A framework for comparing models of computation. IEEE Trans. Comput.-Aided Des. Circuits Syst. 17(12), 1217–1229 (1998)CrossRefGoogle Scholar
  40. 40.
    Lee, E.A., Zheng, H.: Operational semantics of hybrid systems. In: Morari, M., Thiele, L. (eds.) HSCC 2005. LNCS, vol. 3414, pp. 25–53. Springer, Heidelberg (2005). Scholar
  41. 41.
    Lee, E.A., Zheng, H.: Leveraging synchronous language principles for heterogeneous modeling and design of embedded systems. In: EMSOFT, pp. 114–123. ACM (2007)Google Scholar
  42. 42.
    Liao, S., Tjiang, S., Gupta, R.: An efficient implementation of reactivity for modeling hardware in the Scenic design environment. In: Design Automation Conference. ACM (1997)Google Scholar
  43. 43.
    Liu, X., Matsikoudis, E., Lee, E.A.: Modeling timed concurrent systems. In: Baier, C., Hermanns, H. (eds.) CONCUR 2006. LNCS, vol. 4137, pp. 1–15. Springer, Heidelberg (2006). Scholar
  44. 44.
    Lohstroh, M., Lee, E.A.: Deterministic actors. In: 2019 Forum for Specification and Design Languages (FDL), pp. 1–8, 2–4 September 2019Google Scholar
  45. 45.
    Lohstroh, M., Schoeberl, M., Jan, M., Wang, E., Lee, E.A.: Work-in-progress: programs with ironclad timing guarantees. In: 2019 International Conference on Embedded Software (EMSOFT), October 2019Google Scholar
  46. 46.
    Lohstroh, M., et al.: Actors revisited for time-critical systems. In: Proceedings of the 56th Annual Design Automation Conference 2019, DAC 2019, Las Vegas, NV, USA, 02–06 June 2019, pp. 152:1–152:4. ACM (2019)Google Scholar
  47. 47.
    Maler, O., Manna, Z., Pnueli, A.: Prom timed to hybrid systems. In: de Bakker, J.W., Huizing, C., de Roever, W.P., Rozenberg, G. (eds.) REX 1991. LNCS, vol. 600. Springer, Heidelberg (1992). Scholar
  48. 48.
    Matsikoudis, E., Lee, E.A.: The fixed-point theory of strictly causal functions. Technical report UCB/EECS-2013-122, EECS Department, University of California, Berkeley, 9 June 2013Google Scholar
  49. 49.
    Meijer, E.: Reactive extensions (Rx): curing your asynchronous programming blues. In: ACM SIGPLAN Commercial Users of Functional Programming, CUFP 2010, pp. 11:1–11:1. ACM, New York (2010)Google Scholar
  50. 50.
    Moritz, P., et al.: Ray: a distributed framework for emerging AI applications. simarXiv:1712.05889v2 [cs.DC] 30 Sept 2018 (2018)Google Scholar
  51. 51.
    Myter, F., Scholliers, C., De Meuter, W.: Distributed reactive programming for reactive distributed systems. arXiv preprint arXiv:1902.00524 (2019)
  52. 52.
    NASA Engineering and Safety Center: National highway traffic safety administration Toyota unintended acceleration investigation. Technical assessment report, NASA, 18 January 2011Google Scholar
  53. 53.
    Parks, T.M.: Bounded scheduling of process networks. Ph.D. thesis. Technical report UCB/ERL M95/105, UC Berkeley (1995)Google Scholar
  54. 54.
    Prokopec, A.: Pluggable scheduling for the reactor programming model. In: Ricci, A., Haller, P. (eds.) Programming with Actors. LNCS, vol. 10789. Springer, Cham (2018). Scholar
  55. 55.
    Roestenburg, R., Bakker, R., Williams, R.: Akka in Action. Manning Publications Co. (2016)Google Scholar
  56. 56.
    Schoeberl, M., Puffitsch, W., Hepp, S., Huber, B., Prokesch, D.: Patmos: a time-predictable microprocessor. Real-Time Syst. 54(2), 389–423 (2018)CrossRefGoogle Scholar
  57. 57.
    Tasharofi, S., Dinges, P., Johnson, R.E.: Why do scala developers mix the actor model with other concurrency models? In: Castagna, G. (ed.) ECOOP 2013. LNCS, vol. 7920. Springer, Heidelberg (2013). Scholar
  58. 58.
    Tilkov, S., Vinoski, S.: Node. js: using JavaScript to build high-performance network programs. IEEE Internet Comput. 14(6), 80–83 (2010)CrossRefGoogle Scholar
  59. 59.
    Torres Lopez, C., Gurdeep Singh, R., Marr, S., Gonzalez Boix, E., Scholliers, C.: Multiverse debugging: non-deterministic debugging for non-deterministic programs (2019)Google Scholar
  60. 60.
    Vernon, V.: Reactive Messaging Patterns with the Actor Model: Applications and Integration in Scala and Akka. Addison-Wesley Professional (2015)Google Scholar
  61. 61.
    Zhao, Y., Lee, E.A., Liu, J.: A programming model for time-synchronized distributed real-time systems. In: Real-Time and Embedded Technology and Applications Symposium (RTAS), pp. 259–268. IEEE (2007)Google Scholar
  62. 62.
    Zhao, Y., Liu, J., Lee, E.A.: A programming model for time-synchronized distributed real-time systems. In: 13th IEEE Real Time and Embedded Technology and Applications Symposium, RTAS 2007, pp. 259–268, April 2007Google Scholar
  63. 63.
    Zimmer, M., Broman, D., Shaver, C., Lee, E.A.: FlexPRET: a processor platform for mixed-criticality systems. In: Real-Time and Embedded Technology and Application Symposium (RTAS) (2014)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  1. 1.Department of Electrical Engineering and Computer SciencesUC BerkeleyBerkeleyUSA
  2. 2.Chair for Compiler ConstructionTU DresdenDresdenGermany
  3. 3.National InstrumentsAustinUSA

Personalised recommendations