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"
49 #define ONLY_IF_DEBUG(...) __VA_ARGS__
52 #define ONLY_IF_DEBUG(...)
114class state_info_entry;
116using state_info_ptr = state_info_entry*;
117using state_info_const_ptr =
const state_info_entry*;
128using permutation_t = fixed_vector<state_info_ptr>;
145class B_to_C_descriptor;
161class state_info_entry
167 pred_iter_t state_in_begin;
172 succ_iter_t state_out_begin;
175 pred_iter_t state_inert_in_begin;
178 succ_iter_t state_inert_out_begin;
181 succ_iter_t state_inert_out_end;
184 block_t* block =
nullptr;
187 permutation_iter_t pos;
190 state_type notblue = 0UL;
193 succ_iter_t int_current_constln;
196 const constln_t* constln()
const;
197 constln_t* constln();
199 succ_const_iter_t current_constln()
const {
return int_current_constln; }
200 succ_iter_t current_constln() {
return int_current_constln; }
201 void set_current_constln(succ_iter_t
const new_current_constln)
203 int_current_constln = new_current_constln;
204 assert(succ_begin() <= int_current_constln);
205 assert(int_current_constln <= succ_end());
223 pred_const_iter_t pred_begin()
const {
return state_in_begin; }
224 pred_iter_t pred_begin() {
return state_in_begin; }
225 void set_pred_begin(pred_iter_t new_in_begin)
227 state_in_begin = new_in_begin;
231 pred_const_iter_t pred_end()
const
232 { assert(s_i_begin <=
this); assert(
this < s_i_end);
233 return this[1].state_in_begin;
235 pred_iter_t pred_end()
236 { assert(s_i_begin <=
this); assert(
this < s_i_end);
237 return this[1].state_in_begin;
239 void set_pred_end(pred_iter_t new_in_end)
240 { assert(s_i_begin <=
this); assert(
this < s_i_end);
241 this[1].set_pred_begin(new_in_end);
245 pred_const_iter_t noninert_pred_begin()
const {
return state_in_begin; }
246 pred_iter_t noninert_pred_begin() {
return state_in_begin; }
249 pred_const_iter_t noninert_pred_end()
const {
return inert_pred_begin(); }
250 pred_iter_t noninert_pred_end() {
return inert_pred_begin(); }
253 pred_const_iter_t inert_pred_begin()
const {
return state_inert_in_begin; }
254 pred_iter_t inert_pred_begin() {
return state_inert_in_begin; }
255 void set_inert_pred_begin(pred_iter_t new_inert_in_begin)
257 state_inert_in_begin = new_inert_in_begin; assert(pred_begin() <= inert_pred_begin());
258 assert(inert_pred_begin() <= pred_end());
262 pred_const_iter_t inert_pred_end()
const {
return pred_end(); }
263 pred_iter_t inert_pred_end() {
return pred_end(); }
266 succ_const_iter_t succ_begin()
const {
return state_out_begin; }
267 succ_iter_t succ_begin() {
return state_out_begin; }
268 void set_succ_begin(succ_iter_t new_out_begin)
270 state_out_begin = new_out_begin;
274 succ_const_iter_t succ_end()
const
275 { assert(s_i_begin <=
this); assert(
this < s_i_end);
276 return this[1].state_out_begin;
278 succ_iter_t succ_end()
279 { assert(s_i_begin <=
this); assert(
this < s_i_end);
280 return this[1].state_out_begin;
282 void set_succ_end(succ_iter_t new_out_end)
283 { assert(s_i_begin <=
this); assert(
this < s_i_end);
284 this[1].set_succ_begin(new_out_end); assert(succ_begin() <= succ_end());
288 succ_const_iter_t inert_succ_begin()
const {
return state_inert_out_begin;}
289 succ_iter_t inert_succ_begin() {
return state_inert_out_begin; }
290 void set_inert_succ_begin(succ_iter_t
const new_inert_out_begin)
302 state_inert_out_begin = new_inert_out_begin; assert(succ_begin() <= inert_succ_begin());
303 assert(inert_succ_begin() <= inert_succ_end());
307 succ_const_iter_t inert_succ_end()
const {
return state_inert_out_end; }
308 succ_iter_t inert_succ_end() {
return state_inert_out_end; }
310 void set_inert_succ_begin_and_end(succ_iter_t new_inert_out_begin,
311 succ_iter_t new_inert_out_end)
313 state_inert_out_begin = new_inert_out_begin;
314 state_inert_out_end = new_inert_out_end; assert(succ_begin() <= inert_succ_begin());
315 assert(inert_succ_begin() <= inert_succ_end());
316 assert(inert_succ_end() <= succ_end());
330 bool surely_has_transition_to(
const constln_t* SpC)
const;
331 bool surely_has_no_transition_to(
const constln_t* SpC)
const;
335 std::string debug_id_short()
const
337 assert(s_i_begin <=
this);
338 assert(
this < s_i_end);
339 return std::to_string(
this - s_i_begin);
344 std::string debug_id()
const
346 return "state " + debug_id_short();
350 static state_info_const_ptr s_i_begin;
357 static state_info_const_ptr s_i_end;
359 friend class part_state_t;
362 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
363 mutable check_complexity::state_counter_t work_counter;
369static inline void swap_permutation(permutation_iter_t s1,
370 permutation_iter_t s2)
407 permutation_iter_t int_end;
410 permutation_iter_t int_begin;
413 permutation_iter_t int_marked_nonbottom_begin;
416 permutation_iter_t int_bottom_begin;
419 permutation_iter_t int_marked_bottom_begin;
426 B_to_C_iter_t int_inert_begin;
429 B_to_C_iter_t int_inert_end;
437 B_to_C_desc_list to_constln;
440 constln_t* int_constln;
446 block_t* refinable_next =
nullptr;
449 static block_t* refinable_first;
456 state_type int_seqnr = BLOCK_NO_SEQNR;
461 [[maybe_unused]]
static constexpr state_type BLOCK_NO_SEQNR = (state_type) -1;
466 static state_type nr_of_blocks;
474 block_t(constln_t*
const constln_, permutation_iter_t
const begin_, permutation_iter_t
const end_)
477 int_marked_nonbottom_begin(begin_),
478 int_bottom_begin(begin_),
479 int_marked_bottom_begin(end_),
483 int_constln(constln_)
491 assert(int_bottom_begin < int_end);
498 ~block_t() =
default;
502 { assert(BLOCK_NO_SEQNR == int_seqnr);
503 int_seqnr = nr_of_blocks++;
506 state_type seqnr()
const {
return int_seqnr; }
509 static block_t* get_some_refinable() {
return refinable_first; }
513 bool is_refinable()
const {
return nullptr != refinable_next; }
518 bool make_refinable()
524 refinable_next =
nullptr == refinable_first ?
this : refinable_first;
525 refinable_first =
this;
533 void make_nonrefinable()
534 { assert(refinable_first ==
this);
535 refinable_first = refinable_next ==
this ?
nullptr : refinable_next;
536 refinable_next =
nullptr;
540 state_type size()
const {
return int_end - int_begin; }
544 state_type marked_bottom_size()
const
546 return marked_bottom_end() - marked_bottom_begin();
552 state_type marked_size()
const
554 return marked_nonbottom_end() - marked_nonbottom_begin() +
555 marked_bottom_size();
559 state_type unmarked_bottom_size()
const
561 return unmarked_bottom_end() - unmarked_bottom_begin();
570 bool operator<(
const block_t& other)
const
572 return begin() < other.begin();
576 const constln_t* constln()
const {
return int_constln; }
577 constln_t* constln() {
return int_constln; }
578 void set_constln(constln_t* new_constln)
580 int_constln = new_constln;
587 B_to_C_descriptor* FromRed(
const constln_t* SpC);
590 void SetFromRed(B_to_C_desc_iter_t new_fromred);
593 permutation_const_iter_t begin()
const {
return int_begin; }
594 permutation_iter_t begin() {
return int_begin; }
595 void set_begin(permutation_iter_t new_begin)
597 int_begin = new_begin; assert(int_begin <= int_marked_nonbottom_begin);
601 permutation_const_iter_t end()
const {
return int_end; }
602 permutation_iter_t end() {
return int_end; }
603 void set_end(permutation_iter_t new_end)
605 int_end = new_end; assert(int_marked_bottom_begin <= int_end); assert(int_bottom_begin < int_end);
609 permutation_const_iter_t nonbottom_begin()
const {
return int_begin; }
610 permutation_iter_t nonbottom_begin() {
return int_begin; }
613 permutation_const_iter_t nonbottom_end()
const {
return int_bottom_begin; }
614 permutation_iter_t nonbottom_end() {
return int_bottom_begin; }
615 void set_nonbottom_end(permutation_iter_t new_nonbottom_end)
617 int_bottom_begin = new_nonbottom_end; assert(int_marked_nonbottom_begin <= int_bottom_begin);
618 assert(int_bottom_begin <= int_marked_bottom_begin);
619 assert(int_bottom_begin < int_end);
623 permutation_const_iter_t bottom_begin()
const {
return int_bottom_begin; }
624 permutation_iter_t bottom_begin() {
return int_bottom_begin; }
625 void set_bottom_begin(permutation_iter_t new_bottom_begin)
627 int_bottom_begin = new_bottom_begin; assert(int_marked_nonbottom_begin <= int_bottom_begin);
628 assert(int_bottom_begin <= int_marked_bottom_begin);
633 permutation_const_iter_t bottom_end()
const {
return int_end; }
634 permutation_iter_t bottom_end() {
return int_end; }
637 permutation_const_iter_t unmarked_nonbottom_begin()
const{
return int_begin;}
638 permutation_iter_t unmarked_nonbottom_begin() {
return int_begin; }
641 permutation_const_iter_t unmarked_nonbottom_end()
const
643 return int_marked_nonbottom_begin;
645 permutation_iter_t unmarked_nonbottom_end()
647 return int_marked_nonbottom_begin;
649 void set_unmarked_nonbottom_end(permutation_iter_t
650 new_unmarked_nonbottom_end)
652 int_marked_nonbottom_begin = new_unmarked_nonbottom_end; assert(int_begin <= int_marked_nonbottom_begin);
653 assert(int_marked_nonbottom_begin <= int_bottom_begin);
657 permutation_const_iter_t marked_nonbottom_begin()
const
659 return int_marked_nonbottom_begin;
661 permutation_iter_t marked_nonbottom_begin()
663 return int_marked_nonbottom_begin;
665 void set_marked_nonbottom_begin(permutation_iter_t
666 new_marked_nonbottom_begin)
668 int_marked_nonbottom_begin = new_marked_nonbottom_begin; assert(int_begin <= int_marked_nonbottom_begin);
669 assert(int_marked_nonbottom_begin <= int_bottom_begin);
673 permutation_const_iter_t marked_nonbottom_end()
const
675 return int_bottom_begin;
677 permutation_iter_t marked_nonbottom_end() {
return int_bottom_begin; }
680 permutation_const_iter_t unmarked_bottom_begin()
const
682 return int_bottom_begin;
684 permutation_iter_t unmarked_bottom_begin() {
return int_bottom_begin; }
687 permutation_const_iter_t unmarked_bottom_end()
const
689 return int_marked_bottom_begin;
691 permutation_iter_t unmarked_bottom_end() {
return int_marked_bottom_begin;}
692 void set_unmarked_bottom_end(permutation_iter_t new_unmarked_bottom_end)
694 int_marked_bottom_begin = new_unmarked_bottom_end; assert(int_bottom_begin <= int_marked_bottom_begin);
695 assert(int_marked_bottom_begin <= int_end);
699 permutation_const_iter_t marked_bottom_begin()
const
701 return int_marked_bottom_begin;
703 permutation_iter_t marked_bottom_begin() {
return int_marked_bottom_begin;}
704 void set_marked_bottom_begin(permutation_iter_t new_marked_bottom_begin)
706 int_marked_bottom_begin = new_marked_bottom_begin; assert(int_bottom_begin <= int_marked_bottom_begin);
707 assert(int_marked_bottom_begin <= int_end);
712 permutation_const_iter_t marked_bottom_end()
const {
return int_end; }
713 permutation_iter_t marked_bottom_end() {
return int_end; }
716 B_to_C_const_iter_t inert_begin()
const {
return int_inert_begin; }
717 B_to_C_iter_t inert_begin() {
return int_inert_begin; }
718 void set_inert_begin(B_to_C_iter_t new_inert_begin)
720 int_inert_begin = new_inert_begin; assert(int_inert_begin <= int_inert_end);
724 B_to_C_const_iter_t inert_end()
const {
return int_inert_end; }
725 B_to_C_iter_t inert_end() {
return int_inert_end; }
726 void set_inert_end(B_to_C_iter_t new_inert_end)
728 int_inert_end = new_inert_end; assert(int_inert_begin <= int_inert_end);
730 void set_inert_begin_and_end(B_to_C_iter_t new_inert_begin,
731 B_to_C_iter_t new_inert_end)
733 int_inert_begin = new_inert_begin;
734 int_inert_end = new_inert_end; assert(int_inert_begin <= int_inert_end);
742 bool mark_nonbottom(state_info_ptr s)
743 { assert(s->pos < nonbottom_end()); assert(nonbottom_begin() <= s->pos);
744 if (marked_nonbottom_begin() <= s->pos)
748 set_marked_nonbottom_begin(marked_nonbottom_begin() - 1);
749 swap_permutation(s->pos, marked_nonbottom_begin());
759 bool mark(state_info_ptr s)
760 { assert(s->pos < end());
761 if (bottom_begin() <= s->pos)
763 if (marked_bottom_begin() <= s->pos)
767 set_marked_bottom_begin(marked_bottom_begin() - 1);
768 swap_permutation(s->pos, marked_bottom_begin());
771 return mark_nonbottom(s);
780 block_t* split_off_blue(permutation_iter_t blue_nonbottom_end);
795 block_t* split_off_red(permutation_iter_t red_nonbottom_begin);
799 std::string debug_id()
const
801 return "block [" + std::to_string(begin() - perm_begin) +
"," +
802 std::to_string(end() - perm_begin) +
")" +
803 (BLOCK_NO_SEQNR != seqnr() ?
" (#"+std::to_string(seqnr())+
")" :
"");
809 static permutation_const_iter_t permutation_begin() {
return perm_begin; }
811 static permutation_const_iter_t perm_begin;
813 friend class part_state_t;
815 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
817 mutable check_complexity::block_counter_t work_counter;
831 permutation_iter_t int_end;
834 permutation_iter_t int_begin;
841 constln_t* nontrivial_next =
nullptr;
844 static constln_t* nontrivial_first;
857 B_to_C_iter_t postprocess_begin;
861 B_to_C_iter_t postprocess_end;
869 const state_type sort_key;
874 constln_t(state_type sort_key_, permutation_iter_t begin_, permutation_iter_t end_, B_to_C_iter_t postprocess_none)
878 postprocess_begin(postprocess_none),
879 postprocess_end(postprocess_none),
881 { assert(int_begin<int_end); assert(std::cmp_less_equal(int_end-int_begin, sort_key));
885 ~constln_t() =
default;
890 static constln_t* get_some_nontrivial() {
return nontrivial_first; }
898 const constln_t* get_nontrivial_next()
const {
return nontrivial_next; }
905 { assert(nontrivial_first ==
this);
906 nontrivial_first = nontrivial_next ==
this ?
nullptr : nontrivial_next;
907 nontrivial_next =
nullptr;
912 void make_nontrivial()
914 if (
nullptr == nontrivial_next)
916 nontrivial_next =
nullptr == nontrivial_first ?
this
918 nontrivial_first =
this;
926 bool is_trivial()
const
928 return nullptr == nontrivial_next;
932 permutation_const_iter_t begin()
const {
return int_begin; }
934 permutation_iter_t begin() {
return int_begin; }
936 void set_begin(permutation_iter_t new_begin)
938 int_begin = new_begin; assert(int_begin < int_end);
942 permutation_const_iter_t end()
const {
return int_end; }
944 permutation_iter_t end() {
return int_end; }
946 void set_end(permutation_iter_t new_end)
948 int_end = new_end; assert(int_begin < int_end);
952 state_type size()
const {
return int_end - int_begin; }
960 bool operator<(
const constln_t& other)
const
962 return sort_key < other.sort_key;
964 bool operator> (
const constln_t& other)
const {
return other < *
this; }
965 bool operator<=(
const constln_t& other)
const {
return !(other < *
this); }
966 bool operator>=(
const constln_t& other)
const {
return !(*
this < other); }
973 block_t* split_off_small_block()
974 { assert(begin() < end());
975 block_t*
const FirstB = (*begin())->block;
976 block_t*
const LastB = end()[-1]->block; assert(FirstB != LastB);
977 if (FirstB->end() == LastB->begin()) { make_trivial(); } assert(FirstB->constln() ==
this); assert(LastB->constln() ==
this);
978 assert(postprocess_begin == postprocess_end);
985 if (FirstB->size() > LastB->size())
990 new constln_t(sort_key - (LastB->begin() - begin()),
991 LastB->begin(), end(), postprocess_end);
992 set_end(LastB->begin());
993 LastB->set_constln(NewC);
1001 new constln_t(sort_key - (end() - FirstB->end()), begin(),
1002 FirstB->end(), postprocess_end);
1003 set_begin(FirstB->end());
1004 FirstB->set_constln(NewC);
1010 std::string debug_id()
const
1012 return "constellation [" +
1013 std::to_string(begin() - block_t::permutation_begin()) +
1014 "," + std::to_string(end() - block_t::permutation_begin()) +
1015 ") (#" + std::to_string(sort_key) +
")";
1021template <
class LTS_TYPE>
1022class bisim_partitioner_gjkw_initialise_helper;
1038 permutation_t permutation;
1045 fixed_vector<state_info_entry> state_info;
1047 template <
class LTS_TYPE>
1048 friend class bisim_partitioner_gjkw_initialise_helper;
1056 part_state_t(state_type n)
1060 { assert(0 == block_t::nr_of_blocks);
1062 block_t::perm_begin = permutation.begin();
1063 state_info_entry::s_i_begin = state_info.data();
1064 state_info_entry::s_i_end = state_info_entry::s_i_begin + n;
1072 { assert(state_info.empty()); assert(permutation.empty());
1084 for (permutation_iter_t permutation_iter = permutation.end();
1085 permutation.begin() != permutation_iter; )
1087 constln_t*
const C = permutation_iter[-1]->constln(); assert(C->end() == permutation_iter);
1089 assert(permutation_iter[-1]->block->begin() == C->begin());
1090 permutation_iter = C->begin();
1094 state_type deleted_blocks = 0;
1096 for (permutation_iter_t permutation_iter = permutation.end();
1097 permutation.begin() != permutation_iter; )
1099 block_t*
const B = permutation_iter[-1]->block; assert(B->end() == permutation_iter);
1100 permutation_iter = B->begin();
1102 if (block_t::BLOCK_NO_SEQNR != B->seqnr())
1108 assert(0 == deleted_blocks);
1112 } assert(deleted_blocks == block_t::nr_of_blocks);
1113 block_t::nr_of_blocks = 0;
1115 permutation.clear();
1120 state_type state_size()
const {
return permutation.size(); }
1125 const block_t* block(state_type s)
const
1127 return state_info[s].block;
1139 void print_block(
const char* message,
const block_t* B,
1140 permutation_const_iter_t begin, permutation_const_iter_t end)
const;
1147 void print_part(
const part_trans_t& part_tr)
const;
1153 void print_trans()
const;
1205
1206
1210 B_to_C_iter_t B_to_C;
1211 state_info_ptr target =
nullptr;
1226 succ_iter_t int_slice_begin_or_before_end;
1229 succ_iter_t slice_begin_or_before_end()
1231 return int_slice_begin_or_before_end;
1234 succ_const_iter_t slice_begin_or_before_end()
const
1236 return int_slice_begin_or_before_end;
1239 void set_slice_begin_or_before_end(succ_iter_t new_value)
1241 int_slice_begin_or_before_end = new_value;
1245 succ_iter_t slice_begin()
1247 if (
this < &*int_slice_begin_or_before_end)
1248 { assert(&*int_slice_begin_or_before_end->int_slice_begin_or_before_end <=
this);
1249 return int_slice_begin_or_before_end->
1250 int_slice_begin_or_before_end;
1251 } assert(&*int_slice_begin_or_before_end->int_slice_begin_or_before_end ==
this);
1252 return int_slice_begin_or_before_end;
1255 succ_const_iter_t slice_begin()
const
1257 if (
this < &*int_slice_begin_or_before_end)
1258 { assert(&*int_slice_begin_or_before_end->int_slice_begin_or_before_end <=
this);
1259 return int_slice_begin_or_before_end->
1260 int_slice_begin_or_before_end;
1261 } assert(&*int_slice_begin_or_before_end->int_slice_begin_or_before_end ==
this);
1262 return int_slice_begin_or_before_end;
1265 static succ_iter_t slice_end(succ_iter_t this_)
1267 if (this_ < this_->int_slice_begin_or_before_end)
1268 { assert(this_->int_slice_begin_or_before_end->
1269 int_slice_begin_or_before_end <= this_);
1270 return this_->int_slice_begin_or_before_end + 1;
1271 } assert(this_->int_slice_begin_or_before_end->
1272 int_slice_begin_or_before_end == this_);
1279 static succ_const_iter_t slice_end(succ_const_iter_t this_)
1281 if (this_ < this_->int_slice_begin_or_before_end)
1282 { assert(this_->int_slice_begin_or_before_end->
1283 int_slice_begin_or_before_end <= this_);
1284 return this_->int_slice_begin_or_before_end + 1;
1285 } assert(this_->int_slice_begin_or_before_end->
1286 int_slice_begin_or_before_end == this_);
1292 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1295 static void slice_add_work_to_transns(succ_const_iter_t this_,
1296 enum check_complexity::counter_type ctr,
unsigned max_value);
1305 state_info_ptr source =
nullptr;
1309 std::string debug_id_short()
const
1311 return "from " + source->debug_id_short() +
" to " +
1312 succ->target->debug_id_short();
1317 std::string debug_id()
const
1319 return "transition " + debug_id_short();
1322 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1323 mutable check_complexity::trans_counter_t work_counter;
1332 B_to_C_desc_iter_t B_to_C_slice;
1334 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1337 inline void succ_entry::slice_add_work_to_transns(succ_const_iter_t this_,
1338 enum check_complexity::counter_type ctr,
unsigned max_value)
1340 succ_const_iter_t iter = this_->slice_begin();
1341 succ_const_iter_t end = slice_end(this_); (
void) end;
1345 while (++iter != end)
1349 add_work_notemporary(ctr, max_value), );
1355
1356class B_to_C_descriptor
1359 B_to_C_iter_t end, begin;
1361 B_to_C_descriptor(B_to_C_iter_t begin_, B_to_C_iter_t end_)
1367 const block_t* from_block()
const
1368 { assert(begin < end); assert(begin->pred->succ->B_to_C == begin);
1369 return begin->pred->source->block;
1371 block_t* from_block()
1372 { assert(begin < end); assert(begin->pred->succ->B_to_C == begin);
1373 return begin->pred->source->block;
1377 const constln_t* to_constln()
const
1378 { assert(begin < end); assert(begin->pred->succ->B_to_C == begin);
1379 return begin->pred->succ->target->constln();
1381 constln_t* to_constln()
1382 { assert(begin < end); assert(begin->pred->succ->B_to_C == begin);
1383 return begin->pred->succ->target->constln();
1389 bool needs_postprocessing()
const
1390 { assert(to_constln()->postprocess_end <= begin ||
1391 end <= to_constln()->postprocess_end);
1392 assert(to_constln()->postprocess_begin <= begin ||
1393 end <= to_constln()->postprocess_begin);
1394 return to_constln()->postprocess_begin <= begin &&
1395 end <= to_constln()->postprocess_end;
1400 std::string debug_id()
const
1402 assert(begin < end);
1403 std::string result(
"slice containing transition");
1404 if (end - begin > 1)
1412 B_to_C_const_iter_t iter = begin;
1413 assert(iter->pred->succ->B_to_C == iter);
1414 result += iter->pred->debug_id_short();
1417 assert(iter[1].pred->succ->B_to_C == iter+1);
1419 result += iter[1].pred->debug_id_short();
1423 while (++iter != end)
1425 assert(iter->pred->succ->B_to_C == iter);
1427 result += iter->pred->debug_id_short();
1432 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1441 bool add_work_to_bottom_transns(
enum check_complexity::counter_type ctr,
1446 for (B_to_C_const_iter_t iter = begin; iter != end; ++iter)
1448 if (iter->pred->source->pos >=
1449 iter->pred->source->block->bottom_begin())
1456 add_work_notemporary(ctr, max_value), );
1470 mutable check_complexity::B_to_C_counter_t work_counter;
1479 fixed_vector<pred_entry> pred;
1480 fixed_vector<succ_entry> succ;
1481 fixed_vector<B_to_C_entry> B_to_C;
1483 template <
class LTS_TYPE>
1484 friend class bisim_partitioner_gjkw_initialise_helper;
1486 void swap_in(B_to_C_iter_t
const pos1, B_to_C_iter_t
const pos2)
1487 { 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);
1490 pred_entry
const temp_entry(*pos1->pred);
1491 *pos1->pred = *pos2->pred;
1492 *pos2->pred = temp_entry;
1494 pred_iter_t
const temp_iter(pos1->pred);
1495 pos1->pred = pos2->pred;
1496 pos2->pred = temp_iter; assert(B_to_C.end() > pos1); assert(pos1->pred->succ->B_to_C == pos1);
1497 assert(B_to_C.end() > pos2); assert(pos2->pred->succ->B_to_C == pos2);
1500 void swap_out(pred_iter_t
const pos1, pred_iter_t
const pos2)
1501 { assert(pred.end() > pos1); assert(pos1->succ->B_to_C->pred == pos1);
1502 assert(pred.end() > pos2); assert(pos2->succ->B_to_C->pred == pos2);
1503 assert(pos1->succ->slice_begin() == pos2->succ->slice_begin());
1504 assert(succ_entry::slice_end(pos1->succ) == succ_entry::slice_end(pos2->succ));
1506 B_to_C_iter_t
const temp_B_to_C(pos1->succ->B_to_C);
1507 state_info_ptr temp_target(pos1->succ->target);
1508 pos1->succ->B_to_C = pos2->succ->B_to_C;
1509 pos1->succ->target = pos2->succ->target;
1510 pos2->succ->B_to_C = temp_B_to_C;
1511 pos2->succ->target = temp_target;
1513 succ_iter_t
const temp_iter(pos1->succ);
1514 pos1->succ = pos2->succ;
1515 pos2->succ = temp_iter; assert(pred.end() > pos1); assert(pos1->succ->B_to_C->pred == pos1);
1516 assert(pred.end() > pos2); assert(pos2->succ->B_to_C->pred == pos2);
1517 assert(pos1->succ->slice_begin() == pos2->succ->slice_begin());
1518 assert(succ_entry::slice_end(pos1->succ) == succ_entry::slice_end(pos2->succ));
1521 void swap_B_to_C(succ_iter_t
const pos1, succ_iter_t
const pos2)
1522 { assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1523 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1527 std::swap(*pos1->B_to_C,*pos2->B_to_C);
1529 B_to_C_iter_t
const temp_iter(std::move(pos1->B_to_C));
1530 pos1->B_to_C = std::move(pos2->B_to_C);
1531 pos2->B_to_C = std::move(temp_iter);
1532 } assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1533 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1537 void swap3_B_to_C(succ_iter_t
const pos1, succ_iter_t
const pos2,
1538 succ_iter_t
const pos3)
1539 { assert((pos1->B_to_C <= pos3->B_to_C && pos3->B_to_C <= pos2->B_to_C) ||
1540 (pos2->B_to_C <= pos3->B_to_C && pos3->B_to_C <= pos1->B_to_C));
1541 if (pos2 == pos3 || pos1 == pos3)
1543 swap_B_to_C(pos1, pos2);
1546 { assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1547 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1548 assert(succ.end() > pos3); assert(pos3->B_to_C->pred->succ == pos3);
1549 assert(pos1 != pos2); assert(pos1 != pos3); assert(pos2 != pos3);
1551 B_to_C_entry
const temp_entry(std::move(*pos1->B_to_C));
1552 *pos1->B_to_C = std::move(*pos3->B_to_C);
1553 *pos3->B_to_C = std::move(*pos2->B_to_C);
1554 *pos2->B_to_C = std::move(temp_entry);
1556 B_to_C_iter_t
const temp_iter(std::move(pos2->B_to_C));
1557 pos2->B_to_C = std::move(pos3->B_to_C);
1558 pos3->B_to_C = std::move(pos1->B_to_C);
1559 pos1->B_to_C = std::move(temp_iter); assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1560 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1561 assert(succ.end() > pos3); assert(pos3->B_to_C->pred->succ == pos3);
1565 part_trans_t(trans_type m)
1571 { assert(B_to_C.empty()); assert(succ.empty()); assert(pred.empty());
1584 trans_type trans_size()
const {
return pred.size(); }
1587
1588
1589
1590
1591
1592
1593
1594
1595 void split_inert_to_C(block_t* SpB);
1598
1599
1600
1601
1602
1603 succ_iter_t change_to_C(pred_iter_t pred_iter, ONLY_IF_DEBUG( constln_t* SpC, constln_t* NewC, )
1604 bool first_transition_of_state,
bool first_transition_of_block);
1607
1608
1609
1610
1611
1612 bool split_s_inert_out(state_info_ptr s ONLY_IF_DEBUG(, constln_t* OldC)
1616
1617 void make_noninert(succ_iter_t
const succ_iter)
1620 B_to_C_iter_t
const other_B_to_C =
1621 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);
1622 assert(other_B_to_C <= succ_iter->B_to_C);
1623 assert(succ_iter->B_to_C < succ_iter->B_to_C->B_to_C_slice->end);
1624 swap_B_to_C(succ_iter, other_B_to_C->pred->succ);
1625 succ_iter->B_to_C->pred->source->block->set_inert_begin(other_B_to_C +
1628 pred_iter_t
const other_pred = succ_iter->target->inert_pred_begin(); assert(succ_iter->target->pred_begin() <= other_pred);
1629 assert(other_pred <= succ_iter->B_to_C->pred);
1630 assert(succ_iter->B_to_C->pred < succ_iter->target->pred_end());
1631 swap_in(succ_iter->B_to_C, other_pred->succ->B_to_C);
1632 succ_iter->target->set_inert_pred_begin(other_pred + 1);
1634 succ_iter_t
const other_succ =
1635 succ_iter->B_to_C->pred->source->inert_succ_begin(); assert(succ_iter->B_to_C->pred->source->succ_begin() <= other_succ);
1636 assert(other_succ <= succ_iter);
1637 assert(succ_iter < succ_iter->B_to_C->pred->source->succ_end());
1638 swap_out(succ_iter->B_to_C->pred, other_succ->B_to_C->pred);
1639 succ_iter->B_to_C->pred->source->set_inert_succ_begin(other_succ + 1);
1643
1644
1645
1646
1647
1648
1649
1650
1651 void new_blue_block_created(block_t* RfnB, block_t* NewB);
1652 void new_red_block_created(block_t* RfnB, block_t* NewB,
bool postprocessing);
1654 B_to_C_const_iter_t B_to_C_begin()
const {
return B_to_C.begin(); }
1655 B_to_C_iter_t B_to_C_end () {
return B_to_C.end (); }
1656 pred_const_iter_t pred_end()
const {
return pred.end(); }
1657 succ_const_iter_t succ_end()
const {
return succ.end(); }
1660 void assert_stability(
const part_state_t& part_st)
const;
1687
1688
1701template<
class LTS_TYPE>
1702class bisim_partitioner_gjkw_initialise_helper
1706 state_type nr_of_states;
1707 const state_type orig_nr_of_states;
1708 trans_type nr_of_transitions;
1718 Key(
const label_type& f,
const state_type& s)
1723 bool operator==(
const Key &other)
const
1725 return first == other.first && second == other.second;
1732 std::size_t operator()(
const Key& k)
const
1734 return std::hash<label_type>()(k.first) ^
1735 (std::hash<state_type>()(k.second) << 1);
1740 std::unordered_map<Key, state_type, KeyHasher> extra_kripke_states;
1744 std::unordered_map<label_type, state_type> action_block_map;
1746 std::vector<state_type> noninert_out_per_state, inert_out_per_state;
1747 std::vector<state_type> noninert_in_per_state, inert_in_per_state;
1748 std::vector<state_type> noninert_out_per_block, inert_out_per_block;
1749 std::vector<state_type> states_per_block;
1750 state_type nr_of_nonbottom_states = 0;
1752 bisim_partitioner_gjkw_initialise_helper(LTS_TYPE& l,
bool branching,
1753 bool preserve_divergence);
1756 void init_transitions(part_state_t& part_st, part_trans_t& part_tr,
1757 bool branching,
bool preserve_divergence);
1763 void replace_transition_system(
const part_state_t& part_st, ONLY_IF_DEBUG(
bool branching, )
1764 bool preserve_divergence);
1767 state_type get_nr_of_states()
const {
return nr_of_states; }
1770 trans_type get_nr_of_transitions()
const {
return nr_of_transitions; }
1776
1777
1781struct refine_shared_t;
1787template <
class LTS_TYPE>
1788class bisim_partitioner_gjkw
1791 bisim_gjkw::bisim_partitioner_gjkw_initialise_helper<LTS_TYPE> init_helper;
1798 bisim_partitioner_gjkw(LTS_TYPE& l,
bool branching =
false,
1799 bool preserve_divergence =
false)
1800 : init_helper(l, branching, preserve_divergence),
1801 part_st(init_helper.get_nr_of_states()),
1802 part_tr(init_helper.get_nr_of_transitions())
1803 { assert(branching || !preserve_divergence);
1804 create_initial_partition_gjkw(branching, preserve_divergence);
1805 refine_partition_until_it_becomes_stable_gjkw();
1807 ~bisim_partitioner_gjkw()
1817 void replace_transition_system(
bool branching,
bool preserve_divergence)
1820 init_helper.replace_transition_system(part_st, ONLY_IF_DEBUG( branching, )
1821 preserve_divergence);
1824 static state_type num_eq_classes()
1826 return bisim_gjkw::block_t::nr_of_blocks;
1829 state_type get_eq_class(state_type s)
const
1831 return part_st.block(s)->seqnr();
1834 bool in_same_class(state_type s, state_type t)
const
1836 return part_st.block(s) == part_st.block(t);
1843 void create_initial_partition_gjkw(
bool branching,
1844 bool preserve_divergence);
1845 void refine_partition_until_it_becomes_stable_gjkw();
1851 const bisim_gjkw::B_to_C_descriptor* FromRed,
1853 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1854 ,
const bisim_gjkw::constln_t* NewC =
nullptr
1885
1886
1887
1888
1889
1890
1891
1892
1893template <
class LTS_TYPE>
1894void bisimulation_reduce_gjkw(LTS_TYPE& l,
bool branching =
false,
1895 bool preserve_divergence =
false);
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910template <
class LTS_TYPE>
1911bool destructive_bisimulation_compare_gjkw(LTS_TYPE& l1, LTS_TYPE& l2,
1912 bool branching =
false,
bool preserve_divergence =
false,
1913 bool generate_counter_examples =
false);
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930template <
class LTS_TYPE>
1931bool bisimulation_compare_gjkw(
const LTS_TYPE& l1,
const LTS_TYPE& l2,
1932 bool branching =
false,
bool preserve_divergence =
false);
1935template <
class LTS_TYPE>
1936void bisimulation_reduce_gjkw(LTS_TYPE& l,
bool const branching ,
1937 bool const preserve_divergence )
1942 scc_reduce(l, preserve_divergence);
1947 detail::bisim_partitioner_gjkw<LTS_TYPE> bisim_part(l, branching,
1948 preserve_divergence);
1951 bisim_part.replace_transition_system(branching, preserve_divergence);
1954template <
class LTS_TYPE>
1955inline bool bisimulation_compare_gjkw(
const LTS_TYPE& l1,
const LTS_TYPE& l2,
1956 bool branching ,
bool preserve_divergence )
1958 LTS_TYPE l1_copy(l1);
1959 LTS_TYPE l2_copy(l2);
1960 return destructive_bisimulation_compare_gjkw(l1_copy, l2_copy, branching,
1961 preserve_divergence);
1964template <
class LTS_TYPE>
1965bool destructive_bisimulation_compare_gjkw(LTS_TYPE& l1, LTS_TYPE& l2,
1966 bool branching ,
bool preserve_divergence ,
1967 bool generate_counter_examples ,
1968 const std::string& ,
1971 if (generate_counter_examples)
1973 mCRL2log(log::log_level_t::warning) <<
"The GJKW branching bisimulation algorithm does "
1974 "not generate counterexamples.\n";
1976 state_type init_l2 = l2.initial_state() + l1.num_states();
1983 detail::scc_partitioner<LTS_TYPE> scc_part(l1);
1984 scc_part.replace_transition_system(preserve_divergence);
1985 init_l2 = scc_part.get_eq_class(init_l2);
1988 detail::bisim_partitioner_gjkw<LTS_TYPE> bisim_part(l1, branching,
1989 preserve_divergence);
1990 return bisim_part.in_same_class(l1.initial_state(), init_l2);
2017inline const constln_t* state_info_entry::constln()
const
2019 return block->constln();
2022inline constln_t* state_info_entry::constln()
2024 return block->constln();
2028inline B_to_C_descriptor* block_t::FromRed(
const constln_t*
const SpC)
2030 if (!to_constln.empty() && to_constln.front().to_constln() == SpC)
2032 return &*to_constln.begin();
2037 for (B_to_C_desc_const_iter_t iter = to_constln.begin();
2038 to_constln.end() != iter; ++iter)
2040 assert(iter->from_block() ==
this);
2041 assert(iter->to_constln() != SpC);
2050inline void block_t::SetFromRed(B_to_C_desc_iter_t
const new_fromred)
2051{ assert(!to_constln.empty());
2052 if (to_constln.begin() != new_fromred)
2054 to_constln.splice(to_constln.begin(), to_constln, new_fromred);
2055 } assert(new_fromred->from_block() ==
this);
2068inline bool state_info_entry::surely_has_transition_to(
const constln_t*
const
2070{ assert(succ_begin()<=current_constln()); assert(current_constln()<=succ_end());
2071 assert(succ_begin() == current_constln() || succ_end() == current_constln() ||
2072 *current_constln()[-1].target->constln() <
2073 *current_constln()->target->constln());
2074 assert(constln() != SpC);
2077 if (current_constln() != succ_end() &&
2078 current_constln()->target->constln() == SpC)
2096inline bool state_info_entry::surely_has_no_transition_to(
2097 const constln_t*
const SpC)
const
2098{ assert(succ_begin()<=current_constln()); assert(current_constln()<=succ_end());
2099 assert(succ_begin() == current_constln() || succ_end() == current_constln() ||
2100 *current_constln()[-1].target->constln() <
2101 *current_constln()->target->constln());
2102 assert(constln() != SpC);
2106 if (current_constln() != succ_end() &&
2107 *current_constln()->target->constln() <= *SpC)
2111 if (current_constln() != succ_begin() &&
2112 *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 mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
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 function_symbol & c1()
Constructor for function symbol @c1.
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(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)
std::string supported_lts_formats_text(lts_type default_format, const std::set< lts_type > &supported)
Gives a textual list describing supported LTS formats.
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()
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::exploration_strategy::es_breadth, bool preprocess=true)
Checks whether this LTS is smaller than another LTS according to a preorder.
std::string pp(const state_label_dot &l)
Pretty print function for a state_label_dot. Only prints the label field.
void check_lts(const LTS_TYPE <sspec)
Throws a runtime error if the LTS contains a transition with an invalid action label index.
std::set< process::action_label > find_action_labels(const LTS_TYPE <sspec)
Returns the action labels that occur in the transitions of the given LTS.
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 determinise(LTS_TYPE &l)
Determinises this LTS.
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::exploration_strategy::es_breadth, bool preprocess=true)
Checks whether this LTS is smaller than another LTS according to a preorder.
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.
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...
void sort_transitions(std::vector< transition > &transitions, const std::set< transition::size_type > &hidden_label_set, transition_sort_style ts=transition_sort_style::src_lbl_tgt)
Sorts the transitions using a sort style.
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