1  Introduction: What’s the Difference?

Have you ever looked at two program models and wondered how equivalent they are —or, conversely: how they can be distinguished?

I have run into this problem often, for instance when analyzing models of distributed algorithms or when devising examples for teaching. But obviously, the question already occurs every time one rewrites a program part and hopes for it to still do its job.

1  The aim was to bridge between the tools FDR2 and UPPAAL for Göthel’s dissertation (2012). Previous work I was to base the translations on had serious flaws: One approach introduced spurious deadlocks to the model, the other was unable to handle nesting of choices and parallel composition. Clearly, we had to change the encoding!

Göthel, T. (2012). Mechanical verification of parameterized real-time systems [PhD thesis, Berlin Institute of Technology]. https://doi.org/10.14279/depositonce-3248

The first time I had to formally face the question was when working as a student research assistant: I was tasked with implementing a translation from the process algebra Timed CSP to Timed Automata.1 … How to tell whether the translation would properly honor the semantics of the two formalisms? Did it translate CSP terms to automata with the same meaning? Even the definition of the question is tricky, as there are different notions of what counts as “same meaning” in the semantics of programs.

I then took my very first look into the seminal paper on the landscape of process equivalences with internal behavior, the “Linear-time–branching-time spectrum II” by van Glabbeek (1993). Its central figure, reproduced in Figure 1.1, mesmerized me. But, how to use the spectrum to decide for a given pair of processes which of the many equivalences apply, is far from straightforward. Over the years, I have learned that others too have run into this problem: For instance, Nestmann & Pierce (2000) thinking about process algebra encodings and Bell (2013) verifying compiler optimizations. The problem can be summarized as follows:

Nestmann, U., & Pierce, B. C. (2000). Decoding choice encodings. Information and Computation, 163(1), 1–59. https://doi.org/10.1006/inco.2000.2868
Bell, C. J. (2013). Certifiably sound parallelizing transformations. In International conference on certified programs and proofs (pp. 227–242). Springer.

How does one conveniently decide for a pair of systems which notions from a spectrum of behavioral equivalences equate the two?

Above question will be the research question of this thesis. We2 want to enable future researchers to tap into the wisdom of the linear-time–branching-time spectrum and to easily determine what equivalences fit their models.

2  As you might have noticed, this text uses more personal pronouns than is common in much of computer science literature. Their meaning is the same as in a lecture: “I” = “The author”; “You” = “The audience”; “We” = “The asynchronous collective of author and readers.”

1.1 Linear-Time–Branching-Time Spectroscopy

Van Glabbeek’s papers on comparative concurrency semantics (1990, 1993) treat a zoo of distinct qualitative questions of the form “Are processes p and q equivalent with respect to notion N?”, where N would for example be trace or bisimulation equivalence. He unveils an underlying structure where the questions can easily be compared with respect to their distinctive power. This is analogous to the spectrum of light where seemingly qualitative properties (“The light is blue / green / red.”) happen to be quantitative (“The distribution of wavelengths peaks at 460 / 550 / 630~\mathrm{nm}.”).

Glabbeek, R. J. van. (1990). The linear time–branching time spectrum: Extended abstract. In J. C. M. Baeten & J. W. Klop (Eds.), CONCUR’90 (Vol. 458, pp. 278–297). Springer. https://doi.org/10.1007/BFb0039066
Glabbeek, R. J. van. (1993). The linear time–branching time spectrum II: The semantics of sequential systems with silent moves; extended abstract. In E. Best (Ed.), CONCUR’93 (Vol. 715, pp. 66–81). Springer. https://doi.org/10.1007/3-540-57208-2_6

For light (i.e. electromagnetic radiation), the mix of wavelengths can be determined through a process called spectroscopy. So, we may ask:

If there exists a “linear-time–branching time spectrum,” does this mean, there also is some kind of “linear-time–branching-time spectroscopy”?

This thesis answers the question positively, which is the key step to tackle our research question. One can compute what mix of (in-)distinguishabilities exists between a pair of processes, and this places the two on the spectrum of equivalences. We thus turn a set of qualitative equivalence problems into one quantitative problem of how equivalent two systems are. As we will see, this amounts to an abstract form of subtraction between programs, determining what kinds of differences an outside examiner might observe.

1.2 This Thesis

