Expand description
§Overview
This crate provides various algorithms for reducing labeled transition systems
(LTS) modulo various equivalence relations, see merc_lts. These algorithms can
also be used to compare LTS for equivalence. For now the equivalences that are
supported are strong bisimulation, branching bisimulation, and weak
bisimulation.
§Usage
The main functionalities of this crate of provided by the reduce_lts and
compare_lts functions, which can be used to reduce and compare LTS using all
available equivalence relations. These functions, and many functions in this crate,
accept the inputs by value, since these reductions often need to preprocess the given
LTS (.e.g,)
use merc_lts::LTS;
use merc_lts::read_aut;
use merc_reduction::reduce_lts;
use merc_reduction::Equivalence;
use merc_utilities::Timing;
let lts = read_aut(b"des(0, 6, 7)
(0, a, 1)
(0, a, 2)
(1, b, 3)
(1, c, 4)
(2, b, 5)
(2, c, 6)
" as &[u8], Vec::new()).unwrap();
let mut timings = Timing::new();
assert_eq!(lts.num_of_states(), 7); // The original has 6 states
let reduced = reduce_lts(lts, Equivalence::StrongBisim, &mut timings);
assert_eq!(reduced.num_of_states(), 3);§Authors
This crate was developed by Jan J. Martens and Maurice Laveaux. The main signature based branching bisimulation algorithm is described in the paper:
“Faster Signature Refinement for Branching Bisimilarity Minimization”. Jan J. Martens, Maurice Laveaux. TACAS 2026.
§Safety
This crate contains minimal unsafe code, but modules that don’t use unsafe code
are clearly marked as such.
§Minimum Supported Rust Version
We do not maintain an official minimum supported rust version (MSRV), and it may be upgraded at any time when necessary.
§License
All MERC crates are licensed under the BSL-1.0 license. See the LICENSE file in the repository root for more information.
Structs§
- Block
- A block stores a subset of the elements in a partition.
- Block
Iter - Block
Partition - A partition that explicitly stores a list of blocks and their indexing into the list of elements.
- Block
Partition Builder - Block
Tag - A zero sized tag for the block.
- Indexed
Partition - Defines a partition based on an explicit indexing of elements to their block number.
- Signature
- The type of a signature. We use sorted vectors to avoid the overhead of hash sets that might have unused values.
- Simple
Block - A super::Block that stores a subset of the elements in a partition, but with individual stable elements.
- Simple
Block Iter - Simple
Block Partition - A partition that explicitly stores a list of blocks and their indexing into the list of elements. Similar to super::BlockPartition but without taking the stability of individual elements into account.
Enums§
Traits§
- Partition
- A trait for partition refinement algorithms that expose the block number for every state. Can be used to compute the quotient labelled transition system.
Functions§
- branching_
bisim_ signature - Returns the branching bisimulation signature for branching bisimulation.
- branching_
bisim_ signature_ inductive - The inductive version of branching_bisim_signature_sorted. Assumes that the input LTS has no tau-cycles, and is topologically sorted.
- branching_
bisim_ signature_ sorted - The same as branching_bisim_signature, but assuming that the input LTS is topological sorted, and contains no tau-cycles.
- branching_
bisim_ sigref - Computes a branching bisimulation partitioning using signature refinement
- branching_
bisim_ sigref_ naive - Computes a branching bisimulation partitioning using signature refinement without dirty blocks.
- combine_
partition - Combines two partitions into a new partition.
- compare_
lts - has_
tau_ loop - Returns true iff the labelled transition system has tau-loops.
- is_
tau_ hat - Returns true if the label is the special tau_hat label for the given LTS.
- is_
valid_ refinement - Returns true iff the given partition is a strong bisimulation partition
- preprocess_
branching - Perform the preprocessing necessary for branching bisimulation with the sorted signature see branching_bisim_signature_sorted.
- quotient_
lts_ block - Optimised implementation for block partitions.
- quotient_
lts_ naive - Returns a new LTS based on the given partition.
- reduce_
lts - Reduces the given LTS modulo the given equivalence using signature refinement
- reorder_
partition - Reorders the blocks of the given partition according to the given permutation.
- scc_
decomposition - Computes the strongly connected component partitioning of the given LTS.
- sort_
topological - Returns a topological ordering of the states of the given LTS.
- strong_
bisim_ signature - Returns the signature for strong bisimulation.
- strong_
bisim_ sigref - Computes a strong bisimulation partitioning using signature refinement
- strong_
bisim_ sigref_ naive - Computes a strong bisimulation partitioning using signature refinement
- tau_
scc_ decomposition - Computes the strongly connected tau component partitioning of the given LTS.
- weak_
bisim_ signature_ sorted - Computes the weak bisimulation signature.
- weak_
bisim_ signature_ sorted_ taus - This computes only tau signatures.
- weak_
bisim_ sigref_ naive - Computes a branching bisimulation partitioning using signature refinement without dirty blocks.
- weak_
bisimulation - Apply weak bisimulation reduction
Type Aliases§
- Block
Index - The index for blocks.
- Signature
Builder - The builder used to construct the signature.