Abstract
An asynchronous, fault-tolerant, sound and complete algorithm for runtime verification of linearizability of concurrent algorithms was proposed in [7]. This solution relies on the snapshot abstraction in distributed computing. The fastest known snapshot algorithms use complex constructions, hard to implement, and the simplest ones provide large step complexity bounds or only weak termination guarantees. Thus, the snapshot-based verification algorithm is not completely satisfactory. In this paper, we propose an alternative solution, based on the collect abstraction, which can be optimally implemented in a simple manner. As a final result, we offer a simple and generic methodology that takes any presumably linearizable algorithm and produces a lightweight runtime verified linearizable version of it.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
We can eliminate this assumption; we assume it to simplify the algorithm.
- 2.
\(\mathcal {A^{*}}\) can invoke any high-level operation of \(\mathcal {A}\), denoted as Apply(\(op_i\)) [7].
- 3.
The response event happens immediately, e.g., the tight execution in Fig. 1.
- 4.
Theorem 1 appears to be a straightforward way to verify \(\mathcal {A^{+}}\), but due to asynchrony we do not obtain an \(X_E\) thought \(\mathcal {V^{+}}\); however, we can transform any \(X(\tau _i)\) into a well-formed execution \(X(\tau _i')\) which is also an sketch of an execution \(\mathcal {A^{+}}\) as \(X_E\).
- 5.
We focus on the case that each entry stores an evergrowing set, but the definition can be generalized.
References
Afek, Y., Attiya, H., Dolev, D., Gafni, E., Merritt, M., Shavit, N.: Atomic snapshots of shared memory. J. ACM 40(4), 873–890 (1993). https://doi.org/10.1145/153724.153741
Bartocci, E., Falcone, Y. (eds.): Lectures on Runtime Verification - Introductory and Advanced Topics. Lecture Notes in Computer Science, vol. 10457. Springer, Cham (2018)https://doi.org/10.1007/978-3-319-75632-5
Bashari, B., Woelfel, P.: An efficient adaptive partial snapshot implementation. In: Miller, A., Censor-Hillel, K., Korhonen, J.H. (eds.) PODC 2021: ACM Symposium on Principles of Distributed Computing, Virtual Event, Italy, 26–30 July 2021, pp. 545–555. ACM (2021). https://doi.org/10.1145/3465084.3467939
Berkovich, S., Bonakdarpour, B., Fischmeister, S.: Runtime verification with minimal intrusion through parallelism. Formal Methods Syst. Des. 46(3), 317–348 (2015). https://doi.org/10.1007/s10703-015-0226-3
Bonakdarpour, B., Fraigniaud, P., Rajsbaum, S., Rosenblueth, D.A., Travers, C.: Decentralized asynchronous crash-resilient runtime verification. J. ACM 69(5), 34:1–34:31 (2022). https://doi.org/10.1145/3550483
Bonakdarpour, B., Fraigniaud, P., Rajsbaum, S., Travers, C.: Challenges in fault-tolerant distributed runtime verification. In: Margaria, T., Steffen, B. (eds.) ISoLA 2016, Part II. LNCS, vol. 9953, pp. 363–370. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-47169-3_27
Castañeda, A., Rodríguez, G.V.: Asynchronous wait-free runtime verification and enforcement of linearizability. In: Oshman, R., Nolin, A., Halldórsson, M.M., Balliu, A. (eds.) Proceedings of the 2023 ACM Symposium on Principles of Distributed Computing, PODC 2023, Orlando, FL, USA, 19–23 June 2023, pp. 90–101. ACM (2023). https://doi.org/10.1145/3583668.3594563
Decker, N., Gottschling, P., Hochberger, C., Leucker, M., Scheffel, T., Schmitz, M., Weiss, A.: Rapidly adjustable non-intrusive online monitoring for multi-core systems. In: Cavalheiro, S., Fiadeiro, J. (eds.) SBMF 2017. LNCS, vol. 10623, pp. 179–196. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-70848-5_12
El-Hokayem, A., Falcone, Y.: Can we monitor all multithreaded programs? In: Colombo, C., Leucker, M. (eds.) RV 2018. LNCS, vol. 11237, pp. 64–89. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-03769-7_6
Elmas, T., Tasiran, S.: Vyrdmc: Driving runtime refinement checking with model checkers. In: Barringer, H., Finkbeiner, B., Gurevich, Y., Sipma, H. (eds.) Proceedings of the Fifth Workshop on Runtime Verification, RV@CAV 2005, Edinburgh, UK, 12 July 2005. Electronic Notes in Theoretical Computer Science, vol. 144, pp. 41–56. Elsevier (2005). https://doi.org/10.1016/j.entcs.2006.02.003
Elmas, T., Tasiran, S., Qadeer, S.: VYRD: verifying concurrent programs by runtime refinement-violation detection. In: Sarkar, V., Hall, M.W. (eds.) Proceedings of the ACM SIGPLAN 2005 Conference on Programming Language Design and Implementation, Chicago, IL, USA, 12–15 June 2005, pp. 27–37. ACM (2005). https://doi.org/10.1145/1065010.1065015
Falcone, Y.: On decentralized monitoring. In: Nouri, A., Wu, W., Barkaoui, K., Li, Z.W. (eds.) VECoS 2021. LNCS, vol. 13187, pp. 1–16. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-98850-0_1
Falcone, Y., Havelund, K., Reger, G.: A tutorial on runtime verification. In: Broy, M., Peled, D.A., Kalus, G. (eds.) Engineering Dependable Software Systems, NATO Science for Peace and Security Series, D: Information and Communication Security, vol. 34, pp. 141–175. IOS Press (2013). https://doi.org/10.3233/978-1-61499-207-3-141
Fraigniaud, P., Rajsbaum, S., Travers, C.: Locality and checkability in wait-free computing. Distrib. Comput. 26(4), 223–242 (2013). https://doi.org/10.1007/s00446-013-0188-x
Fraigniaud, P., Rajsbaum, S., Travers, C.: A lower bound on the number of opinions needed for fault-tolerant decentralized run-time monitoring. J. Appl. Comput. Topol. 4(1), 141–179 (2020). https://doi.org/10.1007/s41468-019-00047-6
Francalanza, A., Pérez, J.A., Sánchez, C.: Runtime verification for decentralised and distributed systems. In: Bartocci, E., Falcone, Y. (eds.) Lectures on Runtime Verification. LNCS, vol. 10457, pp. 176–210. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-75632-5_6
Havelund, K., Goldberg, A.: Verify your runs. In: Meyer, B., Woodcock, J. (eds.) VSTTE 2005. LNCS, vol. 4171, pp. 374–383. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-69149-5_40
Herlihy, M.: Wait-free synchronization. ACM Trans. Program. Lang. Syst. 13(1), 124–149 (1991). https://doi.org/10.1145/114005.102808
Herlihy, M., Kozlov, D.N., Rajsbaum, S.: Distributed Computing Through Combinatorial Topology. Morgan Kaufmann (2013). https://store.elsevier.com/product.jsp?isbn=9780124045781
Herlihy, M., Shavit, N.: The Art of Multiprocessor Programming. Morgan Kaufmann (2008)
Herlihy, M., Wing, J.M.: Linearizability: a correctness condition for concurrent objects. ACM Trans. Program. Lang. Syst. 12(3), 463–492 (1990). https://doi.org/10.1145/78969.78972
Inoue, M., Masuzawa, T., Chen, W., Tokura, N.: Linear-time snapshot using multi-writer multi-reader registers. In: Tel, G., Vitányi, P. (eds.) WDAG 1994. LNCS, vol. 857, pp. 130–140. Springer, Heidelberg (1994). https://doi.org/10.1007/BFb0020429
Kuznetsov, P., Guerraoui, R.: Algorithms for Concurrent Systems. EPFL Press (2018)
Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput. 28(9), 690–691 (1979). https://doi.org/10.1109/TC.1979.1675439
Leucker, M., Schallhart, C.: A brief account of runtime verification. J. Log. Algebraic Methods Program. 78, 293–303 (2009). https://doi.org/10.1016/j.jlap.2008.08.004
Lourenço, J.M., Fiedor, J., Křena, B., Vojnar, T.: Discovering concurrency errors. In: Bartocci, E., Falcone, Y. (eds.) Lectures on Runtime Verification. LNCS, vol. 10457, pp. 34–60. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-75632-5_2
Lynch, N.A., Vaandrager, F.W.: Forward and backward simulations: I. Untimed systems. Inf. Comput. 121(2), 214–233 (1995). https://doi.org/10.1006/inco.1995.1134
Moir, M., Shavit, N.: Concurrent data structures. In: Mehta, D.P., Sahni, S. (eds.) Handbook of Data Structures and Applications. Chapman and Hall/CRC (2004). https://doi.org/10.1201/9781420035179.ch47
Pnueli, A., Zaks, A.: PSL model checking and run-time verification via testers. In: Misra, J., Nipkow, T., Sekerinski, E. (eds.) FM 2006. LNCS, vol. 4085, pp. 573–586. Springer, Heidelberg (2006). https://doi.org/10.1007/11813040_38
Raynal, M.: Concurrent Programming - Algorithms, Principles, and Foundations. Springer, Cham (2012). https://doi.org/10.1007/978-3-642-32027-9
Sánchez, C., et al.: A survey of challenges for runtime verification from advanced application domains (beyond software). Formal Methods Syst. Des. 54(3), 279–335 (2019). https://doi.org/10.1007/s10703-019-00337-w
Soueidi, C., El-Hokayem, A., Falcone, Y.: Opportunistic monitoring of multithreaded programs. In: Lambers, L., Uchitel, S. (eds.) FASE 2023. LNCS, vol. 13991, pp. 173–194. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-30826-0_10
Taleb, R., Hallé, S., Khoury, R.: Uncertainty in runtime verification: A survey. Comput. Sci. Rev. 50, 100594 (2023). https://doi.org/10.1016/J.COSREV.2023.100594
Wei, Y., Ben-David, N., Blelloch, G.E., Fatourou, P., Ruppert, E., Sun, Y.: Constant-time snapshots with applications to concurrent data structures. In: Lee, J., Petrank, E. (eds.) PPoPP 2021: 26th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, Virtual Event, Republic of Korea, 27 February–3 March 2021, pp. 31–46. ACM (2021). https://doi.org/10.1145/3437801.3441602
Acknowledgments
Gilde Valeria Rodríguez is the recipient of a PhD fellowship of CONAHCYT. Armando Castañeda is supported by the research project DGAPA-PAPIIT IN108723.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2025 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Rodríguez, G.V., Castañeda, A. (2025). Towards Efficient Runtime Verified Linearizable Algorithms. In: Ábrahám, E., Abbas, H. (eds) Runtime Verification. RV 2024. Lecture Notes in Computer Science, vol 15191. Springer, Cham. https://doi.org/10.1007/978-3-031-74234-7_17
Download citation
DOI: https://doi.org/10.1007/978-3-031-74234-7_17
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-74233-0
Online ISBN: 978-3-031-74234-7
eBook Packages: Computer ScienceComputer Science (R0)