The algorithm at the core of this thesis describes how to decide all behavioral equivalences at once for varying spectra of equivalence using games that can count to limit possible distinctions by attacker energy levels. More precisely, we make the following contributions:

  • Chapter 2 lays some foundations and makes precise how bisimilarity games relate to grammars of distinguishing formulas of Hennessy–Milner modal logic.
  • Chapter 3 shows how to understand the strong linear-time–branching-time spectrum quantitatively and formalizes the spectroscopy problem.
  • Chapter 4 introduces the approach of characterizing equivalence spectra through a class of energy games and how to decide such games.
  • TODO Chapter 5 applies the approach to decide the whole strong spectrum through one game for linear-time–branching-time spectroscopy.
  • TODO Chapter 6 adapt the game for the weak spectrum of equivalences accounting for silent-steps.
  • TODO Chapter 7 showcases implementations to conveniently perform equivalence spectroscopies in web browsers and using GPU parallelization.

1.3 Artifacts and Papers

This thesis ties together the work of several publications in a coherent presentation. It is written to be understandable on its own. For details, we usually refer to the original publications or to other artifacts for implementation and machine-checked proofs.

Publications. The following four publications (with me as main author) fuel the following chapters:

  • “Deciding All Behavioral Equivalences at Once: A Game for Linear-Time–Branching-Time Spectroscopy” (LMCS 2022) introduces the spectroscopy problem and the core idea to decide the whole strong spectrum using games that search trees of possible distinguishing formulas. (Conference version: TACAS 2021)
  • “Process Equivalence Problems as Energy Games” (CAV 2023a) makes a big technical leap by using energy games, removing the necessity for explicit formula construction. (Tech report: arXiv 2023b)
  • “Characterizing Contrasimilarity through Games, Modal Logic, and Complexity” (Information & Computation 2024) closes gaps in the weak spectrum of equivalences for games and their complexity and their link to modal logics. (Isabelle/HOL theory: AFP 2023; Workshop version: EXPRESS/SOS 2021)
  • “One Energy Game for the Spectrum Between Branching Bisimilarity and Weak Trace Semantics” (EXPRESS/SOS 2024) adapts the spectroscopy approach for the weak spectrum.
Bisping, B., Jansen, D. N., & Nestmann, U. (2022). Deciding All Behavioral Equivalences at Once: A Game for Linear-Time–Branching-Time Spectroscopy. Logical Methods in Computer Science, 18(3). https://doi.org/10.46298/lmcs-18(3:19)2022
Bisping, B., & Nestmann, U. (2021). A game for linear-time–branching-time spectroscopy. In J. F. Groote & K. G. Larsen (Eds.), Tools and algorithms for the construction and analysis of systems: TACAS (Vol. 12651, pp. 3–19). Springer. https://doi.org/10.1007/978-3-030-72016-2_1
Bisping, B. (2023a). Process equivalence problems as energy games. In C. Enea & A. Lal (Eds.), Computer aided verification (pp. 85–106). Springer Nature Switzerland. https://doi.org/10.1007/978-3-031-37706-8_5
Bisping, B. (2023b). Process equivalence problems as energy games. Technische Universität Berlin. https://doi.org/10.48550/arXiv.2303.08904
Bisping, B., & Montanari, L. (2024). Characterizing contrasimilarity through games, modal logic, and complexity. Inf. Comput., 300, 105191. https://doi.org/10.1016/J.IC.2024.105191
Bisping, B., & Montanari, L. (2023). Coupled similarity and contrasimilarity, and how to compute them. Arch. Formal Proofs, 2023. https://www.isa-afp.org/entries/Coupledsim_Contrasim.html
Bisping, B., & Montanari, L. (2021). A game characterization for contrasimilarity. In O. Dardha & V. Castiglioni (Eds.), Proceedings Combined 28th International Workshop on expressiveness in concurrency and 18th Workshop on structural operational semantics (Vol. 339, pp. 27–42). Open Publishing Association. https://doi.org/10.4204/EPTCS.339.5
Bisping, B., & Jansen, D. N. (2024). One energy game for the spectrum between branching bisimilarity and weak trace semantics. In G. Caltais & C. Di Giusto (Eds.), Proceedings Combined 31st International Workshop on expressiveness in concurrency and 21st Workshop on structural operational semantics, Calgary, Canada, 9th September 2024 (Vol. 412, pp. 71–88). Open Publishing Association. https://doi.org/10.4204/EPTCS.412.6

