23#ifndef MCRL2_LTS_DETAIL_LIBLTS_BISIM_GJKW_H
24#define MCRL2_LTS_DETAIL_LIBLTS_BISIM_GJKW_H
26#include <unordered_map>
30#include "mcrl2/lts/detail/liblts_scc.h"
31#include "mcrl2/lts/detail/liblts_merge.h"
32#include "mcrl2/lts/detail/check_complexity.h"
33#include "mcrl2/lts/detail/fixed_vector.h"
48 #define ONLY_IF_DEBUG(...) __VA_ARGS__
50 #define ONLY_IF_DEBUG(...)
113class state_info_entry;
115using state_info_ptr = state_info_entry*;
116using state_info_const_ptr =
const state_info_entry*;
127using permutation_t = fixed_vector<state_info_ptr>;
144class B_to_C_descriptor;
160class state_info_entry
166 pred_iter_t state_in_begin;
171 succ_iter_t state_out_begin;
174 pred_iter_t state_inert_in_begin;
177 succ_iter_t state_inert_out_begin;
180 succ_iter_t state_inert_out_end;
183 block_t* block =
nullptr;
186 permutation_iter_t pos;
189 state_type notblue = 0UL;
192 succ_iter_t int_current_constln;
195 const constln_t* constln()
const;
196 constln_t* constln();
198 succ_const_iter_t current_constln()
const {
return int_current_constln; }
199 succ_iter_t current_constln() {
return int_current_constln; }
200 void set_current_constln(succ_iter_t
const new_current_constln)
202 int_current_constln = new_current_constln;
203 assert(succ_begin() <= int_current_constln);
204 assert(int_current_constln <= succ_end());
222 pred_const_iter_t pred_begin()
const {
return state_in_begin; }
223 pred_iter_t pred_begin() {
return state_in_begin; }
224 void set_pred_begin(pred_iter_t new_in_begin)
226 state_in_begin = new_in_begin;
230 pred_const_iter_t pred_end()
const
231 { assert(s_i_begin <=
this); assert(
this < s_i_end);
232 return this[1].state_in_begin;
234 pred_iter_t pred_end()
235 { assert(s_i_begin <=
this); assert(
this < s_i_end);
236 return this[1].state_in_begin;
238 void set_pred_end(pred_iter_t new_in_end)
239 { assert(s_i_begin <=
this); assert(
this < s_i_end);
240 this[1].set_pred_begin(new_in_end);
244 pred_const_iter_t noninert_pred_begin()
const {
return state_in_begin; }
245 pred_iter_t noninert_pred_begin() {
return state_in_begin; }
248 pred_const_iter_t noninert_pred_end()
const {
return inert_pred_begin(); }
249 pred_iter_t noninert_pred_end() {
return inert_pred_begin(); }
252 pred_const_iter_t inert_pred_begin()
const {
return state_inert_in_begin; }
253 pred_iter_t inert_pred_begin() {
return state_inert_in_begin; }
254 void set_inert_pred_begin(pred_iter_t new_inert_in_begin)
256 state_inert_in_begin = new_inert_in_begin; assert(pred_begin() <= inert_pred_begin());
257 assert(inert_pred_begin() <= pred_end());
261 pred_const_iter_t inert_pred_end()
const {
return pred_end(); }
262 pred_iter_t inert_pred_end() {
return pred_end(); }
265 succ_const_iter_t succ_begin()
const {
return state_out_begin; }
266 succ_iter_t succ_begin() {
return state_out_begin; }
267 void set_succ_begin(succ_iter_t new_out_begin)
269 state_out_begin = new_out_begin;
273 succ_const_iter_t succ_end()
const
274 { assert(s_i_begin <=
this); assert(
this < s_i_end);
275 return this[1].state_out_begin;
277 succ_iter_t succ_end()
278 { assert(s_i_begin <=
this); assert(
this < s_i_end);
279 return this[1].state_out_begin;
281 void set_succ_end(succ_iter_t new_out_end)
282 { assert(s_i_begin <=
this); assert(
this < s_i_end);
283 this[1].set_succ_begin(new_out_end); assert(succ_begin() <= succ_end());
287 succ_const_iter_t inert_succ_begin()
const {
return state_inert_out_begin;}
288 succ_iter_t inert_succ_begin() {
return state_inert_out_begin; }
289 void set_inert_succ_begin(succ_iter_t
const new_inert_out_begin)
301 state_inert_out_begin = new_inert_out_begin; assert(succ_begin() <= inert_succ_begin());
302 assert(inert_succ_begin() <= inert_succ_end());
306 succ_const_iter_t inert_succ_end()
const {
return state_inert_out_end; }
307 succ_iter_t inert_succ_end() {
return state_inert_out_end; }
309 void set_inert_succ_begin_and_end(succ_iter_t new_inert_out_begin,
310 succ_iter_t new_inert_out_end)
312 state_inert_out_begin = new_inert_out_begin;
313 state_inert_out_end = new_inert_out_end; assert(succ_begin() <= inert_succ_begin());
314 assert(inert_succ_begin() <= inert_succ_end());
315 assert(inert_succ_end() <= succ_end());
329 bool surely_has_transition_to(
const constln_t* SpC)
const;
330 bool surely_has_no_transition_to(
const constln_t* SpC)
const;
334 std::string debug_id_short()
const
336 assert(s_i_begin <=
this);
337 assert(
this < s_i_end);
338 return std::to_string(
this - s_i_begin);
343 std::string debug_id()
const
345 return "state " + debug_id_short();
349 static state_info_const_ptr s_i_begin;
356 static state_info_const_ptr s_i_end;
358 friend class part_state_t;
361 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
362 mutable check_complexity::state_counter_t work_counter;
368static inline void swap_permutation(permutation_iter_t s1,
369 permutation_iter_t s2)
406 permutation_iter_t int_end;
409 permutation_iter_t int_begin;
412 permutation_iter_t int_marked_nonbottom_begin;
415 permutation_iter_t int_bottom_begin;
418 permutation_iter_t int_marked_bottom_begin;
425 B_to_C_iter_t int_inert_begin;
428 B_to_C_iter_t int_inert_end;
436 B_to_C_desc_list to_constln;
439 constln_t* int_constln;
445 block_t* refinable_next =
nullptr;
448 static block_t* refinable_first;
455 state_type int_seqnr;
457#define BLOCK_NO_SEQNR ((state_type) -1
)
463 static state_type nr_of_blocks;
471 block_t(constln_t*
const constln_, permutation_iter_t
const begin_, permutation_iter_t
const end_)
474 int_marked_nonbottom_begin(begin_),
475 int_bottom_begin(begin_),
476 int_marked_bottom_begin(end_),
480 int_constln(constln_),
488 assert(int_bottom_begin < int_end);
495 ~block_t() =
default;
500 int_seqnr = nr_of_blocks++;
503 state_type seqnr()
const {
return int_seqnr; }
506 static block_t* get_some_refinable() {
return refinable_first; }
510 bool is_refinable()
const {
return nullptr != refinable_next; }
515 bool make_refinable()
521 refinable_next =
nullptr == refinable_first ?
this : refinable_first;
522 refinable_first =
this;
530 void make_nonrefinable()
531 { assert(refinable_first ==
this);
532 refinable_first = refinable_next ==
this ?
nullptr : refinable_next;
533 refinable_next =
nullptr;
537 state_type size()
const {
return int_end - int_begin; }
541 state_type marked_bottom_size()
const
543 return marked_bottom_end() - marked_bottom_begin();
549 state_type marked_size()
const
551 return marked_nonbottom_end() - marked_nonbottom_begin() +
552 marked_bottom_size();
556 state_type unmarked_bottom_size()
const
558 return unmarked_bottom_end() - unmarked_bottom_begin();
567 bool operator<(
const block_t& other)
const
569 return begin() < other.begin();
573 const constln_t* constln()
const {
return int_constln; }
574 constln_t* constln() {
return int_constln; }
575 void set_constln(constln_t* new_constln)
577 int_constln = new_constln;
584 B_to_C_descriptor* FromRed(
const constln_t* SpC);
587 void SetFromRed(B_to_C_desc_iter_t new_fromred);
590 permutation_const_iter_t begin()
const {
return int_begin; }
591 permutation_iter_t begin() {
return int_begin; }
592 void set_begin(permutation_iter_t new_begin)
594 int_begin = new_begin; assert(int_begin <= int_marked_nonbottom_begin);
598 permutation_const_iter_t end()
const {
return int_end; }
599 permutation_iter_t end() {
return int_end; }
600 void set_end(permutation_iter_t new_end)
602 int_end = new_end; assert(int_marked_bottom_begin <= int_end); assert(int_bottom_begin < int_end);
606 permutation_const_iter_t nonbottom_begin()
const {
return int_begin; }
607 permutation_iter_t nonbottom_begin() {
return int_begin; }
610 permutation_const_iter_t nonbottom_end()
const {
return int_bottom_begin; }
611 permutation_iter_t nonbottom_end() {
return int_bottom_begin; }
612 void set_nonbottom_end(permutation_iter_t new_nonbottom_end)
614 int_bottom_begin = new_nonbottom_end; assert(int_marked_nonbottom_begin <= int_bottom_begin);
615 assert(int_bottom_begin <= int_marked_bottom_begin);
616 assert(int_bottom_begin < int_end);
620 permutation_const_iter_t bottom_begin()
const {
return int_bottom_begin; }
621 permutation_iter_t bottom_begin() {
return int_bottom_begin; }
622 void set_bottom_begin(permutation_iter_t new_bottom_begin)
624 int_bottom_begin = new_bottom_begin; assert(int_marked_nonbottom_begin <= int_bottom_begin);
625 assert(int_bottom_begin <= int_marked_bottom_begin);
630 permutation_const_iter_t bottom_end()
const {
return int_end; }
631 permutation_iter_t bottom_end() {
return int_end; }
634 permutation_const_iter_t unmarked_nonbottom_begin()
const{
return int_begin;}
635 permutation_iter_t unmarked_nonbottom_begin() {
return int_begin; }
638 permutation_const_iter_t unmarked_nonbottom_end()
const
640 return int_marked_nonbottom_begin;
642 permutation_iter_t unmarked_nonbottom_end()
644 return int_marked_nonbottom_begin;
646 void set_unmarked_nonbottom_end(permutation_iter_t
647 new_unmarked_nonbottom_end)
649 int_marked_nonbottom_begin = new_unmarked_nonbottom_end; assert(int_begin <= int_marked_nonbottom_begin);
650 assert(int_marked_nonbottom_begin <= int_bottom_begin);
654 permutation_const_iter_t marked_nonbottom_begin()
const
656 return int_marked_nonbottom_begin;
658 permutation_iter_t marked_nonbottom_begin()
660 return int_marked_nonbottom_begin;
662 void set_marked_nonbottom_begin(permutation_iter_t
663 new_marked_nonbottom_begin)
665 int_marked_nonbottom_begin = new_marked_nonbottom_begin; assert(int_begin <= int_marked_nonbottom_begin);
666 assert(int_marked_nonbottom_begin <= int_bottom_begin);
670 permutation_const_iter_t marked_nonbottom_end()
const
672 return int_bottom_begin;
674 permutation_iter_t marked_nonbottom_end() {
return int_bottom_begin; }
677 permutation_const_iter_t unmarked_bottom_begin()
const
679 return int_bottom_begin;
681 permutation_iter_t unmarked_bottom_begin() {
return int_bottom_begin; }
684 permutation_const_iter_t unmarked_bottom_end()
const
686 return int_marked_bottom_begin;
688 permutation_iter_t unmarked_bottom_end() {
return int_marked_bottom_begin;}
689 void set_unmarked_bottom_end(permutation_iter_t new_unmarked_bottom_end)
691 int_marked_bottom_begin = new_unmarked_bottom_end; assert(int_bottom_begin <= int_marked_bottom_begin);
692 assert(int_marked_bottom_begin <= int_end);
696 permutation_const_iter_t marked_bottom_begin()
const
698 return int_marked_bottom_begin;
700 permutation_iter_t marked_bottom_begin() {
return int_marked_bottom_begin;}
701 void set_marked_bottom_begin(permutation_iter_t new_marked_bottom_begin)
703 int_marked_bottom_begin = new_marked_bottom_begin; assert(int_bottom_begin <= int_marked_bottom_begin);
704 assert(int_marked_bottom_begin <= int_end);
709 permutation_const_iter_t marked_bottom_end()
const {
return int_end; }
710 permutation_iter_t marked_bottom_end() {
return int_end; }
713 B_to_C_const_iter_t inert_begin()
const {
return int_inert_begin; }
714 B_to_C_iter_t inert_begin() {
return int_inert_begin; }
715 void set_inert_begin(B_to_C_iter_t new_inert_begin)
717 int_inert_begin = new_inert_begin; assert(int_inert_begin <= int_inert_end);
721 B_to_C_const_iter_t inert_end()
const {
return int_inert_end; }
722 B_to_C_iter_t inert_end() {
return int_inert_end; }
723 void set_inert_end(B_to_C_iter_t new_inert_end)
725 int_inert_end = new_inert_end; assert(int_inert_begin <= int_inert_end);
727 void set_inert_begin_and_end(B_to_C_iter_t new_inert_begin,
728 B_to_C_iter_t new_inert_end)
730 int_inert_begin = new_inert_begin;
731 int_inert_end = new_inert_end; assert(int_inert_begin <= int_inert_end);
739 bool mark_nonbottom(state_info_ptr s)
740 { assert(s->pos < nonbottom_end()); assert(nonbottom_begin() <= s->pos);
741 if (marked_nonbottom_begin() <= s->pos)
745 set_marked_nonbottom_begin(marked_nonbottom_begin() - 1);
746 swap_permutation(s->pos, marked_nonbottom_begin());
756 bool mark(state_info_ptr s)
757 { assert(s->pos < end());
758 if (bottom_begin() <= s->pos)
760 if (marked_bottom_begin() <= s->pos)
764 set_marked_bottom_begin(marked_bottom_begin() - 1);
765 swap_permutation(s->pos, marked_bottom_begin());
768 return mark_nonbottom(s);
777 block_t* split_off_blue(permutation_iter_t blue_nonbottom_end);
785 block_t* split_off_red(permutation_iter_t red_nonbottom_begin);
789 std::string debug_id()
const
791 return "block [" + std::to_string(begin() - perm_begin) +
"," +
792 std::to_string(end() - perm_begin) +
")" +
793 (
BLOCK_NO_SEQNR != seqnr() ?
" (#"+std::to_string(seqnr())+
")" :
"");
799 static permutation_const_iter_t permutation_begin() {
return perm_begin; }
801 static permutation_const_iter_t perm_begin;
803 friend class part_state_t;
805 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
807 mutable check_complexity::block_counter_t work_counter;
821 permutation_iter_t int_end;
824 permutation_iter_t int_begin;
831 constln_t* nontrivial_next =
nullptr;
834 static constln_t* nontrivial_first;
847 B_to_C_iter_t postprocess_begin;
851 B_to_C_iter_t postprocess_end;
859 const state_type sort_key;
864 constln_t(state_type sort_key_, permutation_iter_t begin_, permutation_iter_t end_, B_to_C_iter_t postprocess_none)
868 postprocess_begin(postprocess_none),
869 postprocess_end(postprocess_none),
871 { assert(int_begin<int_end); assert(std::cmp_less_equal(int_end-int_begin, sort_key));
875 ~constln_t() =
default;
880 static constln_t* get_some_nontrivial() {
return nontrivial_first; }
888 const constln_t* get_nontrivial_next()
const {
return nontrivial_next; }
895 { assert(nontrivial_first ==
this);
896 nontrivial_first = nontrivial_next ==
this ?
nullptr : nontrivial_next;
897 nontrivial_next =
nullptr;
902 void make_nontrivial()
904 if (
nullptr == nontrivial_next)
906 nontrivial_next =
nullptr == nontrivial_first ?
this
908 nontrivial_first =
this;
916 bool is_trivial()
const
918 return nullptr == nontrivial_next;
922 permutation_const_iter_t begin()
const {
return int_begin; }
924 permutation_iter_t begin() {
return int_begin; }
926 void set_begin(permutation_iter_t new_begin)
928 int_begin = new_begin; assert(int_begin < int_end);
932 permutation_const_iter_t end()
const {
return int_end; }
934 permutation_iter_t end() {
return int_end; }
936 void set_end(permutation_iter_t new_end)
938 int_end = new_end; assert(int_begin < int_end);
942 state_type size()
const {
return int_end - int_begin; }
950 bool operator<(
const constln_t& other)
const
952 return sort_key < other.sort_key;
954 bool operator> (
const constln_t& other)
const {
return other < *
this; }
955 bool operator<=(
const constln_t& other)
const {
return !(other < *
this); }
956 bool operator>=(
const constln_t& other)
const {
return !(*
this < other); }
963 block_t* split_off_small_block()
964 { assert(begin() < end());
965 block_t*
const FirstB = (*begin())->block;
966 block_t*
const LastB = end()[-1]->block; assert(FirstB != LastB);
967 if (FirstB->end() == LastB->begin()) { make_trivial(); } assert(FirstB->constln() ==
this); assert(LastB->constln() ==
this);
968 assert(postprocess_begin == postprocess_end);
975 if (FirstB->size() > LastB->size())
980 new constln_t(sort_key - (LastB->begin() - begin()),
981 LastB->begin(), end(), postprocess_end);
982 set_end(LastB->begin());
983 LastB->set_constln(NewC);
991 new constln_t(sort_key - (end() - FirstB->end()), begin(),
992 FirstB->end(), postprocess_end);
993 set_begin(FirstB->end());
994 FirstB->set_constln(NewC);
1000 std::string debug_id()
const
1002 return "constellation [" +
1003 std::to_string(begin() - block_t::permutation_begin()) +
1004 "," + std::to_string(end() - block_t::permutation_begin()) +
1005 ") (#" + std::to_string(sort_key) +
")";
1011template <
class LTS_TYPE>
1012class bisim_partitioner_gjkw_initialise_helper;
1028 permutation_t permutation;
1035 fixed_vector<state_info_entry> state_info;
1037 template <
class LTS_TYPE>
1038 friend class bisim_partitioner_gjkw_initialise_helper;
1046 part_state_t(state_type n)
1050 { assert(0 == block_t::nr_of_blocks);
1052 block_t::perm_begin = permutation.begin();
1053 state_info_entry::s_i_begin = state_info.data();
1054 state_info_entry::s_i_end = state_info_entry::s_i_begin + n;
1062 { assert(state_info.empty()); assert(permutation.empty());
1074 for (permutation_iter_t permutation_iter = permutation.end();
1075 permutation.begin() != permutation_iter; )
1077 constln_t*
const C = permutation_iter[-1]->constln(); assert(C->end() == permutation_iter);
1079 assert(permutation_iter[-1]->block->begin() == C->begin());
1080 permutation_iter = C->begin();
1084 state_type deleted_blocks = 0;
1086 for (permutation_iter_t permutation_iter = permutation.end();
1087 permutation.begin() != permutation_iter; )
1089 block_t*
const B = permutation_iter[-1]->block; assert(B->end() == permutation_iter);
1090 permutation_iter = B->begin();
1098 assert(0 == deleted_blocks);
1102 } assert(deleted_blocks == block_t::nr_of_blocks);
1103 block_t::nr_of_blocks = 0;
1105 permutation.clear();
1110 state_type state_size()
const {
return permutation.size(); }
1115 const block_t* block(state_type s)
const
1117 return state_info[s].block;
1129 void print_block(
const char* message,
const block_t* B,
1130 permutation_const_iter_t begin, permutation_const_iter_t end)
const;
1137 void print_part(
const part_trans_t& part_tr)
const;
1143 void print_trans()
const;
1196
1197
1201 B_to_C_iter_t B_to_C;
1202 state_info_ptr target =
nullptr;
1217 succ_iter_t int_slice_begin_or_before_end;
1220 succ_iter_t slice_begin_or_before_end()
1222 return int_slice_begin_or_before_end;
1225 succ_const_iter_t slice_begin_or_before_end()
const
1227 return int_slice_begin_or_before_end;
1230 void set_slice_begin_or_before_end(succ_iter_t new_value)
1232 int_slice_begin_or_before_end = new_value;
1236 succ_iter_t slice_begin()
1238 if (
this < &*int_slice_begin_or_before_end)
1239 { assert(&*int_slice_begin_or_before_end->int_slice_begin_or_before_end <=
this);
1240 return int_slice_begin_or_before_end->
1241 int_slice_begin_or_before_end;
1242 } assert(&*int_slice_begin_or_before_end->int_slice_begin_or_before_end ==
this);
1243 return int_slice_begin_or_before_end;
1246 succ_const_iter_t slice_begin()
const
1248 if (
this < &*int_slice_begin_or_before_end)
1249 { assert(&*int_slice_begin_or_before_end->int_slice_begin_or_before_end <=
this);
1250 return int_slice_begin_or_before_end->
1251 int_slice_begin_or_before_end;
1252 } assert(&*int_slice_begin_or_before_end->int_slice_begin_or_before_end ==
this);
1253 return int_slice_begin_or_before_end;
1256 static succ_iter_t slice_end(succ_iter_t this_)
1258 if (this_ < this_->int_slice_begin_or_before_end)
1259 { assert(this_->int_slice_begin_or_before_end->
1260 int_slice_begin_or_before_end <= this_);
1261 return this_->int_slice_begin_or_before_end + 1;
1262 } assert(this_->int_slice_begin_or_before_end->
1263 int_slice_begin_or_before_end == this_);
1270 static succ_const_iter_t slice_end(succ_const_iter_t this_)
1272 if (this_ < this_->int_slice_begin_or_before_end)
1273 { assert(this_->int_slice_begin_or_before_end->
1274 int_slice_begin_or_before_end <= this_);
1275 return this_->int_slice_begin_or_before_end + 1;
1276 } assert(this_->int_slice_begin_or_before_end->
1277 int_slice_begin_or_before_end == this_);
1283 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1286 static void slice_add_work_to_transns(succ_const_iter_t this_,
1287 enum check_complexity::counter_type ctr,
unsigned max_value);
1296 state_info_ptr source =
nullptr;
1300 std::string debug_id_short()
const
1302 return "from " + source->debug_id_short() +
" to " +
1303 succ->target->debug_id_short();
1308 std::string debug_id()
const
1310 return "transition " + debug_id_short();
1313 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1314 mutable check_complexity::trans_counter_t work_counter;
1323 B_to_C_desc_iter_t B_to_C_slice;
1325 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1328 inline void succ_entry::slice_add_work_to_transns(succ_const_iter_t this_,
1329 enum check_complexity::counter_type ctr,
unsigned max_value)
1331 succ_const_iter_t iter = this_->slice_begin();
1332 succ_const_iter_t end = slice_end(this_); (
void) end;
1336 while (++iter != end)
1340 add_work_notemporary(ctr, max_value), );
1346
1347class B_to_C_descriptor
1350 B_to_C_iter_t end, begin;
1352 B_to_C_descriptor(B_to_C_iter_t begin_, B_to_C_iter_t end_)
1358 const block_t* from_block()
const
1359 { assert(begin < end); assert(begin->pred->succ->B_to_C == begin);
1360 return begin->pred->source->block;
1362 block_t* from_block()
1363 { assert(begin < end); assert(begin->pred->succ->B_to_C == begin);
1364 return begin->pred->source->block;
1368 const constln_t* to_constln()
const
1369 { assert(begin < end); assert(begin->pred->succ->B_to_C == begin);
1370 return begin->pred->succ->target->constln();
1372 constln_t* to_constln()
1373 { assert(begin < end); assert(begin->pred->succ->B_to_C == begin);
1374 return begin->pred->succ->target->constln();
1380 bool needs_postprocessing()
const
1381 { assert(to_constln()->postprocess_end <= begin ||
1382 end <= to_constln()->postprocess_end);
1383 assert(to_constln()->postprocess_begin <= begin ||
1384 end <= to_constln()->postprocess_begin);
1385 return to_constln()->postprocess_begin <= begin &&
1386 end <= to_constln()->postprocess_end;
1391 std::string debug_id()
const
1393 assert(begin < end);
1394 std::string result(
"slice containing transition");
1395 if (end - begin > 1)
1403 B_to_C_const_iter_t iter = begin;
1404 assert(iter->pred->succ->B_to_C == iter);
1405 result += iter->pred->debug_id_short();
1408 assert(iter[1].pred->succ->B_to_C == iter+1);
1410 result += iter[1].pred->debug_id_short();
1414 while (++iter != end)
1416 assert(iter->pred->succ->B_to_C == iter);
1418 result += iter->pred->debug_id_short();
1423 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1432 bool add_work_to_bottom_transns(
enum check_complexity::counter_type ctr,
1437 for (B_to_C_const_iter_t iter = begin; iter != end; ++iter)
1439 if (iter->pred->source->pos >=
1440 iter->pred->source->block->bottom_begin())
1447 add_work_notemporary(ctr, max_value), );
1461 mutable check_complexity::B_to_C_counter_t work_counter;
1470 fixed_vector<pred_entry> pred;
1471 fixed_vector<succ_entry> succ;
1472 fixed_vector<B_to_C_entry> B_to_C;
1474 template <
class LTS_TYPE>
1475 friend class bisim_partitioner_gjkw_initialise_helper;
1477 void swap_in(B_to_C_iter_t
const pos1, B_to_C_iter_t
const pos2)
1478 { assert(B_to_C.end() > pos1); assert(pos1->pred->succ->B_to_C == pos1);
1479 assert(B_to_C.end() > pos2); assert(pos2->pred->succ->B_to_C == pos2);
1481 pred_entry
const temp_entry(*pos1->pred);
1482 *pos1->pred = *pos2->pred;
1483 *pos2->pred = temp_entry;
1485 pred_iter_t
const temp_iter(pos1->pred);
1486 pos1->pred = pos2->pred;
1487 pos2->pred = temp_iter; assert(B_to_C.end() > pos1); assert(pos1->pred->succ->B_to_C == pos1);
1488 assert(B_to_C.end() > pos2); assert(pos2->pred->succ->B_to_C == pos2);
1491 void swap_out(pred_iter_t
const pos1, pred_iter_t
const pos2)
1492 { assert(pred.end() > pos1); assert(pos1->succ->B_to_C->pred == pos1);
1493 assert(pred.end() > pos2); assert(pos2->succ->B_to_C->pred == pos2);
1494 assert(pos1->succ->slice_begin() == pos2->succ->slice_begin());
1495 assert(succ_entry::slice_end(pos1->succ) == succ_entry::slice_end(pos2->succ));
1497 B_to_C_iter_t
const temp_B_to_C(pos1->succ->B_to_C);
1498 state_info_ptr temp_target(pos1->succ->target);
1499 pos1->succ->B_to_C = pos2->succ->B_to_C;
1500 pos1->succ->target = pos2->succ->target;
1501 pos2->succ->B_to_C = temp_B_to_C;
1502 pos2->succ->target = temp_target;
1504 succ_iter_t
const temp_iter(pos1->succ);
1505 pos1->succ = pos2->succ;
1506 pos2->succ = temp_iter; assert(pred.end() > pos1); assert(pos1->succ->B_to_C->pred == pos1);
1507 assert(pred.end() > pos2); assert(pos2->succ->B_to_C->pred == pos2);
1508 assert(pos1->succ->slice_begin() == pos2->succ->slice_begin());
1509 assert(succ_entry::slice_end(pos1->succ) == succ_entry::slice_end(pos2->succ));
1512 void swap_B_to_C(succ_iter_t
const pos1, succ_iter_t
const pos2)
1513 { assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1514 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1518 std::swap(*pos1->B_to_C,*pos2->B_to_C);
1520 B_to_C_iter_t
const temp_iter(std::move(pos1->B_to_C));
1521 pos1->B_to_C = std::move(pos2->B_to_C);
1522 pos2->B_to_C = std::move(temp_iter);
1523 } assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1524 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1528 void swap3_B_to_C(succ_iter_t
const pos1, succ_iter_t
const pos2,
1529 succ_iter_t
const pos3)
1530 { assert((pos1->B_to_C <= pos3->B_to_C && pos3->B_to_C <= pos2->B_to_C) ||
1531 (pos2->B_to_C <= pos3->B_to_C && pos3->B_to_C <= pos1->B_to_C));
1532 if (pos2 == pos3 || pos1 == pos3)
1534 swap_B_to_C(pos1, pos2);
1537 { assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1538 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1539 assert(succ.end() > pos3); assert(pos3->B_to_C->pred->succ == pos3);
1540 assert(pos1 != pos2); assert(pos1 != pos3); assert(pos2 != pos3);
1542 B_to_C_entry
const temp_entry(std::move(*pos1->B_to_C));
1543 *pos1->B_to_C = std::move(*pos3->B_to_C);
1544 *pos3->B_to_C = std::move(*pos2->B_to_C);
1545 *pos2->B_to_C = std::move(temp_entry);
1547 B_to_C_iter_t
const temp_iter(std::move(pos2->B_to_C));
1548 pos2->B_to_C = std::move(pos3->B_to_C);
1549 pos3->B_to_C = std::move(pos1->B_to_C);
1550 pos1->B_to_C = std::move(temp_iter); assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1551 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1552 assert(succ.end() > pos3); assert(pos3->B_to_C->pred->succ == pos3);
1556 part_trans_t(trans_type m)
1562 { assert(B_to_C.empty()); assert(succ.empty()); assert(pred.empty());
1575 trans_type trans_size()
const {
return pred.size(); }
1578
1579
1580
1581
1582
1583
1584
1585
1586 void split_inert_to_C(block_t* B);
1589
1590
1591
1592
1593
1594 succ_iter_t change_to_C(pred_iter_t pred_iter,
ONLY_IF_DEBUG( constln_t* SpC, constln_t* NewC, )
1595 bool first_transition_of_state,
bool first_transition_of_block);
1598
1599
1600
1601
1602
1603 bool split_s_inert_out(state_info_ptr s
ONLY_IF_DEBUG(, constln_t* OldC)
1607
1608 void make_noninert(succ_iter_t
const succ_iter)
1611 B_to_C_iter_t
const other_B_to_C =
1612 succ_iter->B_to_C->pred->source->block->inert_begin(); assert(succ_iter->B_to_C->B_to_C_slice->begin <= other_B_to_C);
1613 assert(other_B_to_C <= succ_iter->B_to_C);
1614 assert(succ_iter->B_to_C < succ_iter->B_to_C->B_to_C_slice->end);
1615 swap_B_to_C(succ_iter, other_B_to_C->pred->succ);
1616 succ_iter->B_to_C->pred->source->block->set_inert_begin(other_B_to_C +
1619 pred_iter_t
const other_pred = succ_iter->target->inert_pred_begin(); assert(succ_iter->target->pred_begin() <= other_pred);
1620 assert(other_pred <= succ_iter->B_to_C->pred);
1621 assert(succ_iter->B_to_C->pred < succ_iter->target->pred_end());
1622 swap_in(succ_iter->B_to_C, other_pred->succ->B_to_C);
1623 succ_iter->target->set_inert_pred_begin(other_pred + 1);
1625 succ_iter_t
const other_succ =
1626 succ_iter->B_to_C->pred->source->inert_succ_begin(); assert(succ_iter->B_to_C->pred->source->succ_begin() <= other_succ);
1627 assert(other_succ <= succ_iter);
1628 assert(succ_iter < succ_iter->B_to_C->pred->source->succ_end());
1629 swap_out(succ_iter->B_to_C->pred, other_succ->B_to_C->pred);
1630 succ_iter->B_to_C->pred->source->set_inert_succ_begin(other_succ + 1);
1634
1635
1636
1637
1638
1639
1640
1641
1642 void new_blue_block_created(block_t* OldB, block_t* NewB);
1643 void new_red_block_created(block_t*OldB,block_t*NewB,
bool postprocessing);
1645 B_to_C_const_iter_t B_to_C_begin()
const {
return B_to_C.begin(); }
1646 B_to_C_iter_t B_to_C_end () {
return B_to_C.end (); }
1647 pred_const_iter_t pred_end()
const {
return pred.end(); }
1648 succ_const_iter_t succ_end()
const {
return succ.end(); }
1651 void assert_stability(
const part_state_t& part_st)
const;
1679
1680
1693template<
class LTS_TYPE>
1694class bisim_partitioner_gjkw_initialise_helper
1698 state_type nr_of_states;
1699 const state_type orig_nr_of_states;
1700 trans_type nr_of_transitions;
1710 Key(
const label_type& f,
const state_type& s)
1715 bool operator==(
const Key &other)
const
1717 return first == other.first && second == other.second;
1724 std::size_t operator()(
const Key& k)
const
1726 return std::hash<label_type>()(k.first) ^
1727 (std::hash<state_type>()(k.second) << 1);
1732 std::unordered_map<Key, state_type, KeyHasher> extra_kripke_states;
1736 std::unordered_map<label_type, state_type> action_block_map;
1738 std::vector<state_type> noninert_out_per_state, inert_out_per_state;
1739 std::vector<state_type> noninert_in_per_state, inert_in_per_state;
1740 std::vector<state_type> noninert_out_per_block, inert_out_per_block;
1741 std::vector<state_type> states_per_block;
1742 state_type nr_of_nonbottom_states = 0;
1744 bisim_partitioner_gjkw_initialise_helper(LTS_TYPE& l,
bool branching,
1745 bool preserve_divergence);
1748 void init_transitions(part_state_t& part_st, part_trans_t& part_tr,
1749 bool branching,
bool preserve_divergence);
1755 void replace_transition_system(
const part_state_t& part_st,
ONLY_IF_DEBUG(
bool branching, )
1756 bool preserve_divergence);
1759 state_type get_nr_of_states()
const {
return nr_of_states; }
1762 trans_type get_nr_of_transitions()
const {
return nr_of_transitions; }
1768
1769
1773struct refine_shared_t;
1779template <
class LTS_TYPE>
1780class bisim_partitioner_gjkw
1783 bisim_gjkw::bisim_partitioner_gjkw_initialise_helper<LTS_TYPE> init_helper;
1790 bisim_partitioner_gjkw(LTS_TYPE& l,
bool branching =
false,
1791 bool preserve_divergence =
false)
1792 : init_helper(l, branching, preserve_divergence),
1793 part_st(init_helper.get_nr_of_states()),
1794 part_tr(init_helper.get_nr_of_transitions())
1795 { assert(branching || !preserve_divergence);
1796 create_initial_partition_gjkw(branching, preserve_divergence);
1797 refine_partition_until_it_becomes_stable_gjkw();
1799 ~bisim_partitioner_gjkw()
1809 void replace_transition_system(
bool branching,
bool preserve_divergence)
1812 init_helper.replace_transition_system(part_st,
ONLY_IF_DEBUG( branching, )
1813 preserve_divergence);
1816 static state_type num_eq_classes()
1818 return bisim_gjkw::block_t::nr_of_blocks;
1821 state_type get_eq_class(state_type s)
const
1823 return part_st.block(s)->seqnr();
1826 bool in_same_class(state_type s, state_type t)
const
1828 return part_st.block(s) == part_st.block(t);
1835 void create_initial_partition_gjkw(
bool branching,
1836 bool preserve_divergence);
1837 void refine_partition_until_it_becomes_stable_gjkw();
1843 const bisim_gjkw::B_to_C_descriptor* FromRed,
1845 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1846 ,
const bisim_gjkw::constln_t* NewC =
nullptr
1878
1879
1880
1881
1882
1883
1884
1885
1886template <
class LTS_TYPE>
1887void bisimulation_reduce_gjkw(LTS_TYPE& l,
bool branching =
false,
1888 bool preserve_divergence =
false);
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903template <
class LTS_TYPE>
1904bool destructive_bisimulation_compare_gjkw(LTS_TYPE& l1, LTS_TYPE& l2,
1905 bool branching =
false,
bool preserve_divergence =
false,
1906 bool generate_counter_examples =
false);
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923template <
class LTS_TYPE>
1924bool bisimulation_compare_gjkw(
const LTS_TYPE& l1,
const LTS_TYPE& l2,
1925 bool branching =
false,
bool preserve_divergence =
false);
1928template <
class LTS_TYPE>
1929void bisimulation_reduce_gjkw(LTS_TYPE& l,
bool const branching ,
1930 bool const preserve_divergence )
1935 scc_reduce(l, preserve_divergence);
1940 detail::bisim_partitioner_gjkw<LTS_TYPE> bisim_part(l, branching,
1941 preserve_divergence);
1944 bisim_part.replace_transition_system(branching, preserve_divergence);
1947template <
class LTS_TYPE>
1948inline bool bisimulation_compare_gjkw(
const LTS_TYPE& l1,
const LTS_TYPE& l2,
1949 bool branching ,
bool preserve_divergence )
1951 LTS_TYPE l1_copy(l1);
1952 LTS_TYPE l2_copy(l2);
1953 return destructive_bisimulation_compare_gjkw(l1_copy, l2_copy, branching,
1954 preserve_divergence);
1957template <
class LTS_TYPE>
1958bool destructive_bisimulation_compare_gjkw(LTS_TYPE& l1, LTS_TYPE& l2,
1959 bool branching ,
bool preserve_divergence ,
1960 bool generate_counter_examples ,
1961 const std::string& ,
1964 if (generate_counter_examples)
1966 mCRL2log(log::warning) <<
"The GJKW branching bisimulation algorithm does "
1967 "not generate counterexamples.\n";
1969 state_type init_l2 = l2.initial_state() + l1.num_states();
1976 detail::scc_partitioner<LTS_TYPE> scc_part(l1);
1977 scc_part.replace_transition_system(preserve_divergence);
1978 init_l2 = scc_part.get_eq_class(init_l2);
1981 detail::bisim_partitioner_gjkw<LTS_TYPE> bisim_part(l1, branching,
1982 preserve_divergence);
1983 return bisim_part.in_same_class(l1.initial_state(), init_l2);
2010inline const constln_t* state_info_entry::constln()
const
2012 return block->constln();
2015inline constln_t* state_info_entry::constln()
2017 return block->constln();
2021inline B_to_C_descriptor* block_t::FromRed(
const constln_t*
const SpC)
2023 if (!to_constln.empty() && to_constln.front().to_constln() == SpC)
2025 return &*to_constln.begin();
2030 for (B_to_C_desc_const_iter_t iter = to_constln.begin();
2031 to_constln.end() != iter; ++iter)
2033 assert(iter->from_block() ==
this);
2034 assert(iter->to_constln() != SpC);
2043inline void block_t::SetFromRed(B_to_C_desc_iter_t
const new_fromred)
2044{ assert(!to_constln.empty());
2045 if (to_constln.begin() != new_fromred)
2047 to_constln.splice(to_constln.begin(), to_constln, new_fromred);
2048 } assert(new_fromred->from_block() ==
this);
2061inline bool state_info_entry::surely_has_transition_to(
const constln_t*
const
2063{ assert(succ_begin()<=current_constln()); assert(current_constln()<=succ_end());
2064 assert(succ_begin() == current_constln() || succ_end() == current_constln() ||
2065 *current_constln()[-1].target->constln() <
2066 *current_constln()->target->constln());
2067 assert(constln() != SpC);
2070 if (current_constln() != succ_end() &&
2071 current_constln()->target->constln() == SpC)
2089inline bool state_info_entry::surely_has_no_transition_to(
2090 const constln_t*
const SpC)
const
2091{ assert(succ_begin()<=current_constln()); assert(current_constln()<=succ_end());
2092 assert(succ_begin() == current_constln() || succ_end() == current_constln() ||
2093 *current_constln()[-1].target->constln() <
2094 *current_constln()->target->constln());
2095 assert(constln() != SpC);
2099 if (current_constln() != succ_end() &&
2100 *current_constln()->target->constln() <= *SpC)
2104 if (current_constln() != succ_begin() &&
2105 *SpC <= *current_constln()[-1].target->constln())
#define mCRL2complexity(unit, call, info_for_debug)
Assigns work to a counter and checks for errors.
aterm & operator=(const aterm &other) noexcept=default
aterm(const aterm &other) noexcept=default
This class has user-declared copy constructor so declare default copy and move operators.
std::size_t m_top_of_stack
static constexpr std::size_t maximal_size_of_stack
std::array< unprotected_aterm_core, maximal_size_of_stack > m_stack
void initialise(const term_balanced_tree< Term > &tree)
const Term & dereference() const
Dereference operator.
iterator(const iterator &other)
bool equal(const iterator &other) const
Equality operator.
iterator(const term_balanced_tree< Term > &tree)
void increment()
Increments the iterator.
bool is_node() const
Returns true iff the tree is a node with a left and right subtree.
static void make_tree_helper(aterm &result, ForwardTraversalIterator &p, const std::size_t size, Transformer transformer)
term_balanced_tree & operator=(const term_balanced_tree &) noexcept=default
Assignment operator.
size_type size() const
Returns the size of the term_balanced_tree.
term_balanced_tree(term_balanced_tree &&) noexcept=default
Move constructor.
bool empty() const
Returns true if tree is empty.
static const aterm & empty_tree()
static void make_tree(aterm &result, ForwardTraversalIterator &p, const std::size_t size, Transformer transformer)
term_balanced_tree(ForwardTraversalIterator first, const std::size_t size)
Creates an term_balanced_tree with a copy of a range.
static const function_symbol & tree_single_node_function()
const aterm & left_branch() const
Get the left branch of the tree.
term_balanced_tree(const term_balanced_tree &) noexcept=default
Copy constructor.
term_balanced_tree(ForwardTraversalIterator first, const std::size_t size, Transformer transformer)
Creates an term_balanced_tree with a copy of a range, where a transformer is applied to each term bef...
static const function_symbol & tree_node_function()
const Term & operator[](std::size_t position) const
Element indexing operator.
iterator begin() const
Returns an iterator pointing to the beginning of the term_balanced_tree.
iterator end() const
Returns an iterator pointing to the end of the term_balanced_tree.
term_balanced_tree()
Default constructor. Creates an empty tree.
const aterm & right_branch() const
Get the left branch of the tree.
term_balanced_tree & operator=(term_balanced_tree &&) noexcept=default
Move assign operator.
term_balanced_tree(const aterm &tree)
Construction from aterm.
const Term & element_at(std::size_t position, std::size_t size) const
Get an element at the indicated position.
static const function_symbol & tree_empty_function()
friend void make_term_balanced_tree(term_balanced_tree< Term1 > &result, ForwardTraversalIterator p, std::size_t size, Transformer transformer)
term_balanced_tree(detail::_term_appl *t)
A unordered_map class in which aterms can be stored.
data_expression & operator=(data_expression &&) noexcept=default
sort_expression sort() const
Returns the sort of the data expression.
data_expression(const data_expression &) noexcept=default
Move semantics.
data_expression(data_expression &&) noexcept=default
Rewriter that operates on data expressions.
data_expression operator()(const data_expression &d) const
Rewrites a data expression.
void add_sort(const basic_sort &s)
Adds a sort to this specification.
\brief An untyped parameter
Action rename specification.
\brief A timed multi-action
multi_action(const multi_action &) noexcept=default
Move semantics.
const process::action_list & actions() const
multi_action(const process::action_list &actions=process::action_list(), data::data_expression time=data::undefined_real())
Constructor. Actions are sorted to establish the sorted-storage invariant.
This class contains labels for probabilistic transistions, consisting of a numerator and a denumerato...
static const data::rewriter & m_rewriter()
static probabilistic_data_expression one()
Constant one.
probabilistic_data_expression operator+(const probabilistic_data_expression &other) const
Standard addition operator. Note that the expression is not evaluated. For this the rewriter has to b...
probabilistic_data_expression(const data::data_expression &d)
Construct a probabilistic_data_expression from a data_expression, which must be of sort real.
bool operator==(const probabilistic_data_expression &other) const
probabilistic_data_expression(std::size_t enumerator, std::size_t denominator)
bool operator!=(const probabilistic_data_expression &other) const
bool operator>=(const probabilistic_data_expression &other) const
bool operator<(const probabilistic_data_expression &other) const
bool operator<=(const probabilistic_data_expression &other) const
bool operator>(const probabilistic_data_expression &other) const
probabilistic_data_expression(const std::string &enumerator, const std::string &denominator)
probabilistic_data_expression operator-(const probabilistic_data_expression &other) const
Standard subtraction operator.
static data::data_specification data_specification_with_real()
probabilistic_data_expression()
static probabilistic_data_expression zero()
Constant zero.
Linear process specification.
STATE & state()
Get the state in a state probability pair.
PROBABILITY m_probability
state_probability_pair(state_probability_pair &&p)=default
state_probability_pair & operator=(state_probability_pair &&p)=default
state_probability_pair(const state_probability_pair &p)=default
Copy constructor;.
state_probability_pair & operator=(const state_probability_pair &p)=default
Standard assignment.
const PROBABILITY & probability() const
get the probability from a state proability pair.
const STATE & state() const
Get the state from a state probability pair.
PROBABILITY & probability()
Set the probability in a state probability pair.
state_probability_pair(const STATE &state, const PROBABILITY &probability)
constructor.
bool operator==(const state_probability_pair &other) const
Standard equality operator.
Linear process specification.
A class containing the values for action labels for the .lts format.
action_label_lts & operator=(const action_label_lts &)=default
Copy assignment.
void hide_actions(const std::vector< std::string > &tau_actions)
Hide the actions with labels in tau_actions.
action_label_lts(const action_label_lts &)=default
Copy constructor.
static const action_label_lts & tau_action()
action_label_lts(const mcrl2::lps::multi_action &a)
Constructor.
action_label_lts()=default
Default constructor.
void set_truths(formula &f)
Compute and set the truth values of a formula f.
block_index_type target(observation_t obs)
state_type max_state_index
level_type gca_level(const block_index_type B1, const block_index_type B2)
Auxiliarry function that computes the level of the greatest common ancestor. In other words a lvl i s...
std::vector< block > blocks
std::vector< state_type > block_index_of_a_state
label_type label(observation_t obs)
bisim_partitioner_minimal_depth(LTS_TYPE &l, const std::size_t init_l2)
Creates a bisimulation partitioner for an LTS.
std::set< block_index_type > partition
mcrl2::state_formulas::state_formula dist_formula_mindepth(const std::size_t s, const std::size_t t)
Creates a state formula that distinguishes state s from state t.
formula distinguish(const block_index_type b1, const block_index_type b2)
Creates a formula that distinguishes a block b1 from the block b2.
std::vector< block_index_type > BL
~bisim_partitioner_minimal_depth()=default
Destroys this partitioner.
std::vector< bool > block_flags
std::vector< block_index_type > to_be_processed
regular_formulas::regular_formula create_regular_formula(const mcrl2::lps::multi_action &a) const
create_regular_formula Creates a regular formula that represents action a
bool in_same_class(const std::size_t s, const std::size_t t)
block_index_type lift_block(const block_index_type B1, level_type goal)
mcrl2::state_formulas::state_formula conjunction(std::vector< formula > &conjunctions)
conjunction Creates a conjunction of state formulas
std::vector< bool > state_flags
mcrl2::state_formulas::state_formula convert_formula(formula &f)
void split_BL(level_type lvl)
Performs the splits based on the blocks in Bsplit and the flags set in state_flags.
bool refine_partition(level_type lvl)
std::vector< bool > block_flags
state_type max_state_index
mcrl2::state_formulas::state_formula conjunction(std::set< mcrl2::state_formulas::state_formula > terms) const
conjunction Creates a conjunction of state formulas
regular_formulas::regular_formula create_regular_formula(const mcrl2::lts::action_label_string &a) const
create_regular_formula Creates a regular formula that represents action a
regular_formulas::regular_formula create_regular_formula(const mcrl2::lps::multi_action &a) const
create_regular_formula Creates a regular formula that represents action a
std::vector< bool > block_is_in_to_be_processed
std::vector< bool > state_flags
std::map< block_index_type, block_index_type > right_child
std::vector< block_index_type > BL
bool in_same_class(const std::size_t s, const std::size_t t) const
Returns whether two states are in the same bisimulation equivalence class.
mcrl2::state_formulas::state_formula until_formula(const mcrl2::state_formulas::state_formula &phi1, const label_type &a, const mcrl2::state_formulas::state_formula &phi2)
until_formula Creates a state formula that corresponds to the until operator phi1phi2 from HMLU
std::size_t get_eq_class(const std::size_t s) const
Gives the bisimulation equivalence class number of a state.
bisim_partitioner(LTS_TYPE &l, const bool branching=false, const bool preserve_divergence=false, const bool generate_counter_examples=false)
Creates a bisimulation partitioner for an LTS.
~bisim_partitioner()=default
Destroys this partitioner.
std::map< block_index_type, label_type > split_by_action
std::size_t num_eq_classes() const
Gives the number of bisimulation equivalence classes of the LTS.
mcrl2::state_formulas::state_formula counter_formula(std::size_t s, std::size_t t)
Creates a state formula that distinguishes state s from state t.
void order_recursively_on_tau_reachability(const state_type s, std::map< state_type, std::vector< state_type > > &inert_transition_map, std::vector< non_bottom_state > &new_non_bottom_states, std::set< state_type > &visited)
std::vector< block_index_type > to_be_processed
std::map< block_index_type, block_index_type > split_by_block
void refine_partion_with_respect_to_divergences()
void replace_transition_system(const bool branching, const bool preserve_divergences)
Replaces the transition relation of the current lts by the transitions of the bisimulation reduced tr...
std::vector< block > blocks
void order_on_tau_reachability(std::vector< non_bottom_state > &non_bottom_states)
void split_the_blocks_in_BL(bool &partition_is_unstable, const label_type splitter_label, const block_index_type splitter_block)
void refine_partition_until_it_becomes_stable(const bool branching, const bool preserve_divergence)
void create_initial_partition(const bool branching, const bool preserve_divergences)
std::vector< state_type > block_index_of_a_state
mcrl2::state_formulas::state_formula counter_formula_aux(const block_index_type B1, const block_index_type B2)
void check_internal_consistency_of_the_partitioning_data_structure(const bool branching, const bool preserve_divergence) const
outgoing_transitions_per_state_action_t outgoing_transitions
function object to compare two constln_t pointers based on their contents
A class that can be used to store counterexample trees and.
lts_type type()
Provides the type of this lts, in casu lts_aut.
bool operator==(const lts_aut_base &) const
Standard equality function.
void swap(lts_aut_base &) noexcept
Standard swap function.
void swap(lts_dot_base &) noexcept
The standard swap function.
lts_type type() const
The lts_type of state_label_dot. In this case lts_dot.
void clear()
Clear the transitions system.
const std::vector< std::string > & state_element_values(std::size_t idx) const
Provides the vector of strings that correspond to the values of the number at position idx in a vecto...
std::size_t add_state_element_value(std::size_t idx, const std::string &s)
Adds a string to the state element values for the idx-th position in a state vector....
void swap(lts_fsm_base &other) noexcept
Standard swap function.
bool operator==(const lts_fsm_base &other) const
lts_type type() const
The lts_type of this labelled transition system. In this case lts_fsm.
std::string state_element_value(std::size_t parameter_index, std::size_t element_index) const
Returns the element_index'th element for the parameter with index parameter_index.
std::string state_label_to_string(const state_label_fsm &l) const
Pretty print a state value of this FSM.
a base class for lts_lts_t and probabilistic_lts_t.
static lts_type type()
Yields the type of this lts, in this case lts_lts.
void set_process_parameters(const data::variable_list ¶ms)
Set the state parameters for this LTS.
lts_lts_base()=default
Default constructor.
bool operator==(const lts_lts_base &other) const
Standard equality function;.
process::action_label_list m_action_decls
void set_action_label_declarations(const process::action_label_list &decls)
Set the action label information for this LTS.
const data::variable & process_parameter(std::size_t i) const
Returns the i-th parameter of the state vectors stored in this LTS.
data::data_specification m_data_spec
const data::variable_list & process_parameters() const
Return the process parameters stored in this LTS.
void set_data(const data::data_specification &spec)
Set the mCRL2 data specification of this LTS.
void swap(lts_lts_base &l) noexcept
const process::action_label_list & action_label_declarations() const
Return action label declarations stored in this LTS.
data::variable_list m_parameters
A simple labelled transition format with only strings as action labels.
void load(const std::string &filename)
Load the labelled transition system from a file.
void load(std::istream &is)
Load the labelled transition system from an input stream.
void save(const std::string &filename) const
Save the labelled transition system to file.
A class to contain labelled transition systems in graphviz format.
void save(const std::string &filename) const
Save the labelled transition system to a file.
void save(std::ostream &os) const
Save the labelled transition system to a stream.
The class lts_fsm_t contains labelled transition systems in .fsm format.
void load(const std::string &filename)
Save the labelled transition system to file.
void save(const std::string &filename) const
Save the labelled transition system to file.
This class contains labelled transition systems in .lts format.
lts_lts_t()=default
Creates an object containing no information.
void save(const std::string &filename) const
Save the labelled transition system to file.
void load(const std::string &filename)
Load the labelled transition system from file.
A simple labelled transition format with only strings as action labels.
void load(const std::string &filename)
Load the labelled transition system from a file.
void load(std::istream &is)
Load the labelled transition system from an input stream.
void save(const std::string &filename) const
Save the labelled transition system to file.
A class to contain labelled transition systems in graphviz format.
void save(std::ostream &os) const
Save the labelled transition system to a stream.
void save(const std::string &filename) const
Save the labelled transition system to a file.
The class lts_fsm_t contains labelled transition systems in .fsm format.
This class contains probabilistic labelled transition systems in .lts format.
probabilistic_lts_lts_t()=default
Creates an object containing no information.
void load(const std::string &filename)
Load the labelled transition system from file.
void save(const std::string &filename) const
Save the labelled transition system to file.
A class that contains a labelled transition system.
probabilistic_lts(probabilistic_lts &&other)=default
Standard move constructor.
void set_initial_probabilistic_state(const PROBABILISTIC_STATE_T &state)
Sets the probabilistic initial state number of this LTS.
probabilistic_lts()=default
Creates an empty LTS.
const PROBABILISTIC_STATE_T & initial_probabilistic_state() const
Gets the initial state number of this LTS.
bool operator==(const probabilistic_lts &other) const
Standard equality operator.
labels_size_type num_probabilistic_states() const
Gets the number of probabilistic states of this LTS.
static constexpr bool is_probabilistic_lts
An indicator that this is a probabilistic lts.
void clear_probabilistic_states()
Clear the probabilistic states in this probabilistic transitions system.
states_size_type add_and_reset_probabilistic_state(PROBABILISTIC_STATE_T &s)
Adds a probabilistic state to this LTS and resets the state to empty.
void clear()
Clear the transitions system.
probabilistic_lts & operator=(probabilistic_lts &&other)=default
Standard assignment move operator.
void swap(probabilistic_lts &other) noexcept
Swap this lts with the supplied supplied LTS.
probabilistic_lts & operator=(const probabilistic_lts &other)=default
Standard assignment operator.
std::vector< PROBABILISTIC_STATE_T > m_probabilistic_states
probabilistic_lts(const probabilistic_lts &other)=default
Standard copy constructor.
states_size_type add_probabilistic_state(const PROBABILISTIC_STATE_T &s)
Adds a probabilistic state to this LTS.
states_size_type initial_state() const
PROBABILISTIC_STATE_T m_init_probabilistic_state
A class that contains a probabilistic state.
void set(const STATE &s)
Set this probabilistic state to a single state with probability one.
const_iterator begin() const
Gets an iterator over pairs of state and probability. This can only be used when the state is stored ...
void construct_internal_vector_representation()
Guarantee that this probabilistic state is internally stored as a vector, such that begin/end,...
probabilistic_state & operator=(const probabilistic_state &other)
Copy assignment constructor.
const_reverse_iterator rbegin() const
Gets a reverse iterator over pairs of state and probability. This can only be used when the state is ...
std::size_t size() const
Gets the number of probabilistic states in the vector representation of this state....
bool operator!=(const probabilistic_state &other) const
Standard equality operator.
iterator begin()
Gets an iterator over pairs of state and probability. This can only be used if the state is internall...
probabilistic_state & operator=(probabilistic_state &&other)=default
Move assignment operator.
STATE get() const
Get a probabilistic state if is is simple, i.e., consists of a single state.
void swap(probabilistic_state &other) noexcept
Swap this probabilistic state.
iterator end()
Gets the end iterator over pairs of state and probability.
reverse_iterator rbegin()
Gets a reverse iterator over pairs of state and probability. This can only be used if the state is in...
std::vector< state_probability_pair > m_probabilistic_state
const_iterator end() const
Gets the end iterator over pairs of state and probability.
reverse_iterator rend()
Gets the reverse end iterator over pairs of state and probability.
bool operator==(const probabilistic_state &other) const
Standard equality operator.
void clear()
Makes the probabilistic state empty.
probabilistic_state(probabilistic_state &&other)=default
Move constructor.
probabilistic_state(const STATE_PROBABILITY_PAIR_ITERATOR begin, const STATE_PROBABILITY_PAIR_ITERATOR end)
Creates a probabilistic state on the basis of state_probability_pairs.
STATE maximal_state() const
Provides the maximal state index in a probabilistic state.
probabilistic_state(const probabilistic_state &other)
Copy constructor.
void shrink_to_fit()
If a probabilistic state is ready, shrinking it to minimal size might be useful to reduce its memory ...
probabilistic_state()
Default constructor.
probabilistic_state(const STATE &s)
Constructor of a probabilistic state from a non probabilistic state.
void add(const STATE &s, const PROBABILITY &p)
Add a state with a probability to the probabilistic state.
const_reverse_iterator rend() const
Gets the reverse end iterator over pairs of state and probability.
Class for computing the signature for strong bisimulation.
Class for computing the signature for branching bisimulation.
Class for computing the signature for divergence preserving branching bisimulation.
Signature based reductions for labelled transition systems.
This class contains labels for states in dot format.
void set_name(const std::string &s)
This method sets the name of the state label to the string s.
std::string name() const
This method returns the string in the name field of a state label.
std::string label() const
This method returns the label in the name field of a state label.
void set_label(const std::string &s)
This method sets the label field of the state label to the string s.
state_label_dot(const std::string &state_name, const std::string &state_label)
A constructor setting the name and label of this state label to the indicated values.
std::string m_state_label
bool operator==(const state_label_dot &l) const
Standard comparison operator, comparing both the string in the name field, as well as the one in the ...
bool operator!=(const state_label_dot &l) const
Standard inequality operator. Just the negation of equality.
state_label_dot()=default
The default constructor.
This class contains state labels for the fsm format.
state_label_fsm()=default
Default constructor. The label becomes an empty vector.
state_label_fsm(const state_label_fsm &)=default
Copy constructor.
state_label_fsm & operator=(const state_label_fsm &)=default
Copy assignment.
static state_label_fsm number_to_label(const std::size_t n)
Create a state label consisting of a number as the only list element.
state_label_fsm(const std::vector< std::size_t > &v)
Default constructor. The label is set to the vector v.
state_label_fsm operator+(const state_label_fsm &l) const
An operator to concatenate two state labels. Fsm labels cannot be concatenated. Therefore,...
This class contains state labels for an labelled transition system in .lts format.
state_label_lts(const state_label_lts &)=default
Copy constructor.
state_label_lts operator+(const state_label_lts &l) const
An operator to concatenate two state labels.
state_label_lts(const super &l)
Construct a state label out of list of balanced trees of data expressions, representing a state label...
state_label_lts()=default
Default constructor.
state_label_lts(const lps::state &l)
Construct a state label out of a balanced tree of data expressions, representing a state label.
state_label_lts & operator=(const state_label_lts &)=default
Copy assignment.
static state_label_lts number_to_label(const std::size_t n)
Create a state label consisting of a number as the only list element.
state_label_lts(const CONTAINER &l)
Construct a single state label out of the elements in a container.
Process specification consisting of a data specification, action labels, a sequence of process equati...
\brief An untyped multi action or data application
#define ONLY_IF_DEBUG(...)
include something in Debug mode
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
global_function_symbol g_tree_node("@node@", 2)
global_function_symbol g_empty("@empty@", 0)
aterm g_empty_tree(g_empty)
global_function_symbol g_single_tree_node("@single_node@", 1)
std::string pp(const term_balanced_tree< Term > t)
bool is_aterm_balanced_tree(const aterm &t)
void make_term_balanced_tree(term_balanced_tree< Term > &result, ForwardTraversalIterator p, std::size_t size, Transformer transformer)
static data_specification const & default_specification()
Namespace for system defined sort bool_.
const function_symbol & false_()
Constructor for function symbol false.
const function_symbol & true_()
Constructor for function symbol true.
Namespace for system defined sort int_.
application cint(const data_expression &arg0)
Application of function symbol @cInt.
const basic_sort & int_()
Constructor for sort expression Int.
Namespace for system defined sort nat.
const basic_sort & nat()
Constructor for sort expression Nat.
application cnat(const data_expression &arg0)
Application of function symbol @cNat.
Namespace for system defined sort pos.
const basic_sort & pos()
Constructor for sort expression Pos.
Namespace for system defined sort real_.
data_expression & real_one()
application creal(const data_expression &arg0, const data_expression &arg1)
Application of function symbol @cReal.
data_expression & real_zero()
const basic_sort & real_()
Constructor for sort expression Real.
application plus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
application minus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol -.
bool is_data_expression(const atermpp::aterm &x)
Test for a data_expression expression.
application less(const data_expression &arg0, const data_expression &arg1)
Application of function symbol <.
bool is_untyped_data_parameter(const atermpp::aterm &x)
application equal_to(const data_expression &arg0, const data_expression &arg1)
Application of function symbol ==.
std::pair< std::set< data::variable >, std::set< data::variable > > read_write_parameters(const lps::action_summand &summand, const std::set< data::variable > &process_parameters)
Computes the read and written process parameters for the given summand.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
multi_action complete_multi_action(process::untyped_multi_action &x, const process::action_label_list &action_decls, const data::data_specification &data_spec=data::detail::default_specification())
void remove_common_divisor(std::size_t &enumerator, std::size_t &denominator)
void complete_action_rename_specification(action_rename_specification &x, const lps::stochastic_specification &spec)
process::untyped_multi_action parse_multi_action_new(const std::string &text)
multi_action complete_multi_action(process::untyped_multi_action &x, multi_action_type_checker &typechecker, const data::data_specification &data_spec=data::detail::default_specification())
std::size_t greatest_common_divisor(std::size_t x, std::size_t y)
action_rename_specification parse_action_rename_specification_new(const std::string &text)
The main namespace for the LPS library.
specification parse_linear_process_specification(const std::string &text)
Parses a linear process specification from a string.
void complete_data_specification(stochastic_specification &spec)
Adds all sorts that appear in the process of l to the data specification of l.
multi_action parse_multi_action(const std::string &text, const process::action_label_list &action_decls, const data::data_specification &data_spec=data::detail::default_specification())
Parses a multi_action from a string.
void parse_lps(std::istream &, Specification &)
process::action parse_action(const std::string &text, const process::action_label_list &action_decls, const data::data_specification &data_spec=data::detail::default_specification())
Parses an action from a string.
void complete_data_specification(specification &spec)
Adds all sorts that appear in the process of l to the data specification of l.
std::string pp(const probabilistic_data_expression &l)
multi_action parse_multi_action(std::stringstream &in, multi_action_type_checker &typechecker, const data::data_specification &data_spec=data::detail::default_specification())
Parses a multi_action from an input stream.
action_rename_specification parse_action_rename_specification(std::istream &in, const lps::stochastic_specification &spec)
Parses a process specification from an input stream.
std::ostream & operator<<(std::ostream &out, const probabilistic_data_expression &x)
Pretty print to an outstream.
multi_action parse_multi_action(std::stringstream &in, const process::action_label_list &action_decls, const data::data_specification &data_spec=data::detail::default_specification())
Parses a multi_action from an input stream.
action_rename_specification parse_action_rename_specification(const std::string &spec_string, const lps::stochastic_specification &spec)
Parses an action rename specification. Parses an action rename specification. If the action rename sp...
void parse_lps< specification >(std::istream &from, specification &result)
void make_state(state &result, ForwardTraversalIterator p, const std::size_t size)
void parse_lps< stochastic_specification >(std::istream &from, stochastic_specification &result)
Parses a stochastic linear process specification from an input stream.
std::string pp(const lps::state &x)
multi_action parse_multi_action(const std::string &text, multi_action_type_checker &typechecker, const data::data_specification &data_spec=data::detail::default_specification())
Parses a multi_action from a string.
void parse_lps(const std::string &text, Specification &result)
specification parse_linear_process_specification(std::istream &spec_stream)
Parses a linear process specification from an input stream.
void make_state(state &result, ForwardTraversalIterator p, const std::size_t size, Transformer transformer)
bool bisimulation_compare(const LTS_TYPE &l1, const LTS_TYPE &l2, bool branching=false, bool preserve_divergences=false, bool generate_counter_examples=false, const std::string &counter_example_file="", bool structured_output=false)
Checks whether the two initial states of two lts's are strong or branching bisimilar.
lts_type guess_format(std::string const &s, const bool be_verbose)
Determines the LTS format from a filename by its extension.
static const std::array< std::string, 5 > extension_strings
std::string supported_lts_formats_text(lts_type default_format, const std::set< lts_type > &supported)
Gives a textual list describing supported LTS formats.
std::string supported_lts_formats_text(const std::set< lts_type > &supported)
Gives a textual list describing supported LTS formats.
bool destructive_bisimulation_compare_minimal_depth(LTS_TYPE &l1, LTS_TYPE &l2, const std::string &counter_example_file)
std::string string_for_type(const lts_type type)
Gives a string representation of an LTS format.
void unmark_explicit_divergence_transitions(LTS_TYPE &l, const std::size_t divergent_transition_label)
std::string mime_type_for_type(const lts_type type)
Gives the MIME type associated with an LTS format.
void get_trans(const outgoing_transitions_per_state_t &begin, tree_set_store &tss, std::ptrdiff_t d, std::vector< transition > &d_trans, LTS_TYPE &aut)
lts_type parse_format(std::string const &s)
Determines the LTS format from a format specification string.
static const std::array< std::string, 5 > type_strings
std::string extension_for_type(const lts_type type)
Gives the filename extension associated with an LTS format.
LABEL_TYPE make_divergence_label(const std::string &s)
const std::set< lts_type > & supported_lts_formats()
Gives the set of all supported LTS formats.
std::string lts_extensions_as_string(const std::set< lts_type > &supported)
Gives a list of extensions for supported LTS formats.
std::string lts_extensions_as_string(const std::string &sep, const std::set< lts_type > &supported)
Gives a list of extensions for supported LTS formats.
std::size_t mark_explicit_divergence_transitions(LTS_TYPE &l)
bool destructive_bisimulation_compare(LTS_TYPE &l1, LTS_TYPE &l2, bool branching=false, bool preserve_divergences=false, bool generate_counter_examples=false, const std::string &counter_example_file="", bool structured_output=false)
Checks whether the two initial states of two lts's are strong or branching bisimilar.
void bisimulation_reduce(LTS_TYPE &l, bool branching=false, bool preserve_divergences=false)
Reduce transition system l with respect to strong or (divergence preserving) branching bisimulation.
bool lts_named_cmp(const std::array< std::string, Size > &N, T a, T b)
static const std::array< std::string, 5 > type_desc_strings
static const std::array< std::string, 5 > mime_type_strings
static const std::set< lts_type > & initialise_supported_lts_formats()
std::string pp(const state_label_dot &l)
Pretty print function for a state_label_dot. Only prints the label field.
std::string pp(const state_label_lts &label)
Pretty print a state value of this LTS.
bool is_deterministic(const LTS_TYPE &l)
Checks whether this LTS is deterministic.
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair_reversed(const std::vector< transition > &trans)
Provide the transitions as a multimap accessible per from state and label, ordered backwardly.
action_label_lts parse_lts_action(const std::string &multi_action_string, const data::data_specification &data_spec, lps::multi_action_type_checker &typechecker)
Parse a string into an action label.
void group_transitions_on_label(std::vector< transition > &transitions, std::function< std::size_t(const transition &)> get_label, const std::size_t number_of_labels, const std::size_t tau_label_index)
std::size_t to(const outgoing_pair_t &p)
Target state of a label state pair.
std::string pp(const state_label_fsm &label)
Pretty print an fsm state label.
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair(const std::vector< transition > &trans)
Provide the transitions as a multimap accessible per from state and label.
void sort_transitions(std::vector< transition > &transitions, const std::set< transition::size_type > &hidden_label_set, transition_sort_style ts=src_lbl_tgt)
Sorts the transitions using a sort style.
void determinise(LTS_TYPE &l)
Determinises this LTS.
std::string pp(const probabilistic_state< STATE, PROBABILITY > &l)
std::ostream & operator<<(std::ostream &out, const probabilistic_state< STATE, PROBABILITY > &l)
Pretty print to an outstream.
void reduce(LTS_TYPE &l, lts_equivalence eq)
Applies a reduction algorithm to this LTS.
bool compare(const LTS_TYPE &l1, const LTS_TYPE &l2, lts_equivalence eq, bool generate_counter_examples=false, const std::string &counter_example_file="", bool structured_output=false)
Checks whether this LTS is equivalent to another LTS.
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair_reversed(const std::vector< transition > &trans, const std::set< transition::size_type > &hide_label_set)
Provide the transitions as a multimap accessible per from state and label, ordered backwardly.
bool destructive_compare(LTS_TYPE &l1, LTS_TYPE &l2, const lts_equivalence eq, const bool generate_counter_examples=false, const std::string &counter_example_file=std::string(), const bool structured_output=false)
Checks whether this LTS is equivalent to another LTS.
std::string pp(const action_label_lts &l)
Print the action label to string.
bool destructive_compare(LTS_TYPE &l1, LTS_TYPE &l2, lts_preorder pre, bool generate_counter_example, const std::string &counter_example_file="", bool structured_output=false, lps::exploration_strategy strategy=lps::es_breadth, bool preprocess=true)
Checks whether this LTS is smaller than another LTS according to a preorder.
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair(const std::vector< transition > &trans, const std::set< transition::size_type > &hide_label_set)
Provide the transitions as a multimap accessible per from state and label.
void merge(LTS_TYPE &l1, const LTS_TYPE &l2)
Merge the second lts into the first lts.
bool reachability_check(lts< SL, AL, BASE > &l, bool remove_unreachable=false)
Checks whether all states in this LTS are reachable from the initial state and remove unreachable sta...
std::size_t label(const outgoing_pair_t &p)
Label of a pair of a label and target state.
std::size_t from(const outgoing_transitions_per_state_action_t::const_iterator &i)
From state of an iterator exploring transitions per outgoing state and action.
void group_transitions_on_label(const std::vector< transition >::iterator begin, const std::vector< transition >::iterator end, std::function< std::size_t(const transition &)> get_label, std::vector< std::pair< std::size_t, std::size_t > > &count_sum_transitions_per_action, const std::size_t tau_label_index=0, std::vector< std::size_t > &todo_stack=bogus_todo_stack)
bool reachability_check(probabilistic_lts< SL, AL, PROBABILISTIC_STATE, BASE > &l, bool remove_unreachable=false)
Checks whether all states in a probabilistic LTS are reachable from the initial state and remove unre...
bool compare(const LTS_TYPE &l1, const LTS_TYPE &l2, lts_preorder pre, bool generate_counter_example, const std::string &counter_example_file="", bool structured_output=false, lps::exploration_strategy strategy=lps::es_breadth, bool preprocess=true)
Checks whether this LTS is smaller than another LTS according to a preorder.
The main namespace for the Process library.
bool is_linear(const process_specification &p, bool verbose=false)
Returns true if the process specification is linear.
bool is_untyped_multi_action(const atermpp::aterm &x)
void swap(atermpp::term_balanced_tree< T > &t1, atermpp::term_balanced_tree< T > &t2) noexcept
Swaps two balanced trees.
static const atermpp::aterm StateMay
static const atermpp::aterm StateOr
static const atermpp::aterm UntypedRegFrm
static const atermpp::aterm StateFrm
static const atermpp::aterm StateYaled
static const atermpp::aterm RegAlt
static const atermpp::aterm ActNot
static const atermpp::aterm ActImp
static const atermpp::aterm ActTrue
static const atermpp::aterm StateInfimum
static const atermpp::aterm StateAnd
static const atermpp::aterm StateExists
static const atermpp::aterm RegTrans
static const atermpp::aterm ActOr
static const atermpp::aterm StateConstantMultiplyAlt
static const atermpp::aterm ActFrm
static const atermpp::aterm ActForall
static const atermpp::aterm StateYaledTimed
static const atermpp::aterm ActFalse
static const atermpp::aterm StateFalse
static const atermpp::aterm RegFrm
static const atermpp::aterm StateDelay
static const atermpp::aterm StatePlus
static const atermpp::aterm StateMinus
static const atermpp::aterm StateNu
static const atermpp::aterm ActAnd
static const atermpp::aterm StateDelayTimed
static const atermpp::aterm StateSupremum
static const atermpp::aterm StateSum
static const atermpp::aterm ActAt
static const atermpp::aterm ActExists
static const atermpp::aterm StateMu
static const atermpp::aterm RegTransOrNil
static const atermpp::aterm StateVar
static const atermpp::aterm StateImp
static const atermpp::aterm RegSeq
static const atermpp::aterm StateTrue
static const atermpp::aterm StateForall
static const atermpp::aterm StateMust
static const atermpp::aterm StateNot
static const atermpp::aterm ActMultAct
static const atermpp::aterm StateConstantMultiply
std::vector< state_type > bottom_states
block_index_type parent_block_index
block_index_type block_index
void swap(block &b) noexcept
std::vector< transition > non_inert_transitions
std::vector< non_bottom_state > non_bottom_states
std::vector< state_type > inert_transitions
non_bottom_state(const state_type s, const std::vector< state_type > &it)
non_bottom_state(const state_type s)
std::vector< state_type > states
void swap(block &b) noexcept
block_index_type block_index
std::vector< transition > transitions
block_index_type parent_block_index
Converts a process expression into linear process format. Use the convert member functions for this.
lps::specification convert(const process_specification &p)
Converts a process_specification into a specification. Throws non_linear_process if a non-linear sub-...
Converts a process expression into linear process format. Use the convert member functions for this.
lps::stochastic_specification convert(const process_specification &p)
Converts a process_specification into a stochastic_specification. Throws non_linear_process if a non-...
std::size_t operator()(const atermpp::term_balanced_tree< T > &t) const
std::size_t operator()(const mcrl2::lps::probabilistic_data_expression &p) const
std::size_t operator()(const mcrl2::lps::state_probability_pair< STATE, PROBABILITY > &p) const
std::size_t operator()(const mcrl2::lts::action_label_lts &as) const
std::size_t operator()(const mcrl2::lts::probabilistic_state< STATE, PROBABILITY > &p) const