Notes on the bisimulation partitioner
Authors: Jan Friso Groote and Jan Martens
Introduction
This document describes the algorithm for branching bisimulation reduction, including the algorithm that is used to generate counterexamples.
A partitioner for branching bisimulation
The partitioner for branching bisimulation calculates whether states are bisimilar, branching bisimilar and stuttering preserving branching bisimilar. It gets a state space and divides it into a number of non-intersecting subsets of states called blocks. All states in a block are bisimilar and have the same block index. Using this index it is straightforward to calculate whether two states are equivalent (they have the same index) or to construct the state space modulo this equivalence.
The algorithm works exactly as described in [GV90]. As a preprocessing step for (divergence preserving) branching bisimulation, all states that are strongly connected via internal transitions are replaced by a single state. In case of divergence preserving branching bisimulation this state gets a tau loop. In case of ordinary branching bisimulation, there will not be a tau loop.
Then the algorithm for branching bisimulation is started. The state space is partitioned into blocks. Initially, all states are put in one block. Repeatedly, a block is split in two blocks until the partitioning has become stable. For details see [GV90].
Furthermore, there is an option to obtain counter formulas for two non bisimilar states. The algorithm for this is inspired by [C90] and [K91].
Given two non bisimilar states , where
is the set
of all states, a distinguishing formula is a formula
in
Hennessy-Milner logic such that
and
. For branching bisimulation there is always a
distinguishing formula in Hennessy-Milner logic extended with the regular
, and using the abbreviation
.
Following [M23] and [M24] we implement the computation of minimal depth distinguishing formulas. Two aspects of the implementation differ from the referenced theoretical background.
Filtering
There is one post-processing step we call backwards filtering. It deals with the following scenario.
Consider the transition systems depicted below.
Two LTSs with initial states and
respectively.
We consider the scenario of computing a distinguishing formula
for states
and
. By the partitioning algorithm we know that
the transition
is a distinguishing observation. The
algorithm has to recursively find a distinguishing formula
such
that
and
. This way
and
.
The algorithm starts by recursively computing a distinguishing formula for
and
. It might compute
. Since
, it also
computes the distinguishing formula
. This results in the
formula
We see that adding the conjunct
made the first conjunct
obsolete (since
). This
scenario is very hard to prevent a priori.
To avoid a distinguishing formula with unnecessary conjuncts, each conjunct is reconsidered in FIFO order. We compute the semantics of all other conjuncts and check whether they already achieve the goal. If so, the conjunct under consideration can be safely removed.
Minimal depth partitioning for branching bisimulation
According to [M24] we compute the partitions conforming to the correct
-depth relations. Given the partition
on level
we want to construct
such that it is stable with respect to
the following signatures:
Performing this partitioning step efficiently is not obvious. We implemented the
following algorithm. It relies on the preprocessing step having removed all
strongly connected components, so no
cycles exist.
frontier := { s | s has no outgoing τ-transition }
done := ∅
while frontier ≠ ∅ do
s := frontier.pop_front()
sig := { (B, a, B') | s →ᵃ s', s∈B, s'∈B', B,B'∈πᵢ, a≠τ or B≠B' }
for all s →ᵗ s' do
sig := sig ∪ sigs[s']
sigs[s] := sig
done := done ∪ {s}
for all sₚ →ᵗ s do
if { s' | sₚ →ᵗ s' } \ done = ∅ then
frontier.push_back(sₚ)
References
R. Cleaveland. On automatically explaining bisimulation inequivalence. In E. M. Clarke and R. P. Kurshan, editors, Computer Aided Verification (CAV’90), volume 531 of Lecture Notes in Computer Science, Springer-Verlag, pages 364–372, 1990.
J. F. Groote and F. W. Vaandrager. An efficient algorithm for branching bisimulation and stuttering equivalence. In M. S. Paterson, editor, Proceedings 17th ICALP, Warwick, volume 443 of Lecture Notes in Computer Science, pages 626–638. Springer-Verlag, 1990.
H. Korver. Computing distinguishing formulas for branching bisimulation. In K. G. Larsen and A. Skou, editors, Computer Aided Verification (CAV’91), volume 575 of Lecture Notes in Computer Science, Springer-Verlag, pages 13–23, 1991.
J. J. M. Martens and J. F. Groote. Computing Minimal Distinguishing Hennessy-Milner Formulas is NP-Hard, but Variants are Tractable. In G.-A. Pérez and J.-F. Raskin, editors, CONCUR ‘23, Volume 279 of LIPIcs, Schloss Dagstuhl – Leibniz-Zentrum für Informatik, pages 32:1–32:17, 2023.