Prototype. The algorithms of this thesis have been validated through a Scala prototype implementation. It can be tried out in the browser on https://equiv.io. The source is available openly on https://github.com/benkeks/equivalence-fiddle.

Isabelle formalization. Instead of swamping the document with technical proofs, these are contained in machine-checkable Isabelle/HOL theories.

Student theses. Some parts of this thesis strongly rely on student work that I have supervised, in particular, on the following theses:

  • Trzeciakiewicz (2021): Linear-Time–Branching-Time Spectroscopy as an Educational Web Browser Game provides a computer game version of the spectroscopy procedure to be discussed in Subsection 7.3.1.
  • Ozegowski (2023): Integration eines generischen Äquivalenzprüfers in CAAL extends the Concurrency Workbench Aalborg Edition with a spectroscopy feature, reported in Subsection 7.3.2.
  • Mattes (2024): Measuring Expressive Power of HML Formulas in Isabelle/HOL proves the approach to modal characterization of Section 3.2.
  • Vogel (2024): Accelerating Process Equivalence Energy Games using WebGPU, topic of Section 7.2, allows massive parallelization on the GPU of key parts of our algorithm.
  • Lemke (2024): A Formal Proof of Decidability of Multi-Weighted Declining Energy Games formalizes the fixedpoint algorithm of Section 4.3.
