Skip to main content

A Note on Idleness Detection of Actor Systems

  • Chapter
  • First Online:
The Logic of Software. A Tasting Menu of Formal Methods

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13360))

  • 652 Accesses

Abstract

In an actor system, detecting global idleness is trivial if the global state can be inspected synchronously. A distributed implementation, especially with asynchronous messages, poses more problems. This paper discusses detecting idleness in actor systems with various characteristics, among them topology and message passing semantics. We present a TLA+ specification of a simple termination detection algorithm, add necessary conditions missing in the original description, and establish a correctness invariant to model-check the specification against. We further show via model-checking that the algorithm only works with synchronous messages but is robust against message reordering. We then model and discuss a simplified version of the idleness detection implementation in the Erlang backend of the ABS modeling language.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Armstrong, J.: Erlang. Commun. ACM 53(9), 68–75 (2010). https://doi.org/10.1145/1810891.1810910

    Article  Google Scholar 

  2. Chandy, K.M., Misra, J.: How processes learn. Distrib. Comput. 1(1), 40–52 (1986). https://doi.org/10.1007/BF01843569

    Article  MATH  Google Scholar 

  3. Dijkstra, E.W., Feijen, W., van Gasteren, A.: Derivation of a termination detection algorithm for distributed computations. Inf. Process. Lett. 16(5), 217–219 (1983). https://doi.org/10.1016/0020-0190(83)90092-3

    Article  MathSciNet  MATH  Google Scholar 

  4. Göri, G.: Erlang-based Execution and Error Handling for Abstract Behavioural Specifications. Master’s thesis, Graz University of Technology, Institute for Software Technology (2015). https://diglib.tugraz.at/download.php?id=576a741586a71&location=search

  5. Johnsen, E.B., Hähnle, R., Schäfer, J., Schlatte, R., Steffen, M.: ABS: a core language for abstract behavioral specification. In: Aichernig, B.K., de Boer, F.S., Bonsangue, M.M. (eds.) FMCO 2010. LNCS, vol. 6957, pp. 142–164. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-25271-6_8

    Chapter  Google Scholar 

  6. Johnsen, E.B., Schlatte, R., Tapia Tarifa, S.L.: Integrating deployment architectures and resource consumption in timed object-oriented models. J. Logical Algebraic Methods Program. 84(1), 67–91 (2015). https://doi.org/10.1016/j.jlamp.2014.07.001

    Article  MATH  Google Scholar 

  7. Lamport, L.: Specifying Systems: The TLA+ Language and Tools for Hardware and Software Engineers. Addison-Wesley, Boston (2002)

    Google Scholar 

  8. Matocha, J., Camp, T.: A taxonomy of distributed termination detection algorithms. J. Syst. Softw. 43(3), 207–221 (1998). https://doi.org/10.1016/S0164-1212(98)10034-1

    Article  Google Scholar 

  9. Newcombe, C., Rath, T., Zhang, F., Munteanu, B., Brooker, M., Deardeuff, M.: How Amazon web services uses formal methods. Commun. ACM 58(4), 66–73 (2015). https://doi.org/10.1145/2699417

    Article  Google Scholar 

Download references

Acknowledgements

The development of ABS was supported by the EU projects HATS and Envisage. Reiner Hähnle participated in Envisage and coordinated HATS; his influence on the development and developer of ABS is gratefully acknowledged.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rudolf Schlatte .

Editor information

Editors and Affiliations

Appendices

A Dijkstra’s Algorithm

figure a
figure b

B Asynchronous Message Sending in the Dijkstra Algorithm Model

Add the inbox variable and replace the rule \( sendMsg(i, j) \) of Appendix A with the two rules sendMsg, becomeActive as follows:

figure c

C Specification of the Erlang Backend Behavior

figure d
figure e

Rights and permissions

Reprints and permissions

Copyright information

© 2022 Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Schlatte, R. (2022). A Note on Idleness Detection of Actor Systems. In: Ahrendt, W., Beckert, B., Bubel, R., Johnsen, E.B. (eds) The Logic of Software. A Tasting Menu of Formal Methods. Lecture Notes in Computer Science, vol 13360. Springer, Cham. https://doi.org/10.1007/978-3-031-08166-8_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-08166-8_21

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-08165-1

  • Online ISBN: 978-3-031-08166-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics