pub fn strong_bisim_sigref_naive<L: LTS>(lts: L, timing: &mut Timing) -> (L, IndexedPartition) {
let partition = signature_refinement_naive::<_, _, false>(<s, |state_index, partition, _, builder| {
branching_bisim_signature_inductive(state_index, &preprocessed_lts, partition, state_to_key, builder);
/// Computes a branching bisimulation partitioning using signature refinement without dirty blocks.
branching_bisim_signature_sorted(state_index, &preprocessed_lts, partition, state_to_signature, builder);
/// Computes a branching bisimulation partitioning using signature refinement without dirty blocks.
weak_bisim_signature_sorted(state_index, &preprocessed_lts, partition, state_to_signature, builder)
let id: &'_ mut FxHashMap<Signature<'_>, BlockIndex> = unsafe { std::mem::transmute(&mut id) };
let key_to_signature: &'_ mut Vec<Signature<'_>> = unsafe { std::mem::transmute(&mut key_to_signature) };
partition.partition_marked_with(block_index, &mut split_builder, |state_index, partition| {
fn signature_refinement_naive<F, L: LTS, const WEAK: bool>(lts: &L, mut signature: F) -> IndexedPartition
let id: &'_ mut FxHashMap<Signature<'_>, BlockIndex> = unsafe { std::mem::transmute(&mut id) };
let state_to_signature: &mut Vec<Signature<'_>> = unsafe { std::mem::transmute(&mut state_to_signature) };
weak_bisim_signature_sorted_taus(state_index, lts, &partition, state_to_signature, &mut builder);
// Keep track of the index for every state, either use the arena to allocate space or simply borrow the value.
// Keep track of the index for every state, either use the arena to allocate space or simply borrow the value.
"There can never be more splits than number of states, but at least two iterations for stability"
pub fn is_valid_refinement<F, P>(lts: &impl LTS, partition: &P, mut compute_signature: F) -> bool
let mut block_to_signature: Vec<Option<SignatureBuilder>> = vec![None; partition.num_of_blocks()];
"State {state_index} has a different signature {signature:?} then the block {block} which has signature {block_signature:?}"
/// Checks that the branching bisimulation partition is a refinement of the strong bisimulation partition.
fn is_refinement(lts: &impl LTS, strong_partition: &impl Partition, branching_partition: &impl Partition) {
if strong_partition.block_number(state_index) == strong_partition.block_number(other_state_index) {
// If the states are together according to branching bisimilarity, then they should also be together according to strong bisimilarity.
let (preprocessed_lts, branching_partition) = branching_bisim_sigref_naive(lts, &mut timing);