Trzeciakiewicz, M. (2021). Linear-time–branching-time spectroscopy as an educational web browser game [Bachelor's Thesis, Technische Universität Berlin]. https://github.com/Marii19/the-spectroscopy-invaders
Ozegowski, F. (2023). Integration eines generischen äquivalenzprüfers in CAAL [Bachelor's Thesis, Technische Universität Berlin]. https://github.com/Fabian-O01/CAAL
Mattes, K. P. P. (2024). Measuring expressive power of HML formulas in Isabelle/HOL [Bachelor's Thesis, Technische Universität Berlin]. https://github.com/ekeln/BA_formula_prices/raw/main/output/outline.pdf
Vogel, G. (2024). Accelerating process equivalence energy games using WebGPU [Bachelor's Thesis, Technische Universität Berlin]. https://github.com/Gobbel2000/gpuequiv
Lemke, C. (2024). A formal proof of decidability of multi-weighted declining energy games [Master’s thesis]. Technische Universität Berlin.

Other publications. Only indirectly connected to this dissertation project are my prior publications in leading me to topic and techniques:

  • Bisping et al. (2016, ITP): “Mechanical Verification of a Constructive Proof for FLP.”
  • Bisping & Nestmann (2019, TACAS): “Computing Coupled Similarity.”
  • Bisping et al. (2020, Acta Informatica): “Coupled similarity: the first 32 years.”
Bisping, B., Brodmann, P.-D., Jungnickel, T., Rickmann, C., Seidler, H., Stüber, A., Wilhelm-Weidner, A., Peters, K., & Nestmann, U. (2016). Mechanical verification of a constructive proof for FLP. In J. C. Blanchette & S. Merz (Eds.), Interactive theorem proving (pp. 107–122). Springer International Publishing. https://doi.org/10.1007/978-3-319-43144-4_7
Bisping, B., & Nestmann, U. (2019). Computing coupled similarity. In T. Vojnar & L. Zhang (Eds.), Tools and algorithms for the construction and analysis of systems: TACAS (Vol. 11427, pp. 244–261). Springer. https://doi.org/10.1007/978-3-030-17462-0_14
Bisping, B., Nestmann, U., & Peters, K. (2020). Coupled similarity: The first 32 years. Acta Informatica, 57(3–5), 439–463. https://doi.org/10.1007/s00236-019-00356-4

Other Bachelor theses. During my dissertation project, I also supervised several other Bachelor theses, many of which played important roles in shaping the research. Although they do not appear directly on the following pages, I want to acknowledge the students’ vital contribution to the research.

  • Peacock (2020): Process Equivalences as a Video Game
  • Lê (2020): Implementing Coupled Similarity as an Automated Checker for mCRL2
  • Wrusch (2020): Ein Computerspiel zum Erlernen von Verhaltensäquivalenzen
  • Reichert (2020): Visualising and Model Checking Counterfactuals
  • Wittig (2020): Charting the Jungle of Process Calculi Encodings
  • Bulik (2021): Statically Analysing Inter-Process Communication in Elixir Programs
  • Montanari (2021): Kontrasimulation als Spiel
  • Pohlmann (2021): Reducing Strong Reactive Bisimilarity to Strong Bisimilarity
  • England (2021): HML Synthesis of Distinguished Processes
  • Duong (2022): Developing an Educational Tool for Linear-Time–Branching-Time Spectroscopy
  • Alshukairi (2022): Automatisierte Reduktion von reaktiver zu starker Bisimilarität
  • Adler (2022): Simulation fehlertoleranter Konsensalgorithmen in Hash.ai
  • Sandt (2022): A Video Game about Reactive Bisimilarity
  • Lönne (2023): An Educational Computer Game about Counterfactual Truth Conditions
  • Hauschild (2023): Nonlinear Counterfactuals in Isabelle/HOL
  • Stöcker (2024): Higher-Order Diadic µ-Calculus—An Efficient Framework for Checking Process Equivalences?
  • Kurzan (2024): Implementierung eines Contrasimilarity-Checkers für mCRL2
Peacock, D. A. (2020). Process equivalences as a video game [Bachelor's Thesis, Technische Universität Berlin]. https://drive.google.com/drive/folders/19YuOCXI_7CEB4p9fgr6kDKCTbFwx2VU9
Lê, H. N. (2020). Implementing coupled similarity as an automated checker for mCRL2 [Bachelor's Thesis]. Technische Universität Berlin.
Wrusch, M. (2020). Ein Computerspiel zum Erlernen von Verhaltensäquivalenzen [Bachelor's Thesis]. Technische Universität Berlin.
Reichert, J. M. (2020). Visualising and model checking counterfactuals [Bachelor's Thesis]. Technische Universität Berlin.
Wittig, T. (2020). Charting the jungle of process calculi encodings [Bachelor's Thesis, Technische Universität Berlin]. https://concurrency-theory.org/process-jungle/
Bulik, J. (2021). Statically analysing inter-process communication in Elixir programs [Bachelor's Thesis, Technische Universität Berlin]. https://gitlab.com/MrGreenTea/stille-post
Montanari, L. (2021). Kontrasimulation als Spiel [Bachelor's Thesis, Technische Universität Berlin]. https://github.com/luisamontanari/ContrasimGame
Pohlmann, M. (2021). Reducing strong reactive bisimilarity to strong bisimilarity [Bachelor's Thesis, Technische Universität Berlin]. https://maxpohlmann.github.io/Reducing-Reactive-to-Strong-Bisimilarity/thesis.pdf
England, J. (2021). HML synthesis of distinguished processes [Bachelor's Thesis]. Technische Universität Berlin.
Duong, T. M. (2022). Developing an educational tool for linear-time–branching-time spectroscopy [Bachelor's Thesis]. Technische Universität Berlin.
Alshukairi, Z. (2022). Automatisierte Reduktion von reaktiver zu starker Bisimilarität [Bachelor's Thesis]. Technische Universität Berlin.
Adler, R. (2022). Simulation fehlertoleranter Konsensalgorithmen in Hash.ai [Bachelor's Thesis]. Technische Universität Berlin.
Sandt, E. (2022). A video game about reactive bisimilarity [Bachelor's Thesis, Technische Universität Berlin]. https://github.com/eloinoel/ReactiveBisimilarityGame
Lönne, B. (2023). An educational computer game about counterfactual truth conditions [Bachelor's Thesis, Technische Universität Berlin]. https://github.com/Brunololos/counterfactuals-demo
Hauschild, J. (2023). Nonlinear counterfactuals in Isabelle/HOL [Bachelor's Thesis, Technische Universität Berlin]. https://github.com/johanneshauschild/NonlinearCounterfactuals
Stöcker, V. (2024). Higher-order diadic µ-calculus—an efficient framework for checking process equivalences? [Bachelor's Thesis]. Technische Universität Berlin.
Kurzan, T. (2024). Implementierung eines Contrasimilarity-Checkers für mCRL2 [Bachelor's Thesis]. Technische Universität Berlin.