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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Armstrong, J.: Erlang. Commun. ACM 53(9), 68–75 (2010). https://doi.org/10.1145/1810891.1810910
Chandy, K.M., Misra, J.: How processes learn. Distrib. Comput. 1(1), 40–52 (1986). https://doi.org/10.1007/BF01843569
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
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
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
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
Lamport, L.: Specifying Systems: The TLA+ Language and Tools for Hardware and Software Engineers. Addison-Wesley, Boston (2002)
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
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
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
Corresponding author
Editor information
Editors and Affiliations
Appendices
A Dijkstra’s Algorithm
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:
C Specification of the Erlang Backend Behavior
Rights and permissions
Copyright information
© 2022 Springer Nature Switzerland AG
About this chapter
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)