mCRL2
Loading...
Searching...
No Matches
liblts_bisim_gjkw.h
Go to the documentation of this file.
1// Author(s): David N. Jansen, Radboud Universiteit, Nijmegen, The Netherlands
2//
3// Copyright: see the accompanying file COPYING or copy at
4// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
5//
6// Distributed under the Boost Software License, Version 1.0.
7// (See accompanying file LICENSE_1_0.txt or copy at
8// http://www.boost.org/LICENSE_1_0.txt)
9
10/// \file lts/detail/liblts_bisim_gjkw.h
11///
12/// \brief O(m log n)-time stuttering equivalence algorithm
13///
14/// \details This file implements the efficient partition refinement algorithm
15/// by Groote / Jansen / Keiren / Wijs to calculate the stuttering equivalence
16/// quotient of a Kripke structure. (Labelled transition systems are converted
17/// to Kripke structures before the main algorithm).
18/// The file accompanies the planned publication in the ACM Trans. Comput. Log.
19/// Log. special issue for TACAS 2016, to appear in 2017.
20///
21/// \author David N. Jansen, Radboud Universiteit, Nijmegen, The Netherlands
22
23#ifndef _LIBLTS_BISIM_GJKW_H
24#define _LIBLTS_BISIM_GJKW_H
25
26#include <unordered_map> // used during initialisation
27#include <list> // for the list of B_to_C_descriptors
28
29#include "mcrl2/lts/detail/liblts_scc.h"
30#include "mcrl2/lts/detail/liblts_merge.h"
31#include "mcrl2/lts/detail/check_complexity.h"
32#include "mcrl2/lts/detail/fixed_vector.h"
33
34namespace mcrl2
35{
36namespace lts
37{
38namespace detail
39{
40 #ifndef NDEBUG
41 /// \brief include something in Debug mode
42 /// \details In a few places, we have to include an additional parameter to
43 /// a function in Debug mode. While it is in principle possible to use
44 /// #ifndef NDEBUG ... #endif, that would lead to distributing the code
45 /// over many code lines. This macro expands to its arguments in Debug
46 /// mode and to nothing otherwise.
47 #define ONLY_IF_DEBUG(...) __VA_ARGS__
48 #else
49 #define ONLY_IF_DEBUG(...)
50 #endif
51// state_type and trans_type are defined in check_complexity.h.
52
53/// \brief type used to store label numbers and counts
54typedef std::size_t label_type;
55
56
57
58
59
60/* ************************************************************************* */
61/* */
62/* R E F I N A B L E P A R T I T I O N */
63/* */
64/* ************************************************************************* */
65
66
67
68
69
70/// \defgroup part_state
71/// \brief data structures for a refinable partition
72/// \details The following definitions provide a _refinable partition_ data
73/// structure. The basic idea is that we store a permutation of the states (in
74/// a permutation_t array), so that states belonging to the same block are
75/// adjacent, and also that blocks belonging to the same constellation are
76/// adjacent.
77///
78/// The basic structure therefore consists of the classes:
79///
80/// state_info_ptr - an entry in the permutation array; it contains a
81/// pointer to a state_info_entry.
82/// permutation_t - an array of permutation_entries.
83/// constln_t - contains information about a constellation, in
84/// particular which slice of permutation_t contains its
85/// states.
86/// block_t - contains information about a block, in particular which
87/// slice of permutation_t contains its states, and its
88/// constellation.
89/// state_info_entry - contains information about a state, in particular its
90/// position in the permutation_t array and its block.
91/// state_info_t - an array of state_info_entries.
92/// part_state_t - the complete data structure combining state_info_t and
93/// permutation_t.
94///
95/// This basic structure is extended as follows:
96/// - Because we combine this data structure with a partition of the
97/// transitions, a state_info_entry also contains information which slice of
98/// the incoming and outgoing, inert and non-inert transitions belong to the
99/// state. In many cases the slice of this state ends exactly where the
100/// slice of the next state begins, so we can find the end of this state's
101/// slice by looking at the next state's state_info_entry. Therefore,
102/// state_info_ptr actually contains a pointer to a state_info_entry with
103/// the additional guarantee that this is not the last entry in state_info_t.
104/// (To make this a small bit more type safe, we could change the type
105/// state_info_ptr to something like ``pointer to an array with two
106/// state_info_entries'', typedef state_info_entry (*state_info_ptr)[2];.
107/// Still, that would allow unsafe pointer juggling.)
108/// - A block_t also contains information about its outgoing inert transitions.
109/// - A state_info_entry also contains information used during `refine()` or
110/// `process_new_bottom()`.
111///@{
112
113namespace bisim_gjkw
114{
115
116class state_info_entry;
117
120
121/// \class permutation_t
122/// \brief stores a permutation of the states, ordered by block
123/// \details This is the central concept of the _refinable partition_: the
124/// permutation of the states, such that states belonging to the same block are
125/// adjacent, and also that blocks belonging to the same constellation are
126/// adjacent.
127///
128/// Iterating over the states of a block or the blocks of a constellation will
129/// therefore be done using the permutation_t array.
133
134class block_t;
135class constln_t;
136
137class B_to_C_entry;
138class pred_entry;
139class succ_entry;
143
151
152/// \class state_info_entry
153/// \brief stores information about a single state
154/// \details This class stores all other information about a state that the
155/// partition needs. In particular: the block where the state belongs and the
156/// position in the permutation array (i. e. the inverse of the permutation).
157///
158/// A `state_info_entry` only works correctly if it is part of an array where
159/// there is one more `state_info_entry`. The reason is that iterators past
160/// the last transition are not actually stored here, as they are equal to the
161/// iterator to the first transition of the next state. The array will contain
162/// one additional ``state'' that is only used for these pointers.
164{
165 private:
166 /// \brief iterator to first incoming transition
167 /// \details also serves as iterator past the last incoming transition of
168 /// the previous state.
170
171 /// \brief iterator to first outgoing transition
172 /// \details also serves as iterator past the last outgoing transition of
173 /// the previous state.
175
176 /// iterator to first _inert_ incoming transition
178
179 /// iterator to first _inert_ outgoing transition
181
182 /// iterator past the last _inert_ outgoing transition
184 public:
185 /// block where the state belongs
187
188 /// position of the state in the permutation array
190
191 /// number of inert transitions to non-blue states
193 private:
194 /// iterator to first outgoing transition to the constellation of interest
196 public:
197 /// get constellation where the state belongs
198 const constln_t* constln() const;
200
203 void set_current_constln(succ_iter_t const new_current_constln)
204 {
205 int_current_constln = new_current_constln; // current_constln points to a successor transition of this state:
208 // it points to a place where a constellation slice starts or ends:
209 // (This assertion cannot be tested because the types are not yet
210 // complete.)
211 // assert(succ_begin() == int_current_constln ||
212 // succ_end() == int_current_constln ||
213 // int_current_constln[-1].constln_slice !=
214 // int_current_constln->constln_slice);
215 // it points to the relevant constellation:
216 // The following assertions cannot be executed immediately after each
217 // call.
218 // assert(succ_begin() == current_constln() ||
219 // *current_constln()[-1].target->constln() <= *SpC);
220 // assert(succ_end() == current_constln() ||
221 // *SpC <= *current_constln()->target->constln());
222 }
223
224 /// iterator to first incoming transition
227 void set_pred_begin(pred_iter_t new_in_begin)
228 {
229 state_in_begin = new_in_begin;
230 }
231
232 /// iterator past the last incoming transition
234 { assert(s_i_begin <= this); assert(this < s_i_end);
235 return this[1].state_in_begin;
236 }
238 { assert(s_i_begin <= this); assert(this < s_i_end);
239 return this[1].state_in_begin;
240 }
241 void set_pred_end(pred_iter_t new_in_end)
242 { assert(s_i_begin <= this); assert(this < s_i_end);
243 this[1].set_pred_begin(new_in_end);
244 }
245
246 /// iterator to first non-inert incoming transition
249
250 /// iterator past the last non-inert incoming transition
253
254 /// iterator to first inert incoming transition
257 void set_inert_pred_begin(pred_iter_t new_inert_in_begin)
258 {
259 state_inert_in_begin = new_inert_in_begin; assert(pred_begin() <= inert_pred_begin());
261 }
262
263 /// iterator one past the last inert incoming transition
266
267 /// iterator to first outgoing transition
270 void set_succ_begin(succ_iter_t new_out_begin)
271 {
272 state_out_begin = new_out_begin;
273 }
274
275 /// iterator past the last outgoing transition
277 { assert(s_i_begin <= this); assert(this < s_i_end);
278 return this[1].state_out_begin;
279 }
281 { assert(s_i_begin <= this); assert(this < s_i_end);
282 return this[1].state_out_begin;
283 }
284 void set_succ_end(succ_iter_t new_out_end)
285 { assert(s_i_begin <= this); assert(this < s_i_end);
286 this[1].set_succ_begin(new_out_end); assert(succ_begin() <= succ_end());
287 }
288
289 /// iterator to first inert outgoing transition
292 void set_inert_succ_begin(succ_iter_t const new_inert_out_begin)
293 { // The following assertions cannot be tested because the respective
294 // types are not yet complete.
295 // if (new_inert_out_begin > inert_succ_begin())
296 // {
297 // assert(*new_inert_out_begin[-1].target->constln()<=*constln());
298 // assert(new_inert_out_begin[-1].target->block != block);
299 // }
300 // else if (new_inert_out_begin < inert_succ_begin())
301 // {
302 // assert(new_inert_out_begin->target->block == block);
303 // }
304 state_inert_out_begin = new_inert_out_begin; assert(succ_begin() <= inert_succ_begin());
306 }
307
308 /// iterator past the last inert outgoing transition
311
313 succ_iter_t new_inert_out_end)
314 {
315 state_inert_out_begin = new_inert_out_begin;
316 state_inert_out_end = new_inert_out_end; assert(succ_begin() <= inert_succ_begin());
318 assert(inert_succ_end() <= succ_end());
319 // The following assertions cannot be tested always, as the function
320 // may be called earlier than the assertions are reestablished.
321 // assert(succ_begin() == inert_succ_begin() ||
322 // *inert_succ_begin()[-1].target->constln() <= *constln());
323 // assert(succ_begin() == inert_succ_begin() ||
324 // inert_succ_begin()[-1].target->block != block);
325 // assert(inert_succ_begin() == inert_succ_end() ||
326 // (inert_succ_begin()->target->block == block &&
327 // inert_succ_end()[-1].target->block == block));
328 // assert(succ_end() == inert_succ_end() ||
329 // *constln() < *inert_succ_end()->target->constln());
330 }
331
332 bool surely_has_transition_to(const constln_t* SpC) const;
334 #ifndef NDEBUG
335 /// \brief print a short state identification for debugging
336 /// \details This function is only available if compiled in Debug mode.
337 std::string debug_id_short() const
338 {
339 assert(s_i_begin <= this);
340 assert(this < s_i_end);
341 return std::to_string(this - s_i_begin);
342 }
343
344 /// \brief print a state identification for debugging
345 /// \details This function is only available if compiled in Debug mode.
346 std::string debug_id() const
347 {
348 return "state " + debug_id_short();
349 }
350 private:
351 /// \brief pointer at the first entry in the `state_info` array
353
354 /// \brief pointer past the last actual entry in the `state_info` array
355 /// \details `state_info` actually contains an additional entry that is
356 /// only used partially, namely to store pointers to the end of the
357 /// transition slices of the last state. In other words, `s_i_end` points
358 /// at this additional, partially used entry.
360
361 friend class part_state_t;
362 public:
363 #endif
364 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
366 #endif
367};
368
369
370/// swap two permutations
373{
374 // swap contents of permutation array
375 std::swap(*s1, *s2);
376 // swap pointers to permutation array
377 (*s1)->pos = s1;
378 (*s2)->pos = s2;
379}
380
381/// \class block_t
382/// \brief stores information about a block
383/// \details A block corresponds to a slice of the permutation array. As the
384/// number of blocks is initially unknown, we will allocate instances of this
385/// class dynamically.
386///
387/// The slice in the permutation array containing the states of the block is
388/// subdivided into the following subslices (in this order):
389/// 1. unmarked non-bottom states
390/// 2. marked non-bottom states (initially empty)
391/// 3. unmarked bottom states
392/// 4. marked bottom states (initially empty)
393///
394/// A state should be marked iff it is a predecessor of the current splitter
395/// (through a strong transition). The marking is later extended to the red
396/// states; that are the states with a weak transition to the splitter.
397///
398/// (During the execution of some functions, more slices are subdivided
399/// further; however, as these subdivisions are local to a single function,
400/// they are not stored here.)
401///
402/// The blocks keep track of the total number of blocks allocated and number
403/// themselves sequentially using the static member `nr_of_blocks`. It is
404/// therefore impossible to have multiple refinements running at the same time.
406{
407 private:
408 /// iterator past the last state of the block
410
411 /// iterator to the first state of the block
413
414 /// iterator to the first marked non-bottom state of the block
416
417 /// iterator to the first bottom state of the block
419
420 /// iterator to the first marked bottom state of the block
422
423 /// \brief iterator to the first inert transition of the block
424 /// \details If there are no inert transitions, then `inert_begin` and
425 /// `inert_end` point to the end of the B_to_C-slice containing transitions
426 /// from the block to its own constellation. If there is no such slice,
427 /// both are equal to `B_to_C`.
429
430 /// iterator past the last inert transition of the block
432 public:
433 /// \brief list of B_to_C with transitions from this block
434 /// \details This list serves two purposes: it contains all
435 /// B_to_C_descriptors, so that the constellations reachable from this
436 /// block can be found; and if this block has transitions to the current
437 /// splitter SpC\SpB, then the first element of the list points to these
438 /// transitions.
440 private:
441 /// constellation to which the block belongs
443
444 /// \brief next block in the list of refinable blocks
445 /// \details If this is the last block in the list, `refinable_next` points
446 /// to this very block. Consequently, it is possible to check whether some
447 /// block is refinable without an additional variable.
449
450 /// first block in the list of refinable blocks
452
453 /// \brief unique sequence number of this block
454 /// \details After the stuttering equivalence algorithm has terminated,
455 /// this number is used as a state number in the quotient Kripke structure.
456 /// (For blocks that contain extra Kripke states, the number is set to
457 /// BLOCK_NO_SEQNR).
459
460#define BLOCK_NO_SEQNR ((state_type) -1)
461
462 public:
463 /// \brief total number of blocks with unique sequence number allocated
464 /// \details Upon starting the stuttering equivalence algorithm, the number
465 /// of blocks must be zero.
467
468 /// \brief constructor
469 /// \details The constructor initialises the block to: all states are
470 /// bottom states, no state is marked, the block is not refinable.
471 /// \param constln_ constellation to which the block belongs
472 /// \param begin_ initial iterator to the first state of the block
473 /// \param end_ initial iterator past the last state of the block
474 block_t(constln_t* const constln_, permutation_iter_t const begin_,
475 permutation_iter_t const end_)
476 : int_end(end_),
477 int_begin(begin_),
478 int_marked_nonbottom_begin(begin_), // no non-bottom state is marked
479 int_bottom_begin(begin_), // all states are bottom states
480 int_marked_bottom_begin(end_), // no bottom state is marked
481 // int_inert_begin -- is initialised by part_trans_t::create_new_block
482 // int_inert_end -- is initialised by part_trans_t::create_new_block
483 to_constln(), // empty list
484 int_constln(constln_),
485 refinable_next(nullptr),
487 { // The following assertions hold trivially.
488 // assert(int_begin <= int_marked_nonbottom_begin);
489 // assert(int_marked_nonbottom_begin <= int_bottom_begin);
490 // assert(int_bottom_begin <= int_marked_bottom_begin);
491 // assert(int_marked_bottom_begin <= int_end);
492 assert(int_bottom_begin < int_end);
493 // The following assertions cannot be tested because constln_t is not
494 // yet complete.
495 // assert(int_constln->begin() <= int_begin);
496 // assert(int_end <= int_constln->end());
497 }
498
499 ~block_t() { }
500
501 /// assigns a unique sequence number
503 { assert(BLOCK_NO_SEQNR == int_seqnr);
505 }
506
507 state_type seqnr() const { return int_seqnr; }
508
509 /// provides an arbitrary refinable block
511
512 /// \brief checks whether the block is refinable
513 /// \returns true if the block is refinable
514 bool is_refinable() const { return nullptr != refinable_next; }
515
516 /// \brief makes a block refinable (i. e. inserts it into the respective
517 /// list)
518 /// \returns true if the block was not refinable before
520 {
521 if (is_refinable())
522 {
523 return false;
524 }
525 refinable_next = nullptr == refinable_first ? this : refinable_first;
526 refinable_first = this;
527 return true;
528 }
529
530 /// \brief makes a block non-refinable (i. e. removes it from the
531 /// respective list)
532 /// \details This member function only works if the block is the first one
533 /// in the list (which will normally be the case).
535 { assert(refinable_first == this);
536 refinable_first = refinable_next == this ? nullptr : refinable_next;
537 refinable_next = nullptr;
538 }
539
540 /// provides the number of states in the block
541 state_type size() const { return int_end - int_begin; }
542
543 /// \brief provides the number of marked bottom states in the block
544 /// \details This size includes the old bottom states.
546 {
548 }
549
550 /// \brief provides the number of marked states in the block
551 /// \details This size includes the old bottom states; in other words, the
552 /// old bottom states are always regarded as marked.
554 {
557 }
558
559 /// provides the number of unmarked bottom states in the block
561 {
563 }
564
565 /// \brief compares two blocks for ordering them
566 /// \details The blocks are ordered according to their positions in the
567 /// permutation array. This is a suitable order, as blocks may be refined,
568 /// but never swap positions as a whole. Refining will make the new
569 /// subblocks compare in the same way to other blocks as the original,
570 /// larger block.
571 bool operator<(const block_t& other) const
572 {
573 return begin() < other.begin();
574 }
575
576 /// constellation where the block belongs to
577 const constln_t* constln() const { return int_constln; }
579 void set_constln(constln_t* new_constln)
580 { // The following assertion cannot be tested because the type constln_t
581 int_constln = new_constln; // is not yet complete.
582 // assert(nullptr == int_constln ||
583 // (int_constln->begin() <= int_begin &&
584 // int_end <= int_constln->end()));
585 }
586
587 /// read FromRed
589
590 /// set FromRed to an existing element in to_constln
591 void SetFromRed(B_to_C_desc_iter_t new_fromred);
592
593 /// iterator to the first state in the block
597 {
598 int_begin = new_begin; assert(int_begin <= int_marked_nonbottom_begin);
599 }
600
601 /// iterator past the last state in the block
605 {
606 int_end = new_end; assert(int_marked_bottom_begin <= int_end); assert(int_bottom_begin < int_end);
607 }
608
609 /// iterator to the first non-bottom state in the block
612
613 /// iterator past the last non-bottom state in the block
616 void set_nonbottom_end(permutation_iter_t new_nonbottom_end)
617 {
618 int_bottom_begin = new_nonbottom_end; assert(int_marked_nonbottom_begin <= int_bottom_begin);
620 assert(int_bottom_begin < int_end);
621 }
622
623 /// iterator to the first bottom state in the block
627 {
628 int_bottom_begin = new_bottom_begin; assert(int_marked_nonbottom_begin <= int_bottom_begin);
630 // assert(int_bottom_begin < int_end);
631 }
632
633 /// iterator past the last bottom state in the block
636
637 /// iterator to the first unmarked non-bottom state in the block
640
641 /// iterator past the last unmarked non-bottom state in the block
643 {
645 }
647 {
649 }
651 new_unmarked_nonbottom_end)
652 {
653 int_marked_nonbottom_begin = new_unmarked_nonbottom_end; assert(int_begin <= int_marked_nonbottom_begin);
655 }
656
657 /// iterator to the first marked non-bottom state in the block
659 {
661 }
663 {
665 }
667 new_marked_nonbottom_begin)
668 {
669 int_marked_nonbottom_begin = new_marked_nonbottom_begin; assert(int_begin <= int_marked_nonbottom_begin);
671 }
672
673 /// iterator one past the last marked non-bottom state in the block
675 {
676 return int_bottom_begin;
677 }
679
680 /// iterator to the first unmarked bottom state in the block
682 {
683 return int_bottom_begin;
684 }
686
687 /// iterator past the last unmarked bottom state in the block
689 {
691 }
693 void set_unmarked_bottom_end(permutation_iter_t new_unmarked_bottom_end)
694 {
695 int_marked_bottom_begin = new_unmarked_bottom_end; assert(int_bottom_begin <= int_marked_bottom_begin);
697 }
698
699 /// iterator to the first marked bottom state in the block
701 {
703 }
705 void set_marked_bottom_begin(permutation_iter_t new_marked_bottom_begin)
706 {
707 int_marked_bottom_begin = new_marked_bottom_begin; assert(int_bottom_begin <= int_marked_bottom_begin);
709 }
710
711 /// \brief iterator past the last marked bottom state in the block
712 /// \details This includes the old bottom states.
715
716 /// iterator to the first inert transition of the block
719 void set_inert_begin(B_to_C_iter_t new_inert_begin)
720 {
721 int_inert_begin = new_inert_begin; assert(int_inert_begin <= int_inert_end);
722 }
723
724 /// iterator past the last inert transition of the block
727 void set_inert_end(B_to_C_iter_t new_inert_end)
728 {
729 int_inert_end = new_inert_end; assert(int_inert_begin <= int_inert_end);
730 }
732 B_to_C_iter_t new_inert_end)
733 {
734 int_inert_begin = new_inert_begin;
735 int_inert_end = new_inert_end; assert(int_inert_begin <= int_inert_end);
736 }
737
738 /// \brief mark a non-bottom state
739 /// \details Marking is done by moving the state to the slice of the marked
740 /// non-bottom states of the block.
741 /// \param s the non-bottom state that has to be marked
742 /// \returns true if the state was not marked before
744 { assert(s->pos < nonbottom_end()); assert(nonbottom_begin() <= s->pos);
745 if (marked_nonbottom_begin() <= s->pos) return false;
748 return true;
749 }
750
751 /// \brief mark a state
752 /// \details Marking is done by moving the state to the slice of the marked
753 /// bottom or non-bottom states of the block. If `s` is an old bottom
754 /// state, it is treated as if it already were marked.
755 /// \param s the state that has to be marked
756 /// \returns true if the state was not marked before
758 { assert(s->pos < end());
759 if (bottom_begin() <= s->pos)
760 {
761 if (marked_bottom_begin() <= s->pos) return false;
764 return true;
765 }
766 return mark_nonbottom(s);
767 }
768
769 /// \brief refine the block (the blue subblock is smaller)
770 /// \details This function is called after a refinement function has found
771 /// that the blue subblock is the smaller one. It creates a new block for
772 /// the blue states.
773 /// \param blue_nonbottom_end iterator past the last blue non-bottom state
774 /// \returns pointer to the new (blue) block
775 block_t* split_off_blue(permutation_iter_t blue_nonbottom_end);
776
777 /// \brief refine the block (the red subblock is smaller)
778 /// \details This function is called after a refinement function has found
779 /// that the red subblock is the smaller one. It creates a new block for
780 /// the red states.
781 /// \param red_nonbottom_begin iterator to the first red non-bottom state
782 /// \returns pointer to the new (red) block
783 block_t* split_off_red(permutation_iter_t red_nonbottom_begin);
784 #ifndef NDEBUG
785 /// \brief print a block identification for debugging
786 /// \details This function is only available if compiled in Debug mode.
787 std::string debug_id() const
788 {
789 return "block [" + std::to_string(begin() - perm_begin) + "," +
790 std::to_string(end() - perm_begin) + ")" +
791 (BLOCK_NO_SEQNR != seqnr() ?" (#"+std::to_string(seqnr())+")" :"");
792 }
793
794 /// \brief provide an iterator to the beginning of the permutation array
795 /// \details This iterator is required to be able to print identifications
796 /// for debugging. It is only available if compiled in Debug mode.
798 private:
800
801 friend class part_state_t;
802 #endif
803 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
804 public:
806 #endif
807};
808
809
810/// \class constln_t
811/// \brief stores information about a constellation
812/// \details A constellation corresponds to a slice in the permutation array;
813/// its boundaries are also block boundaries. As the number of constellations
814/// is initially unknown, we will allocate it dynamically.
816{
817 private:
818 /// iterator past the last state in the constellation
820
821 /// iterator to the first state in the constellation
823
824 /// \brief next constellation in the list of non-trivial constellations
825 /// \details If this is the last constellation in the list,
826 /// `nontrivial_next` points to this very constellation. Consequently, it
827 /// is possible to check whether some constellation is trivial without an
828 /// additional variable.
830
831 /// first constellation in the list of non-trivial constellations
833 public:
834 /// \brief iterator to the first transition into this constellation that
835 /// needs postprocessing
836 /// \details In `postprocess_new_bottom()`, all transitions from a refined
837 /// block to the present constellation have to be gone through. Because
838 /// during this process the refined block may be refined even further, we
839 /// need `postprocess_begin` and `postprocess_end` to store which
840 /// transitions have to be gone through overall.
841 ///
842 /// If no transitions to this constellation need to be postprocessed, the
843 /// variable is set to the same value as postprocess_end, preferably to
844 /// part_trans_t::B_to_C->end().
846
847 /// \brief iterator past the last transition into this constellation that
848 /// needs postprocessing
850
851 /// \brief sort key to order constellation-related information
852 /// \details When a constellation is created anew, it it assigned a sort
853 /// key that is lower than the constellation it came from, but never lower
854 /// than the sort key of any other constellation that was lower than the
855 /// original constellation. This ensures that the order of other
856 /// constellations does not change.
858
859 /// \brief constructor
860 /// \param begin_ iterator to the first state in the constellation
861 /// \param end_ iterator past the last state in the constellation
863 permutation_iter_t end_, B_to_C_iter_t postprocess_none)
864 : int_end(end_),
865 int_begin(begin_),
866 nontrivial_next(nullptr),
867 postprocess_begin(postprocess_none),
868 postprocess_end(postprocess_none),
869 sort_key(sort_key_)
870 { assert(int_begin<int_end); assert((state_type)(int_end-int_begin)<=sort_key);
871 }
872
873 /// \brief destructor
875
876 /// \brief provides an arbitrary non-trivial constellation
877 /// \details The static function is implemented in a way to provide the
878 /// first constellation in the list of non-trivial constellations.
880
881 /// \brief provides the next non-trivial constellation
882 /// \details This (non-static!) function just returns the next non-trivial
883 /// constellation in the list. Note: If this constellation is the last in
884 /// the list of non-trivial constellations, the convention is that the next
885 /// pointer points to this constellation self (to distinguish it from
886 /// nullptr).
888
889 /// \brief makes a constellation trivial (i. e. removes it from the
890 /// respective list)
891 /// \details This member function only works if the constellation is the
892 /// first one in the list (which will normally be the case).
894 { assert(nontrivial_first == this);
896 nontrivial_next = nullptr;
897 }
898
899 /// \brief makes a constellation non-trivial (i. e. inserts it into the
900 /// respective list)
902 {
903 if (nullptr == nontrivial_next)
904 {
905 nontrivial_next = nullptr == nontrivial_first ? this
907 nontrivial_first = this;
908 }
909 }
910
911 /// \brief returns true iff the constellation is trivial
912 /// \details If this constellation is the last in the list of non-trivial
913 /// constellations, the convention is that the next pointer points to this
914 /// constellation itself (to distinguish it from nullptr).
915 bool is_trivial() const
916 {
917 return nullptr == nontrivial_next;
918 }
919
920 /// \brief constant iterator to the first state in the constellation
922 /// \brief iterator to the first state in the constellation
924 /// \brief set the iterator to the first state in the constellation
926 {
927 int_begin = new_begin; assert(int_begin < int_end);
928 }
929
930 /// \brief constant iterator past the last state in the constellation
932 /// \brief iterator past the last state in the constellation
934 /// \brief set the iterator past the last state in the constellation
936 {
937 int_end = new_end; assert(int_begin < int_end);
938 }
939
940 /// \brief returns number of states in the constellation
941 state_type size() const { return int_end - int_begin; }
942
943 /// \brief compares two constellations for ordering them
944 /// \details Constellations are ordered according to their sort keys. The
945 /// keys have to be assigned in a way that when a constellation is split,
946 /// the parts are placed where the split constellation was in the order.
947 /// This can be achieved by assigning sort keys that are related to the
948 /// size of the constellation.
949 bool operator<(const constln_t& other) const
950 {
951 return sort_key < other.sort_key;
952 }
953 bool operator> (const constln_t& other) const { return other < *this; }
954 bool operator<=(const constln_t& other) const { return !(other < *this); }
955 bool operator>=(const constln_t& other) const { return !(*this < other); }
956
957 /// \brief split off a single block from the constellation
958 /// \details The function splits the current constellation after its first
959 /// block or before its last block, whichever is smaller. It creates a new
960 /// constellation for the split-off block and returns a pointer to the
961 /// block.
963 { assert(begin() < end());
964 block_t* const FirstB = (*begin())->block;
965 block_t* const LastB = end()[-1]->block; assert(FirstB != LastB);
966 if (FirstB->end() == LastB->begin()) { make_trivial(); } assert(FirstB->constln() == this); assert(LastB->constln() == this);
968 // 2.5: Choose a small splitter block SpB subset of SpC from P,
969 // i.e. |SpB| <= 1/2*|SpC|
970 /// It doesn't matter very much how ties are resolved here:
971 /// `part_tr.change_to_C()` is faster if the first block is selected to
972 /// be split off. `part_tr.split_s_inert_out()` is faster if the last
973 /// block is selected.
974 if (FirstB->size() > LastB->size())
975 {
976 // 2.6: Create a new constellation NewC
977 // 2.6: ... and move SpB from SpC to NewC
978 constln_t* NewC =
982 LastB->set_constln(NewC);
983 return LastB;
984 }
985 else
986 {
987 // 2.6: Create a new constellation NewC
988 // 2.6: ... and move SpB from SpC to NewC
989 constln_t* NewC =
992 set_begin(FirstB->end());
993 FirstB->set_constln(NewC);
994 return FirstB;
995 }
996 }
997 #ifndef NDEBUG
998 /// \brief print a constellation identification for debugging
999 std::string debug_id() const
1000 {
1001 return "constellation [" +
1002 std::to_string(begin() - block_t::permutation_begin()) +
1003 "," + std::to_string(end() - block_t::permutation_begin()) +
1004 ") (#" + std::to_string(sort_key) + ")";
1005 }
1006 #endif
1007};
1008
1009
1010template <class LTS_TYPE>
1012
1013class part_trans_t;
1014
1015/// \class part_state_t
1016/// \brief refinable partition data structure
1017/// \details This class collects all information about a partition of the
1018/// states.
1020{
1021 public:
1022 /// \brief permutation array
1023 /// \details This is the central element of the data structure: In this
1024 /// array, states that belong to the same block are stored in adjacent
1025 /// elements, and blocks that belong to the same constellation are stored
1026 /// in adjacent slices.
1028
1029 private:
1030 /// \brief array with all other information about states
1031 /// \details We allocate 1 additional ``state'' to allow for the iterators
1032 /// past the last transition, as described in the documentation of
1033 /// `state_info_entry`.
1035
1036 template <class LTS_TYPE>
1038 public:
1039 /// \brief constructor
1040 /// \details The constructor allocates memory, but does not actually
1041 /// initialise the partition. Immediately afterwards, the initialisation
1042 /// helper `bisim_partitioner_gjkw_initialise_helper::init_transitions()`
1043 /// should be called.
1044 /// \param n number of states in the Kripke structure
1046 : permutation(n),
1047 state_info(n+1) //< an additional ``state'' is needed to store pointers
1048 // to the end of the slices of transitions of the last state
1049 { assert(0 == block_t::nr_of_blocks);
1050 #ifndef NDEBUG
1051 block_t::perm_begin = permutation.begin();
1052 state_info_entry::s_i_begin = state_info.data();
1054 #endif
1055 }
1056
1057 /// \brief destructor
1058 /// \details The destructor assumes that the caller has already executed
1059 /// `clear()` to deallocate the memory for the partition.
1061 { assert(state_info.empty()); assert(permutation.empty());
1062 }
1063
1064 /// \brief deallocates constellations and blocks
1065 /// \details This function can be called shortly before destructing the
1066 /// partition. Afterwards, the data structure is in a unusable state,
1067 /// as all information on states, blocks and constellations is deleted and
1068 /// deallocated.
1069 void clear()
1070 {
1071 // We have to deallocate constellations first because deallocating
1072 // blocks makes the constellations inaccessible.
1073 for (permutation_iter_t permutation_iter = permutation.end();
1074 permutation.begin() != permutation_iter; )
1075 {
1076 constln_t* const C = permutation_iter[-1]->constln(); assert(C->end() == permutation_iter);
1077 // permutation_iter[-1]->block->set_constln(nullptr); // assert that constellation is trivial:
1078 assert(permutation_iter[-1]->block->begin() == C->begin());
1079 permutation_iter = C->begin();
1080 delete C;
1081 }
1082 #ifndef NDEBUG
1083 state_type deleted_blocks = 0;
1084 #endif
1085 for (permutation_iter_t permutation_iter = permutation.end();
1086 permutation.begin() != permutation_iter; )
1087 {
1088 block_t* const B = permutation_iter[-1]->block; assert(B->end() == permutation_iter);
1089 permutation_iter = B->begin();
1090 #ifndef NDEBUG
1091 if (BLOCK_NO_SEQNR != B->seqnr()) ++deleted_blocks;
1092 else assert(0 == deleted_blocks);
1093 #endif
1094 delete B;
1095 } assert(deleted_blocks == block_t::nr_of_blocks);
1097 state_info.clear();
1098 permutation.clear();
1099 }
1100
1101 /// \brief provide size of state space
1102 /// \returns the stored size of the state space
1103 state_type state_size() const { return permutation.size(); }
1104
1105 /// \brief find block of a state
1106 /// \param s number of the state
1107 /// \returns a pointer to the block where state s resides in
1108 const block_t* block(state_type s) const
1109 {
1110 return state_info[s].block;
1111 }
1112 #ifndef NDEBUG
1113 private:
1114 /// \brief print a slice of the partition (typically a block)
1115 /// \details If the slice indicated by the parameters is not empty, the
1116 /// states in this slice will be printed.
1117 /// \param message text printed as a title if the slice is not empty
1118 /// \param B block that is being printed (it is checked whether
1119 /// states belong to this block)
1120 /// \param begin iterator to the beginning of the slice
1121 /// \param end iterator past the end of the slice
1122 void print_block(const char* message, const block_t* B,
1124 public:
1125 /// \brief print the partition as a tree (per constellation and block)
1126 /// \details The function prints all constellations (in order); for each
1127 /// constellation it prints the blocks it consists of; and for each block,
1128 /// it lists its states, separated into nonbottom and bottom states.
1129 /// \param part_tr partition for the transitions
1130 void print_part(const part_trans_t& part_tr) const;
1131
1132 /// \brief print all transitions
1133 /// \details For each state (in order), its outgoing transitions are
1134 /// listed, sorted by goal constellation. The function also indicates
1135 /// where the current constellation pointer of the state points at.
1136 void print_trans() const;
1137 #endif
1138};
1139
1140///@} (end of group part_state)
1141
1142
1143
1144
1145
1146/* ************************************************************************* */
1147/* */
1148/* T R A N S I T I O N S */
1149/* */
1150/* ************************************************************************* */
1151
1152
1153
1154
1155
1156/// \defgroup part_trans
1157/// \brief data structures for transitions used during partition refinement
1158/// \details These definitions provide a partition for transition data
1159/// structure that can be used for the partition refinement algorithm.
1160///
1161/// Basically, transitions are stored in three arrays:
1162/// - `pred`: transitions ordered by goal state, to allow finding all
1163/// predecessors of a goal state.
1164/// - `succ`: transitions ordered by source state and goal constellation, to
1165/// allow finding all successors of a source state. Given a transition in
1166/// this array, it is easy to find all transitions from the same source state
1167/// to the same goal constellation. It is possible to find out, in time
1168/// logarithmic in the out-degree, whether a state has a transition to a
1169/// given constellation.
1170/// - `B_to_C`: a permutation of the transitions such that transitions from the
1171/// same source block to the same goal constellation are adjacent. Further,
1172/// this array does not need a specific sort order.
1173///
1174/// Within this sort order, inert transitions are always placed after non-inert
1175/// transitions.
1176///
1177/// state_info_entry and block_t (defined above) contain pointers to the slices
1178/// of these arrays. For the incoming transitions, they contain enough
1179/// information; for the outgoing and the B_to_C-transitions, we additionally
1180/// use so-called _descriptors_ that show which slice belongs together.
1181/// The above was the original design described in our publication
1182/// [Groote/Jansen/Keiren/Wijs 2017]. This code reduces the descriptor for the
1183/// outgoing transitions to a single pointer, which is stored in the `succ`
1184/// array directly.
1185
1186///@{
1187
1188/* pred_entry, succ_entry, and B_to_C_entry contain the data that is stored
1189about a transition. Every transition has one of each data structure; the three
1190structures are linked through the iterators (used here as pointers). */
1192{
1193 public:
1196
1197 private:
1198 /// \brief points to the last or the first transition to the same
1199 /// constellation
1200 /// \details We need to know, given a transition, which other transitions
1201 /// with the same source state and the same goal constellation there are.
1202 /// This pointer, in most cases, points to the last transition with the
1203 /// same source state and goal constellation, with the exception: If this
1204 /// `succ_entry` is actually the last transition, then the pointer points
1205 /// to the first such transition. In that way, one can find the first and
1206 /// the last relevant transition with one or two levels of dereferencing.
1207 ///
1208 /// The advantage of this pointer is that one does not need to allocate a
1209 /// separate data structure containing this information.
1211 public:
1212
1214 {
1216 }
1217
1219 {
1221 }
1222
1224 {
1226 }
1227
1228
1230 {
1231 if (this < &*int_slice_begin_or_before_end)
1232 { assert(&*int_slice_begin_or_before_end->int_slice_begin_or_before_end <= this);
1234 int_slice_begin_or_before_end;
1235 } assert(&*int_slice_begin_or_before_end->int_slice_begin_or_before_end == this);
1237 }
1238
1240 {
1241 if (this < &*int_slice_begin_or_before_end)
1242 { assert(&*int_slice_begin_or_before_end->int_slice_begin_or_before_end <= this);
1244 int_slice_begin_or_before_end;
1245 } assert(&*int_slice_begin_or_before_end->int_slice_begin_or_before_end == this);
1247 }
1248
1250 {
1251 if (this_ < this_->int_slice_begin_or_before_end)
1252 { assert(this_->int_slice_begin_or_before_end->
1253 int_slice_begin_or_before_end <= this_);
1254 return this_->int_slice_begin_or_before_end + 1;
1255 } assert(this_->int_slice_begin_or_before_end->
1256 int_slice_begin_or_before_end == this_);
1257 // The following line requires an iterator but a normal method would
1258 // only have a pointer, not an iterator. That's why we need to jump
1259 // through the `static` hoop.
1260 return this_ + 1;
1261 }
1262
1264 {
1265 if (this_ < this_->int_slice_begin_or_before_end)
1266 { assert(this_->int_slice_begin_or_before_end->
1267 int_slice_begin_or_before_end <= this_);
1268 return this_->int_slice_begin_or_before_end + 1;
1269 } assert(this_->int_slice_begin_or_before_end->
1270 int_slice_begin_or_before_end == this_);
1271 // The following line requires an iterator but a normal method would
1272 // only have a pointer, not an iterator. That's why we need to jump
1273 // through the `static` hoop.
1274 return this_ + 1;
1275 }
1276 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1277 /// adds work (for time complexity measurement) to every transition in the
1278 /// slice to which `this_` belongs.
1280 enum check_complexity::counter_type ctr, unsigned max_value);
1281 #endif
1282};
1283
1284
1286{
1287 public:
1290 #ifndef NDEBUG
1291 /// \brief print a short transition identification for debugging
1292 /// \details This function is only available if compiled in Debug mode.
1293 std::string debug_id_short() const
1294 {
1295 return "from " + source->debug_id_short() + " to " +
1296 succ->target->debug_id_short();
1297 }
1298
1299 /// \brief print a transition identification for debugging
1300 /// \details This function is only available if compiled in Debug mode.
1301 std::string debug_id() const
1302 {
1303 return "transition " + debug_id_short();
1304 }
1305 #endif
1306 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1308 #endif
1309};
1310
1311
1313{
1314 public:
1317};
1318 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1319 /// adds work (for time complexity measurement) to every transition in the
1320 /// slice.
1322 enum check_complexity::counter_type ctr, unsigned max_value)
1323 {
1324 succ_const_iter_t iter = this_->slice_begin();
1325 succ_const_iter_t end = slice_end(this_); (void) end;
1326 assert(iter < end);
1327 mCRL2complexity(iter->B_to_C->pred, add_work(ctr, max_value), );
1328 #ifndef NDEBUG
1329 while (++iter != end)
1330 {
1331 // treat temporary counters specially
1332 mCRL2complexity(iter->B_to_C->pred,
1333 add_work_notemporary(ctr, max_value), );
1334 }
1335 #endif
1336 }
1337 #endif
1338/* B_to_C_descriptor is a data type that indicates which slice of states
1339belongs together. */
1341{
1342 public:
1344
1346 : end(end_),
1347 begin(begin_)
1348 { }
1349
1350 /// compute the source block of the transitions in this slice
1351 const block_t* from_block() const
1352 { assert(begin < end); assert(begin->pred->succ->B_to_C == begin);
1353 return begin->pred->source->block;
1354 }
1356 { assert(begin < end); assert(begin->pred->succ->B_to_C == begin);
1357 return begin->pred->source->block;
1358 }
1359
1360 /// compute the goal constellation of the transitions in this slice
1361 const constln_t* to_constln() const
1362 { assert(begin < end); assert(begin->pred->succ->B_to_C == begin);
1363 return begin->pred->succ->target->constln();
1364 }
1366 { assert(begin < end); assert(begin->pred->succ->B_to_C == begin);
1367 return begin->pred->succ->target->constln();
1368 }
1369
1370 /// \brief returns true iff the slice is marked for postprocessing
1371 /// \details The function uses the data registered with the goal
1372 /// constellation.
1380 }
1381 #ifndef NDEBUG
1382 /// \brief print a B_to_C slice identification for debugging
1383 /// \details This function is only available if compiled in Debug mode.
1384 std::string debug_id() const
1385 {
1386 assert(begin < end);
1387 std::string result("slice containing transition");
1388 if (end - begin > 1)
1389 result += "s ";
1390 else
1391 result += " ";
1393 assert(iter->pred->succ->B_to_C == iter);
1394 result += iter->pred->debug_id_short();
1395 if (end - iter > 4)
1396 {
1397 assert(iter[1].pred->succ->B_to_C == iter+1);
1398 result += ", ";
1399 result += iter[1].pred->debug_id_short();
1400 result += ", ...";
1401 iter = end - 3;
1402 }
1403 while (++iter != end)
1404 {
1405 assert(iter->pred->succ->B_to_C == iter);
1406 result += ", ";
1407 result += iter->pred->debug_id_short();
1408 }
1409 return result;
1410 }
1411 #endif
1412 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1413 /// The function is meant to transfer work temporarily assigned to the
1414 /// B_to_C slice to the transitions in the slice. It is used during
1415 /// handling of new bottom states, so the work is only assigned to
1416 /// transitions that start in a (new) bottom state.
1417 /// If at this moment no such (new) bottom state has been found, the work
1418 /// is kept with the slice and the function returns false. The work should
1419 /// be transferred later (but if there is no later transfer, it should be
1420 /// tested that the function returns true).
1422 unsigned max_value)
1423 {
1424 bool added = false;
1425
1426 for (B_to_C_const_iter_t iter = begin; iter != end; ++iter)
1427 {
1428 if (iter->pred->source->pos >=
1429 iter->pred->source->block->bottom_begin())
1430 {
1431 // source state of the transition is a bottom state
1432 #ifndef NDEBUG
1433 if (added)
1434 {
1435 mCRL2complexity(iter->pred,
1436 add_work_notemporary(ctr, max_value), );
1437 continue;
1438 }
1439 #endif
1440 mCRL2complexity(iter->pred, add_work(ctr, max_value), );
1441 added = true;
1442 #ifdef NDEBUG
1443 break;
1444 #endif
1445 }
1446 }
1447 return added;
1448 }
1449
1451 #endif
1452};
1453
1454
1455/* part_trans_t collects and organises all data for the transitions. */
1457{
1458 private:
1462
1463 template <class LTS_TYPE>
1465
1466 void swap_in(B_to_C_iter_t const pos1, B_to_C_iter_t const pos2)
1467 { assert(B_to_C.end() > pos1); assert(pos1->pred->succ->B_to_C == pos1);
1468 assert(B_to_C.end() > pos2); assert(pos2->pred->succ->B_to_C == pos2);
1469 // swap contents
1470 pred_entry const temp_entry(*pos1->pred);
1471 *pos1->pred = *pos2->pred;
1472 *pos2->pred = temp_entry;
1473 // swap pointers to contents
1474 pred_iter_t const temp_iter(pos1->pred);
1475 pos1->pred = pos2->pred;
1476 pos2->pred = temp_iter; assert(B_to_C.end() > pos1); assert(pos1->pred->succ->B_to_C == pos1);
1477 assert(B_to_C.end() > pos2); assert(pos2->pred->succ->B_to_C == pos2);
1478 }
1479
1480 void swap_out(pred_iter_t const pos1, pred_iter_t const pos2)
1481 { assert(pred.end() > pos1); assert(pos1->succ->B_to_C->pred == pos1);
1482 assert(pred.end() > pos2); assert(pos2->succ->B_to_C->pred == pos2);
1483 assert(pos1->succ->slice_begin() == pos2->succ->slice_begin());
1484 assert(succ_entry::slice_end(pos1->succ) == succ_entry::slice_end(pos2->succ));
1485 // swap contents, but do not swap slice_begin_or_before_end
1486 B_to_C_iter_t const temp_B_to_C(pos1->succ->B_to_C);
1487 state_info_ptr const temp_target(pos1->succ->target);
1488 pos1->succ->B_to_C = pos2->succ->B_to_C;
1489 pos1->succ->target = pos2->succ->target;
1490 pos2->succ->B_to_C = temp_B_to_C;
1491 pos2->succ->target = temp_target;
1492 // swap pointers to contents
1493 succ_iter_t const temp_iter(pos1->succ);
1494 pos1->succ = pos2->succ;
1495 pos2->succ = temp_iter; assert(pred.end() > pos1); assert(pos1->succ->B_to_C->pred == pos1);
1496 assert(pred.end() > pos2); assert(pos2->succ->B_to_C->pred == pos2);
1497 assert(pos1->succ->slice_begin() == pos2->succ->slice_begin());
1498 assert(succ_entry::slice_end(pos1->succ) == succ_entry::slice_end(pos2->succ));
1499 }
1500
1501 void swap_B_to_C(succ_iter_t const pos1, succ_iter_t const pos2)
1502 { assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1503 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1504 if (pos1 != pos2)
1505 {
1506 // swap contents
1507 std::swap(*pos1->B_to_C,*pos2->B_to_C);
1508 // swap pointers to contents
1509 B_to_C_iter_t const temp_iter(std::move(pos1->B_to_C));
1510 pos1->B_to_C = std::move(pos2->B_to_C);
1511 pos2->B_to_C = std::move(temp_iter);
1512 } assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1513 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1514 }
1515
1516 // *pos1 -> *pos2 -> *pos3 -> *pos1, where pos3 is between pos1 and pos2
1517 void swap3_B_to_C(succ_iter_t const pos1, succ_iter_t const pos2,
1518 succ_iter_t const pos3)
1519 { assert((pos1->B_to_C <= pos3->B_to_C && pos3->B_to_C <= pos2->B_to_C) ||
1520 (pos2->B_to_C <= pos3->B_to_C && pos3->B_to_C <= pos1->B_to_C));
1521 if (pos2 == pos3 || pos1 == pos3)
1522 {
1523 swap_B_to_C(pos1, pos2);
1524 }
1525 else
1526 { assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1527 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1528 assert(succ.end() > pos3); assert(pos3->B_to_C->pred->succ == pos3);
1529 assert(pos1 != pos2); assert(pos1 != pos3); assert(pos2 != pos3);
1530 // swap contents
1531 B_to_C_entry const temp_entry(std::move(*pos1->B_to_C));
1532 *pos1->B_to_C = std::move(*pos3->B_to_C);
1533 *pos3->B_to_C = std::move(*pos2->B_to_C);
1534 *pos2->B_to_C = std::move(temp_entry);
1535 // swap pointers to contents
1536 B_to_C_iter_t const temp_iter(std::move(pos2->B_to_C));
1537 pos2->B_to_C = std::move(pos3->B_to_C);
1538 pos3->B_to_C = std::move(pos1->B_to_C);
1539 pos1->B_to_C = std::move(temp_iter); assert(succ.end() > pos1); assert(pos1->B_to_C->pred->succ == pos1);
1540 assert(succ.end() > pos2); assert(pos2->B_to_C->pred->succ == pos2);
1541 assert(succ.end() > pos3); assert(pos3->B_to_C->pred->succ == pos3);
1542 }
1543 }
1544 public:
1546 : pred(m),
1547 succ(m),
1548 B_to_C(m)
1549 { }
1551 { assert(B_to_C.empty()); assert(succ.empty()); assert(pred.empty());
1552 }
1553
1554 /// clear allocated memory
1555 void clear()
1556 {
1557 // B_to_C_descriptors are deallocated when their respective lists are
1558 // deallocated by destructing the blocks.
1559 B_to_C.clear();
1560 succ.clear();
1561 pred.clear();
1562 }
1563
1564 trans_type trans_size() const { return pred.size(); }
1565
1566 /* split_inert_to_C splits the B_to_C slice of block b to its own
1567 constellation into two slices: one for the inert and one for the non-inert
1568 transitions. It is called with SpB just after a constellation is split, as
1569 the transitions from SpB to itself (= the inert transitions) now go to a
1570 different constellation than the other transitions from SpB to its old
1571 constellation. It does, however, not adapt the other transition arrays to
1572 reflect that noninert and inert transitions from block b would go to
1573 different constellations.
1574 Its time complexity is O(1+min {|out_noninert(b-->C)|, |out_inert(b)|}). */
1575 void split_inert_to_C(block_t* B);
1576
1577 /* part_trans_t::change_to_C has to be called after a transition target has
1578 changed its constellation. The member function will adapt the transition
1579 data structure. It assumes that the transition is non-inert and that the
1580 new constellation does not (yet) have inert incoming transitions. It
1581 returns the boundary between transitions to OldC and transitions to NewC in
1582 the state's outgoing transition array. */
1584 bool first_transition_of_state, bool first_transition_of_block);
1585
1586 /* split_s_inert_out splits the outgoing transitions from s to its own
1587 constellation into two: the inert transitions become transitions to the
1588 new constellation of which s is now part; the non-inert transitions remain
1589 transitions to OldC. It returns the boundary between transitions to
1590 OldC and transitions to NewC in the outgoing transition array of s.
1591 Its time complexity is O(1 + min { |out_\nottau(s)|, |out_\tau(s)| }). */
1593 );
1594
1595 /* part_trans_t::make_noninert makes the transition identified by succ_iter
1596 noninert. */
1597 void make_noninert(succ_iter_t const succ_iter)
1598 {
1599 // change B_to_C
1600 B_to_C_iter_t const other_B_to_C =
1601 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);
1602 assert(other_B_to_C <= succ_iter->B_to_C);
1603 assert(succ_iter->B_to_C < succ_iter->B_to_C->B_to_C_slice->end);
1604 swap_B_to_C(succ_iter, other_B_to_C->pred->succ);
1605 succ_iter->B_to_C->pred->source->block->set_inert_begin(other_B_to_C +
1606 1);
1607 // change pred
1608 pred_iter_t const other_pred = succ_iter->target->inert_pred_begin(); assert(succ_iter->target->pred_begin() <= other_pred);
1609 assert(other_pred <= succ_iter->B_to_C->pred);
1610 assert(succ_iter->B_to_C->pred < succ_iter->target->pred_end());
1611 swap_in(succ_iter->B_to_C, other_pred->succ->B_to_C);
1612 succ_iter->target->set_inert_pred_begin(other_pred + 1);
1613 // change succ
1614 succ_iter_t const other_succ =
1615 succ_iter->B_to_C->pred->source->inert_succ_begin(); assert(succ_iter->B_to_C->pred->source->succ_begin() <= other_succ);
1616 assert(other_succ <= succ_iter);
1617 assert(succ_iter < succ_iter->B_to_C->pred->source->succ_end());
1618 swap_out(succ_iter->B_to_C->pred, other_succ->B_to_C->pred);
1619 succ_iter->B_to_C->pred->source->set_inert_succ_begin(other_succ + 1);
1620 }
1621
1622 /* part_trans_t::new_block_created splits the B_to_C-slices to reflect that
1623 some transitions now start in the new block NewB. They can no longer be in
1624 the same slice as the transitions that start in the old block.
1625
1626 We need separate functions for blue and red blocks because the B_to_C-slice
1627 of the red block should come after the B_to_C-slice of the blue block,
1628 at least while postprocessing.
1629
1630 Its time complexity is O(1 + |out(NewB)|). */
1631 void new_blue_block_created(block_t* OldB, block_t* NewB);
1632 void new_red_block_created(block_t*OldB,block_t*NewB, bool postprocessing);
1633
1634 B_to_C_const_iter_t B_to_C_begin() const { return B_to_C.begin(); }
1635 B_to_C_iter_t B_to_C_end () { return B_to_C.end (); }
1636 pred_const_iter_t pred_end() const { return pred.end(); }
1637 succ_const_iter_t succ_end() const { return succ.end(); }
1638 #ifndef NDEBUG
1639 /// \brief assert that the data structure is consistent and stable
1640 void assert_stability(const part_state_t& part_st) const;
1641 #endif
1642};
1643
1644///@} (end of group part_trans)
1645
1646
1647
1648
1649
1650
1651/* ************************************************************************* */
1652/* */
1653/* A L G O R I T H M S */
1654/* */
1655/* ************************************************************************* */
1656
1657
1658
1659
1660
1661/// \defgroup part_refine
1662/// \brief classes to calculate the stutter equivalence quotient of a LTS
1663///@{
1664
1665
1666
1667/*=============================================================================
1668= create initial partition and data structures =
1669=============================================================================*/
1670
1671
1672
1673/// \class bisim_partitioner_gjkw_initialise_helper
1674/// \brief helps with initialising the refinable partition data structure
1675/// \details Before allocating memory for the refinable partition data
1676/// structure, the number of states and transitions (including extra states
1677/// generated by the translation from labelled transition system to Kripke
1678/// structure) has to be known. This class serves to calculate these numbers.
1679///
1680/// The helper class also initialises the variables used by check_complexity to
1681/// find the number of states and transitions in time complexity checks.
1682template<class LTS_TYPE>
1684{
1685 private:
1686 LTS_TYPE& aut;
1690
1691 // key and hash function for (action, target state) pair. Required since
1692 // unordered_map does not directly allow to use pair keys
1693 class Key
1694 {
1695 public:
1698
1699 Key(const label_type& f, const state_type& s)
1700 : first(f),
1701 second(s)
1702 {}
1703
1704 bool operator==(const Key &other) const
1705 {
1706 return first == other.first && second == other.second;
1707 }
1708 };
1709
1711 {
1712 public:
1713 std::size_t operator()(const Key& k) const
1714 {
1715 return std::hash<label_type>()(k.first) ^
1716 (std::hash<state_type>()(k.second) << 1);
1717 }
1718 };
1719 // Map used to convert LTS to Kripke structure
1720 // (also used when converting Kripke structure back to LTS)
1722
1723 // temporary map to keep track of blocks. maps transition labels (different
1724 // from tau) to blocks
1726
1732 public:
1733 bisim_partitioner_gjkw_initialise_helper(LTS_TYPE& l, bool branching,
1734 bool preserve_divergence);
1735
1736 /// initialise the state in part_st and the transitions in part_tr
1737 void init_transitions(part_state_t& part_st, part_trans_t& part_tr,
1738 bool branching, bool preserve_divergence);
1739
1740 // replace_transition_system() replaces the transitions of the LTS stored here by
1741 // those of its bisimulation quotient. However, it does not change
1742 // anything else; in particular, it does not change the number of states of
1743 // the LTS.
1744 void replace_transition_system(const part_state_t& part_st, ONLY_IF_DEBUG( bool branching, )
1745 bool preserve_divergence);
1746
1747 /// provides the number of states in the Kripke structure
1749
1750 /// provides the number of transitions in the Kripke structure
1752};
1753
1754
1755
1756/*=============================================================================
1757= main class =
1758=============================================================================*/
1759
1760
1761
1762struct refine_shared_t;
1763
1764} // end namespace bisim_gjkw
1765
1766/// \class bisim_partitioner_gjkw
1767/// \brief implements the main algorithm for the stutter equivalence quotient
1768template <class LTS_TYPE>
1770{
1771 private:
1775 public:
1776 // The constructor constructs the data structures and immediately
1777 // calculates the bisimulation quotient. However, it does not change the
1778 // LTS.
1779 bisim_partitioner_gjkw(LTS_TYPE& l, bool branching = false,
1780 bool preserve_divergence = false)
1781 : init_helper(l, branching, preserve_divergence),
1784 { assert(branching || !preserve_divergence);
1785 create_initial_partition_gjkw(branching, preserve_divergence);
1787 }
1789 {
1790 part_tr.clear();
1791 part_st.clear();
1792 }
1793
1794 // replace_transition_system() replaces the transitions of the LTS stored here by
1795 // those of its bisimulation quotient. However, it does not change
1796 // anything else; in particular, it does not change the number of states of
1797 // the LTS.
1798 void replace_transition_system(bool branching, bool preserve_divergence)
1799 {
1800 (void) branching; // avoid warning about unused parameter.
1801 init_helper.replace_transition_system(part_st, ONLY_IF_DEBUG( branching, )
1802 preserve_divergence);
1803 }
1804
1806 {
1808 }
1809
1811 {
1812 return part_st.block(s)->seqnr();
1813 }
1814
1816 {
1817 return part_st.block(s) == part_st.block(t);
1818 }
1819
1820 private:
1821
1822 /*-------- dbStutteringEquivalence -- Algorithm 2 of [GJKW 2017] --------*/
1823
1824 void create_initial_partition_gjkw(bool branching,
1825 bool preserve_divergence);
1827
1828 /*----------------- Refine -- Algorithm 3 of [GJKW 2017] ----------------*/
1829
1831 const bisim_gjkw::constln_t* SpC,
1832 const bisim_gjkw::B_to_C_descriptor* FromRed,
1833 bool postprocessing
1834 #if !defined(NDEBUG) || defined(COUNT_WORK_BALANCE)
1835 , const bisim_gjkw::constln_t* NewC = nullptr
1836 #endif
1837 );
1838
1839 /*--------- PostprocessNewBottom -- Algorithm 4 of [GJKW 2017] ----------*/
1840
1842};
1843
1844///@} (end of group part_refine)
1845
1846
1847
1848
1849
1850/* ************************************************************************* */
1851/* */
1852/* I N T E R F A C E */
1853/* */
1854/* ************************************************************************* */
1855
1856
1857
1858
1859
1860/// \defgroup part_interface
1861/// \brief nonmember functions serving as interface with the rest of mCRL2
1862/// \details These functions are copied, almost without changes, from
1863/// liblts_bisim_gw.h, which was written by Anton Wijs.
1864///@{
1865
1866/** \brief Reduce transition system l with respect to strong or (divergence
1867 * preserving) branching bisimulation.
1868 * \param[in,out] l The transition system that is reduced.
1869 * \param branching If true branching bisimulation is
1870 * applied, otherwise strong bisimulation.
1871 * \param preserve_divergence Indicates whether loops of internal
1872 * actions on states must be preserved. If
1873 * false these are removed. If true these
1874 * are preserved. */
1875template <class LTS_TYPE>
1876void bisimulation_reduce_gjkw(LTS_TYPE& l, bool branching = false,
1877 bool preserve_divergence = false);
1878
1879/** \brief Checks whether the two initial states of two LTSs are strong or
1880 * branching bisimilar.
1881 * \details The LTSs l1 and l2 are not usable anymore after this call.
1882 * The space consumption is O(n) and time is O(m log n). It uses the branching
1883 * bisimulation algorithm by Groote/Jansen/Keiren/Wijs.
1884 * \param[in,out] l1 A first transition system.
1885 * \param[in,out] l2 A second transistion system.
1886 * \param branching If true branching bisimulation is used,
1887 * otherwise strong bisimulation is applied.
1888 * \param preserve_divergence If true and branching is true, preserve
1889 * tau loops on states.
1890 * \retval True iff the initial states of the current transition system and l2
1891 * are (divergence preserving) (branching) bisimilar. */
1892template <class LTS_TYPE>
1893bool destructive_bisimulation_compare_gjkw(LTS_TYPE& l1, LTS_TYPE& l2,
1894 bool branching = false, bool preserve_divergence = false,
1895 bool generate_counter_examples = false);
1896
1897/** \brief Checks whether the two initial states of two LTSs are strong or
1898 * branching bisimilar.
1899 * \details The LTSs l1 and l2 are first duplicated and subsequently reduced
1900 * modulo bisimulation. If memory space is a concern, one could consider to use
1901 * destructive_bisimulation_compare. This routine uses the O(m log n) branching
1902 * bisimulation routine. It runs in O(m log n) time and uses O(n) memory, where
1903 * n is the number of states and m is the number of transitions.
1904 * \param[in,out] l1 A first transition system.
1905 * \param[in,out] l2 A second transistion system.
1906 * \param branching If true branching bisimulation is used,
1907 * otherwise strong bisimulation is applied.
1908 * \param preserve_divergence If true and branching is true, preserve
1909 * tau loops on states.
1910 * \retval True iff the initial states of the current transition system and l2
1911 * are (divergence preserving) (branching) bisimilar. */
1912template <class LTS_TYPE>
1913bool bisimulation_compare_gjkw(const LTS_TYPE& l1, const LTS_TYPE& l2,
1914 bool branching = false, bool preserve_divergence = false);
1915
1916/// calculates the bisimulation quotient of a LTS.
1917template <class LTS_TYPE>
1918void bisimulation_reduce_gjkw(LTS_TYPE& l, bool const branching /* = false */,
1919 bool const preserve_divergence /* = false */)
1920{
1921 // First, remove tau loops in case of branching bisimulation.
1922 if (branching)
1923 {
1924 scc_reduce(l, preserve_divergence);
1925 }
1926
1927 // Second, apply the branching bisimulation reduction algorithm. If there are
1928 // no taus, this will automatically yield strong bisimulation.
1929 detail::bisim_partitioner_gjkw<LTS_TYPE> bisim_part(l, branching,
1930 preserve_divergence);
1931
1932 // Assign the reduced LTS
1933 bisim_part.replace_transition_system(branching, preserve_divergence);
1934}
1935
1936template <class LTS_TYPE>
1937inline bool bisimulation_compare_gjkw(const LTS_TYPE& l1, const LTS_TYPE& l2,
1938 bool branching /* = false */, bool preserve_divergence /* = false */)
1939{
1940 LTS_TYPE l1_copy(l1);
1941 LTS_TYPE l2_copy(l2);
1942 return destructive_bisimulation_compare_gjkw(l1_copy, l2_copy, branching,
1943 preserve_divergence);
1944}
1945
1946template <class LTS_TYPE>
1947bool destructive_bisimulation_compare_gjkw(LTS_TYPE& l1, LTS_TYPE& l2,
1948 bool branching /* = false */, bool preserve_divergence /* = false */,
1949 bool generate_counter_examples /* = false */,
1950 const std::string& /*counter_example_file = "" */,
1951 bool /*structured_output = false */)
1952{
1953 if (generate_counter_examples)
1954 {
1955 mCRL2log(log::warning) << "The GJKW branching bisimulation algorithm does "
1956 "not generate counterexamples.\n";
1957 }
1958 state_type init_l2 = l2.initial_state() + l1.num_states();
1959 mcrl2::lts::detail::merge(l1, l2);
1960 l2.clear(); // No use for l2 anymore.
1961
1962 // First remove tau loops in case of branching bisimulation.
1963 if (branching)
1964 {
1965 detail::scc_partitioner<LTS_TYPE> scc_part(l1);
1966 scc_part.replace_transition_system(preserve_divergence);
1967 init_l2 = scc_part.get_eq_class(init_l2);
1968 }
1969
1970 detail::bisim_partitioner_gjkw<LTS_TYPE> bisim_part(l1, branching,
1971 preserve_divergence);
1972 return bisim_part.in_same_class(l1.initial_state(), init_l2);
1973}
1974
1975///@} (end of group part_interface)
1976
1977
1978
1979
1980
1981/* ************************************************************************* */
1982/* */
1983/* I M P L E M E N T A T I O N S */
1984/* */
1985/* ************************************************************************* */
1986
1987
1988
1989
1990
1991// This section contains implementations of functions that refer to details of
1992// classes defined later, so they could not be defined at the point of
1993// declaration.
1994
1995namespace bisim_gjkw
1996{
1997
1998/// get the constellation of the state
1999inline const constln_t* state_info_entry::constln() const
2000{
2001 return block->constln();
2002}
2003
2005{
2006 return block->constln();
2007}
2008
2009/// read FromRed
2010inline B_to_C_descriptor* block_t::FromRed(const constln_t* const SpC)
2011{
2012 if (!to_constln.empty() && to_constln.front().to_constln() == SpC)
2013 {
2014 return &*to_constln.begin();
2015 }
2016 else
2017 {
2018 #ifndef NDEBUG
2019 for (B_to_C_desc_const_iter_t iter = to_constln.begin();
2020 to_constln.end() != iter; ++iter)
2021 {
2022 assert(iter->from_block() == this);
2023 assert(iter->to_constln() != SpC);
2024 }
2025 #endif
2026 return nullptr;
2027 }
2028}
2029
2030
2031/// set FromRed to an existing element in to_constln
2032inline void block_t::SetFromRed(B_to_C_desc_iter_t const new_fromred)
2033{ assert(!to_constln.empty());
2034 if (to_constln.begin() != new_fromred)
2035 {
2036 to_constln.splice(to_constln.begin(), to_constln, new_fromred);
2037 } assert(new_fromred->from_block() == this);
2038}
2039
2040
2041/// \brief quick check to find out whether the state has a transition to `SpC`
2042/// \details If the current constellation pointer happens to be set to `SpC`,
2043/// the function can quickly find out whether the state has a transition to
2044/// `SpC`.
2045/// The function should not be called for the constellation in which the state
2046/// resides.
2047/// \param SpC constellation of interest
2048/// \returns true if the state is known to have a transition to `SpC`
2049/// \memberof state_info_entry
2051 SpC) const
2053 assert(succ_begin() == current_constln() || succ_end() == current_constln() ||
2054 *current_constln()[-1].target->constln() <
2055 *current_constln()->target->constln());
2056 assert(constln() != SpC);
2057 // either current_constln()->target or current_constln()[-1].target is in
2058 // SpC
2060 current_constln()->target->constln() == SpC)
2061 {
2062 return true;
2063 }
2064 return false;
2065}
2066
2067
2068/// \brief quick check to find out whether the state has _no_ transition to
2069/// `SpC`
2070/// \details If the current constellation pointer happens to be set to `SpC` or
2071/// its successor, the function can quickly find out whether the state has a
2072/// transition to `SpC`.
2073/// The function should not be called for the constellation in which the state
2074/// resides.
2075/// \param SpC constellation of interest
2076/// \returns true if the state is known to have _no_ transition to `SpC`
2077/// \memberof state_info_entry
2079 const constln_t* const SpC) const
2081 assert(succ_begin() == current_constln() || succ_end() == current_constln() ||
2082 *current_constln()[-1].target->constln() <
2083 *current_constln()->target->constln());
2084 assert(constln() != SpC);
2085 // condition:
2086 // current_constln()->target is in a constellation > SpC and
2087 // current_constln()[-1].target is in a constellation < SpC.
2089 *current_constln()->target->constln() <= *SpC)
2090 {
2091 return false;
2092 }
2093 if (current_constln() != succ_begin() &&
2094 *SpC <= *current_constln()[-1].target->constln())
2095 {
2096 return false;
2097 }
2098 return true;
2099}
2100
2101
2102} // end namespace bisim_gjkw
2103} // end namespace detail
2104} // end namespace lts
2105} // end namespace mcrl2
2106
2107#endif // ifndef _LIBLTS_BISIM_GJKW_H
#define mCRL2complexity(unit, call, info_for_debug)
Assigns work to a counter and checks for errors.
const aterm & operator[](const size_type i) const
Returns the i-th argument.
Definition aterm.h:187
aterm & operator=(const aterm &other) noexcept=default
const function_symbol & function() const
Returns the function symbol belonging to an aterm.
Definition aterm.h:144
aterm(const aterm &other) noexcept=default
This class has user-declared copy constructor so declare default copy and move operators.
const function_symbol & function() const noexcept
Definition aterm_core.h:55
bool operator!=(const function_symbol &f) const
Inequality test.
bool operator==(const function_symbol &f) const
Equality test.
unprotected_aterm_core m_stack[maximal_size_of_stack]
static constexpr std::size_t maximal_size_of_stack
void initialise(const term_balanced_tree< Term > &tree)
const Term & dereference() const
Dereference operator.
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.
friend void make_term_balanced_tree(term_balanced_tree< Term1 > &result, ForwardTraversalIterator p, const std::size_t size, Transformer transformer)
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.
Term & reference
Reference to T.
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.
std::size_t size_type
An unsigned integral type.
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 value_type
The type of object, T stored in the term_balanced_tree.
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.
const Term const_reference
Const reference to T.
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()
term_balanced_tree(detail::_term_appl *t)
ptrdiff_t difference_type
A signed integral type.
A list of aterm objects.
Definition aterm_list.h:24
An unprotected term does not change the reference count of the shared term when it is copied or moved...
Definition aterm_core.h:32
void swap(unprotected_aterm_core &t) noexcept
Swaps this term with its argument.
Definition aterm_core.h:152
bool operator==(const unprotected_aterm_core &t) const
Comparison operator.
Definition aterm_core.h:83
bool defined() const
Returns true if this term is not equal to the term assigned by the default constructor of aterms,...
Definition aterm_core.h:143
const detail::_aterm * m_term
Definition aterm_core.h:36
bool operator!=(const unprotected_aterm_core &t) const
Inequality operator on two unprotected aterms.
Definition aterm_core.h:92
const function_symbol & function() const
Yields the function symbol in an aterm.
Definition aterm_core.h:161
action_formula(action_formula &&) noexcept=default
action_formula & operator=(const action_formula &) noexcept=default
action_formula(const atermpp::aterm &term)
action_formula(const data::data_expression &x)
\brief Constructor Z6.
action_formula(const action_formula &) noexcept=default
Move semantics.
action_formula & operator=(action_formula &&) noexcept=default
action_formula(const data::untyped_data_parameter &x)
\brief Constructor Z6.
action_formula()
\brief Default constructor X3.
action_formula(const process::untyped_multi_action &x)
\brief Constructor Z6.
\brief The and operator for action formulas
and_ & operator=(const and_ &) noexcept=default
and_ & operator=(and_ &&) noexcept=default
and_(const action_formula &left, const action_formula &right)
\brief Constructor Z14.
and_()
\brief Default constructor X3.
and_(and_ &&) noexcept=default
const action_formula & left() const
and_(const atermpp::aterm &term)
and_(const and_ &) noexcept=default
Move semantics.
const action_formula & right() const
\brief The at operator for action formulas
at(const atermpp::aterm &term)
const data::data_expression & time_stamp() const
at & operator=(at &&) noexcept=default
const action_formula & operand() const
at(const at &) noexcept=default
Move semantics.
at(at &&) noexcept=default
at()
\brief Default constructor X3.
at & operator=(const at &) noexcept=default
at(const action_formula &operand, const data::data_expression &time_stamp)
\brief Constructor Z14.
\brief The existential quantification operator for action formulas
exists(const atermpp::aterm &term)
exists & operator=(exists &&) noexcept=default
exists(exists &&) noexcept=default
exists(const exists &) noexcept=default
Move semantics.
exists()
\brief Default constructor X3.
const data::variable_list & variables() const
exists & operator=(const exists &) noexcept=default
const action_formula & body() const
exists(const data::variable_list &variables, const action_formula &body)
\brief Constructor Z14.
\brief The value false for action formulas
false_(const atermpp::aterm &term)
false_()
\brief Default constructor X3.
false_(false_ &&) noexcept=default
false_(const false_ &) noexcept=default
Move semantics.
false_ & operator=(const false_ &) noexcept=default
false_ & operator=(false_ &&) noexcept=default
\brief The universal quantification operator for action formulas
forall & operator=(const forall &) noexcept=default
const action_formula & body() const
forall & operator=(forall &&) noexcept=default
forall(const atermpp::aterm &term)
const data::variable_list & variables() const
forall()
\brief Default constructor X3.
forall(const data::variable_list &variables, const action_formula &body)
\brief Constructor Z14.
forall(const forall &) noexcept=default
Move semantics.
forall(forall &&) noexcept=default
\brief The implication operator for action formulas
const action_formula & left() const
imp(const imp &) noexcept=default
Move semantics.
imp(imp &&) noexcept=default
imp & operator=(imp &&) noexcept=default
imp(const action_formula &left, const action_formula &right)
\brief Constructor Z14.
imp()
\brief Default constructor X3.
imp & operator=(const imp &) noexcept=default
imp(const atermpp::aterm &term)
const action_formula & right() const
\brief The multi action for action formulas
multi_action(const multi_action &) noexcept=default
Move semantics.
multi_action(multi_action &&) noexcept=default
multi_action(const process::action_list &actions)
\brief Constructor Z14.
multi_action(const atermpp::aterm &term)
multi_action & operator=(const multi_action &) noexcept=default
multi_action()
\brief Default constructor X3.
const process::action_list & actions() const
multi_action & operator=(multi_action &&) noexcept=default
\brief The not operator for action formulas
not_(const action_formula &operand)
\brief Constructor Z14.
not_()
\brief Default constructor X3.
const action_formula & operand() const
not_(const atermpp::aterm &term)
not_(not_ &&) noexcept=default
not_(const not_ &) noexcept=default
Move semantics.
not_ & operator=(const not_ &) noexcept=default
not_ & operator=(not_ &&) noexcept=default
\brief The or operator for action formulas
or_ & operator=(const or_ &) noexcept=default
or_(or_ &&) noexcept=default
or_()
\brief Default constructor X3.
or_ & operator=(or_ &&) noexcept=default
or_(const action_formula &left, const action_formula &right)
\brief Constructor Z14.
or_(const atermpp::aterm &term)
or_(const or_ &) noexcept=default
Move semantics.
const action_formula & right() const
const action_formula & left() const
\brief The value true for action formulas
true_(true_ &&) noexcept=default
true_ & operator=(const true_ &) noexcept=default
true_()
\brief Default constructor X3.
true_(const true_ &) noexcept=default
Move semantics.
true_(const atermpp::aterm &term)
true_ & operator=(true_ &&) noexcept=default
data_expression & operator=(const data_expression &) noexcept=default
data_expression & operator=(data_expression &&) noexcept=default
sort_expression sort() const
Returns the sort of the data expression.
Definition data.cpp:108
data_expression(const data_expression &) noexcept=default
Move semantics.
data_expression(data_expression &&) noexcept=default
Rewriter that operates on data expressions.
Definition rewriter.h:81
data_expression operator()(const data_expression &d) const
Rewrites a data expression.
Definition rewriter.h:158
void add_sort(const basic_sort &s)
Adds a sort to this specification.
\brief A data variable
Definition variable.h:28
logger(const log_level_t l)
Default constructor.
Definition logger.h:164
Read-only singly linked list of action rename rules.
\brief A timed multi-action
multi_action(const multi_action &) noexcept=default
Move semantics.
const process::action_list & actions() const
const data::data_expression & time() const
multi_action(multi_action &&) noexcept=default
multi_action(const process::action_list &actions=process::action_list(), data::data_expression time=data::undefined_real())
Constructor.
This class contains labels for probabilistic transistions, consisting of a numerator and a denumerato...
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 operator-(const probabilistic_data_expression &other) const
Standard subtraction operator.
static data::data_specification data_specification_with_real()
static probabilistic_data_expression zero()
Constant zero.
Linear process specification.
STATE & state()
Get the state in a state probability pair.
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.
A class containing the values for action labels for the .lts format.
Definition lts_lts.h:144
action_label_lts & operator=(const action_label_lts &)=default
Copy assignment.
static mcrl2::lps::multi_action sort_multiactions(const mcrl2::lps::multi_action &a)
A function to sort a multi action to guarantee that multi-actions are compared properly.
Definition lts_lts.h:190
void hide_actions(const std::vector< std::string > &tau_actions)
Hide the actions with labels in tau_actions.
Definition lts_lts.h:166
action_label_lts(const action_label_lts &)=default
Copy constructor.
static const action_label_lts & tau_action()
Definition lts_lts.h:182
action_label_lts()
Default constructor.
Definition lts_lts.h:148
action_label_lts(const mcrl2::lps::multi_action &a)
Constructor.
Definition lts_lts.h:158
This class contains strings to be used as values for action labels in lts's.
static std::string sort_multiactions(const std::string &s)
Sort multiactions in a string.
void hide_actions(const std::vector< std::string > &string_vector)
action_label_string & operator=(const action_label_string &)=default
Copy assignment.
static const action_label_string & tau_action()
action_label_string(const std::string &s)
bool operator<(const action_label_string &l) const
action_label_string(const action_label_string &)=default
Copy constructor.
stores information about a block
stores information about a constellation
stores information about a single state
bool surely_has_no_transition_to(const constln_t *const SpC) const
quick check to find out whether the state has no transition to SpC
bool surely_has_transition_to(const constln_t *const SpC) const
quick check to find out whether the state has a transition to SpC
implements the main algorithm for the stutter equivalence quotient
void set_truths(formula &f)
Compute and set the truth values of a formula f.
std::pair< label_type, block_index_type > observation_t
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...
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
bisim_partitioner_minimal_depth(LTS_TYPE &l, const std::size_t init_l2)
Creates a bisimulation partitioner for an LTS.
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.
~bisim_partitioner_minimal_depth()=default
Destroys this partitioner.
std::map< std::pair< block_index_type, block_index_type >, level_type > greatest_common_ancestor
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
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.
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::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, std::set< block_index_type > > r_tauP
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.
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 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...
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
std::map< block_index_type, std::set< block_index_type > > r_alpha
mcrl2::state_formulas::state_formula counter_formula_aux(const block_index_type B1, const block_index_type B2)
mcrl2::state_formulas::state_formula counter_formula(const std::size_t s, const std::size_t t)
Creates a state formula that distinguishes state s from state t.
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
class for time complexity checks
counter_type
Type for complexity budget counters.
compare_transitions_lts(const std::set< std::size_t > &hide_action_set)
Definition transition.h:72
bool operator()(const transition &t1, const transition &t2)
Definition transition.h:76
const std::set< std::size_t > & m_hide_action_set
Definition transition.h:69
const std::set< std::size_t > & m_hide_action_set
Definition transition.h:37
bool operator()(const transition &t1, const transition &t2)
Definition transition.h:44
compare_transitions_slt(const std::set< std::size_t > &hide_action_set)
Definition transition.h:40
bool operator()(const transition &t1, const transition &t2)
Definition transition.h:188
bool operator()(const transition &t1, const transition &t2)
Definition transition.h:166
compare_transitions_tl(const std::set< std::size_t > &hide_action_set)
Definition transition.h:162
const std::set< std::size_t > & m_hide_action_set
Definition transition.h:159
const std::set< std::size_t > & m_hide_action_set
Definition transition.h:98
compare_transitions_tls(const std::set< std::size_t > &hide_action_set)
Definition transition.h:101
bool operator()(const transition &t1, const transition &t2)
Definition transition.h:105
compare_transitions_tsl(const std::set< std::size_t > &hide_action_set)
Definition transition.h:133
const std::set< std::size_t > & m_hide_action_set
Definition transition.h:130
bool operator()(const transition &t1, const transition &t2)
Definition transition.h:137
A class that can be used to store counterexample trees and.
indexed_sorted_vector_for_tau_transitions(const LTS_TYPE &aut, bool outgoing)
Definition liblts_scc.h:44
const std::vector< state_type > & get_transitions() const
Definition liblts_scc.h:96
std::vector< state_type > m_states_with_outgoing_or_incoming_tau_transition
Definition liblts_scc.h:39
std::pair< label_type, state_type > label_state_pair
indexed_sorted_vector_for_transitions(const std::vector< transition > &transitions, state_type num_states, bool outgoing)
const std::vector< CONTENT > & get_transitions() const
void swap(lts_aut_base &)
Standard swap function.
Definition lts_aut.h:48
lts_type type()
Provides the type of this lts, in casu lts_aut.
Definition lts_aut.h:42
bool operator==(const lts_aut_base &) const
Standard equality function.
Definition lts_aut.h:55
lts_type type() const
The lts_type of state_label_dot. In this case lts_dot.
Definition lts_dot.h:117
void swap(lts_dot_base &)
The standard swap function.
Definition lts_dot.h:124
void clear()
Clear the transitions system.
Definition lts_fsm.h:135
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...
Definition lts_fsm.h:147
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....
Definition lts_fsm.h:179
bool operator==(const lts_fsm_base &other) const
Definition lts_fsm.h:109
void clear_process_parameters()
Clear the state parameters for this LTS.
Definition lts_fsm.h:226
std::vector< std::vector< std::string > > m_state_element_values
state_element_values contain the values that can occur at the i-th position of a state label
Definition lts_fsm.h:100
lts_type type() const
The lts_type of this labelled transition system. In this case lts_fsm.
Definition lts_fsm.h:118
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.
Definition lts_fsm.h:194
std::pair< std::string, std::string > process_parameter(std::size_t i) const
Returns the i-th parameter of the state vectors stored in this LTS.
Definition lts_fsm.h:218
std::vector< std::pair< std::string, std::string > > m_parameters
m_parameters contain the parameters corresponding to the consecutive elements of a state vector....
Definition lts_fsm.h:105
std::vector< std::pair< std::string, std::string > > process_parameters() const
Return the parameters of the state vectors stored in this LTS.
Definition lts_fsm.h:209
void add_process_parameter(const std::string &name, const std::string &sort)
Set the state parameters for this LTS.
Definition lts_fsm.h:236
std::string state_label_to_string(const state_label_fsm &l) const
Pretty print a state value of this FSM.
Definition lts_fsm.h:157
void swap(lts_fsm_base &other)
Standard swap function.
Definition lts_fsm.h:124
a base class for lts_lts_t and probabilistic_lts_t.
Definition lts_lts.h:282
static lts_type type()
Yields the type of this lts, in this case lts_lts.
Definition lts_lts.h:311
void set_process_parameters(const data::variable_list &params)
Set the state parameters for this LTS.
Definition lts_lts.h:369
bool operator==(const lts_lts_base &other) const
Standard equality function;.
Definition lts_lts.h:294
process::action_label_list m_action_decls
Definition lts_lts.h:286
void swap(lts_lts_base &l)
Definition lts_lts.h:301
void set_action_label_declarations(const process::action_label_list &decls)
Set the action label information for this LTS.
Definition lts_lts.h:333
const data::variable & process_parameter(std::size_t i) const
Returns the i-th parameter of the state vectors stored in this LTS.
Definition lts_lts.h:356
data::data_specification m_data_spec
Definition lts_lts.h:284
const data::variable_list & process_parameters() const
Return the process parameters stored in this LTS.
Definition lts_lts.h:348
void set_data(const data::data_specification &spec)
Set the mCRL2 data specification of this LTS.
Definition lts_lts.h:341
lts_lts_base()
Default constructor.
Definition lts_lts.h:290
const process::action_label_list & action_label_declarations() const
Return action label declarations stored in this LTS.
Definition lts_lts.h:325
data::variable_list m_parameters
Definition lts_lts.h:285
This class contains an scc partitioner removing inert tau loops.
Definition liblts_scc.h:128
std::size_t get_eq_class(const std::size_t s) const
Gives the equivalence class number of a state. The equivalence class numbers range from 0 upto (and e...
Definition liblts_scc.h:339
void dfs_numbering(const state_type t, const indexed_sorted_vector_for_tau_transitions< LTS_TYPE > &src_tgt, std::vector< bool > &visited)
Definition liblts_scc.h:373
std::size_t num_eq_classes() const
Gives the number of bisimulation equivalence classes of the LTS.
Definition liblts_scc.h:333
void group_components(const state_type t, const state_type equivalence_class_index, const indexed_sorted_vector_for_tau_transitions< LTS_TYPE > &src_tgt_src, std::vector< bool > &visited)
Definition liblts_scc.h:353
scc_partitioner(LTS_TYPE &l)
Creates an scc partitioner for an LTS.
Definition liblts_scc.h:210
void replace_transition_system(const bool preserve_divergence_loops)
The lts for which this partioner is created is replaced by the lts modulo the calculated partition.
Definition liblts_scc.h:248
~scc_partitioner()=default
Destroys this partitioner.
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.
Definition liblts_scc.h:345
std::vector< state_type > block_index_of_a_state
Definition liblts_scc.h:194
std::vector< state_type > dfsn2state
Definition liblts_scc.h:195
A simple labelled transition format with only strings as action labels.
Definition lts_aut.h:70
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.
void swap(lts_default_base &)
Standard swap function.
Definition lts.h:53
lts_type type()
Provides the type of this lts, in casu lts_none.
Definition lts.h:47
bool operator==(const lts_default_base &) const
Standard equality function.
Definition lts.h:60
A class to contain labelled transition systems in graphviz format.
Definition lts_dot.h:137
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.
Definition lts_fsm.h:255
lts< state_label_fsm, action_label_string, detail::lts_fsm_base > super
Definition lts_fsm.h:257
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.
Definition lts_lts.h:385
lts_lts_t()
Creates an object containing no information.
Definition lts_lts.h:388
A class that contains a labelled transition system.
Definition lts.h:83
states_size_type num_state_labels() const
Gets the number of state labels of this LTS.
Definition lts.h:271
labels_size_type num_action_labels() const
Gets the number of action labels of this LTS.
Definition lts.h:327
states_size_type m_init_state
Definition lts.h:117
void add_transition(const transition &t)
Add a transition to the lts.
Definition lts.h:563
void set_num_action_labels(const labels_size_type n)
Sets the number of action labels of this LTS.
Definition lts.h:319
bool has_action_info() const
Checks whether this LTS has labels associated with its actions, which are numbers.
Definition lts.h:664
bool is_tau(labels_size_type action) const
Checks whether an action is a tau action.
Definition lts.h:572
std::set< labels_size_type > & hidden_label_set()
Returns the hidden label set that tells for each label what its corresponding hidden label is.
Definition lts.h:431
states_size_type num_states() const
Gets the number of states of this LTS.
Definition lts.h:245
void set_hidden_label_set(const std::set< labels_size_type > &m)
Sets the hidden label map that tells for each label what its corresponding hidden label is.
Definition lts.h:439
void clear_transitions(const std::size_t n=0)
Clear the transitions of an lts.
Definition lts.h:493
void set_num_transitions(const std::size_t n)
Sets the number of transitions of this LTS and tries to shrink the datastructure.
Definition lts.h:310
void clear_actions()
Clear the action labels of an lts.
Definition lts.h:504
void set_num_states(const states_size_type n, const bool has_state_labels=true)
Sets the number of states of this LTS.
Definition lts.h:280
void store_action_label_to_be_renamed(const ACTION_LABEL_T &a, const labels_size_type i, std::map< labels_size_type, labels_size_type > &action_rename_map)
Definition lts.h:146
void add_state_number_as_state_information()
Label each state with its state number.
Definition lts.h:521
static constexpr bool is_probabilistic_lts
An indicator that this is not a probabilistic lts.
Definition lts.h:112
bool is_probabilistic(const states_size_type state) const
Gets the label of a state.
Definition lts.h:469
ACTION_LABEL_T action_label_t
The type of action labels.
Definition lts.h:92
const std::set< labels_size_type > & hidden_label_set() const
Returns the hidden label set that tells for each label what its corresponding hidden label is.
Definition lts.h:423
std::vector< transition > m_transitions
Definition lts.h:118
std::vector< STATE_LABEL_T > & state_labels()
Provides the state labels of an LTS.
Definition lts.h:253
ACTION_LABEL_T action_label(const labels_size_type action) const
Gets the label of an action.
Definition lts.h:479
const labels_size_type tau_label_index() const
Provide the index of the label that represents tau.
Definition lts.h:385
const std::vector< ACTION_LABEL_T > & action_labels() const
The action labels in this lts.
Definition lts.h:402
bool has_state_info() const
Checks whether this LTS has state values associated with its states.
Definition lts.h:655
lts(const lts &l)
Creates a copy of the supplied LTS.
Definition lts.h:180
void set_initial_state(const states_size_type state)
Sets the initial state number of this LTS.
Definition lts.h:343
void set_action_label(const labels_size_type action, const ACTION_LABEL_T &label)
Sets the label of an action.
Definition lts.h:411
void rename_labels(const std::map< labels_size_type, labels_size_type > &action_rename_map)
Definition lts.h:127
std::set< labels_size_type > m_hidden_label_set
Definition lts.h:124
std::vector< STATE_LABEL_T >::size_type states_size_type
The sort that contains the indices of states.
Definition lts.h:100
void apply_hidden_actions(const std::vector< std::string > &tau_actions)
Rename actions in the lts by hiding the actions in the vector tau_actions.
Definition lts.h:628
labels_size_type apply_hidden_label_map(const labels_size_type action) const
If the action label is registered hidden, it returns tau, otherwise the original label.
Definition lts.h:447
std::vector< transition > & get_transitions()
Gets a reference to the vector of transitions of the current lts.
Definition lts.h:554
std::vector< ACTION_LABEL_T >::size_type labels_size_type
The sort that represents the indices of labels.
Definition lts.h:104
lts & operator=(const lts &l)
Standard assignment operator.
Definition lts.h:194
const std::vector< STATE_LABEL_T > & state_labels() const
Provides the state labels of an LTS.
Definition lts.h:261
std::vector< STATE_LABEL_T > m_state_labels
Definition lts.h:119
STATE_LABEL_T state_label(const states_size_type state) const
Gets the label of a state.
Definition lts.h:459
states_size_type add_state(const STATE_LABEL_T &label=STATE_LABEL_T())
Adds a state to this LTS.
Definition lts.h:356
STATE_LABEL_T state_label_t
The type of state labels.
Definition lts.h:88
void clear()
Clear the transitions system.
Definition lts.h:533
lts()
Creates an empty LTS.
Definition lts.h:172
bool operator==(const lts &other) const
Standard equality operator.
Definition lts.h:209
states_size_type m_nstates
Definition lts.h:116
const std::vector< transition > & get_transitions() const
Gets a const reference to the vector of transitions of the current lts.
Definition lts.h:545
LTS_BASE base_t
The type of the used lts base.
Definition lts.h:96
std::vector< transition >::size_type transitions_size_type
The sort that contains indices of transitions.
Definition lts.h:108
states_size_type initial_state() const
Gets the initial state number of this LTS.
Definition lts.h:335
void clear_state_labels()
Clear the labels of an lts.
Definition lts.h:514
void swap(lts &l)
Swap this lts with the supplied supplied LTS.
Definition lts.h:222
void record_hidden_actions(const std::vector< std::string > &tau_actions)
Records all actions with a string that occurs in tau_actions internally.
Definition lts.h:589
std::vector< ACTION_LABEL_T > m_action_labels
Definition lts.h:120
transitions_size_type num_transitions() const
Gets the number of transitions of this LTS.
Definition lts.h:302
void set_state_label(const states_size_type state, const STATE_LABEL_T &label)
Sets the label of a state.
Definition lts.h:393
labels_size_type add_action(const ACTION_LABEL_T &label)
Adds an action with a label to this LTS.
Definition lts.h:370
A simple labelled transition format with only strings as action labels.
Definition lts_aut.h:103
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.
Definition lts_dot.h:163
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.
Definition lts_fsm.h:283
probabilistic_lts< state_label_fsm, action_label_string, probabilistic_state_t, detail::lts_fsm_base > super
Definition lts_fsm.h:286
void save(const std::string &filename) const
Save the labelled transition system to file.
void load(const std::string &filename)
Save the labelled transition system to file.
This class contains probabilistic labelled transition systems in .lts format.
Definition lts_lts.h:413
probabilistic_lts_lts_t()
Creates an object containing no information.
Definition lts_lts.h:416
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.
const PROBABILISTIC_STATE_T & initial_probabilistic_state() const
Gets the initial state number of this LTS.
super::transitions_size_type transitions_size_type
bool operator==(const probabilistic_lts &other) const
Standard equality operator.
void swap(probabilistic_lts &other)
Swap this lts with the supplied supplied LTS.
super::states_size_type states_size_type
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.
lts< STATE_LABEL_T, ACTION_LABEL_T, LTS_BASE > super
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 set_initial_state(const states_size_type s)
void clear()
Clear the transitions system.
probabilistic_lts & operator=(probabilistic_lts &&other)=default
Standard assignment move operator.
PROBABILISTIC_STATE_T probabilistic_state_t
The type of probabilistic labels.
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.
super::state_label_t state_label_t
states_size_type initial_state() const
PROBABILISTIC_STATE_T m_init_probabilistic_state
super::labels_size_type labels_size_type
super::action_label_t action_label_t
const PROBABILISTIC_STATE_T & probabilistic_state(const states_size_type index) const
Gets the probabilistic label of an index.
probabilistic_lts()
Creates an empty LTS.
void set_probabilistic_state(const states_size_type index, const PROBABILISTIC_STATE_T &s)
Sets the probabilistic label corresponding to some index.
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...
std::vector< state_probability_pair >::const_iterator const_iterator
STATE get() const
Get a probabilistic state if is is simple, i.e., consists of a single 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.
std::vector< state_probability_pair >::iterator iterator
void swap(probabilistic_state &other)
Swap this probabilistic state.
reverse_iterator rend()
Gets the reverse end iterator over pairs of state and probability.
std::vector< state_probability_pair >::const_reverse_iterator const_reverse_iterator
bool operator==(const probabilistic_state &other) const
Standard equality operator.
void clear()
Makes the probabilistic state empty.
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.
std::vector< state_probability_pair >::reverse_iterator reverse_iterator
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.
Definition sigref.h:75
Class for computing the signature for branching bisimulation.
Definition sigref.h:105
Class for computing the signature for divergence preserving branching bisimulation.
Definition sigref.h:185
Signature based reductions for labelled transition systems.
Definition sigref.h:350
This class contains labels for states in dot format.
Definition lts_dot.h:37
std::string name() const
This method returns the string in the name field of a state label.
Definition lts_dot.h:64
std::string label() const
This method returns the label in the name field of a state label.
Definition lts_dot.h:78
state_label_dot()
The default constructor.
Definition lts_dot.h:46
std::string m_state_label
Definition lts_dot.h:40
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 ...
Definition lts_dot.h:86
bool operator!=(const state_label_dot &l) const
Standard inequality operator. Just the negation of equality.
Definition lts_dot.h:93
Contains empty state values, used for lts's without state valued.
bool operator==(const state_label_empty &) const
static state_label_empty number_to_label(const std::size_t)
Create a state label consisting of a number as the only list element. For empty state labels this doe...
bool operator!=(const state_label_empty &other) const
state_label_empty operator+(const state_label_empty &) const
An operator to concatenate two state labels.
This class contains state labels for the fsm format.
Definition lts_fsm.h:38
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.
Definition lts_fsm.h:70
state_label_fsm()
Default constructor. The label becomes an empty vector.
Definition lts_fsm.h:42
state_label_fsm(const std::vector< std::size_t > &v)
Default constructor. The label is set to the vector v.
Definition lts_fsm.h:53
state_label_fsm operator+(const state_label_fsm &l) const
An operator to concatenate two state labels. Fsm labels cannot be concatenated. Therefore,...
Definition lts_fsm.h:59
This class contains state labels for an labelled transition system in .lts format.
Definition lts_lts.h:40
state_label_lts()
Default constructor.
Definition lts_lts.h:46
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.
Definition lts_lts.h:81
state_label_lts(const super &l)
Construct a state label out of list of balanced trees of data expressions, representing a state label...
Definition lts_lts.h:73
atermpp::term_list< lps::state > super
Definition lts_lts.h:42
state_label_lts(const lps::state &l)
Construct a state label out of a balanced tree of data expressions, representing a state label.
Definition lts_lts.h:66
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.
Definition lts_lts.h:96
state_label_lts(const CONTAINER &l)
Construct a single state label out of the elements in a container.
Definition lts_lts.h:58
A class containing triples, source label and target representing transitions.
Definition transition.h:48
void set_label(const size_type label)
Set the label of the transition.
Definition transition.h:116
transition & operator=(const transition &t)=default
Assignment.
void set_to(const size_type to)
Set the target of the transition.
Definition transition.h:123
bool operator<(const transition &t) const
Standard lexicographic ordering on transitions.
Definition transition.h:147
transition(const std::size_t f, const std::size_t l, const std::size_t t)
Constructor (there is no default constructor).
Definition transition.h:67
size_type from() const
The source of the transition.
Definition transition.h:89
transition & operator=(transition &&t)=default
Move assignment.
bool operator!=(const transition &t) const
Standard inequality on transitions.
Definition transition.h:137
size_type label() const
The label of the transition.
Definition transition.h:95
size_type to() const
The target of the transition.
Definition transition.h:102
void set_from(const size_type from)
Set the source of the transition.
Definition transition.h:109
transition(transition &&t)=default
Move constructor.
transition(const transition &t)=default
Copy constructor.
std::size_t size_type
The type of the elements in a transition.
Definition transition.h:51
bool operator==(const transition &t) const
Standard equality on transitions.
Definition transition.h:130
\brief An action label
action_label(const core::identifier_string &name, const data::sort_expression_list &sorts)
\brief Constructor Z12.
action(const action_label &label, const data::data_expression_list &arguments)
\brief Constructor Z14.
Process specification consisting of a data specification, action labels, a sequence of process equati...
\brief An untyped multi action or data application
\brief The alt operator for regular formulas
alt(const atermpp::aterm &term)
alt()
\brief Default constructor X3.
alt & operator=(alt &&) noexcept=default
const regular_formula & right() const
alt(const regular_formula &left, const regular_formula &right)
\brief Constructor Z14.
alt(const alt &) noexcept=default
Move semantics.
alt(alt &&) noexcept=default
alt & operator=(const alt &) noexcept=default
const regular_formula & left() const
regular_formula()
\brief Default constructor X3.
regular_formula(const action_formulas::action_formula &x)
\brief Constructor Z6.
regular_formula(const atermpp::aterm &term)
regular_formula(const regular_formula &) noexcept=default
Move semantics.
regular_formula(const data::data_expression &x)
\brief Constructor Z6.
regular_formula & operator=(const regular_formula &) noexcept=default
regular_formula(regular_formula &&) noexcept=default
regular_formula & operator=(regular_formula &&) noexcept=default
\brief The seq operator for regular formulas
seq(const regular_formula &left, const regular_formula &right)
\brief Constructor Z14.
const regular_formula & right() const
seq & operator=(const seq &) noexcept=default
seq(const seq &) noexcept=default
Move semantics.
const regular_formula & left() const
seq(seq &&) noexcept=default
seq()
\brief Default constructor X3.
seq & operator=(seq &&) noexcept=default
seq(const atermpp::aterm &term)
\brief The 'trans or nil' operator for regular formulas
trans_or_nil & operator=(trans_or_nil &&) noexcept=default
trans_or_nil & operator=(const trans_or_nil &) noexcept=default
trans_or_nil(const trans_or_nil &) noexcept=default
Move semantics.
trans_or_nil(const regular_formula &operand)
\brief Constructor Z14.
trans_or_nil()
\brief Default constructor X3.
trans_or_nil(trans_or_nil &&) noexcept=default
trans_or_nil(const atermpp::aterm &term)
const regular_formula & operand() const
\brief The trans operator for regular formulas
trans(const atermpp::aterm &term)
trans(trans &&) noexcept=default
const regular_formula & operand() const
trans & operator=(const trans &) noexcept=default
trans & operator=(trans &&) noexcept=default
trans()
\brief Default constructor X3.
trans(const trans &) noexcept=default
Move semantics.
trans(const regular_formula &operand)
\brief Constructor Z14.
\brief An untyped regular formula or action formula
untyped_regular_formula()
\brief Default constructor X3.
untyped_regular_formula & operator=(untyped_regular_formula &&) noexcept=default
untyped_regular_formula & operator=(const untyped_regular_formula &) noexcept=default
untyped_regular_formula(const std::string &name, const regular_formula &left, const regular_formula &right)
\brief Constructor Z2.
untyped_regular_formula(const core::identifier_string &name, const regular_formula &left, const regular_formula &right)
\brief Constructor Z14.
const core::identifier_string & name() const
untyped_regular_formula(const untyped_regular_formula &) noexcept=default
Move semantics.
untyped_regular_formula(untyped_regular_formula &&) noexcept=default
Standard exception class for reporting runtime errors.
Definition exception.h:27
\brief The and operator for state formulas
and_(and_ &&) noexcept=default
const state_formula & right() const
and_(const atermpp::aterm &term)
and_(const and_ &) noexcept=default
Move semantics.
and_(const state_formula &left, const state_formula &right)
\brief Constructor Z14.
and_ & operator=(const and_ &) noexcept=default
and_()
\brief Default constructor X3.
and_ & operator=(and_ &&) noexcept=default
const state_formula & left() const
\brief The multiply operator for state formulas with values
const_multiply_alt & operator=(const const_multiply_alt &) noexcept=default
const state_formula & left() const
const_multiply_alt(const state_formula &left, const data::data_expression &right)
\brief Constructor Z14.
const_multiply_alt(const const_multiply_alt &) noexcept=default
Move semantics.
const_multiply_alt(const_multiply_alt &&) noexcept=default
const data::data_expression & right() const
const_multiply_alt(const atermpp::aterm &term)
const_multiply_alt & operator=(const_multiply_alt &&) noexcept=default
const_multiply_alt()
\brief Default constructor X3.
\brief The multiply operator for state formulas with values
const data::data_expression & left() const
const_multiply(const const_multiply &) noexcept=default
Move semantics.
const_multiply(const data::data_expression &left, const state_formula &right)
\brief Constructor Z14.
const_multiply()
\brief Default constructor X3.
const_multiply(const_multiply &&) noexcept=default
const_multiply & operator=(const const_multiply &) noexcept=default
const_multiply & operator=(const_multiply &&) noexcept=default
const_multiply(const atermpp::aterm &term)
const state_formula & right() const
\brief The timed delay operator for state formulas
delay_timed(const atermpp::aterm &term)
delay_timed()
\brief Default constructor X3.
delay_timed & operator=(const delay_timed &) noexcept=default
const data::data_expression & time_stamp() const
delay_timed(const data::data_expression &time_stamp)
\brief Constructor Z14.
delay_timed(const delay_timed &) noexcept=default
Move semantics.
delay_timed(delay_timed &&) noexcept=default
delay_timed & operator=(delay_timed &&) noexcept=default
\brief The delay operator for state formulas
delay & operator=(delay &&) noexcept=default
delay()
\brief Default constructor X3.
delay(const delay &) noexcept=default
Move semantics.
delay(delay &&) noexcept=default
delay(const atermpp::aterm &term)
delay & operator=(const delay &) noexcept=default
\brief The existential quantification operator for state formulas
exists(const data::variable_list &variables, const state_formula &body)
\brief Constructor Z14.
const state_formula & body() const
exists(const exists &) noexcept=default
Move semantics.
exists(exists &&) noexcept=default
exists & operator=(const exists &) noexcept=default
exists & operator=(exists &&) noexcept=default
exists()
\brief Default constructor X3.
exists(const atermpp::aterm &term)
const data::variable_list & variables() const
\brief The value false for state formulas
false_(false_ &&) noexcept=default
false_ & operator=(const false_ &) noexcept=default
false_ & operator=(false_ &&) noexcept=default
false_(const atermpp::aterm &term)
false_(const false_ &) noexcept=default
Move semantics.
false_()
\brief Default constructor X3.
\brief The universal quantification operator for state formulas
const state_formula & body() const
forall(const atermpp::aterm &term)
const data::variable_list & variables() const
forall & operator=(const forall &) noexcept=default
forall & operator=(forall &&) noexcept=default
forall(const forall &) noexcept=default
Move semantics.
forall(const data::variable_list &variables, const state_formula &body)
\brief Constructor Z14.
forall(forall &&) noexcept=default
forall()
\brief Default constructor X3.
\brief The implication operator for state formulas
imp()
\brief Default constructor X3.
imp(imp &&) noexcept=default
imp(const state_formula &left, const state_formula &right)
\brief Constructor Z14.
imp & operator=(const imp &) noexcept=default
const state_formula & left() const
const state_formula & right() const
imp(const atermpp::aterm &term)
imp(const imp &) noexcept=default
Move semantics.
imp & operator=(imp &&) noexcept=default
\brief The infimum over a data type for state formulas
infimum(const infimum &) noexcept=default
Move semantics.
infimum()
\brief Default constructor X3.
infimum(const data::variable_list &variables, const state_formula &body)
\brief Constructor Z14.
infimum & operator=(infimum &&) noexcept=default
const data::variable_list & variables() const
const state_formula & body() const
infimum(const atermpp::aterm &term)
infimum(infimum &&) noexcept=default
infimum & operator=(const infimum &) noexcept=default
\brief The may operator for state formulas
const state_formula & operand() const
may()
\brief Default constructor X3.
const regular_formulas::regular_formula & formula() const
may & operator=(const may &) noexcept=default
may & operator=(may &&) noexcept=default
may(const regular_formulas::regular_formula &formula, const state_formula &operand)
\brief Constructor Z14.
may(may &&) noexcept=default
may(const atermpp::aterm &term)
may(const may &) noexcept=default
Move semantics.
\brief The minus operator for state formulas
minus & operator=(minus &&) noexcept=default
minus(minus &&) noexcept=default
minus(const minus &) noexcept=default
Move semantics.
minus(const atermpp::aterm &term)
minus(const state_formula &operand)
\brief Constructor Z14.
const state_formula & operand() const
minus & operator=(const minus &) noexcept=default
minus()
\brief Default constructor X3.
\brief The mu operator for state formulas
const core::identifier_string & name() const
const data::assignment_list & assignments() const
mu(const mu &) noexcept=default
Move semantics.
mu(const std::string &name, const data::assignment_list &assignments, const state_formula &operand)
\brief Constructor Z2.
mu(const core::identifier_string &name, const data::assignment_list &assignments, const state_formula &operand)
\brief Constructor Z14.
mu & operator=(const mu &) noexcept=default
mu(mu &&) noexcept=default
mu & operator=(mu &&) noexcept=default
mu(const atermpp::aterm &term)
mu()
\brief Default constructor X3.
const state_formula & operand() const
\brief The must operator for state formulas
must(must &&) noexcept=default
must & operator=(must &&) noexcept=default
must(const atermpp::aterm &term)
must(const regular_formulas::regular_formula &formula, const state_formula &operand)
\brief Constructor Z14.
const regular_formulas::regular_formula & formula() const
must(const must &) noexcept=default
Move semantics.
const state_formula & operand() const
must()
\brief Default constructor X3.
must & operator=(const must &) noexcept=default
\brief The not operator for state formulas
not_(not_ &&) noexcept=default
not_(const not_ &) noexcept=default
Move semantics.
not_ & operator=(const not_ &) noexcept=default
not_ & operator=(not_ &&) noexcept=default
not_()
\brief Default constructor X3.
not_(const atermpp::aterm &term)
const state_formula & operand() const
not_(const state_formula &operand)
\brief Constructor Z14.
\brief The nu operator for state formulas
nu(const atermpp::aterm &term)
nu(nu &&) noexcept=default
nu(const core::identifier_string &name, const data::assignment_list &assignments, const state_formula &operand)
\brief Constructor Z14.
nu()
\brief Default constructor X3.
nu & operator=(const nu &) noexcept=default
nu & operator=(nu &&) noexcept=default
const core::identifier_string & name() const
nu(const std::string &name, const data::assignment_list &assignments, const state_formula &operand)
\brief Constructor Z2.
const state_formula & operand() const
nu(const nu &) noexcept=default
Move semantics.
const data::assignment_list & assignments() const
\brief The or operator for state formulas
or_(or_ &&) noexcept=default
or_()
\brief Default constructor X3.
or_(const or_ &) noexcept=default
Move semantics.
or_(const state_formula &left, const state_formula &right)
\brief Constructor Z14.
or_ & operator=(const or_ &) noexcept=default
const state_formula & right() const
or_ & operator=(or_ &&) noexcept=default
or_(const atermpp::aterm &term)
const state_formula & left() const
\brief The plus operator for state formulas with values
plus & operator=(plus &&) noexcept=default
plus & operator=(const plus &) noexcept=default
plus(const plus &) noexcept=default
Move semantics.
const state_formula & left() const
plus(const atermpp::aterm &term)
plus()
\brief Default constructor X3.
const state_formula & right() const
plus(plus &&) noexcept=default
plus(const state_formula &left, const state_formula &right)
\brief Constructor Z14.
state_formula(const state_formula &) noexcept=default
Move semantics.
state_formula()
\brief Default constructor X3.
state_formula(state_formula &&) noexcept=default
bool has_time() const
Returns true if the formula is timed.
state_formula(const data::untyped_data_parameter &x)
\brief Constructor Z6.
state_formula & operator=(state_formula &&) noexcept=default
state_formula(const data::data_expression &x)
\brief Constructor Z6.
state_formula(const atermpp::aterm &term)
state_formula & operator=(const state_formula &) noexcept=default
\brief The sum over a data type for state formulas
sum(const sum &) noexcept=default
Move semantics.
sum(sum &&) noexcept=default
sum(const atermpp::aterm &term)
sum(const data::variable_list &variables, const state_formula &body)
\brief Constructor Z14.
sum & operator=(sum &&) noexcept=default
sum()
\brief Default constructor X3.
const data::variable_list & variables() const
const state_formula & body() const
sum & operator=(const sum &) noexcept=default
\brief The supremum over a data type for state formulas
supremum & operator=(supremum &&) noexcept=default
supremum(supremum &&) noexcept=default
supremum(const atermpp::aterm &term)
supremum()
\brief Default constructor X3.
supremum(const supremum &) noexcept=default
Move semantics.
supremum & operator=(const supremum &) noexcept=default
const state_formula & body() const
const data::variable_list & variables() const
supremum(const data::variable_list &variables, const state_formula &body)
\brief Constructor Z14.
\brief The value true for state formulas
true_()
\brief Default constructor X3.
true_ & operator=(const true_ &) noexcept=default
true_(true_ &&) noexcept=default
true_(const true_ &) noexcept=default
Move semantics.
true_(const atermpp::aterm &term)
true_ & operator=(true_ &&) noexcept=default
\brief The state formula variable
variable & operator=(const variable &) noexcept=default
variable(const core::identifier_string &name, const data::data_expression_list &arguments)
\brief Constructor Z14.
variable(const variable &) noexcept=default
Move semantics.
variable(const std::string &name, const data::data_expression_list &arguments)
\brief Constructor Z2.
variable()
\brief Default constructor X3.
variable & operator=(variable &&) noexcept=default
const core::identifier_string & name() const
const data::data_expression_list & arguments() const
variable(variable &&) noexcept=default
variable(const atermpp::aterm &term)
\brief The timed yaled operator for state formulas
yaled_timed(yaled_timed &&) noexcept=default
yaled_timed & operator=(const yaled_timed &) noexcept=default
yaled_timed()
\brief Default constructor X3.
yaled_timed & operator=(yaled_timed &&) noexcept=default
yaled_timed(const yaled_timed &) noexcept=default
Move semantics.
yaled_timed(const data::data_expression &time_stamp)
\brief Constructor Z14.
yaled_timed(const atermpp::aterm &term)
const data::data_expression & time_stamp() const
\brief The yaled operator for state formulas
yaled()
\brief Default constructor X3.
yaled(const atermpp::aterm &term)
yaled & operator=(const yaled &) noexcept=default
yaled(const yaled &) noexcept=default
Move semantics.
yaled(yaled &&) noexcept=default
yaled & operator=(yaled &&) noexcept=default
void div_mod(const big_natural_number &other, big_natural_number &result, big_natural_number &remainder, big_natural_number &calculation_buffer_divisor) const
bool is_number(std::size_t n) const
Returns whether this number equals a number of std::size_t.
big_natural_number(const std::size_t n)
big_natural_number operator*(const big_natural_number &other) const
operator std::size_t() const
Transforms this number to a std::size_t, provided it is sufficiently small. If not an mcrl2::runtime_...
bool operator>=(const big_natural_number &other) const
std::size_t operator[](const std::size_t n) const
Give the n-th digit where the most significant digit is positioned last.
void add(const big_natural_number &other)
std::vector< std::size_t > m_number
big_natural_number operator+(const big_natural_number &other) const
bool operator==(const big_natural_number &other) const
std::size_t divide_by(std::size_t n)
big_natural_number operator%(const big_natural_number &other) const
std::size_t size() const
Give the number of digits in this big number.
big_natural_number operator-(const big_natural_number &other) const
friend void swap(big_natural_number &x, big_natural_number &y)
Standard overload of swap.
bool operator<=(const big_natural_number &other) const
big_natural_number operator/(const big_natural_number &other) const
void clear()
Sets the number to zero.
bool operator!=(const big_natural_number &other) const
bool is_zero() const
Returns whether this number equals zero.
void multiply(const big_natural_number &other, big_natural_number &result, big_natural_number &calculation_buffer_for_multiplicand) const
void push_back(const std::size_t n)
bool operator<(const big_natural_number &other) const
void subtract(const big_natural_number &other)
bool operator>(const big_natural_number &other) const
void multiply_by(std::size_t n, std::size_t carry)
This class contains labels for probabilistic transistions, consisting of a numerator and a denominato...
probabilistic_arbitrary_precision_fraction operator*(const probabilistic_arbitrary_precision_fraction &other) const
static void greatest_common_divisor_destructive(utilities::big_natural_number &x, utilities::big_natural_number &y, utilities::big_natural_number &buffer_divide, utilities::big_natural_number &buffer_remainder, utilities::big_natural_number &buffer)
bool operator>=(const probabilistic_arbitrary_precision_fraction &other) const
static void remove_common_factors(utilities::big_natural_number &enumerator, utilities::big_natural_number &denominator)
bool operator!=(const probabilistic_arbitrary_precision_fraction &other) const
probabilistic_arbitrary_precision_fraction operator+(const probabilistic_arbitrary_precision_fraction &other) const
bool operator<(const probabilistic_arbitrary_precision_fraction &other) const
bool operator>(const probabilistic_arbitrary_precision_fraction &other) const
static probabilistic_arbitrary_precision_fraction & one()
Constant one.
static utilities::big_natural_number greatest_common_divisor(utilities::big_natural_number x, utilities::big_natural_number y)
probabilistic_arbitrary_precision_fraction operator-(const probabilistic_arbitrary_precision_fraction &other) const
static probabilistic_arbitrary_precision_fraction & zero()
Constant zero.
probabilistic_arbitrary_precision_fraction operator/(const probabilistic_arbitrary_precision_fraction &other) const
bool operator<=(const probabilistic_arbitrary_precision_fraction &other) const
probabilistic_arbitrary_precision_fraction(const utilities::big_natural_number &enumerator, const utilities::big_natural_number &denominator)
bool operator==(const probabilistic_arbitrary_precision_fraction &other) const
bool bisimulation_compare_gjkw(const LTS_TYPE &l1, const LTS_TYPE &l2, bool branching=false, bool preserve_divergence=false)
Checks whether the two initial states of two LTSs are strong or branching bisimilar.
void bisimulation_reduce_gjkw(LTS_TYPE &l, bool branching=false, bool preserve_divergence=false)
Reduce transition system l with respect to strong or (divergence preserving) branching bisimulation.
bool destructive_bisimulation_compare_gjkw(LTS_TYPE &l1, LTS_TYPE &l2, bool branching=false, bool preserve_divergence=false, bool generate_counter_examples=false)
Checks whether the two initial states of two LTSs are strong or branching bisimilar.
bool destructive_bisimulation_compare_gjkw(LTS_TYPE &l1, LTS_TYPE &l2, bool branching, bool preserve_divergence, bool generate_counter_examples, const std::string &, bool)
std::string debug_id() const
print a B_to_C slice identification for debugging
std::string debug_id() const
print a constellation identification for debugging
std::string debug_id() const
print a block identification for debugging
bisim_partitioner_gjkw(LTS_TYPE &l, bool branching=false, bool preserve_divergence=false)
check_complexity::trans_counter_t work_counter
succ_iter_t change_to_C(pred_iter_t pred_iter, ONLY_IF_DEBUG(constln_t *SpC, constln_t *NewC,) bool first_transition_of_state, bool first_transition_of_block)
transition target is moved to a new constellation
block_t * refinable_next
next block in the list of refinable blocks
static permutation_const_iter_t permutation_begin()
provide an iterator to the beginning of the permutation array
permutation_const_iter_t end() const
iterator past the last state in the block
void split_inert_to_C(block_t *B)
handle the transitions from the splitter to its own constellation
void set_inert_begin(B_to_C_iter_t new_inert_begin)
void replace_transition_system(bool branching, bool preserve_divergence)
void assert_stability(const part_state_t &part_st) const
assert that the data structure is consistent and stable
bisim_gjkw::bisim_partitioner_gjkw_initialise_helper< LTS_TYPE > init_helper
const constln_t * to_constln() const
compute the goal constellation of the transitions in this slice
static state_type nr_of_blocks
total number of blocks with unique sequence number allocated
state_type unmarked_bottom_size() const
provides the number of unmarked bottom states in the block
void replace_transition_system(const part_state_t &part_st, ONLY_IF_DEBUG(bool branching,) bool preserve_divergence)
Replaces the transition relation of the current LTS by the transitions of the bisimulation-reduced tr...
bool split_s_inert_out(state_info_ptr s ONLY_IF_DEBUG(, constln_t *OldC))
Split outgoing transitions of a state in the splitter.
void set_marked_bottom_begin(permutation_iter_t new_marked_bottom_begin)
void SetFromRed(B_to_C_desc_iter_t new_fromred)
set FromRed to an existing element in to_constln
void make_nontrivial()
makes a constellation non-trivial (i. e. inserts it into the respective list)
permutation_const_iter_t nonbottom_begin() const
iterator to the first non-bottom state in the block
pred_const_iter_t inert_pred_end() const
iterator one past the last inert incoming transition
const block_t * from_block() const
compute the source block of the transitions in this slice
bisim_gjkw::block_t * refine(bisim_gjkw::block_t *RfnB, const bisim_gjkw::constln_t *SpC, const bisim_gjkw::B_to_C_descriptor *FromRed, bool postprocessing, const bisim_gjkw::constln_t *NewC=nullptr)
refine a block into the part that can reach SpC and the part that cannot
block_t * split_off_small_block()
split off a single block from the constellation
bisim_gjkw::block_t * postprocess_new_bottom(bisim_gjkw::block_t *RedB)
Split a block with new bottom states as needed.
B_to_C_iter_t postprocess_begin
iterator to the first transition into this constellation that needs postprocessing
bool add_work_to_bottom_transns(enum check_complexity::counter_type ctr, unsigned max_value)
bool operator>(const constln_t &other) const
const constln_t * constln() const
get constellation where the state belongs
permutation_const_iter_t begin() const
iterator to the first state in the block
void make_trivial()
makes a constellation trivial (i. e. removes it from the respective list)
void swap_B_to_C(succ_iter_t const pos1, succ_iter_t const pos2)
succ_iter_t state_inert_out_end
iterator past the last inert outgoing transition
B_to_C_descriptor(B_to_C_iter_t begin_, B_to_C_iter_t end_)
bool surely_has_no_transition_to(const constln_t *SpC) const
bool needs_postprocessing() const
returns true iff the slice is marked for postprocessing
void set_begin(permutation_iter_t new_begin)
permutation_const_iter_t marked_nonbottom_begin() const
iterator to the first marked non-bottom state in the block
permutation_iter_t pos
position of the state in the permutation array
state_type get_eq_class(state_type s) const
static constln_t * nontrivial_first
first constellation in the list of non-trivial constellations
bool operator>=(const constln_t &other) const
permutation_const_iter_t end() const
constant iterator past the last state in the constellation
permutation_const_iter_t unmarked_bottom_begin() const
iterator to the first unmarked bottom state in the block
void set_inert_begin_and_end(B_to_C_iter_t new_inert_begin, B_to_C_iter_t new_inert_end)
B_to_C_const_iter_t inert_begin() const
iterator to the first inert transition of the block
void make_nonrefinable()
makes a block non-refinable (i. e. removes it from the respective list)
permutation_const_iter_t marked_bottom_begin() const
iterator to the first marked bottom state in the block
pred_const_iter_t noninert_pred_begin() const
iterator to first non-inert incoming transition
bool mark_nonbottom(state_info_ptr s)
mark a non-bottom state
permutation_const_iter_t bottom_begin() const
iterator to the first bottom state in the block
std::string debug_id_short() const
print a short state identification for debugging
permutation_iter_t int_marked_bottom_begin
iterator to the first marked bottom state of the block
void swap_out(pred_iter_t const pos1, pred_iter_t const pos2)
state_type size() const
provides the number of states in the block
void init_transitions(part_state_t &part_st, part_trans_t &part_tr, bool branching, bool preserve_divergence)
initialise the state in part_st and the transitions in part_tr
permutation_iter_t int_begin
iterator to the first state in the constellation
succ_iter_t int_current_constln
iterator to first outgoing transition to the constellation of interest
block_t * split_off_blue(permutation_iter_t blue_nonbottom_end)
refine the block (the blue subblock is smaller)
permutation_iter_t int_bottom_begin
iterator to the first bottom state of the block
permutation_const_iter_t marked_bottom_end() const
iterator past the last marked bottom state in the block
void set_slice_begin_or_before_end(succ_iter_t new_value)
state_type notblue
number of inert transitions to non-blue states
permutation_const_iter_t marked_nonbottom_end() const
iterator one past the last marked non-bottom state in the block
check_complexity::state_counter_t work_counter
const state_type sort_key
sort key to order constellation-related information
state_type marked_bottom_size() const
provides the number of marked bottom states in the block
bool is_trivial() const
returns true iff the constellation is trivial
permutation_iter_t int_marked_nonbottom_begin
iterator to the first marked non-bottom state of the block
void make_noninert(succ_iter_t const succ_iter)
permutation_iter_t int_end
iterator past the last state of the block
B_to_C_desc_list to_constln
list of B_to_C with transitions from this block
state_type get_nr_of_states() const
provides the number of states in the Kripke structure
static block_t * get_some_refinable()
provides an arbitrary refinable block
static succ_iter_t slice_end(succ_iter_t this_)
block_t * block
block where the state belongs
void create_initial_partition_gjkw(bool branching, bool preserve_divergence)
const constln_t * get_nontrivial_next() const
provides the next non-trivial constellation
void set_constln(constln_t *new_constln)
void set_marked_nonbottom_begin(permutation_iter_t new_marked_nonbottom_begin)
#define BLOCK_NO_SEQNR
static permutation_const_iter_t perm_begin
bool operator<(const constln_t &other) const
compares two constellations for ordering them
bool make_refinable()
makes a block refinable (i. e. inserts it into the respective list)
fixed_vector< state_info_entry > state_info
array with all other information about states
state_type state_size() const
provide size of state space
state_type size() const
returns number of states in the constellation
B_to_C_const_iter_t inert_end() const
iterator past the last inert transition of the block
const constln_t * constln() const
constellation where the block belongs to
constln_t * int_constln
constellation to which the block belongs
permutation_const_iter_t bottom_end() const
iterator past the last bottom state in the block
static block_t * refinable_first
first block in the list of refinable blocks
static void slice_add_work_to_transns(succ_const_iter_t this_, enum check_complexity::counter_type ctr, unsigned max_value)
void swap_in(B_to_C_iter_t const pos1, B_to_C_iter_t const pos2)
state_type int_seqnr
unique sequence number of this block
succ_const_iter_t succ_begin() const
iterator to first outgoing transition
bool operator<=(const constln_t &other) const
void new_red_block_created(block_t *OldB, block_t *NewB, bool postprocessing)
handle B_to_C slices after a new red block has been created
void set_end(permutation_iter_t new_end)
void print_trans() const
print all transitions
bool is_refinable() const
checks whether the block is refinable
block_t * split_off_red(permutation_iter_t red_nonbottom_begin)
refine the block (the red subblock is smaller)
succ_iter_t int_slice_begin_or_before_end
points to the last or the first transition to the same constellation
succ_const_iter_t inert_succ_begin() const
iterator to first inert outgoing transition
permutation_const_iter_t begin() const
constant iterator to the first state in the constellation
pred_iter_t state_in_begin
iterator to first incoming transition
permutation_iter_t int_begin
iterator to the first state of the block
pred_iter_t state_inert_in_begin
iterator to first inert incoming transition
void assign_seqnr()
assigns a unique sequence number
std::unordered_map< Key, state_type, KeyHasher > extra_kripke_states
void new_blue_block_created(block_t *OldB, block_t *NewB)
handle B_to_C slices after a new blue block has been created
permutation_iter_t begin()
iterator to the first state in the constellation
static state_info_const_ptr s_i_begin
pointer at the first entry in the state_info array
check_complexity::B_to_C_counter_t work_counter
static constln_t * get_some_nontrivial()
provides an arbitrary non-trivial constellation
permutation_const_iter_t unmarked_bottom_end() const
iterator past the last unmarked bottom state in the block
bool operator<(const block_t &other) const
compares two blocks for ordering them
void set_bottom_begin(permutation_iter_t new_bottom_begin)
void set_nonbottom_end(permutation_iter_t new_nonbottom_end)
std::string debug_id() const
print a state identification for debugging
void set_inert_pred_begin(pred_iter_t new_inert_in_begin)
void clear()
deallocates constellations and blocks
constln_t(state_type sort_key_, permutation_iter_t begin_, permutation_iter_t end_, B_to_C_iter_t postprocess_none)
constructor
void set_inert_succ_begin_and_end(succ_iter_t new_inert_out_begin, succ_iter_t new_inert_out_end)
void swap3_B_to_C(succ_iter_t const pos1, succ_iter_t const pos2, succ_iter_t const pos3)
block_t(constln_t *const constln_, permutation_iter_t const begin_, permutation_iter_t const end_)
constructor
const block_t * block(state_type s) const
find block of a state
succ_const_iter_t inert_succ_end() const
iterator past the last inert outgoing transition
permutation_iter_t end()
iterator past the last state in the constellation
succ_const_iter_t slice_begin_or_before_end() const
check_complexity::block_counter_t work_counter
bisim_partitioner_gjkw_initialise_helper(LTS_TYPE &l, bool branching, bool preserve_divergence)
constructor of the helper class
succ_iter_t state_out_begin
iterator to first outgoing transition
pred_const_iter_t inert_pred_begin() const
iterator to first inert incoming transition
std::string debug_id() const
print a transition identification for debugging
B_to_C_iter_t int_inert_begin
iterator to the first inert transition of the block
void set_unmarked_bottom_end(permutation_iter_t new_unmarked_bottom_end)
pred_const_iter_t noninert_pred_end() const
iterator past the last non-inert incoming transition
void set_inert_end(B_to_C_iter_t new_inert_end)
pred_const_iter_t pred_end() const
iterator past the last incoming transition
constln_t * nontrivial_next
next constellation in the list of non-trivial constellations
bool in_same_class(state_type s, state_type t) const
B_to_C_iter_t int_inert_end
iterator past the last inert transition of the block
static state_info_const_ptr s_i_end
pointer past the last actual entry in the state_info array
permutation_const_iter_t unmarked_nonbottom_begin() const
iterator to the first unmarked non-bottom state in the block
void set_end(permutation_iter_t new_end)
set the iterator past the last state in the constellation
permutation_const_iter_t nonbottom_end() const
iterator past the last non-bottom state in the block
succ_const_iter_t succ_end() const
iterator past the last outgoing transition
void set_unmarked_nonbottom_end(permutation_iter_t new_unmarked_nonbottom_end)
B_to_C_descriptor * FromRed(const constln_t *SpC)
read FromRed
std::string debug_id_short() const
print a short transition identification for debugging
permutation_const_iter_t unmarked_nonbottom_end() const
iterator past the last unmarked non-bottom state in the block
void print_block(const char *message, const block_t *B, permutation_const_iter_t begin, permutation_const_iter_t end) const
print a slice of the partition (typically a block)
state_type marked_size() const
provides the number of marked states in the block
B_to_C_iter_t postprocess_end
iterator past the last transition into this constellation that needs postprocessing
trans_type get_nr_of_transitions() const
provides the number of transitions in the Kripke structure
void print_part(const part_trans_t &part_tr) const
print the partition as a tree (per constellation and block)
permutation_iter_t int_end
iterator past the last state in the constellation
void set_current_constln(succ_iter_t const new_current_constln)
void set_inert_succ_begin(succ_iter_t const new_inert_out_begin)
bool mark(state_info_ptr s)
mark a state
succ_iter_t state_inert_out_begin
iterator to first inert outgoing transition
pred_const_iter_t pred_begin() const
iterator to first incoming transition
bool surely_has_transition_to(const constln_t *SpC) const
void set_begin(permutation_iter_t new_begin)
set the iterator to the first state in the constellation
#define ONLY_IF_DEBUG(...)
include something in Debug mode
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
Definition logger.h:391
#define BRANCH_BIS_EXPERIMENT_JFG
global_function_symbol g_tree_node("@node@", 2)
global_function_symbol g_empty("@empty@", 0)
global_function_symbol g_single_tree_node("@single_node@", 1)
The main namespace for the aterm++ library.
Definition algorithm.h:21
term_balanced_tree< aterm > aterm_balanced_tree
A term_balanced_tree with elements of type aterm.
void make_term_balanced_tree(term_balanced_tree< Term > &result, ForwardTraversalIterator p, const std::size_t size, Transformer transformer)
bool is_aterm_balanced_tree(const aterm &t)
void make_exists(atermpp::aterm &t, const ARGUMENTS &... args)
std::vector< action_formula > action_formula_vector
\brief vector of action_formulas
bool is_at(const atermpp::aterm &x)
void swap(multi_action &t1, multi_action &t2)
\brief swap overload
atermpp::term_list< action_formula > action_formula_list
\brief list of action_formulas
void swap(true_ &t1, true_ &t2)
\brief swap overload
std::string pp(const action_formulas::action_formula &x)
void swap(false_ &t1, false_ &t2)
\brief swap overload
void make_not_(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const action_formulas::exists &x)
void swap(action_formula &t1, action_formula &t2)
\brief swap overload
std::string pp(const action_formulas::and_ &x)
std::set< data::variable > find_all_variables(const action_formulas::action_formula &x)
std::string pp(const action_formulas::at &x)
void swap(not_ &t1, not_ &t2)
\brief swap overload
bool is_or(const atermpp::aterm &x)
void swap(exists &t1, exists &t2)
\brief swap overload
bool is_true(const atermpp::aterm &x)
bool is_forall(const atermpp::aterm &x)
std::string pp(const action_formulas::imp &x)
void make_and_(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_false(const atermpp::aterm &x)
bool is_not(const atermpp::aterm &x)
std::string pp(const action_formulas::multi_action &x)
std::string pp(const action_formulas::or_ &x)
void make_imp(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const action_formulas::forall &x)
bool is_imp(const atermpp::aterm &x)
bool is_and(const atermpp::aterm &x)
void make_forall(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(at &t1, at &t2)
\brief swap overload
void swap(imp &t1, imp &t2)
\brief swap overload
void make_or_(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(forall &t1, forall &t2)
\brief swap overload
std::string pp(const action_formulas::not_ &x)
std::string pp(const action_formulas::false_ &x)
void make_multi_action(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(or_ &t1, or_ &t2)
\brief swap overload
bool is_multi_action(const atermpp::aterm &x)
void swap(and_ &t1, and_ &t2)
\brief swap overload
std::string pp(const action_formulas::true_ &x)
void make_at(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_exists(const atermpp::aterm &x)
bool is_action_formula(const atermpp::aterm &x)
const atermpp::function_symbol & function_symbol_StateImp()
const atermpp::function_symbol & function_symbol_StateMinus()
const atermpp::function_symbol & function_symbol_ActForall()
const atermpp::function_symbol & function_symbol_StateForall()
const atermpp::function_symbol & function_symbol_StateYaledTimed()
const atermpp::function_symbol & function_symbol_RegSeq()
const atermpp::function_symbol & function_symbol_StateNu()
const atermpp::function_symbol & function_symbol_StateConstantMultiplyAlt()
const atermpp::function_symbol & function_symbol_StateExists()
const atermpp::function_symbol & function_symbol_StateVar()
const atermpp::function_symbol & function_symbol_ActMultAct()
const atermpp::function_symbol & function_symbol_StateNot()
const atermpp::function_symbol & function_symbol_ActImp()
const atermpp::function_symbol & function_symbol_StateSum()
const atermpp::function_symbol & function_symbol_ActAt()
const atermpp::function_symbol & function_symbol_StateMu()
const atermpp::function_symbol & function_symbol_RegTransOrNil()
const atermpp::function_symbol & function_symbol_StateMay()
const atermpp::function_symbol & function_symbol_StatePlus()
const atermpp::function_symbol & function_symbol_RegTrans()
const atermpp::function_symbol & function_symbol_RegAlt()
const atermpp::function_symbol & function_symbol_ActAnd()
const atermpp::function_symbol & function_symbol_StateDelayTimed()
const atermpp::function_symbol & function_symbol_StateConstantMultiply()
const atermpp::function_symbol & function_symbol_StateOr()
const atermpp::function_symbol & function_symbol_ActOr()
const atermpp::function_symbol & function_symbol_StateAnd()
const atermpp::function_symbol & function_symbol_StateInfimum()
const atermpp::function_symbol & function_symbol_ActNot()
const atermpp::function_symbol & function_symbol_ActExists()
const atermpp::function_symbol & function_symbol_UntypedRegFrm()
const atermpp::function_symbol & function_symbol_StateSupremum()
const atermpp::function_symbol & function_symbol_StateMust()
atermpp::aterm_string identifier_string
String type of the LPS library. Identifier strings are represented internally as ATerms.
static data_specification const & default_specification()
Definition parse.h:31
Namespace for system defined sort bool_.
Definition bool.h:32
const function_symbol & false_()
Constructor for function symbol false.
Definition bool.h:109
const function_symbol & true_()
Constructor for function symbol true.
Definition bool.h:77
Namespace for system defined sort int_.
application cint(const data_expression &arg0)
Application of function symbol @cInt.
Definition int1.h:104
const basic_sort & int_()
Constructor for sort expression Int.
Definition int1.h:47
Namespace for system defined sort nat.
const basic_sort & nat()
Constructor for sort expression Nat.
Definition nat1.h:46
application cnat(const data_expression &arg0)
Application of function symbol @cNat.
Definition nat1.h:164
data_expression nat(const std::string &n)
Constructs expression of type Nat from a string.
Namespace for system defined sort pos.
const function_symbol & c1()
Constructor for function symbol @c1.
Definition pos1.h:78
data_expression pos(const std::string &n)
Constructs expression of type Pos from a string.
const basic_sort & pos()
Constructor for sort expression Pos.
Definition pos1.h:45
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.
Definition real1.h:132
data_expression & real_zero()
const basic_sort & real_()
Constructor for sort expression Real.
Definition real1.h:48
application plus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
Definition real1.h:1115
application minus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol -.
Definition real1.h:1200
Namespace for all data library functionality.
Definition data.cpp:22
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 <.
Definition standard.h:258
atermpp::term_list< data_expression > data_expression_list
\brief list of data_expressions
bool is_untyped_data_parameter(const atermpp::aterm &x)
atermpp::term_list< variable > variable_list
\brief list of variables
atermpp::term_list< assignment > assignment_list
\brief list of assignments
Definition assignment.h:146
application equal_to(const data_expression &arg0, const data_expression &arg1)
Application of function symbol ==.
Definition standard.h:144
@ warning
Definition logger.h:34
@ verbose
Definition logger.h:37
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())
Definition lps.cpp:132
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)
Definition lps.cpp:150
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())
Definition lps.cpp:124
std::size_t greatest_common_divisor(std::size_t x, std::size_t y)
The main namespace for the LPS library.
Definition constelm.h:21
void complete_data_specification(stochastic_specification &spec)
Adds all sorts that appear in the process of l to the data specification of l.
void parse_lps(std::istream &, Specification &)
Definition parse.h:159
void complete_data_specification(specification &spec)
Adds all sorts that appear in the process of l to the data specification of l.
atermpp::term_balanced_tree< data::data_expression > state
Definition state.h:24
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.
Definition parse.h:56
action_rename_specification parse_action_rename_specification(std::istream &in, const lps::stochastic_specification &spec)
Parses a process specification from an input stream.
Definition parse.h:94
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.
Definition parse.h:42
void parse_lps< specification >(std::istream &from, specification &result)
Definition parse.h:166
void make_state(state &result, ForwardTraversalIterator p, const std::size_t size)
Definition state.h:37
void parse_lps< stochastic_specification >(std::istream &from, stochastic_specification &result)
Parses a stochastic linear process specification from an input stream.
Definition parse.h:183
std::string pp(const lps::state &x)
Definition state.h:49
specification parse_linear_process_specification(std::istream &spec_stream)
Parses a linear process specification from an input stream.
Definition parse.h:128
void make_state(state &result, ForwardTraversalIterator p, const std::size_t size, Transformer transformer)
Definition state.h:27
const state_info_entry * state_info_const_ptr
fixed_vector< pred_entry >::iterator pred_iter_t
fixed_vector< succ_entry >::const_iterator succ_const_iter_t
permutation_t::iterator permutation_iter_t
fixed_vector< pred_entry >::const_iterator pred_const_iter_t
fixed_vector< state_info_ptr > permutation_t
permutation_t::const_iterator permutation_const_iter_t
std::list< B_to_C_descriptor > B_to_C_desc_list
B_to_C_desc_list::const_iterator B_to_C_desc_const_iter_t
B_to_C_desc_list::iterator B_to_C_desc_iter_t
fixed_vector< B_to_C_entry >::iterator B_to_C_iter_t
fixed_vector< succ_entry >::iterator succ_iter_t
fixed_vector< B_to_C_entry >::const_iterator B_to_C_const_iter_t
static void swap_permutation(permutation_iter_t s1, permutation_iter_t s2)
swap two permutations
A base class for the lts_dot labelled transition system.
bool bisimulation_compare(const LTS_TYPE &l1, const LTS_TYPE &l2, const bool branching=false, const bool preserve_divergences=false, const bool generate_counter_examples=false, const std::string &counter_example_file="", const bool structured_output=false)
Checks whether the two initial states of two lts's are strong or branching bisimilar.
void merge(LTS_TYPE &l1, const LTS_TYPE &l2)
std::string supported_lts_formats_text(lts_type default_format, const std::set< lts_type > &supported)
Gives a textual list describing supported LTS formats.
Definition liblts.cpp:153
static std::string mime_type_strings[]
Definition liblts.cpp:85
std::string supported_lts_formats_text(const std::set< lts_type > &supported)
Gives a textual list describing supported LTS formats.
Definition liblts.cpp:185
bool destructive_bisimulation_compare_minimal_depth(LTS_TYPE &l1, LTS_TYPE &l2, const std::string &counter_example_file)
std::size_t state_type
type used to store state (numbers and) counts
void bisimulation_reduce(LTS_TYPE &l, const bool branching=false, const bool preserve_divergences=false)
Reduce transition system l with respect to strong or (divergence preserving) branching bisimulation.
std::string extension_for_type(const lts_type type)
Gives the filename extension associated with an LTS format.
Definition liblts.cpp:118
void unmark_explicit_divergence_transitions(LTS_TYPE &l, const std::size_t divergent_transition_label)
std::string string_for_type(const lts_type type)
Gives a string representation of an LTS format.
Definition liblts.cpp:113
lts_type parse_format(std::string const &s)
Determines the LTS format from a format specification string.
Definition liblts.cpp:92
bool destructive_bisimulation_compare(LTS_TYPE &l1, LTS_TYPE &l2, const bool branching=false, const bool preserve_divergences=false, const bool generate_counter_examples=false, const std::string &counter_example_file="", const bool structured_output=false)
Checks whether the two initial states of two lts's are strong or branching bisimilar.
static std::string type_desc_strings[]
Definition liblts.cpp:75
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.
Definition liblts.cpp:140
std::size_t label_type
type used to store label numbers and counts
std::size_t trans_type
type used to store transition (numbers and) counts
std::string lts_extensions_as_string(const std::set< lts_type > &supported)
Gives a list of extensions for supported LTS formats.
Definition liblts.cpp:220
static const std::string type_strings[]
Definition liblts.cpp:71
bool lts_named_cmp(const std::string N[], T a, T b)
Definition liblts.cpp:148
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.
Definition liblts.cpp:190
std::size_t mark_explicit_divergence_transitions(LTS_TYPE &l)
lts_type guess_format(std::string const &s, const bool be_verbose)
Determines the LTS format from a filename by its extension.
Definition liblts.cpp:26
static const std::string extension_strings[]
Definition liblts.cpp:73
void get_trans(const outgoing_transitions_per_state_t &begin, tree_set_store &tss, std::size_t d, std::vector< transition > &d_trans, LTS_TYPE &aut)
std::size_t apply_hidden_labels(const std::size_t n, const std::set< std::size_t > &hidden_action_set)
Definition transition.h:25
std::string mime_type_for_type(const lts_type type)
Gives the MIME type associated with an LTS format.
Definition liblts.cpp:123
static const std::set< lts_type > & initialise_supported_lts_formats()
Definition liblts.cpp:128
The main LTS namespace.
std::size_t label(const outgoing_transitions_per_state_action_t::const_iterator &i)
Label of an iterator exploring transitions per outgoing state and action.
std::string pp(const state_label_dot &l)
Pretty print function for a state_label_dot. Only prints the label field.
Definition lts_dot.h:101
lts_equivalence
LTS equivalence relations.
@ lts_eq_branching_bisim_sigref
@ lts_eq_divergence_preserving_weak_bisim
@ lts_eq_branching_bisim_gjkw
@ lts_eq_branching_bisim_gv
@ lts_eq_divergence_preserving_branching_bisim_sigref
@ lts_eq_divergence_preserving_branching_bisim
@ lts_eq_branching_bisim_gj
@ lts_eq_divergence_preserving_branching_bisim_gjkw
@ lts_eq_divergence_preserving_branching_bisim_gv
@ lts_eq_divergence_preserving_branching_bisim_gj
std::string pp(const state_label_lts &label)
Pretty print a state value of this LTS.
Definition lts_lts.h:108
bool is_deterministic(const LTS_TYPE &l)
Checks whether this LTS is deterministic.
lts_type
The enumerated type lts_type contains an index for every type type of labelled transition system that...
Definition lts_type.h:37
@ lts_fsm_probabilistic
Definition lts_type.h:45
@ lts_type_min
Definition lts_type.h:46
@ lts_lts_probabilistic
Definition lts_type.h:43
@ lts_aut_probabilistic
Definition lts_type.h:44
@ lts_type_max
Definition lts_type.h:47
bool destructive_compare(LTS_TYPE &l1, LTS_TYPE &l2, const lts_preorder pre, const bool generate_counter_example, const std::string &counter_example_file="", const bool structured_output=false, const lps::exploration_strategy strategy=lps::es_breadth, const bool preprocess=true)
Checks whether this LTS is smaller than another LTS according to a preorder.
transition_sort_style
Transition sort styles.
Definition transition.h:35
std::multimap< std::pair< transition::size_type, transition::size_type >, transition::size_type > outgoing_transitions_per_state_action_t
Type for exploring transitions per state and action.
std::string pp(const state_label_empty &)
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.
lts_preorder
LTS preorder relations.
void group_transitions_on_label_tgt(std::vector< transition > &transitions, const std::size_t number_of_labels, const std::size_t tau_label_index, const std::size_t number_of_states)
static std::vector< std::size_t > bogus_todo_stack
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.
Definition lts_fsm.h:78
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.
std::size_t to(const outgoing_transitions_per_state_action_t::const_iterator &i)
To state of an iterator exploring transitions per outgoing state and action.
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 sort_transitions(std::vector< transition > &transitions, transition_sort_style ts=src_lbl_tgt)
Sorts the transitions using a sort style.
void determinise(LTS_TYPE &l)
Determinises this LTS.
void group_transitions_on_tgt_label(std::vector< transition > &transitions, const std::size_t number_of_labels, const std::size_t tau_label_index, const std::size_t number_of_states)
std::string pp(const probabilistic_state< STATE, PROBABILITY > &l)
void reduce(LTS_TYPE &l, lts_equivalence eq)
Applies a reduction algorithm to this LTS.
detail::indexed_sorted_vector_for_transitions< outgoing_pair_t > outgoing_transitions_per_state_t
void group_transitions_on_tgt_label(LTS_TYPE &aut)
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 ptr(const transition t)
Sorts the transitions on labels. Action with the tau label are put first.
std::string pp(const action_label_lts &l)
Print the action label to string.
Definition lts_lts.h:202
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 scc_reduce(LTS_TYPE &l, const bool preserve_divergence_loops=false)
Definition liblts_scc.h:394
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)
static const std::size_t const_tau_label_index
Definition transition.h:28
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...
std::pair< transition::size_type, transition::size_type > outgoing_pair_t
Type for exploring transitions per state.
bool compare(const LTS_TYPE &l1, const LTS_TYPE &l2, const lts_preorder pre, const bool generate_counter_example, const std::string &counter_example_file="", const bool structured_output=false, const lps::exploration_strategy strategy=lps::es_breadth, const bool preprocess=true)
Checks whether this LTS is smaller than another LTS according to a preorder.
std::string pp(const action_label_string &l)
bool compare(const LTS_TYPE &l1, const LTS_TYPE &l2, const lts_equivalence eq, const bool generate_counter_examples=false, const std::string &counter_example_file="", const bool structured_output=false)
Checks whether this LTS is equivalent to another LTS.
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.
Definition is_linear.h:347
atermpp::term_list< action_label > action_label_list
\brief list of action_labels
std::vector< action > action_vector
\brief vector of actions
atermpp::term_list< action > action_list
\brief list of actions
bool is_untyped_multi_action(const atermpp::aterm &x)
process_specification parse_process_specification(std::istream &in)
Parses a process specification from an input stream.
Definition parse.h:43
std::string pp(const regular_formulas::regular_formula &x)
bool is_alt(const atermpp::aterm &x)
bool is_untyped_regular_formula(const atermpp::aterm &x)
void make_trans(atermpp::aterm &t, const ARGUMENTS &... args)
void make_seq(atermpp::aterm &t, const ARGUMENTS &... args)
void make_trans_or_nil(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_trans(const atermpp::aterm &x)
void swap(alt &t1, alt &t2)
\brief swap overload
std::string pp(const regular_formulas::seq &x)
void make_alt(atermpp::aterm &t, const ARGUMENTS &... args)
void make_untyped_regular_formula(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_trans_or_nil(const atermpp::aterm &x)
bool is_regular_formula(const atermpp::aterm &x)
void swap(trans &t1, trans &t2)
\brief swap overload
bool is_seq(const atermpp::aterm &x)
std::string pp(const regular_formulas::alt &x)
std::vector< regular_formula > regular_formula_vector
\brief vector of regular_formulas
void swap(untyped_regular_formula &t1, untyped_regular_formula &t2)
\brief swap overload
std::string pp(const regular_formulas::untyped_regular_formula &x)
atermpp::term_list< regular_formula > regular_formula_list
\brief list of regular_formulas
void swap(seq &t1, seq &t2)
\brief swap overload
std::string pp(const regular_formulas::trans_or_nil &x)
void swap(regular_formula &t1, regular_formula &t2)
\brief swap overload
std::string pp(const regular_formulas::trans &x)
void swap(trans_or_nil &t1, trans_or_nil &t2)
\brief swap overload
bool is_timed(const state_formula &x)
bool is_infimum(const atermpp::aterm &x)
std::string pp(const state_formulas::or_ &x)
std::string pp(const state_formulas::plus &x)
void swap(nu &t1, nu &t2)
\brief swap overload
bool is_and(const atermpp::aterm &x)
std::string pp(const state_formulas::yaled_timed &x)
std::string pp(const state_formulas::may &x)
bool is_delay_timed(const atermpp::aterm &x)
bool is_const_multiply(const atermpp::aterm &x)
std::string pp(const state_formulas::must &x)
void swap(const_multiply &t1, const_multiply &t2)
\brief swap overload
bool is_minus(const atermpp::aterm &x)
std::string pp(const state_formulas::not_ &x)
void make_imp(atermpp::aterm &t, const ARGUMENTS &... args)
atermpp::term_list< state_formula > state_formula_list
\brief list of state_formulas
bool is_exists(const atermpp::aterm &x)
std::string pp(const state_formulas::delay &x)
bool is_not(const atermpp::aterm &x)
void swap(and_ &t1, and_ &t2)
\brief swap overload
bool is_state_formula(const atermpp::aterm &x)
void make_const_multiply(atermpp::aterm &t, const ARGUMENTS &... args)
void make_exists(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(yaled_timed &t1, yaled_timed &t2)
\brief swap overload
bool is_supremum(const atermpp::aterm &x)
bool is_must(const atermpp::aterm &x)
std::set< data::variable > find_all_variables(const state_formulas::state_formula &x)
bool is_yaled(const atermpp::aterm &x)
std::string pp(const state_formulas::const_multiply &x)
void swap(infimum &t1, infimum &t2)
\brief swap overload
void make_and_(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::exists &x)
std::string pp(const state_formulas::const_multiply_alt &x)
std::set< data::variable > find_free_variables(const state_formulas::state_formula &x)
void swap(imp &t1, imp &t2)
\brief swap overload
bool is_true(const atermpp::aterm &x)
void swap(minus &t1, minus &t2)
\brief swap overload
std::string pp(const state_formulas::and_ &x)
void swap(may &t1, may &t2)
\brief swap overload
std::string pp(const state_formulas::state_formula &x)
void swap(exists &t1, exists &t2)
\brief swap overload
void swap(plus &t1, plus &t2)
\brief swap overload
std::string pp(const state_formulas::infimum &x)
void swap(mu &t1, mu &t2)
\brief swap overload
void make_plus(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::minus &x)
bool is_variable(const atermpp::aterm &x)
void make_not_(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(variable &t1, variable &t2)
\brief swap overload
void swap(supremum &t1, supremum &t2)
\brief swap overload
void make_infimum(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(true_ &t1, true_ &t2)
\brief swap overload
bool is_may(const atermpp::aterm &x)
bool is_yaled_timed(const atermpp::aterm &x)
bool is_imp(const atermpp::aterm &x)
void make_delay_timed(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::forall &x)
std::string pp(const state_formulas::imp &x)
std::string pp(const state_formulas::yaled &x)
std::vector< state_formula > state_formula_vector
\brief vector of state_formulas
void make_const_multiply_alt(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::sum &x)
void make_may(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(const_multiply_alt &t1, const_multiply_alt &t2)
\brief swap overload
bool is_sum(const atermpp::aterm &x)
void swap(or_ &t1, or_ &t2)
\brief swap overload
std::string pp(const state_formulas::delay_timed &x)
void swap(delay_timed &t1, delay_timed &t2)
\brief swap overload
state_formulas::state_formula translate_user_notation(const state_formulas::state_formula &x)
void make_must(atermpp::aterm &t, const ARGUMENTS &... args)
state_formulas::state_formula normalize_sorts(const state_formulas::state_formula &x, const data::sort_specification &sortspec)
std::string pp(const state_formulas::false_ &x)
void swap(must &t1, must &t2)
\brief swap overload
bool is_nu(const atermpp::aterm &x)
void swap(not_ &t1, not_ &t2)
\brief swap overload
bool is_delay(const atermpp::aterm &x)
std::string pp(const state_formulas::true_ &x)
std::string pp(const state_formulas::mu &x)
std::string pp(const state_formulas::supremum &x)
bool is_false(const atermpp::aterm &x)
void make_variable(atermpp::aterm &t, const ARGUMENTS &... args)
void make_nu(atermpp::aterm &t, const ARGUMENTS &... args)
void make_supremum(atermpp::aterm &t, const ARGUMENTS &... args)
void make_sum(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_plus(const atermpp::aterm &x)
void swap(state_formula &t1, state_formula &t2)
\brief swap overload
void swap(false_ &t1, false_ &t2)
\brief swap overload
void swap(sum &t1, sum &t2)
\brief swap overload
void make_forall(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_mu(const atermpp::aterm &x)
void swap(yaled &t1, yaled &t2)
\brief swap overload
bool is_forall(const atermpp::aterm &x)
void swap(delay &t1, delay &t2)
\brief swap overload
void make_minus(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::nu &x)
bool is_const_multiply_alt(const atermpp::aterm &x)
bool is_or(const atermpp::aterm &x)
void make_or_(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(forall &t1, forall &t2)
\brief swap overload
void make_yaled_timed(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::variable &x)
std::set< data::sort_expression > find_sort_expressions(const state_formulas::state_formula &x)
bool find_nil(const state_formulas::state_formula &x)
std::set< process::action_label > find_action_labels(const state_formulas::state_formula &x)
void make_mu(atermpp::aterm &t, const ARGUMENTS &... args)
std::set< core::identifier_string > find_identifiers(const state_formulas::state_formula &x)
void remove_common_divisor(std::size_t &p, std::size_t &q)
std::size_t hash_combine(const std::size_t h1, const std::size_t h2)
std::size_t multiply_single_number(const std::size_t n1, const std::size_t n2, std::size_t &multiplication_carry)
Definition big_numbers.h:95
std::size_t divide_single_number(const std::size_t p, const std::size_t q, std::size_t &remainder)
std::size_t add_single_number(const std::size_t n1, const std::size_t n2, std::size_t &carry)
Definition big_numbers.h:49
std::size_t greatest_common_divisor(std::size_t p, std::size_t q)
std::size_t subtract_single_number(const std::size_t n1, const std::size_t n2, std::size_t &carry)
Definition big_numbers.h:72
std::string pp(const probabilistic_arbitrary_precision_fraction &l)
std::string pp(const big_natural_number &l)
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
void swap(atermpp::term_balanced_tree< T > &t1, atermpp::term_balanced_tree< T > &t2)
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
static const atermpp::function_symbol UntypedRegFrm
static const atermpp::function_symbol StateMu
static const atermpp::function_symbol ActMultAct
static const atermpp::function_symbol RegSeq
static const atermpp::function_symbol StateConstantMultiply
static const atermpp::function_symbol ActNot
static const atermpp::function_symbol StateSum
static const atermpp::function_symbol ActAnd
static const atermpp::function_symbol StateConstantMultiplyAlt
static const atermpp::function_symbol StateForall
static const atermpp::function_symbol StateOr
static const atermpp::function_symbol ActFalse
static const atermpp::function_symbol RegTransOrNil
static const atermpp::function_symbol StateYaledTimed
static const atermpp::function_symbol StateExists
static const atermpp::function_symbol ActExists
static const atermpp::function_symbol StateVar
static const atermpp::function_symbol StateTrue
static const atermpp::function_symbol StateFalse
static const atermpp::function_symbol StateImp
static const atermpp::function_symbol RegAlt
static const atermpp::function_symbol RegTrans
static const atermpp::function_symbol StateMinus
static const atermpp::function_symbol StateNot
static const atermpp::function_symbol StateInfimum
static const atermpp::function_symbol StateDelay
static const atermpp::function_symbol StateYaled
static const atermpp::function_symbol ActAt
static const atermpp::function_symbol StateMay
static const atermpp::function_symbol StateDelayTimed
static const atermpp::function_symbol ActImp
static const atermpp::function_symbol ActTrue
static const atermpp::function_symbol ActForall
static const atermpp::function_symbol StatePlus
static const atermpp::function_symbol StateMust
static const atermpp::function_symbol StateNu
static const atermpp::function_symbol StateAnd
static const atermpp::function_symbol ActOr
static const atermpp::function_symbol StateSupremum
std::vector< transition > non_inert_transitions
std::vector< non_bottom_state > non_bottom_states
non_bottom_state(const state_type s, const std::vector< state_type > &it)
std::set< std::pair< label_type, block_index_type > > outgoing_observations
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::aterm &t) const
Definition aterm.h:483
std::size_t operator()(const atermpp::detail::reference_aterm< T > &t) const
std::size_t operator()(const atermpp::term_balanced_tree< T > &t) const
std::size_t operator()(const mcrl2::lps::multi_action &ma) 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
Definition lts_lts.h:440
std::size_t operator()(const mcrl2::lts::action_label_string &as) const
std::size_t operator()(const mcrl2::lts::probabilistic_state< STATE, PROBABILITY > &p) const
std::size_t operator()(const mcrl2::lts::transition &t) const
Definition transition.h:164
std::size_t operator()(const mcrl2::utilities::big_natural_number &n) const
std::size_t operator()(const mcrl2::utilities::probabilistic_arbitrary_precision_fraction &p) const