Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
166 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
42 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Inductive diagrams for causal reasoning (2307.10484v2)

Published 19 Jul 2023 in cs.PL

Abstract: The Lamport diagram is a pervasive and intuitive tool for informal reasoning about "happens-before" relationships in a concurrent system. However, traditional axiomatic formalizations of Lamport diagrams can be painful to work with in a mechanized setting like Agda. We propose an alternative, inductive formalization -- the causal separation diagram (CSD) -- that takes inspiration from string diagrams and concurrent separation logic, but enjoys a graphical syntax similar to Lamport diagrams. Critically, CSDs are based on the idea that causal relationships between events are witnessed by the paths that information follows between them. To that end, we model happens-before as a dependent type of paths between events. The inductive formulation of CSDs enables their interpretation into a variety of semantic domains. We demonstrate the interpretability of CSDs with a case study on properties of logical clocks, widely-used mechanisms for reifying causal relationships as data. We carry out this study by implementing a series of interpreters for CSDs, culminating in a generic proof of Lamport's clock condition that is parametric in a choice of clock. We instantiate this proof on Lamport's scalar clock, on Mattern's vector clock, and on the matrix clocks of Raynal et al. and of Wuu and Bernstein, yielding verified implementations of each. The CSD formalism and our case study are mechanized in the Agda proof assistant.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (60)
  1. Arup Acharya and B.R. Badrinath. 1992. Recording distributed snapshots based on causal order of message delivery. Inform. Process. Lett. 44, 6 (1992), 317–321. https://doi.org/10.1016/0020-0190(92)90107-7
  2. Causal memory: definitions, implementation, and programming. Distributed Computing 9, 1 (1995), 37–49. https://doi.org/10.1007/BF01784241
  3. Sridhar Alagar and S. Venkatesan. 1994. An optimal algorithm for distributed snapshots with causal message ordering. Inform. Process. Lett. 50, 6 (1994), 311–316. https://doi.org/10.1016/0020-0190(94)00055-7
  4. Thorsten Altenkirch and Peter Morris. 2009. Indexed Containers. In 2009 24th Annual IEEE Symposium on Logic In Computer Science. 277–285. https://doi.org/10.1109/lics.2009.33
  5. Inference of Message Sequence Charts. In Proceedings of the 22nd International Conference on Software Engineering (Limerick, Ireland) (ICSE ’00). Association for Computing Machinery, New York, NY, USA, 304–313. https://doi.org/10.1145/337180.337215
  6. An analyzer for message sequence charts. In Tools and Algorithms for the Construction and Analysis of Systems, Tiziana Margaria and Bernhard Steffen (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 35–48.
  7. Mark Bickford. 2009. Component Specification Using Event Classes. In Component-Based Software Engineering, Grace A. Lewis, Iman Poernomo, and Christine Hofmeister (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 140–155.
  8. K. Birman and T. Joseph. 1987a. Exploiting Virtual Synchrony in Distributed Systems. SIGOPS Oper. Syst. Rev. 21, 5 (Nov. 1987), 123–138. https://doi.org/10.1145/37499.37515
  9. Lightweight Causal and Atomic Group Multicast. ACM Trans. Comput. Syst. 9, 3 (Aug. 1991), 272–314. https://doi.org/10.1145/128738.128742
  10. Kenneth P. Birman and Thomas A. Joseph. 1987b. Reliable Communication in the Presence of Failures. ACM Trans. Comput. Syst. 5, 1 (Jan. 1987), 47–76. https://doi.org/10.1145/7351.7478
  11. A Unifying Framework for Deciding Synchronizability. In 32nd International Conference on Concurrency Theory (CONCUR 2021) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 203), Serge Haddad and Daniele Varacca (Eds.). Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl, Germany, 14:1–14:18. https://doi.org/10.4230/LIPIcs.CONCUR.2021.14
  12. Deconstructing the Calculus of Relations with Tape Diagrams. Proc. ACM Program. Lang. 7, POPL, Article 64 (Jan. 2023), 31 pages. https://doi.org/10.1145/3571257
  13. Stephen Brookes and Peter W. O’Hearn. 2016. Concurrent Separation Logic. ACM SIGLOG News 3, 3 (Aug. 2016), 47–65. https://doi.org/10.1145/2984450.2984457
  14. Manfred Broy. 2005. A semantic and methodological essence of message sequence charts. Science of Computer Programming 54, 2 (2005), 213–256. https://doi.org/10.1016/j.scico.2004.04.003
  15. Miguel Castro and Barbara Liskov. 1999. Practical Byzantine Fault Tolerance. In Proceedings of the Third Symposium on Operating Systems Design and Implementation (New Orleans, Louisiana, USA) (OSDI ’99). USENIX Association, USA, 173–186.
  16. K. Mani Chandy and Leslie Lamport. 1985. Distributed Snapshots: Determining Global States of Distributed Systems. ACM Trans. Comput. Syst. 3, 1 (Feb. 1985), 63–75. https://doi.org/10.1145/214451.214456
  17. Bob Coecke and Ross Duncan. 2008. Interacting Quantum Observables. In Automata, Languages and Programming, Luca Aceto, Ivan Damgård, Leslie Ann Goldberg, Magnús M. Halldórsson, Anna Ingólfsdóttir, and Igor Walukiewicz (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 298–310.
  18. A Partial Order View of Message-Passing Communication Models. Proc. ACM Program. Lang. 7, POPL, Article 55 (Jan. 2023), 27 pages. https://doi.org/10.1145/3571248
  19. C. A. Ellis and S. J. Gibbs. 1989. Concurrency Control in Groupware Systems. SIGMOD Rec. 18, 2 (June 1989), 399–407. https://doi.org/10.1145/66926.66963
  20. C. J. Fidge. 1988. Timestamps in message-passing systems that preserve the partial ordering. Proceedings of the 11th Australian Computer Science Conference 10, 1 (1988), 56–66.
  21. Cormac Flanagan and Stephen N. Freund. 2009. FastTrack: Efficient and Precise Dynamic Race Detection. In Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation (Dublin, Ireland) (PLDI ’09). Association for Computing Machinery, New York, NY, USA, 121–133. https://doi.org/10.1145/1542476.1542490
  22. An Algebraic Semantics for Message Sequence Chart Documents. Springer US, Boston, MA, 3–18. https://doi.org/10.1007/978-0-387-35394-4_1
  23. Distributed Causal Memory: Modular Specification and Verification in Higher-Order Distributed Separation Logic. Proc. ACM Program. Lang. 5, POPL, Article 42 (Jan. 2021), 29 pages. https://doi.org/10.1145/3434323
  24. ITU-T. 2011. ITU Recommendation Z.120: Message Sequence Chart (MSC). https://www.itu.int/rec/T-REC-Z.120-201102-I/
  25. André Joyal and Ross Street. 1991. The geometry of tensor calculus, I. Advances in Mathematics 88, 1 (July 1991), 55–112. https://doi.org/10.1016/0001-8708(91)90003-p
  26. Iris from the ground up: A modular foundation for higher-order concurrent separation logic. J. Funct. Program. 28 (2018), e20. https://doi.org/10.1017/S0956796818000151
  27. Aneris: A Mechanised Logic for Modular Reasoning about Distributed Systems. In Programming Languages and Systems: 29th European Symposium on Programming, ESOP 2020, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2020, Dublin, Ireland, April 25–30, 2020, Proceedings (Dublin, Ireland). Springer-Verlag, Berlin, Heidelberg, 336–365. https://doi.org/10.1007/978-3-030-44914-8_13
  28. Ajay D. Kshemkalyani. 2004. The power of logical clock abstractions. Distributed Computing 17, 2 (Aug. 2004). https://doi.org/10.1007/s00446-003-0105-9
  29. Peter B. Ladkin and Stefan Leue. 1993. What Do Message Sequence Charts Mean?. In Proceedings of the IFIP TC6/WG6.1 Sixth International Conference on Formal Description Techniques, VI (FORTE ’93). North-Holland Publishing Co., Nld, 301–316.
  30. Leslie Lamport. 1978. Time, Clocks, and the Ordering of Events in a Distributed System. Commun. ACM 21, 7 (July 1978), 558–565. https://doi.org/10.1145/359545.359563
  31. Gérard Le Lann. 1977. Distributed Systems – Toward a Formal Approach. In Proceedings of IFIP Congress 1977 (Toronto, Canada) (IFIP ’77). North-Holland Publishing Co., Nld, 155–160.
  32. VyZX: A Vision for Verifying the ZX Calculus. https://doi.org/10.48550/ARXIV.2205.05781 arXiv:2205.05781 [quant-ph]
  33. VyZX: Formal Verification of a Graphical Quantum Language. https://doi.org/10.48550/arXiv.2311.11571 arXiv:2311.11571 [cs.PL]
  34. Chapar: Certified Causally Consistent Distributed Key-Value Stores. In Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (St. Petersburg, FL, USA) (POPL ’16). Association for Computing Machinery, New York, NY, USA, 357–370. https://doi.org/10.1145/2837614.2837622
  35. Don’t Settle for Eventual: Scalable Causal Consistency for Wide-Area Storage with COPS. In Proceedings of the Twenty-Third ACM Symposium on Operating Systems Principles (Cascais, Portugal) (SOSP ’11). Association for Computing Machinery, New York, NY, USA, 401–416. https://doi.org/10.1145/2043556.2043593
  36. Markus Lohrey and Anca Muscholl. 2004. Bounded MSC communication. Information and Computation 189, 2 (2004), 160–181. https://doi.org/10.1016/j.ic.2003.10.002
  37. Verifying Dynamic Race Detection. In Proceedings of the 6th ACM SIGPLAN Conference on Certified Programs and Proofs (Paris, France) (Cpp 2017). Association for Computing Machinery, New York, NY, USA, 151–163. https://doi.org/10.1145/3018610.3018611
  38. A Tree Clock Data Structure for Causal Orderings in Concurrent Executions. In Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (Lausanne, Switzerland) (ASPLOS ’22). Association for Computing Machinery, New York, NY, USA, 710–725. https://doi.org/10.1145/3503222.3507734
  39. Friedemann Mattern. 1989. Virtual Time and Global States of Distributed Systems. In Parallel and Distributed Algorithms. North-Holland, 215–226.
  40. S. Mauw and M. A. Reniers. 1994. An Algebraic Semantics of Basic Message Sequence Charts. Comput. J. 37, 4 (01 1994), 269–277. https://doi.org/10.1093/comjnl/37.4.269
  41. Message Chains for Distributed System Verification. Proc. ACM Program. Lang. 7, OOPSLA2, Article 300 (Oct. 2023), 27 pages. https://doi.org/10.1145/3622876
  42. Chad Nester. 2021. The Structure of Concurrent Process Histories. In Coordination Models and Languages (Lecture Notes in Computer Science), Ferruccio Damiani and Ornela Dardha (Eds.). Springer International Publishing, Cham, 209–224. https://doi.org/10.1007/978-3-030-78142-2_13
  43. Modular Verification of Op-Based CRDTs in Separation Logic. Proc. ACM Program. Lang. 6, OOPSLA2, Article 188 (Oct. 2022), 29 pages. https://doi.org/10.1145/3563351
  44. Peter O’Hearn. 2019. Separation Logic. Commun. ACM 62, 2 (Jan. 2019), 86–95. https://doi.org/10.1145/3211968
  45. Peter W. O’Hearn. 2007. Resources, concurrency, and local reasoning. Theoretical Computer Science 375, 1 (2007), 271–307. https://doi.org/10.1016/j.tcs.2006.12.035 Festschrift for John C. Reynolds’s 70th birthday.
  46. Robin Piedeleu and Fabio Zanasi. 2023. An Introduction to String Diagrams for Computer Scientists. arXiv:2305.08768 [cs.LO] https://arxiv.org/abs/2305.08768
  47. Eli Pozniansky and Assaf Schuster. 2003. Efficient On-the-Fly Data Race Detection in Multithreaded C++ Programs. In Proceedings of the Ninth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (San Diego, California, USA) (PPoPP ’03). Association for Computing Machinery, New York, NY, USA, 179–190. https://doi.org/10.1145/781498.781529
  48. EventML: Specification, verification, and implementation of crash-tolerant state machine replication systems. Science of Computer Programming 148 (2017), 26–48. https://doi.org/10.1016/j.scico.2017.05.009 Special issue on Automated Verification of Critical Systems (AVoCS 2015).
  49. The causal ordering abstraction and a simple way to implement it. Inform. Process. Lett. 39, 6 (Sept. 1991), 343–350. https://doi.org/10.1016/0020-0190(91)90008-6
  50. Michel Raynal and Mukesh Singhal. 1996. Logical time: Capturing causality in distributed systems. Computer 29, 2 (1996), 49–56.
  51. Verified Causal Broadcast with Liquid Haskell. In Proceedings of the 34th Symposium on Implementation and Application of Functional Languages (Copenhagen, Denmark) (IFL ’22). Association for Computing Machinery, New York, NY, USA, Article 6, 13 pages. https://doi.org/10.1145/3587216.3587222
  52. J.C. Reynolds. 2002. Separation logic: a logic for shared mutable data structures. In Proceedings 17th Annual IEEE Symposium on Logic in Computer Science. 55–74. https://doi.org/10.1109/LICS.2002.1029817
  53. Graphical development of consistent system specifications. In FME’96: Industrial Benefit and Advances in Formal Methods, Marie-Claude Gaudel and James Woodcock (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 248–267.
  54. A New Algorithm to Implement Causal Ordering. In Proceedings of the 3rd International Workshop on Distributed Algorithms. Springer-Verlag, Berlin, Heidelberg, 219–232.
  55. Frank B Schmuck. 1988. The use of efficient broadcast protocols in asynchronous distributed systems. Ph. D. Dissertation.
  56. Conflict-Free Replicated Data Types. In Proceedings of the 13th International Conference on Stabilization, Safety, and Security of Distributed Systems (Grenoble, France) (SSS’11). Springer-Verlag, Berlin, Heidelberg, 386–400.
  57. Murali Talupur and Mark R. Tuttle. 2008. Going with the Flow: Parameterized Verification Using Message Flows. In 2008 Formal Methods in Computer-Aided Design. 1–8. https://doi.org/10.1109/fmcad.2008.ecp.14
  58. Ceph: A Scalable, High-Performance Distributed File System. In Proceedings of the 7th Symposium on Operating Systems Design and Implementation (Seattle, Washington) (OSDI ’06). USENIX Association, USA, 307–320.
  59. Ribbon Proofs for Separation Logic. In Programming Languages and Systems - 22nd European Symposium on Programming, ESOP 2013, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2013, Rome, Italy, March 16-24, 2013. Proceedings (Lecture Notes in Computer Science, Vol. 7792), Matthias Felleisen and Philippa Gardner (Eds.). Springer, 189–208. https://doi.org/10.1007/978-3-642-37036-6_12
  60. Gene T.J. Wuu and Arthur J. Bernstein. 1984. Efficient Solutions to the Replicated Log and Dictionary Problems. In Proceedings of the Third Annual ACM Symposium on Principles of Distributed Computing (Vancouver, British Columbia, Canada) (PODC ’84). Association for Computing Machinery, New York, NY, USA, 233–242. https://doi.org/10.1145/800222.806750
Citations (1)

Summary

We haven't generated a summary for this paper yet.