mCRL2
Loading...
Searching...
No Matches
simple_list.h
Go to the documentation of this file.
1// Author(s): David N. Jansen, Institute of Software, Chinese Academy of
2// Sciences, Beijing, PR China
3//
4// Copyright: see the accompanying file COPYING or copy at
5// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
6//
7// Distributed under the Boost Software License, Version 1.0.
8// (See accompanying file LICENSE_1_0.txt or copy at
9// http://www.boost.org/LICENSE_1_0.txt)
10
11/// \file lts/detail/simple_list.h
12///
13/// \brief Simple list implementation (with pool allocator)
14///
15/// \details This file supports partition refinement algorithms by implementing
16/// a simple list data structure, possibly with a pool allocator.
17///
18/// The main difference to std::list<T> is that the simple list only stores
19/// a pointer to the first list element; there is no sentinel. The list
20/// elements themselves form a doubly-linked list that is almost circular; only
21/// the pointer from the last element to the next one is nullptr. This allows
22/// to find the last element in the list (namely as predecessor of the first).
23/// A disadvantage is that the list does not allow to find the last element
24/// through `std::prev(end())`; to alleviate this, we offer a separate function
25/// `before_end()`.
26///
27/// Also, a simple list requires the stored elements to be trivially
28/// destructible, so they can be stored in a pool allocator data structure.
29///
30/// The pool allocator uses larger blocks to allocate data items,
31/// mostly list elements, but also other items can be stored, as long
32/// as they are trivially destructible. To access the pool, one uses
33/// `simple_list<element type>::get_pool()`. However, only elements of the
34/// same size as `simple_list<element type>` entries can be deleted. This is
35/// a static pool that is available throughout the running time of the program.
36/// (If you are really concerned about shaving off every small bit of time,
37/// you might destroy the pool through a memory leak upon termination of the
38/// program -- to that end, modify the destructor of `my_pool` to do nothing.)
39///
40/// \author David N. Jansen, Institute of Software, Chinese Academy of
41/// Sciences, Beijing, PR China
42
43#ifndef SIMPLE_LIST_H
44#define SIMPLE_LIST_H
45
46#include <cstddef> // for std::size_t
47#include <new> // for placement new
48#include <type_traits> // for std::is_trivially_destructible<class>
49#include <functional> // for std::less
50#include <iterator> // for std::forward_iterator_tag
51
52// My provisional recommendation is to always use simple lists and pool
53// allocators. Using standard allocation and standard lists is 5-15% slower
54// and uses perhaps 0.7% more memory. Using standard allocation and simple
55// lists is 10-20% slower and has no significant effect on memory use. These
56// numbers are based on a small set with not-so-large case studies for the JGKW
57// bisimulation minimisation algorithm, none of which includes new bottom
58// states.
59
60#define USE_SIMPLE_LIST
61
62#ifndef USE_SIMPLE_LIST
63 #include <list>
64#endif
65
66#define USE_POOL_ALLOCATOR
67
68namespace mcrl2::lts::detail
69{
70
71
72
73
74
75/* ************************************************************************* */
76/* */
77/* M E M O R Y M A N A G E M E N T */
78/* */
79/* ************************************************************************* */
80
81
82
83
84
86 #define ONLY_IF_POOL_ALLOCATOR(...) __VA_ARGS__ // NOLINT(cppcoreguidelines-macro-usage)
87 #ifndef USE_SIMPLE_LIST
88 #error "Using the pool allocator also requires using the simple list"
89 #endif
90
91 /// \class pool
92 /// \brief a pool allocator class
93 /// \details This class allocates a large chunk of memory at once and hands
94 /// out smaller parts. It is supposed to be more efficient than calling
95 /// new/delete, in particular because it assumes that T is trivially
96 /// destructible, so it won't call destructors. It allows to store
97 /// elements of different sizes.
98 ///
99 /// Internally, it keeps a (single-linked) list of large chunks of size
100 /// NR_ELEMENTS*sizeof(T)+sizeof(pointer). Each chunk contains a data area; for all chunks except the
101 /// first one, this area is completely in use.
102 ///
103 /// There is a free list, a (single-linked) list of elements in the chunks
104 /// that have been freed. However, all elements in the free list have to
105 /// have the same size as type T.
106 template <class T, std::size_t NR_ELEMENTS = 4000>
107 class my_pool
108 {
109 static_assert(std::is_trivially_destructible_v<T>);
110 private:
111 static_assert(sizeof(void*) <= sizeof(T));
112 class pool_block_t
113 {
114 public:
115 char data[NR_ELEMENTS * sizeof(T)]{}; // NOLINT(cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays) raw storage for the pool allocator
116 pool_block_t* next_block;
117
118 pool_block_t(pool_block_t* const new_next_block)
119 : next_block(new_next_block)
120 {}
121 }; static_assert(sizeof(T) <= sizeof(pool_block_t::data));
122
123 /// \brief first chunk in list of chunks
124 /// \details All chunks except the first one are completely in use.
125 pool_block_t* first_block;
126
127 /// \brief start of part in the first chunk that is already in use
128 void* begin_used_in_first_block;
129
130 /// \brief first freed element
131 void* first_free_T = nullptr;
132
133 static void*& deref_void(void* addr)
134 {
135 return *static_cast<void**>(addr);
136 }
137 public:
138 /// \brief constructor
139 my_pool()
140 : first_block(new pool_block_t(nullptr)),
141 begin_used_in_first_block(
142 &first_block->data[sizeof(first_block->data)])
143 {}
144
145
146 /// \brief destructor
147 ~my_pool()
148 {
149 pool_block_t* block(first_block); assert(nullptr != block);
150 do
151 {
152 pool_block_t* next_block = block->next_block;
153 delete block;
154 block = next_block;
155 }
156 while(nullptr != block);
157 }
158
159
160 private:
161 /// \brief allocate and construct a new element of the same size as the
162 /// free list
163 template <class U, class... Args>
164 U* construct_samesize(Args&&... args)
165 { static_assert(sizeof(T) == sizeof(U));
166 void* new_el; assert(nullptr != first_block);
167 if (first_block->data + sizeof(U) <= begin_used_in_first_block)
168 {
169 begin_used_in_first_block =
170 new_el = static_cast<char*>(begin_used_in_first_block) -
171 sizeof(U);
172 }
173 else if (nullptr != first_free_T)
174 {
175 // free list is tested afterwards because I expect that there
176 // won't be too many elements in the free list.
177 new_el = first_free_T;
178 first_free_T = deref_void(new_el);
179 }
180 else
181 {
182 first_block = new pool_block_t(first_block);
183 begin_used_in_first_block =
184 new_el = &first_block->data[sizeof(first_block->data) -
185 sizeof(U)];
186 }
187 return new(new_el) U(std::forward<Args>(args)...);
188 }
189
190
191 /// \brief allocate and construct a new element of a size that doesn't
192 /// fit the free list
193 template <class U, class... Args>
194 U* construct_othersize(Args&&... args)
195 { static_assert(sizeof(U) != sizeof(T));
196 void* new_el; assert(nullptr != first_block);
197 if (first_block->data + sizeof(U) <= begin_used_in_first_block)
198 {
199 begin_used_in_first_block =
200 new_el = static_cast<char*>(begin_used_in_first_block) -
201 sizeof(U);
202 }
203 else
204 {
205 if constexpr (sizeof(T) * 2 < sizeof(U))
206 {
207 // There may be space for several T-elements,
208 // extend the free list accordingly
209 while (first_block->data + sizeof(T) <=
210 begin_used_in_first_block)
211 {
212 begin_used_in_first_block = static_cast<char*>
213 (begin_used_in_first_block) - sizeof(T);
214 deref_void(begin_used_in_first_block) = first_free_T;
215 first_free_T = begin_used_in_first_block;
216 }
217 }
218 else if constexpr (sizeof(T) < sizeof(U))
219 {
220 // There may be space for one T-element (but not more),
221 // extend the free list accordingly
222 if (first_block->data + sizeof(T) <=
223 begin_used_in_first_block)
224 {
225 begin_used_in_first_block = static_cast<char*>
226 (begin_used_in_first_block) - sizeof(T);
227 deref_void(begin_used_in_first_block) = first_free_T;
228 first_free_T = begin_used_in_first_block;
229 }
230 } assert(first_block->data + sizeof(T) > begin_used_in_first_block);
231 first_block = new pool_block_t(first_block);
232 begin_used_in_first_block =
233 new_el = &first_block->data[sizeof(first_block->data) -
234 sizeof(U)];
235 }
236 return new(new_el) U(std::forward<Args>(args)...);
237 }
238 public:
239 /// \brief allocate and construct a new element (of any type)
240 template <class U, class... Args>
241 U* construct(Args&&... args)
242 {
243 static_assert(std::is_trivially_destructible_v<U>);
244 if constexpr (sizeof(U) == sizeof(T))
245 {
246 return construct_samesize<U>(std::forward<Args>(args)...);
247 }
248 else
249 { static_assert(sizeof(U) <= sizeof(first_block->data));
250 return construct_othersize<U>(std::forward<Args>(args)...);
251 }
252 }
253
254
255 /// \brief destroy and delete some element
256 /// \details destroy() is only allowed if the destructor of U is
257 /// trivial. This ensures that in my_pool::~my_pool() we do not have
258 /// to test whether some element has been freed before we destroy it.
259 /// Also, the size of U has to be the same size as the size of T, so
260 /// each entry in the free list has the same size.
261 template <class U>
262 void destroy(U* const old_el)
263 { static_assert(sizeof(T) == sizeof(U));
264 old_el->~U();
265 static_assert(std::is_trivially_destructible_v<U>);
266#ifndef NDEBUG
267 // ensure that old_el points to an element in some block
268 static std::less<const void*> const total_order; // NOLINT(modernize-use-transparent-functors) explicit type required to compare differing pointer types
269 for (const pool_block_t* block(first_block);
270 assert(nullptr != block),
271 total_order(old_el, block->data) ||
272 total_order(&block->data[sizeof(block->data)], old_el + 1);
273 block = block->next_block )
274 { }
275 #endif
276 deref_void(old_el) = first_free_T;
277 first_free_T = static_cast<void*>(old_el);
278 }
279 };
280#else
281 #define ONLY_IF_POOL_ALLOCATOR(...)
282#endif // #define USE_POOL_ALLOCATOR
283
284#ifdef USE_SIMPLE_LIST
285 /// \class simple_list
286 /// \brief a simple implementation of lists
287 /// \details This class simplifies lists: It assumes that list entries are
288 /// trivially destructible, and it does not store the size of a list.
289 /// Therefore, the destructor, erase() and splice() can be simplified.
290 /// Also, the simple_list object itself is trivially destructible if the
291 /// pool allocator is used; therefore, destroying a block_t object becomes
292 /// trivial as well.
293 template <class T>
294 class simple_list
295 {
296 public:
297 class const_iterator;
298
299 #ifndef USE_POOL_ALLOCATOR
300 private:
301 #endif
302 /// \brief list entry
303 /// \details If the list is to use the pool allocator, its designated
304 /// type must be `simple_list::entry` so elements can be erased.
305 class entry
306 {
307 private:
308 entry* next;
309 entry* prev;
310 T data;
311
312 friend class simple_list;
313 friend class const_iterator;
314 friend class my_pool<entry>;
315
316 template <class... Args>
317 entry(entry* const new_next, entry* const new_prev, Args&&... args)
318 : next(new_next),
319 prev(new_prev),
320 data(std::forward<Args>(args)...)
321 { }
322 };
323
324 private:
325 /// \brief pointer to the beginning of the list
326 entry* first;
327
328 public:
329 #ifdef USE_POOL_ALLOCATOR
330 static my_pool<entry>& get_pool()
331 {
332 static my_pool<entry> pool;
333
334 return pool;
335 }
336 #endif
337
338 /// \brief constant iterator class for simple_list
339 class const_iterator
340 {
341 public:
342 using value_type = T;
343 using pointer = T*;
344 using reference = T&;
345 using difference_type = std::ptrdiff_t;
346 using iterator_category = std::forward_iterator_tag;
347 protected:
348 entry* ptr;
349
350 const_iterator(const entry* const new_ptr)
351 : ptr(const_cast<entry*>(new_ptr))
352 { }
353
354 friend class simple_list;
355 public:
356 const_iterator() = default;
357 const_iterator(const const_iterator& other) = default;
358 const_iterator& operator=(const const_iterator& other) = default;
359
360 const_iterator& operator++()
361 { assert(nullptr != ptr);
362 ptr = ptr->next;
363 return *this;
364 }
365
366 const_iterator& operator--()
367 { assert(nullptr != ptr);
368 ptr = ptr->prev; assert(nullptr != ptr->next);
369 return *this;
370 }
371
372 const_iterator operator++(int)
373 { assert(nullptr != ptr);
374 const_iterator temp(*this);
375 ptr = ptr->next;
376 return temp;
377 }
378
379 const_iterator operator--(int)
380 { assert(nullptr != ptr);
381 const_iterator temp(*this);
382 ptr = ptr->prev; assert(nullptr != ptr->next);
383 return temp;
384 }
385
386 const T& operator*() const
387 { assert(nullptr != ptr);
388 return ptr->data;
389 }
390
391 const T* operator->() const
392 { assert(nullptr != ptr);
393 return &ptr->data;
394 }
395
396 bool operator==(const const_iterator& other) const
397 {
398 return ptr == other.ptr;
399 }
400
401 bool operator==(const T* const other) const
402 { assert(nullptr != other);
403 // It is allowed to call this even if is_null().
404 return ptr != nullptr && operator->() == other;
405 }
406
407 };
408
409 /// \brief iterator class for simple_list
410 class iterator : public const_iterator
411 {
412 public:
413 using typename const_iterator::value_type;
414 using typename const_iterator::pointer;
415 using typename const_iterator::reference;
416 using typename const_iterator::difference_type;
417 using typename const_iterator::iterator_category;
418 protected:
419 iterator(entry* const new_ptr) : const_iterator(new_ptr) { }
420
421 friend class simple_list;
422 public:
423 iterator() = default;
424
425 iterator(const iterator& other) = default;
426
427 iterator& operator=(const iterator& other) = default;
428
429 iterator& operator++(){const_iterator::operator++(); return *this;}
430
431 iterator& operator--(){const_iterator::operator--(); return *this;}
432
433 iterator operator++(int)
434 {
435 iterator temp(*this);
436 const_iterator::operator++();
437 return temp;
438 }
439
440 iterator operator--(int)
441 {
442 iterator temp(*this);
443 const_iterator::operator--();
444 return temp;
445 }
446
447 T& operator*() const
448 {
449 return const_cast<T&>(const_iterator::operator*());
450 }
451
452 T* operator->() const
453 {
454 return const_cast<T*>(const_iterator::operator->());
455 }
456 };
457
458 /// \brief class that stores either an iterator or a null value
459 /// \details We cannot use C++14's ``null forward iterators'', as they
460 /// are not guaranteed to compare unequal to valid iterators. We also
461 /// need to compare null iterators with non-null ones.
462 class iterator_or_null : public iterator
463 {
464 public:
465 using typename iterator::value_type;
466 using typename iterator::pointer;
467 using typename iterator::reference;
468 using typename iterator::difference_type;
469 using typename iterator::iterator_category;
470 using iterator::operator*;
471 using iterator::operator->;
472
473 iterator_or_null() : iterator() { }
474
475 iterator_or_null(std::nullptr_t) : iterator()
476 {
477 const_iterator::ptr = nullptr;
478 }
479
480 iterator_or_null(const iterator& other) : iterator(other) { }
481
482 bool is_null() const { return nullptr == const_iterator::ptr; }
483
484 iterator_or_null& operator=(std::nullptr_t)
485 {
486 const_iterator::ptr = nullptr;
487 return *this;
488 }
489 };
490
491 /// \brief constructor
492 simple_list()
493 : first(nullptr)
494 {
495 static_assert(std::is_trivially_destructible_v<entry>);
496 }
497
498 #ifndef USE_POOL_ALLOCATOR
499 /// \brief destructor
500 ~simple_list()
501 {
502 for (iterator iter = begin(); end() != iter; )
503 {
504 iterator next = std::next(iter);
505 delete iter.ptr;
506 iter = next;
507 }
508 }
509 #endif
510
511 /// \brief return true iff the list is empty
512 bool empty() const { return nullptr==first; }
513
514 /// \brief return an iterator to the first element of the list
515 iterator begin() { return iterator(first); }
516
517 /// \brief return an iterator past the last element of the list
518 static iterator end() { return iterator(nullptr); }
519
520 /// \brief return a constant iterator to the first element of the list
521 const_iterator cbegin() const { return const_iterator(first); }
522
523 /// \brief return a constant iterator past the last element of the list
524 static const_iterator cend() { return end(); }
525
526 /// \brief return a constant iterator to the first element of the list
527 const_iterator begin() const { return cbegin(); }
528
529 /// \brief return an iterator to the last element of the list
530 iterator before_end()
531 { assert(!empty());
532 return iterator(first->prev);
533 }
534
535 const_iterator before_end() const
536 { assert(!empty());
537 return const_iterator(first->prev);
538 }
539
540 /// \brief return a reference to the first element of the list
541 T& front()
542 { assert(!empty());
543 return first->data;
544 }
545
546 /// \brief return a reference to the last element of the list
547 T& back()
548 { assert(!empty());
549 return first->prev->data;
550 }
551 [[nodiscard]]
552 bool check_linked_list() const
553 {
554 if (empty())
555 {
556 return true;
557 }
558 const_iterator i = first;
559 if (nullptr == i.ptr->prev)
560 {
561 return false;
562 }
563 while (nullptr != i.ptr->next)
564 {
565 if (i.ptr->next->prev != i.ptr)
566 {
567 return false;
568 }
569 ++i;
570 assert(i.ptr->prev->next == i.ptr);
571 }
572 return first->prev == i.ptr;
573 }
574 /// \brief construct a new list entry before pos
575 /// \details If pos==end(), construct a new list entry at the end
576 template<class... Args>
577 iterator emplace(iterator pos, Args&&... args)
578 { assert(end()==pos || !empty()); assert(end()==pos || nullptr!=pos.ptr->prev);
579 #ifndef NDEBUG
580 assert(check_linked_list());
581 if (end() != pos)
582 { for(const_iterator i=begin(); i!=pos; ++i) { assert(end()!=i); } }
583 #endif
584 entry* const prev = end() == pos
585 ? (empty() ? nullptr : first->prev)
586 : pos.ptr->prev;
587 entry* const new_entry(
588 #ifdef USE_POOL_ALLOCATOR
589 get_pool().template construct<entry>
590 #else
591 new entry
592 #endif
593 (pos.ptr, prev, std::forward<Args>(args)...));
594 if (begin() == pos)
595 {
596 // we insert a new element before the current list begin, so
597 // the begin should change. This includes the case that the
598 // list was empty before.
599 first = new_entry;
600 }
601 else if (nullptr != prev)
602 {
603 // We insert an element not at the current list begin, so it
604 // should be reachable from its predecessor.
605 prev->next = new_entry;
606 }
607 if (end() != pos)
608 {
609 pos.ptr->prev = new_entry;
610 }
611 else
612 { assert(nullptr != first);
613 first->prev = new_entry;
614 } assert(check_linked_list());
615 #ifndef NDEBUG
616 assert((end() == pos ? before_end() : pos.ptr->prev) == new_entry);
617 for (const_iterator i=begin(); i != new_entry; ++i) { assert(end() != i); }
618 #endif
619 return iterator(new_entry);
620 }
621
622
623 /// Puts a new element at the end.
624 template <class... Args>
625 iterator emplace_back(Args&&... args)
626 {
627 return emplace(end(), std::forward<Args>(args)...);
628 }
629
630
631 /// \brief construct a new list entry after pos
632 /// \details if pos==end(), the new list entry is created at the front.
633 template<class... Args>
634 iterator emplace_after(iterator pos, Args&&... args)
635 { assert(end()==pos || !empty()); assert(end()==pos || end()!=pos.ptr->prev);
636 #ifndef NDEBUG
637 assert(check_linked_list());
638 if (end() != pos) {
639 for (const_iterator i = begin(); i != pos; ++i) { assert(end() != i); }
640 }
641 #endif
642 entry* const next = end() == pos ? begin().ptr : pos.ptr->next;
643 entry* const new_entry(
644 #ifdef USE_POOL_ALLOCATOR
645 get_pool().template construct<entry>
646 #else
647 new entry
648 #endif
649 (next, pos.ptr, std::forward<Args>(args)...));
650 if (end() == pos)
651 {
652 // we insert a new element before the current list begin, so
653 // the begin should change. This includes the case that the
654 // list was empty before.
655 new_entry->prev = empty() ? new_entry : before_end().ptr;
656 first = new_entry;
657 }
658 else
659 {
660 pos.ptr->next = new_entry;
661 } assert(nullptr != first);
662 if (nullptr == next)
663 {
664 first->prev = new_entry;
665 }
666 else
667 {
668 next->prev = new_entry;
669 } assert(check_linked_list());
670 #ifndef NDEBUG
671 assert((end() == pos ? first : pos.ptr->next) == new_entry);
672 for (const_iterator i=begin(); i != new_entry; ++i) { assert(end() != i); }
673 #endif
674 return iterator(new_entry);
675 }
676
677
678 /// \brief construct a new list entry at the beginning
679 template<class... Args>
680 iterator emplace_front(Args&&... args)
681 {
682 return emplace_after(end(), std::forward<Args>(args)...);
683 }
684
685
686 /// The function moves the element pointed at by from_pos (that is in
687 /// the list indicated by the 2nd parameter) just after position to_pos
688 /// (that is in this list). If to_pos == end(), move the element to the
689 /// beginning of this list.
690 void splice_to_after(iterator const to_pos, simple_list<T>& from_list,
691 iterator const from_pos)
692 { assert(from_pos != to_pos);
693 #ifndef NDEBUG
694 assert(check_linked_list());
695 if (end() != to_pos) {
696 assert(!empty()); assert(nullptr != to_pos.ptr->prev);
697 for(const_iterator i = begin(); i!=to_pos; ++i) { assert(end() != i); }
698 }
699 assert(end() != from_pos); assert(nullptr != from_pos.ptr->prev);
700 assert(!from_list.empty()); assert(from_list.check_linked_list());
701 /* remove element from_pos from its original list */ for (const_iterator i = from_list.begin(); i != from_pos; ++i) {
702 assert(from_list.end() != i);
703 }
704 #endif
705 if (from_pos.ptr != from_list.first)
706 { assert(nullptr != from_list.first->next); // at least 2 elements in the list
707 /* not the first element in from_list */ assert(from_pos == from_pos.ptr->prev->next);
708 from_pos.ptr->prev->next = from_pos.ptr->next;
709 if (nullptr != from_pos.ptr->next)
710 {
711 /* not the last element in from_list */ assert(from_pos == from_pos.ptr->next->prev);
712 from_pos.ptr->next->prev = from_pos.ptr->prev;
713 }
714 else
715 {
716 /* last element in from_list */ assert(from_pos == from_list.first->prev);
717 from_list.first->prev = from_pos.ptr->prev;
718 }
719 }
720 else
721 {
722 /* first element in from_list */ assert(nullptr == from_pos.ptr->prev->next);
723 from_list.first = from_pos.ptr->next;
724 if (!from_list.empty())
725 {
726 /* not the last element in from_list */ assert(from_pos == from_pos.ptr->next->prev);
727 from_pos.ptr->next->prev = from_pos.ptr->prev;
728 }
729 }
730 // update the pointers of from_pos and insert from_pos into this
731 // list
732 entry* next;
733 if (end() == to_pos)
734 {
735 // we insert the element before the current list begin, so
736 // the begin should change. This includes the case that the
737 // list was empty before.
738 if (!empty())
739 {
740 from_pos.ptr->prev = before_end().ptr;
741 }
742 // else from_pos->prev = from_pos; -- will be set below.
743 next = first;
744 first = from_pos.ptr;
745 }
746 else
747 {
748 from_pos.ptr->prev = to_pos.ptr;
749 next = to_pos.ptr->next;
750 to_pos.ptr->next = from_pos.ptr;
751 } assert(nullptr != first);
752 from_pos.ptr->next = next;
753 if (nullptr == next)
754 {
755 first->prev = from_pos.ptr;
756 }
757 else
758 {
759 next->prev = from_pos.ptr;
760 } assert(check_linked_list()); assert(from_list.check_linked_list());
761 #ifndef NDEBUG
762 assert(from_pos == (end() == to_pos ? first : to_pos.ptr->next));
763 for (const_iterator i=begin(); i!=from_pos; ++i) { assert(i!=end()); }
764 if (end() != to_pos) {
765 for (const_iterator i=begin(); i!=to_pos; ++i) { assert(end() != i); }
766 }
767 #endif
768 }
769
770
771 /// \brief move a list entry from one position to another (possibly in
772 /// a different list)
773 /// The function moves the element pointed at by from_pos (that is in
774 /// the list indicated by the 2nd parameter) just before position
775 /// to_pos (that is in this list). If to_pos == end(), move the element
776 /// to the end of this list.
777 void splice(iterator const to_pos, simple_list<T>& from_list,
778 iterator const from_pos)
779 { assert(from_pos != to_pos); assert(end() == to_pos || !empty());
780 #ifndef NDEBUG
781 assert(end() == to_pos || nullptr != to_pos.ptr->prev);
782 assert(check_linked_list());
783 if (end() != to_pos) {
784 for (const_iterator i=begin(); i!=to_pos; ++i) { assert(end() != i); }
785 }
786 assert(from_list.end() != from_pos); assert(nullptr != from_pos.ptr->prev);
787 assert(!from_list.empty()); assert(from_list.check_linked_list());
788 /* remove element from_pos from its original list */ for (const_iterator i=from_list.begin(); i!=from_pos; ++i) {
789 assert(from_list.end() != i);
790 }
791 #endif
792 if (from_pos != from_list.first)
793 { assert(nullptr != from_list.first->next); // at least 2 elements in the list
794 /* not the first element in from_list */ assert(from_pos.ptr == from_pos.ptr->prev->next);
795 from_pos.ptr->prev->next = from_pos.ptr->next;
796 if (nullptr != from_pos.ptr->next)
797 {
798 /* not the last element in from_list */ assert(from_pos.ptr == from_pos.ptr->next->prev);
799 from_pos.ptr->next->prev = from_pos.ptr->prev;
800 }
801 else
802 {
803 /* last element in from_list */ assert(from_pos.ptr == from_list.first->prev);
804 from_list.first->prev = from_pos.ptr->prev;
805 }
806 }
807 else
808 {
809 /* first element in from_list */ assert(nullptr == from_pos.ptr->prev->next);
810 from_list.first = from_pos.ptr->next;
811 if (!from_list.empty())
812 {
813 /* not the last element in from_list */ assert(from_pos.ptr == from_pos.ptr->next->prev);
814 from_pos.ptr->next->prev = from_pos.ptr->prev;
815 }
816 }
817 // update the pointers of from_pos and insert from_pos into this
818 // list
819 from_pos.ptr->next = to_pos.ptr;
820 if (end() == to_pos)
821 {
822 // from_pos becomes the last element in *this
823 if (empty())
824 {
825 from_pos.ptr->prev = from_pos.ptr;
826 first = from_pos.ptr; assert(check_linked_list()); assert(from_list.check_linked_list());
827 return;
828 }
829 from_pos.ptr->prev = before_end().ptr;
830 from_pos.ptr->prev->next = from_pos.ptr;
831 first->prev = from_pos.ptr;
832 }
833 else
834 {
835 /* from_pos does not become the last element in *this */ assert(!empty());
836 from_pos.ptr->prev = to_pos.ptr->prev;
837 to_pos.ptr->prev = from_pos.ptr;
838 if (to_pos.ptr == first)
839 {
840 // we insert a new element before the current list begin,
841 // so the begin should change.
842 first = from_pos.ptr;
843 }
844 else
845 {
846 from_pos.ptr->prev->next = from_pos.ptr;
847 }
848 } assert(check_linked_list()); assert(from_list.check_linked_list());
849 #ifndef NDEBUG
850 assert((end() == to_pos ? before_end().ptr
851 : iterator(to_pos.ptr->prev)) == from_pos.ptr);
852 for (const_iterator i=begin(); i != from_pos; ++i) { assert(end() != i); }
853 if (end() != to_pos) {
854 for (const_iterator i=begin(); i!=to_pos; ++i) { assert(end() != i); }
855 }
856 #endif
857 }
858
859
860 /// \brief erase an element from a list
861 void erase(iterator const pos)
862 { assert(end() != pos); assert(nullptr != pos.ptr->prev); assert(!empty());
863 #ifndef NDEBUG
864 assert(check_linked_list());
865 for (const_iterator i = begin(); i != pos; ++i) { assert(end() != i); }
866 #endif
867 if (pos != first)
868 { assert(nullptr != first->next); // at least 2 elements in the list
869 /* not the first element */ assert(pos.ptr == pos.ptr->prev->next);
870 pos.ptr->prev->next = pos.ptr->next;
871 if (nullptr != pos.ptr->next)
872 {
873 /* not the last element */ assert(pos.ptr == pos.ptr->next->prev);
874 pos.ptr->next->prev = pos.ptr->prev;
875 }
876 else
877 {
878 /* last element */ assert(pos.ptr == first->prev);
879 first->prev = pos.ptr->prev;
880 }
881 }
882 else
883 {
884 /* first element */ assert(nullptr == pos.ptr->prev->next);
885 first = pos.ptr->next;
886 if (!empty())
887 {
888 /* not the last element */ assert(pos.ptr == pos.ptr->next->prev);
889 pos.ptr->next->prev = pos.ptr->prev;
890 }
891 }
892 #ifdef USE_POOL_ALLOCATOR
893 get_pool().destroy(pos.ptr);
894 #else
895 delete pos.ptr;
896 #endif
897 }
898
899
900 /// The function computes the successor of pos in the list. If pos is
901 /// the last element of the list, it returns end(). It is an error if
902 /// pos==end() or if pos is not in the list.
903 #ifdef NDEBUG
904 static // only in debug mode it accesses data of the list itself
905 #endif
906 iterator next(iterator pos)
907 #ifndef NDEBUG
908 const // static functions cannot be const
909 #endif
910 { assert(end() != pos);
911 #ifndef NDEBUG
912 for (const_iterator i = begin(); i != pos; ++i) { assert(end() != i); }
913 #endif
914 return iterator(pos.ptr->next);
915 }
916
917
918 /// The function computes the successor of pos in the list. If pos is
919 /// the last element of the list, it returns end(). It is an error if
920 /// pos==end() or if pos is not in the list.
921 #ifdef NDEBUG
922 static // only in debug mode it accesses data of the list itself
923 #endif
924 const_iterator next(const_iterator pos)
925 #ifndef NDEBUG
926 const // static functions cannot be const
927 #endif
928 { assert(end() != pos);
929 #ifndef NDEBUG
930 for (const_iterator i = begin(); i != pos; ++i) { assert(end() != i); }
931 #endif
932 return const_iterator(pos.ptr->next);
933 }
934
935
936 /// The function computes the predecessor of pos in the list. If pos is at
937 /// the beginning of the list, it returns end(). It is an error if
938 /// pos==end() or if pos is not in the list.
939 iterator prev(iterator pos) const
940 { assert(pos!=end());
941 #ifndef NDEBUG
942 for (const_iterator i = begin(); i != pos; ++i) { assert(end() != i); }
943 #endif
944 return begin() == pos ? end() : iterator(pos.ptr->prev);
945 }
946
947
948 /// The function computes the predecessor of pos in the list. If pos is at
949 /// the beginning of the list, it returns end(). It is an error if
950 /// pos==end() or if pos is not in the list.
951 const_iterator prev(const_iterator pos) const
952 { assert(end() != pos);
953 #ifndef NDEBUG
954 for (const_iterator i = begin(); i != pos; ++i) { assert(end() != i); }
955 #endif
956 return begin() == pos ? end() : const_iterator(pos.ptr->prev);
957 }
958
959
960 bool operator==(const simple_list& other) const
961 {
962 const_iterator it = cbegin();
963 const_iterator other_it = other.cbegin();
964 while (cend() != it)
965 {
966 if (cend() == other_it || *it != *other_it)
967 {
968 return false;
969 }
970 ++it;
971 ++other_it;
972 }
973 return end()==other_it;
974 }
975 };
976
977 template <class El>
978 using iterator_or_null_t = typename simple_list<El>::iterator_or_null;
979#else
980 #define simple_list std::list
981
982 template <class El>
984 {
985 public:
986 typedef std::list<El>::iterator iterator;
988 private:
989 const void* null;
991 public:
992 /// \brief Construct an uninitialized object
994 {
996 {
997 // We still have to internally decide whether to construct
998 // the iterator or not so the destructor knows what to do.
999 null = nullptr;
1000 }
1001 }
1002
1003
1004 /// \brief Construct an object containing a null pointer
1006 {
1007 null = nullptr;
1008 }
1009
1010
1011 /// \brief Construct an object containing a valid iterator
1012 explicit iterator_or_null_t(const iterator other)
1013 {
1014 new (&iter) iterator(other); assert(nullptr != null);
1015 }
1016
1017
1018 /// \brief Check whether the object contains a valid iterator
1019 bool is_null() const { return nullptr == null; }
1020
1021
1022 /// \brief Destruct an object (whether it contains a valid iterator or
1023 // not)
1025 {
1026 if constexpr (!std::is_trivially_destructible<iterator>::value)
1027 {
1028 if (!is_null()) iter.~iterator();
1029 }
1030 }
1031
1032 El* operator->()
1033 { assert(nullptr != null);
1034 return iter.operator->();
1035 }
1036 El& operator*()
1037 { assert(nullptr != null);
1038 return iter.operator*();
1039 }
1040
1041 void operator=(nullptr_t)
1042 {
1043 if constexpr (!std::is_trivially_destructible<iterator>::value)
1044 {
1045 if (!is_null()) iter.~iterator();
1046 }
1047 null = nullptr;
1048 }
1049
1050
1051 explicit operator iterator() const
1052 { assert(nullptr != null);
1053 return iter;
1054 }
1055
1056
1057 void operator=(const iterator& other)
1058 {
1059 if constexpr (!std::is_trivially_destructible<iterator>::value)
1060 {
1061 if (!is_null()) iter.~iterator();
1062 }
1063 new (&iter) iterator(other); assert(nullptr != null);
1064 }
1065
1066 /// \brief Compare the object with another iterator_or_null_t object
1067 /// \details The operator could be templated so that iterator_or_null_t
1068 /// objects of different types can be compared.
1069 bool operator==(const iterator_or_null_t other) const
1070 {
1071 if constexpr (sizeof(null) == sizeof(iter))
1072 {
1073 return &*iter == &*other.iter;
1074 }
1075 else
1076 {
1077 return (is_null() && other.is_null()) ||
1078 (!is_null() && !other.is_null() && &*iter == &*other.iter);
1079 }
1080 }
1081
1082
1083 /// \brief Compare the object with another iterator_or_null_t object
1084 bool operator!=(const iterator_or_null_t other) const
1085 {
1086 return !operator==(other);
1087 }
1088
1089
1090 /// \brief Compare the object with an iterator
1091 /// \details If the object does not contain a valid iterator, it
1092 /// compares unequal with the iterator.
1093 bool operator==(const const_iterator other) const
1094 { // assert(nullptr != &*other); -- generates a warning
1095 return (sizeof(null) == sizeof(iter) || !is_null()) &&
1096 &*iter == &*other;
1097 }
1098
1099
1100 bool operator!=(const const_iterator other) const
1101 {
1102 return !operator==(other);
1103 }
1104
1105
1106 /// \brief Compare the object with a non-null pointer
1107 /// \details If the object does not contain a valid iterator, it
1108 /// compares unequal with the pointer.
1109 bool operator==(const El* const other) const
1110 { assert(nullptr != other);
1111 return !is_null() && &*iter == other;
1112 }
1113
1114
1115 bool operator!=(const El* const other) const
1116 {
1117 return !operator==(other);
1118 }
1119 };
1120#endif
1121
1122} // end namespace detail
1123// end namespace lts
1124// end namespace mcrl2
1125
1126#endif // ifndef SIMPLE_LIST_H
#define mCRL2complexity(unit, call, info_for_debug)
Assigns work to a counter and checks for errors.
aterm & operator=(const aterm &other) noexcept=default
aterm(const aterm &other) noexcept=default
This class has user-declared copy constructor so declare default copy and move operators.
static constexpr std::size_t maximal_size_of_stack
std::array< unprotected_aterm_core, maximal_size_of_stack > m_stack
void initialise(const term_balanced_tree< Term > &tree)
const Term & dereference() const
Dereference operator.
bool equal(const iterator &other) const
Equality operator.
iterator(const term_balanced_tree< Term > &tree)
void increment()
Increments the iterator.
bool is_node() const
Returns true iff the tree is a node with a left and right subtree.
static void make_tree_helper(aterm &result, ForwardTraversalIterator &p, const std::size_t size, Transformer transformer)
term_balanced_tree & operator=(const term_balanced_tree &) noexcept=default
Assignment operator.
size_type size() const
Returns the size of the term_balanced_tree.
term_balanced_tree(term_balanced_tree &&) noexcept=default
Move constructor.
bool empty() const
Returns true if tree is empty.
static const aterm & empty_tree()
static void make_tree(aterm &result, ForwardTraversalIterator &p, const std::size_t size, Transformer transformer)
term_balanced_tree(ForwardTraversalIterator first, const std::size_t size)
Creates an term_balanced_tree with a copy of a range.
static const function_symbol & tree_single_node_function()
const aterm & left_branch() const
Get the left branch of the tree.
term_balanced_tree(const term_balanced_tree &) noexcept=default
Copy constructor.
term_balanced_tree(ForwardTraversalIterator first, const std::size_t size, Transformer transformer)
Creates an term_balanced_tree with a copy of a range, where a transformer is applied to each term bef...
static const function_symbol & tree_node_function()
const Term & operator[](std::size_t position) const
Element indexing operator.
iterator begin() const
Returns an iterator pointing to the beginning of the term_balanced_tree.
iterator end() const
Returns an iterator pointing to the end of the term_balanced_tree.
term_balanced_tree()
Default constructor. Creates an empty tree.
const aterm & right_branch() const
Get the left branch of the tree.
term_balanced_tree & operator=(term_balanced_tree &&) noexcept=default
Move assign operator.
term_balanced_tree(const aterm &tree)
Construction from aterm.
const Term & element_at(std::size_t position, std::size_t size) const
Get an element at the indicated position.
static const function_symbol & tree_empty_function()
friend void make_term_balanced_tree(term_balanced_tree< Term1 > &result, ForwardTraversalIterator p, std::size_t size, Transformer transformer)
term_balanced_tree(detail::_term_appl *t)
A list of aterm objects.
Definition aterm_list.h:26
A unordered_map class in which aterms can be stored.
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=(data_expression &&) noexcept=default
sort_expression sort() const
Returns the sort of the data expression.
Definition data.cpp:107
data_expression(const data_expression &) noexcept=default
Move semantics.
data_expression(data_expression &&) noexcept=default
Rewriter that operates on data expressions.
Definition rewriter.h:84
data_expression operator()(const data_expression &d) const
Rewrites a data expression.
Definition rewriter.h:161
void add_sort(const basic_sort &s)
Adds a sort to this specification.
\brief A data variable
Definition variable.h:25
Action rename specification.
\brief A timed multi-action
multi_action(const multi_action &) noexcept=default
Move semantics.
const process::action_list & actions() const
multi_action(const process::action_list &actions=process::action_list(), data::data_expression time=data::undefined_real())
Constructor. Actions are sorted to establish the sorted-storage invariant.
This class contains labels for probabilistic transistions, consisting of a numerator and a denumerato...
static probabilistic_data_expression one()
Constant one.
probabilistic_data_expression operator+(const probabilistic_data_expression &other) const
Standard addition operator. Note that the expression is not evaluated. For this the rewriter has to b...
probabilistic_data_expression(const data::data_expression &d)
Construct a probabilistic_data_expression from a data_expression, which must be of sort real.
bool operator==(const probabilistic_data_expression &other) const
probabilistic_data_expression(std::size_t enumerator, std::size_t denominator)
bool operator!=(const probabilistic_data_expression &other) const
bool operator>=(const probabilistic_data_expression &other) const
bool operator<(const probabilistic_data_expression &other) const
bool operator<=(const probabilistic_data_expression &other) const
bool operator>(const probabilistic_data_expression &other) const
probabilistic_data_expression(const std::string &enumerator, const std::string &denominator)
probabilistic_data_expression operator-(const probabilistic_data_expression &other) const
Standard subtraction operator.
static data::data_specification data_specification_with_real()
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:142
action_label_lts & operator=(const action_label_lts &)=default
Copy assignment.
void hide_actions(const std::vector< std::string > &tau_actions)
Hide the actions with labels in tau_actions.
Definition lts_lts.h:163
action_label_lts(const action_label_lts &)=default
Copy constructor.
static const action_label_lts & tau_action()
Definition lts_lts.h:179
action_label_lts(const mcrl2::lps::multi_action &a)
Constructor.
Definition lts_lts.h:155
action_label_lts()=default
Default constructor.
void set_truths(formula &f)
Compute and set the truth values of a formula f.
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...
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.
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, label_type > split_by_action
std::size_t num_eq_classes() const
Gives the number of bisimulation equivalence classes of the LTS.
mcrl2::state_formulas::state_formula counter_formula(std::size_t s, std::size_t t)
Creates a state formula that distinguishes state s from state t.
void order_recursively_on_tau_reachability(const state_type s, std::map< state_type, std::vector< state_type > > &inert_transition_map, std::vector< non_bottom_state > &new_non_bottom_states, std::set< state_type > &visited)
std::vector< block_index_type > to_be_processed
std::map< block_index_type, block_index_type > split_by_block
void 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
mcrl2::state_formulas::state_formula counter_formula_aux(const block_index_type B1, const block_index_type B2)
void check_internal_consistency_of_the_partitioning_data_structure(const bool branching, const bool preserve_divergence) const
outgoing_transitions_per_state_action_t outgoing_transitions
function object to compare two constln_t pointers based on their contents
A class that can be used to store counterexample trees and.
lts_type type()
Provides the type of this lts, in casu lts_aut.
Definition lts_aut.h:39
bool operator==(const lts_aut_base &) const
Standard equality function.
Definition lts_aut.h:52
void swap(lts_aut_base &) noexcept
Standard swap function.
Definition lts_aut.h:45
void swap(lts_dot_base &) noexcept
The standard swap function.
Definition lts_dot.h:120
lts_type type() const
The lts_type of state_label_dot. In this case lts_dot.
Definition lts_dot.h:113
void clear()
Clear the transitions system.
Definition lts_fsm.h:134
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:146
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:178
void swap(lts_fsm_base &other) noexcept
Standard swap function.
Definition lts_fsm.h:123
bool operator==(const lts_fsm_base &other) const
Definition lts_fsm.h:108
lts_type type() const
The lts_type of this labelled transition system. In this case lts_fsm.
Definition lts_fsm.h:117
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:193
std::string state_label_to_string(const state_label_fsm &l) const
Pretty print a state value of this FSM.
Definition lts_fsm.h:156
a base class for lts_lts_t and probabilistic_lts_t.
Definition lts_lts.h:268
static lts_type type()
Yields the type of this lts, in this case lts_lts.
Definition lts_lts.h:296
void set_process_parameters(const data::variable_list &params)
Set the state parameters for this LTS.
Definition lts_lts.h:354
lts_lts_base()=default
Default constructor.
bool operator==(const lts_lts_base &other) const
Standard equality function;.
Definition lts_lts.h:279
process::action_label_list m_action_decls
Definition lts_lts.h:272
void set_action_label_declarations(const process::action_label_list &decls)
Set the action label information for this LTS.
Definition lts_lts.h:318
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:341
data::data_specification m_data_spec
Definition lts_lts.h:270
const data::variable_list & process_parameters() const
Return the process parameters stored in this LTS.
Definition lts_lts.h:333
void set_data(const data::data_specification &spec)
Set the mCRL2 data specification of this LTS.
Definition lts_lts.h:326
void swap(lts_lts_base &l) noexcept
Definition lts_lts.h:286
const process::action_label_list & action_label_declarations() const
Return action label declarations stored in this LTS.
Definition lts_lts.h:310
data::variable_list m_parameters
Definition lts_lts.h:271
A simple labelled transition format with only strings as action labels.
Definition lts_aut.h:67
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:132
void save(const std::string &filename) const
Save the labelled transition system to a file.
void save(std::ostream &os) const
Save the labelled transition system to a stream.
The class lts_fsm_t contains labelled transition systems in .fsm format.
Definition lts_fsm.h:254
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:370
lts_lts_t()=default
Creates an object containing no information.
void save(const std::string &filename) const
Save the labelled transition system to file.
void load(const std::string &filename)
Load the labelled transition system from file.
A simple labelled transition format with only strings as action labels.
Definition lts_aut.h:100
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:158
void save(std::ostream &os) const
Save the labelled transition system to a stream.
void save(const std::string &filename) const
Save the labelled transition system to a file.
The class lts_fsm_t contains labelled transition systems in .fsm format.
Definition lts_fsm.h:282
This class contains probabilistic labelled transition systems in .lts format.
Definition lts_lts.h:398
probabilistic_lts_lts_t()=default
Creates an object containing no information.
void load(const std::string &filename)
Load the labelled transition system from file.
void save(const std::string &filename) const
Save the labelled transition system to file.
A class that contains a labelled transition system.
probabilistic_lts(probabilistic_lts &&other)=default
Standard move constructor.
void set_initial_probabilistic_state(const PROBABILISTIC_STATE_T &state)
Sets the probabilistic initial state number of this LTS.
probabilistic_lts()=default
Creates an empty LTS.
const PROBABILISTIC_STATE_T & initial_probabilistic_state() const
Gets the initial state number of this LTS.
bool operator==(const probabilistic_lts &other) const
Standard equality operator.
labels_size_type num_probabilistic_states() const
Gets the number of probabilistic states of this LTS.
static constexpr bool is_probabilistic_lts
An indicator that this is a probabilistic lts.
void clear_probabilistic_states()
Clear the probabilistic states in this probabilistic transitions system.
states_size_type add_and_reset_probabilistic_state(PROBABILISTIC_STATE_T &s)
Adds a probabilistic state to this LTS and resets the state to empty.
void clear()
Clear the transitions system.
probabilistic_lts & operator=(probabilistic_lts &&other)=default
Standard assignment move operator.
void swap(probabilistic_lts &other) noexcept
Swap this lts with the supplied supplied LTS.
probabilistic_lts & operator=(const probabilistic_lts &other)=default
Standard assignment operator.
std::vector< PROBABILISTIC_STATE_T > m_probabilistic_states
probabilistic_lts(const probabilistic_lts &other)=default
Standard copy constructor.
states_size_type add_probabilistic_state(const PROBABILISTIC_STATE_T &s)
Adds a probabilistic state to this LTS.
states_size_type initial_state() const
PROBABILISTIC_STATE_T m_init_probabilistic_state
A class that contains a probabilistic state.
void set(const STATE &s)
Set this probabilistic state to a single state with probability one.
const_iterator begin() const
Gets an iterator over pairs of state and probability. This can only be used when the state is stored ...
void construct_internal_vector_representation()
Guarantee that this probabilistic state is internally stored as a vector, such that begin/end,...
probabilistic_state & operator=(const probabilistic_state &other)
Copy assignment constructor.
const_reverse_iterator rbegin() const
Gets a reverse iterator over pairs of state and probability. This can only be used when the state is ...
std::size_t size() const
Gets the number of probabilistic states in the vector representation of this state....
bool operator!=(const probabilistic_state &other) const
Standard equality operator.
iterator begin()
Gets an iterator over pairs of state and probability. This can only be used if the state is internall...
probabilistic_state & operator=(probabilistic_state &&other)=default
Move assignment operator.
STATE get() const
Get a probabilistic state if is is simple, i.e., consists of a single state.
void swap(probabilistic_state &other) noexcept
Swap this probabilistic state.
iterator end()
Gets the end iterator over pairs of state and probability.
reverse_iterator rbegin()
Gets a reverse iterator over pairs of state and probability. This can only be used if the state is in...
std::vector< state_probability_pair > m_probabilistic_state
const_iterator end() const
Gets the end iterator over pairs of state and probability.
reverse_iterator rend()
Gets the reverse end iterator over pairs of state and probability.
bool operator==(const probabilistic_state &other) const
Standard equality operator.
void clear()
Makes the probabilistic state empty.
probabilistic_state(probabilistic_state &&other)=default
Move constructor.
probabilistic_state(const STATE_PROBABILITY_PAIR_ITERATOR begin, const STATE_PROBABILITY_PAIR_ITERATOR end)
Creates a probabilistic state on the basis of state_probability_pairs.
STATE maximal_state() const
Provides the maximal state index in a probabilistic state.
probabilistic_state(const probabilistic_state &other)
Copy constructor.
void shrink_to_fit()
If a probabilistic state is ready, shrinking it to minimal size might be useful to reduce its memory ...
probabilistic_state()
Default constructor.
probabilistic_state(const STATE &s)
Constructor of a probabilistic state from a non probabilistic state.
void add(const STATE &s, const PROBABILITY &p)
Add a state with a probability to the probabilistic state.
const_reverse_iterator rend() const
Gets the reverse end iterator over pairs of state and probability.
Class for computing the signature for strong bisimulation.
Definition sigref.h:74
Class for computing the signature for branching bisimulation.
Definition sigref.h:104
Class for computing the signature for divergence preserving branching bisimulation.
Definition sigref.h:183
Signature based reductions for labelled transition systems.
Definition sigref.h:349
This class contains labels for states in dot format.
Definition lts_dot.h:34
void set_name(const std::string &s)
This method sets the name of the state label to the string s.
Definition lts_dot.h:53
std::string name() const
This method returns the string in the name field of a state label.
Definition lts_dot.h:60
std::string label() const
This method returns the label in the name field of a state label.
Definition lts_dot.h:74
void set_label(const std::string &s)
This method sets the label field of the state label to the string s.
Definition lts_dot.h:67
state_label_dot(const std::string &state_name, const std::string &state_label)
A constructor setting the name and label of this state label to the indicated values.
Definition lts_dot.h:47
std::string m_state_label
Definition lts_dot.h:37
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:82
bool operator!=(const state_label_dot &l) const
Standard inequality operator. Just the negation of equality.
Definition lts_dot.h:89
state_label_dot()=default
The default constructor.
This class contains state labels for the fsm format.
Definition lts_fsm.h:36
state_label_fsm()=default
Default constructor. The label becomes an empty vector.
state_label_fsm(const state_label_fsm &)=default
Copy constructor.
state_label_fsm & operator=(const state_label_fsm &)=default
Copy assignment.
static state_label_fsm number_to_label(const std::size_t n)
Create a state label consisting of a number as the only list element.
Definition lts_fsm.h:67
state_label_fsm(const std::vector< std::size_t > &v)
Default constructor. The label is set to the vector v.
Definition lts_fsm.h:50
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:56
This class contains state labels for an labelled transition system in .lts format.
Definition lts_lts.h:38
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:79
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:71
state_label_lts()=default
Default constructor.
state_label_lts(const lps::state &l)
Construct a state label out of a balanced tree of data expressions, representing a state label.
Definition lts_lts.h:64
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:94
state_label_lts(const CONTAINER &l)
Construct a single state label out of the elements in a container.
Definition lts_lts.h:55
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
\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
#define BLOCK_NO_SEQNR
#define PRINT_SG_PL(counter, sg_string, pl_string)
#define ONLY_IF_DEBUG(...)
include something in Debug mode
#define PRINT_INT_PERCENTAGE(num, denom)
#define INIT_WITHOUT_BLC_SETS
#define min_above_pivot
#define abort_if_non_bottom_size_too_large_NewBotSt(i)
#define bottom_size(coroutine)
#define linked_list
#define new_start_bottom_states(idx)
#define new_end_bottom_states(idx)
#define abort_if_size_too_large(coroutine, i)
#define non_bottom_states_NewBotSt
#define new_end_bottom_states_NewBotSt
#define abort_if_bottom_size_too_large(coroutine)
#define max_below_pivot
#define bottom_and_non_bottom_size(coroutine)
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
Definition logger.h:393
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)
std::string pp(const term_balanced_tree< Term > t)
bool is_aterm_balanced_tree(const aterm &t)
void make_term_balanced_tree(term_balanced_tree< Term > &result, ForwardTraversalIterator p, std::size_t size, Transformer transformer)
void make_exists(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(or_ &t1, or_ &t2) noexcept
\brief swap overload
std::string pp(const action_formulas::exists &x, bool arg0)
bool is_at(const atermpp::aterm &x)
void swap(forall &t1, forall &t2) noexcept
\brief swap overload
std::string pp(const action_formulas::imp &x, bool arg0)
std::ostream & operator<<(std::ostream &out, const or_ &x)
std::string pp(const action_formulas::at &x, bool arg0)
std::ostream & operator<<(std::ostream &out, const action_formula &x)
std::string pp(const action_formulas::forall &x, bool arg0)
void make_not_(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const action_formulas::or_ &x, bool arg0)
std::string pp(const action_formulas::action_formula &x, bool arg0)
std::ostream & operator<<(std::ostream &out, const true_ &x)
std::ostream & operator<<(std::ostream &out, const exists &x)
std::ostream & operator<<(std::ostream &out, const at &x)
std::string pp(const action_formulas::true_ &x, bool arg0)
std::set< data::variable > find_all_variables(const action_formulas::action_formula &x)
bool is_or(const atermpp::aterm &x)
void swap(action_formula &t1, action_formula &t2) noexcept
\brief swap overload
bool is_true(const atermpp::aterm &x)
bool is_forall(const atermpp::aterm &x)
void swap(not_ &t1, not_ &t2) noexcept
\brief swap overload
std::string pp(const action_formulas::not_ &x, bool arg0)
std::ostream & operator<<(std::ostream &out, const and_ &x)
void swap(true_ &t1, true_ &t2) noexcept
\brief swap overload
void make_and_(atermpp::aterm &t, const ARGUMENTS &... args)
std::ostream & operator<<(std::ostream &out, const false_ &x)
bool is_false(const atermpp::aterm &x)
bool is_not(const atermpp::aterm &x)
void swap(false_ &t1, false_ &t2) noexcept
\brief swap overload
void swap(and_ &t1, and_ &t2) noexcept
\brief swap overload
void make_imp(atermpp::aterm &t, const ARGUMENTS &... args)
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(multi_action &t1, multi_action &t2) noexcept
\brief swap overload
void swap(imp &t1, imp &t2) noexcept
\brief swap overload
void make_or_(atermpp::aterm &t, const ARGUMENTS &... args)
std::ostream & operator<<(std::ostream &out, const forall &x)
void swap(exists &t1, exists &t2) noexcept
\brief swap overload
std::ostream & operator<<(std::ostream &out, const imp &x)
std::ostream & operator<<(std::ostream &out, const multi_action &x)
void make_multi_action(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_multi_action(const atermpp::aterm &x)
std::ostream & operator<<(std::ostream &out, const not_ &x)
std::string pp(const action_formulas::multi_action &x, bool arg0)
void swap(at &t1, at &t2) noexcept
\brief swap overload
void make_at(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const action_formulas::false_ &x, bool arg0)
bool is_exists(const atermpp::aterm &x)
std::string pp(const action_formulas::and_ &x, bool arg0)
bool is_action_formula(const atermpp::aterm &x)
static data_specification const & default_specification()
Definition parse.h:28
Namespace for system defined sort bool_.
Definition bool.h:29
const function_symbol & false_()
Constructor for function symbol false.
Definition bool.h:106
const function_symbol & true_()
Constructor for function symbol true.
Definition bool.h:74
Namespace for system defined sort int_.
application cint(const data_expression &arg0)
Application of function symbol @cInt.
Definition int1.h:101
const basic_sort & int_()
Constructor for sort expression Int.
Definition int1.h:44
Namespace for system defined sort nat.
const basic_sort & nat()
Constructor for sort expression Nat.
Definition nat1.h:43
application cnat(const data_expression &arg0)
Application of function symbol @cNat.
Definition nat1.h:161
Namespace for system defined sort pos.
const basic_sort & pos()
Constructor for sort expression Pos.
Definition pos1.h:42
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:129
data_expression & real_zero()
const basic_sort & real_()
Constructor for sort expression Real.
Definition real1.h:45
application plus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
Definition real1.h:1112
application minus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol -.
Definition real1.h:1197
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:254
bool is_untyped_data_parameter(const atermpp::aterm &x)
application equal_to(const data_expression &arg0, const data_expression &arg1)
Application of function symbol ==.
Definition standard.h:140
std::pair< std::set< data::variable >, std::set< data::variable > > read_write_parameters(const lps::action_summand &summand, const std::set< data::variable > &process_parameters)
Computes the read and written process parameters for the given summand.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
multi_action complete_multi_action(process::untyped_multi_action &x, const process::action_label_list &action_decls, const data::data_specification &data_spec=data::detail::default_specification())
Definition lps.cpp:148
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:166
process::untyped_multi_action parse_multi_action_new(const std::string &text)
Definition lps.cpp:130
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:140
std::size_t greatest_common_divisor(std::size_t x, std::size_t y)
action_rename_specification parse_action_rename_specification_new(const std::string &text)
Definition lps.cpp:156
The main namespace for the LPS library.
Definition constelm.h:18
specification parse_linear_process_specification(const std::string &text)
Parses a linear process specification from a string.
Definition parse.h:149
void complete_data_specification(stochastic_specification &spec)
Adds all sorts that appear in the process of l to the data specification of l.
multi_action parse_multi_action(const std::string &text, const process::action_label_list &action_decls, const data::data_specification &data_spec=data::detail::default_specification())
Parses a multi_action from a string.
Definition parse.h:67
void parse_lps(std::istream &, Specification &)
Definition parse.h:156
process::action parse_action(const std::string &text, const process::action_label_list &action_decls, const data::data_specification &data_spec=data::detail::default_specification())
Parses an action from a string.
Definition parse.h:208
void complete_data_specification(specification &spec)
Adds all sorts that appear in the process of l to the data specification of l.
std::string pp(const probabilistic_data_expression &l)
multi_action parse_multi_action(std::stringstream &in, multi_action_type_checker &typechecker, const data::data_specification &data_spec=data::detail::default_specification())
Parses a multi_action from an input stream.
Definition parse.h:53
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:91
std::ostream & operator<<(std::ostream &out, const probabilistic_data_expression &x)
Pretty print to an outstream.
multi_action parse_multi_action(std::stringstream &in, const process::action_label_list &action_decls, const data::data_specification &data_spec=data::detail::default_specification())
Parses a multi_action from an input stream.
Definition parse.h:39
action_rename_specification parse_action_rename_specification(const std::string &spec_string, const lps::stochastic_specification &spec)
Parses an action rename specification. Parses an action rename specification. If the action rename sp...
Definition parse.h:107
void parse_lps< specification >(std::istream &from, specification &result)
Definition parse.h:163
void make_state(state &result, ForwardTraversalIterator p, const std::size_t size)
Definition state.h:33
void parse_lps< stochastic_specification >(std::istream &from, stochastic_specification &result)
Parses a stochastic linear process specification from an input stream.
Definition parse.h:180
std::string pp(const lps::state &x)
Definition state.h:44
multi_action parse_multi_action(const std::string &text, multi_action_type_checker &typechecker, const data::data_specification &data_spec=data::detail::default_specification())
Parses a multi_action from a string.
Definition parse.h:80
void parse_lps(const std::string &text, Specification &result)
Definition parse.h:194
specification parse_linear_process_specification(std::istream &spec_stream)
Parses a linear process specification from an input stream.
Definition parse.h:125
void make_state(state &result, ForwardTraversalIterator p, const std::size_t size, Transformer transformer)
Definition state.h:24
bool bisimulation_compare(const LTS_TYPE &l1, const LTS_TYPE &l2, bool branching=false, bool preserve_divergences=false, bool generate_counter_examples=false, const std::string &counter_example_file="", bool structured_output=false)
Checks whether the two initial states of two lts's are strong or branching bisimilar.
lts_type guess_format(std::string const &s, const bool be_verbose)
Determines the LTS format from a filename by its extension.
Definition liblts.cpp:26
static const std::array< std::string, 5 > extension_strings
Definition liblts.cpp:73
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:152
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::string string_for_type(const lts_type type)
Gives a string representation of an LTS format.
Definition liblts.cpp:112
void unmark_explicit_divergence_transitions(LTS_TYPE &l, const std::size_t divergent_transition_label)
std::string mime_type_for_type(const lts_type type)
Gives the MIME type associated with an LTS format.
Definition liblts.cpp:122
void get_trans(const outgoing_transitions_per_state_t &begin, tree_set_store &tss, std::ptrdiff_t d, std::vector< transition > &d_trans, LTS_TYPE &aut)
lts_type parse_format(std::string const &s)
Determines the LTS format from a format specification string.
Definition liblts.cpp:91
static const std::array< std::string, 5 > type_strings
Definition liblts.cpp:71
std::string extension_for_type(const lts_type type)
Gives the filename extension associated with an LTS format.
Definition liblts.cpp:117
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:139
std::string lts_extensions_as_string(const std::set< lts_type > &supported)
Gives a list of extensions for supported LTS formats.
Definition liblts.cpp:221
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)
bool destructive_bisimulation_compare(LTS_TYPE &l1, LTS_TYPE &l2, bool branching=false, bool preserve_divergences=false, bool generate_counter_examples=false, const std::string &counter_example_file="", bool structured_output=false)
Checks whether the two initial states of two lts's are strong or branching bisimilar.
void bisimulation_reduce(LTS_TYPE &l, bool branching=false, bool preserve_divergences=false)
Reduce transition system l with respect to strong or (divergence preserving) branching bisimulation.
bool lts_named_cmp(const std::array< std::string, Size > &N, T a, T b)
Definition liblts.cpp:147
static const std::array< std::string, 5 > type_desc_strings
Definition liblts.cpp:75
static const std::array< std::string, 5 > mime_type_strings
Definition liblts.cpp:84
static const std::set< lts_type > & initialise_supported_lts_formats()
Definition liblts.cpp:127
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:97
std::string pp(const state_label_lts &label)
Pretty print a state value of this LTS.
Definition lts_lts.h:106
bool is_deterministic(const LTS_TYPE &l)
Checks whether this LTS is deterministic.
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair_reversed(const std::vector< transition > &trans)
Provide the transitions as a multimap accessible per from state and label, ordered backwardly.
action_label_lts parse_lts_action(const std::string &multi_action_string, const data::data_specification &data_spec, lps::multi_action_type_checker &typechecker)
Parse a string into an action label.
Definition lts_lts.h:201
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:75
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair(const std::vector< transition > &trans)
Provide the transitions as a multimap accessible per from state and label.
void sort_transitions(std::vector< transition > &transitions, const std::set< transition::size_type > &hidden_label_set, transition_sort_style ts=src_lbl_tgt)
Sorts the transitions using a sort style.
void determinise(LTS_TYPE &l)
Determinises this LTS.
std::string pp(const probabilistic_state< STATE, PROBABILITY > &l)
std::ostream & operator<<(std::ostream &out, const probabilistic_state< STATE, PROBABILITY > &l)
Pretty print to an outstream.
void reduce(LTS_TYPE &l, lts_equivalence eq)
Applies a reduction algorithm to this LTS.
bool compare(const LTS_TYPE &l1, const LTS_TYPE &l2, lts_equivalence eq, bool generate_counter_examples=false, const std::string &counter_example_file="", bool structured_output=false)
Checks whether this LTS is equivalent to another LTS.
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair_reversed(const std::vector< transition > &trans, const std::set< transition::size_type > &hide_label_set)
Provide the transitions as a multimap accessible per from state and label, ordered backwardly.
bool destructive_compare(LTS_TYPE &l1, LTS_TYPE &l2, const lts_equivalence eq, const bool generate_counter_examples=false, const std::string &counter_example_file=std::string(), const bool structured_output=false)
Checks whether this LTS is equivalent to another LTS.
std::string pp(const action_label_lts &l)
Print the action label to string.
Definition lts_lts.h:188
bool destructive_compare(LTS_TYPE &l1, LTS_TYPE &l2, lts_preorder pre, bool generate_counter_example, const std::string &counter_example_file="", bool structured_output=false, lps::exploration_strategy strategy=lps::es_breadth, bool preprocess=true)
Checks whether this LTS is smaller than another LTS according to a preorder.
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair(const std::vector< transition > &trans, const std::set< transition::size_type > &hide_label_set)
Provide the transitions as a multimap accessible per from state and label.
void merge(LTS_TYPE &l1, const LTS_TYPE &l2)
Merge the second lts into the first lts.
bool reachability_check(lts< SL, AL, BASE > &l, bool remove_unreachable=false)
Checks whether all states in this LTS are reachable from the initial state and remove unreachable sta...
std::size_t label(const outgoing_pair_t &p)
Label of a pair of a label and target state.
std::size_t from(const outgoing_transitions_per_state_action_t::const_iterator &i)
From state of an iterator exploring transitions per outgoing state and action.
void group_transitions_on_label(const std::vector< transition >::iterator begin, const std::vector< transition >::iterator end, std::function< std::size_t(const transition &)> get_label, std::vector< std::pair< std::size_t, std::size_t > > &count_sum_transitions_per_action, const std::size_t tau_label_index=0, std::vector< std::size_t > &todo_stack=bogus_todo_stack)
bool reachability_check(probabilistic_lts< SL, AL, PROBABILISTIC_STATE, BASE > &l, bool remove_unreachable=false)
Checks whether all states in a probabilistic LTS are reachable from the initial state and remove unre...
bool compare(const LTS_TYPE &l1, const LTS_TYPE &l2, lts_preorder pre, bool generate_counter_example, const std::string &counter_example_file="", bool structured_output=false, lps::exploration_strategy strategy=lps::es_breadth, bool preprocess=true)
Checks whether this LTS is smaller than another LTS according to a preorder.
The main namespace for the Process library.
bool is_linear(const process_specification &p, bool verbose=false)
Returns true if the process specification is linear.
Definition is_linear.h:344
bool is_untyped_multi_action(const atermpp::aterm &x)
void swap(trans &t1, trans &t2) noexcept
\brief swap overload
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)
std::ostream & operator<<(std::ostream &out, const regular_formula &x)
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)
std::string pp(const regular_formulas::trans &x, bool arg0)
void make_alt(atermpp::aterm &t, const ARGUMENTS &... args)
void make_untyped_regular_formula(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const regular_formulas::alt &x, bool arg0)
std::ostream & operator<<(std::ostream &out, const trans &x)
void swap(untyped_regular_formula &t1, untyped_regular_formula &t2) noexcept
\brief swap overload
bool is_trans_or_nil(const atermpp::aterm &x)
std::ostream & operator<<(std::ostream &out, const untyped_regular_formula &x)
bool is_regular_formula(const atermpp::aterm &x)
void swap(trans_or_nil &t1, trans_or_nil &t2) noexcept
\brief swap overload
std::ostream & operator<<(std::ostream &out, const trans_or_nil &x)
bool is_seq(const atermpp::aterm &x)
std::string pp(const regular_formulas::untyped_regular_formula &x, bool arg0)
std::string pp(const regular_formulas::seq &x, bool arg0)
std::string pp(const regular_formulas::trans_or_nil &x, bool arg0)
void swap(seq &t1, seq &t2) noexcept
\brief swap overload
std::ostream & operator<<(std::ostream &out, const seq &x)
void swap(regular_formula &t1, regular_formula &t2) noexcept
\brief swap overload
std::ostream & operator<<(std::ostream &out, const alt &x)
std::string pp(const regular_formulas::regular_formula &x, bool arg0)
void swap(alt &t1, alt &t2) noexcept
\brief swap overload
bool is_timed(const state_formula &x)
void swap(variable &t1, variable &t2) noexcept
\brief swap overload
bool is_infimum(const atermpp::aterm &x)
std::string pp(const state_formulas::nu &x, bool arg0)
std::string pp(const state_formulas::exists &x, bool arg0)
std::string pp(const state_formulas::not_ &x, bool arg0)
std::ostream & operator<<(std::ostream &out, const not_ &x)
bool is_and(const atermpp::aterm &x)
void swap(minus &t1, minus &t2) noexcept
\brief swap overload
std::ostream & operator<<(std::ostream &out, const sum &x)
std::string pp(const state_formulas::supremum &x, bool arg0)
bool is_delay_timed(const atermpp::aterm &x)
void swap(exists &t1, exists &t2) noexcept
\brief swap overload
bool is_const_multiply(const atermpp::aterm &x)
std::ostream & operator<<(std::ostream &out, const exists &x)
std::string pp(const state_formulas::must &x, bool arg0)
void swap(const_multiply_alt &t1, const_multiply_alt &t2) noexcept
\brief swap overload
bool is_minus(const atermpp::aterm &x)
void make_imp(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_exists(const atermpp::aterm &x)
void swap(may &t1, may &t2) noexcept
\brief swap overload
void swap(mu &t1, mu &t2) noexcept
\brief swap overload
bool is_not(const atermpp::aterm &x)
std::string pp(const state_formulas::minus &x, bool arg0)
bool is_state_formula(const atermpp::aterm &x)
void swap(sum &t1, sum &t2) noexcept
\brief swap overload
std::ostream & operator<<(std::ostream &out, const const_multiply &x)
std::ostream & operator<<(std::ostream &out, const may &x)
void make_const_multiply(atermpp::aterm &t, const ARGUMENTS &... args)
std::ostream & operator<<(std::ostream &out, const nu &x)
void make_exists(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(supremum &t1, supremum &t2) noexcept
\brief swap overload
bool is_supremum(const atermpp::aterm &x)
void swap(true_ &t1, true_ &t2) noexcept
\brief swap overload
std::ostream & operator<<(std::ostream &out, const minus &x)
bool is_must(const atermpp::aterm &x)
void swap(const_multiply &t1, const_multiply &t2) noexcept
\brief swap overload
std::set< data::variable > find_all_variables(const state_formulas::state_formula &x)
std::ostream & operator<<(std::ostream &out, const imp &x)
bool is_yaled(const atermpp::aterm &x)
std::ostream & operator<<(std::ostream &out, const mu &x)
void make_and_(atermpp::aterm &t, const ARGUMENTS &... args)
std::ostream & operator<<(std::ostream &out, const must &x)
std::ostream & operator<<(std::ostream &out, const supremum &x)
void swap(not_ &t1, not_ &t2) noexcept
\brief swap overload
std::set< data::variable > find_free_variables(const state_formulas::state_formula &x)
void swap(state_formula &t1, state_formula &t2) noexcept
\brief swap overload
bool is_true(const atermpp::aterm &x)
std::string pp(const state_formulas::true_ &x, bool arg0)
std::ostream & operator<<(std::ostream &out, const true_ &x)
std::string pp(const state_formulas::state_formula &x, bool arg0)
std::ostream & operator<<(std::ostream &out, const variable &x)
std::ostream & operator<<(std::ostream &out, const state_formula &x)
void swap(plus &t1, plus &t2) noexcept
\brief swap overload
std::string pp(const state_formulas::const_multiply &x, bool arg0)
void make_plus(atermpp::aterm &t, const ARGUMENTS &... args)
std::ostream & operator<<(std::ostream &out, const and_ &x)
std::string pp(const state_formulas::delay_timed &x, bool arg0)
void swap(yaled &t1, yaled &t2) noexcept
\brief swap overload
void swap(delay &t1, delay &t2) noexcept
\brief swap overload
bool is_variable(const atermpp::aterm &x)
void make_not_(atermpp::aterm &t, const ARGUMENTS &... args)
std::ostream & operator<<(std::ostream &out, const forall &x)
void make_infimum(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_may(const atermpp::aterm &x)
std::ostream & operator<<(std::ostream &out, const yaled_timed &x)
bool is_yaled_timed(const atermpp::aterm &x)
bool is_imp(const atermpp::aterm &x)
void swap(yaled_timed &t1, yaled_timed &t2) noexcept
\brief swap overload
void make_delay_timed(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::imp &x, bool arg0)
std::ostream & operator<<(std::ostream &out, const or_ &x)
std::string pp(const state_formulas::mu &x, bool arg0)
void make_const_multiply_alt(atermpp::aterm &t, const ARGUMENTS &... args)
void make_may(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_sum(const atermpp::aterm &x)
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)
void swap(and_ &t1, and_ &t2) noexcept
\brief swap overload
bool is_nu(const atermpp::aterm &x)
void swap(false_ &t1, false_ &t2) noexcept
\brief swap overload
std::string pp(const state_formulas::delay &x, bool arg0)
std::ostream & operator<<(std::ostream &out, const false_ &x)
std::string pp(const state_formulas::forall &x, bool arg0)
void swap(forall &t1, forall &t2) noexcept
\brief swap overload
std::string pp(const state_formulas::sum &x, bool arg0)
void swap(delay_timed &t1, delay_timed &t2) noexcept
\brief swap overload
void swap(infimum &t1, infimum &t2) noexcept
\brief swap overload
std::ostream & operator<<(std::ostream &out, const plus &x)
std::string pp(const state_formulas::yaled &x, bool arg0)
bool is_delay(const atermpp::aterm &x)
std::ostream & operator<<(std::ostream &out, const infimum &x)
std::string pp(const state_formulas::infimum &x, bool arg0)
std::string pp(const state_formulas::or_ &x, bool arg0)
std::ostream & operator<<(std::ostream &out, const delay &x)
std::string pp(const state_formulas::may &x, bool arg0)
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)
void swap(must &t1, must &t2) noexcept
\brief swap overload
bool is_plus(const atermpp::aterm &x)
std::ostream & operator<<(std::ostream &out, const delay_timed &x)
void swap(nu &t1, nu &t2) noexcept
\brief swap overload
std::string pp(const state_formulas::and_ &x, bool arg0)
void make_forall(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::false_ &x, bool arg0)
std::string pp(const state_formulas::const_multiply_alt &x, bool arg0)
bool is_mu(const atermpp::aterm &x)
bool is_forall(const atermpp::aterm &x)
void make_minus(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_const_multiply_alt(const atermpp::aterm &x)
void swap(or_ &t1, or_ &t2) noexcept
\brief swap overload
std::string pp(const state_formulas::yaled_timed &x, bool arg0)
std::string pp(const state_formulas::plus &x, bool arg0)
bool is_or(const atermpp::aterm &x)
void make_or_(atermpp::aterm &t, const ARGUMENTS &... args)
void make_yaled_timed(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::variable &x, bool arg0)
void swap(imp &t1, imp &t2) noexcept
\brief swap overload
std::set< data::sort_expression > find_sort_expressions(const state_formulas::state_formula &x)
bool find_nil(const state_formulas::state_formula &x)
std::ostream & operator<<(std::ostream &out, const const_multiply_alt &x)
std::set< process::action_label > find_action_labels(const state_formulas::state_formula &x)
std::ostream & operator<<(std::ostream &out, const yaled &x)
void make_mu(atermpp::aterm &t, const ARGUMENTS &... args)
std::set< core::identifier_string > find_identifiers(const state_formulas::state_formula &x)
void swap(atermpp::term_balanced_tree< T > &t1, atermpp::term_balanced_tree< T > &t2) noexcept
Swaps two balanced trees.
#define USE_SIMPLE_LIST
Definition simple_list.h:60
#define USE_POOL_ALLOCATOR
Definition simple_list.h:66
static const atermpp::aterm StateMay
static const atermpp::aterm StateOr
static const atermpp::aterm UntypedRegFrm
static const atermpp::aterm StateFrm
static const atermpp::aterm StateYaled
static const atermpp::aterm RegAlt
static const atermpp::aterm ActNot
static const atermpp::aterm ActImp
static const atermpp::aterm ActTrue
static const atermpp::aterm StateInfimum
static const atermpp::aterm StateAnd
static const atermpp::aterm StateExists
static const atermpp::aterm RegTrans
static const atermpp::aterm ActOr
static const atermpp::aterm StateConstantMultiplyAlt
static const atermpp::aterm ActFrm
static const atermpp::aterm ActForall
static const atermpp::aterm StateYaledTimed
static const atermpp::aterm ActFalse
static const atermpp::aterm StateFalse
static const atermpp::aterm RegFrm
static const atermpp::aterm StateDelay
static const atermpp::aterm StatePlus
static const atermpp::aterm StateMinus
static const atermpp::aterm StateNu
static const atermpp::aterm ActAnd
static const atermpp::aterm StateDelayTimed
static const atermpp::aterm StateSupremum
static const atermpp::aterm StateSum
static const atermpp::aterm ActAt
static const atermpp::aterm ActExists
static const atermpp::aterm StateMu
static const atermpp::aterm RegTransOrNil
static const atermpp::aterm StateVar
static const atermpp::aterm StateImp
static const atermpp::aterm RegSeq
static const atermpp::aterm StateTrue
static const atermpp::aterm StateForall
static const atermpp::aterm StateMust
static const atermpp::aterm StateNot
static const atermpp::aterm ActMultAct
static const atermpp::aterm StateConstantMultiply
std::vector< 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)
Converts a process expression into linear process format. Use the convert member functions for this.
lps::specification convert(const process_specification &p)
Converts a process_specification into a specification. Throws non_linear_process if a non-linear sub-...
Converts a process expression into linear process format. Use the convert member functions for this.
lps::stochastic_specification convert(const process_specification &p)
Converts a process_specification into a stochastic_specification. Throws non_linear_process if a non-...
std::size_t operator()(const atermpp::term_balanced_tree< T > &t) const
std::size_t operator()(const mcrl2::lps::probabilistic_data_expression &p) const
std::size_t operator()(const mcrl2::lps::state_probability_pair< STATE, PROBABILITY > &p) const
std::size_t operator()(const mcrl2::lts::action_label_lts &as) const
Definition lts_lts.h:424
std::size_t operator()(const mcrl2::lts::probabilistic_state< STATE, PROBABILITY > &p) const