mCRL2
Loading...
Searching...
No Matches
lts_convert.h
Go to the documentation of this file.
1// Author(s): Jan Friso Groote
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
9
10/** \file mcrl2/lts/detail/lts_convert.h
11 *
12 * \brief This file contains lts_convert routines that translate different lts formats into each other.
13 * \details For each pair of lts formats there is a translation of one format into the other,
14 if such a translation is possible.
15 * \author Jan Friso Groote, Muck van Weerdenburg
16 */
17
18
19#ifndef MCRL2_LTS_DETAIL_LTS_CONVERT_H
20#define MCRL2_LTS_DETAIL_LTS_CONVERT_H
21
22#include "mcrl2/lts/lts_lts.h"
23#include "mcrl2/lts/lts_aut.h"
24#include "mcrl2/lts/lts_fsm.h"
25#include "mcrl2/lts/lts_dot.h"
26
27namespace mcrl2
28{
29namespace lts
30{
31namespace detail
32{
33
34/** \brief Translate a fraction given as a data_expression to a representation
35 * with an arbitrary size fraction */
36
38{
39 const data::application& da=atermpp::down_cast<data::application>(d);
43 {
44 throw mcrl2::runtime_error("Cannot convert the probability " + pp(d) + " to an arbitrary size denominator/enumerator pair.");
45 }
46 return utilities::probabilistic_arbitrary_precision_fraction(pp(da[0]),pp(da[1]));
47}
48
49template <class PROBABILISTIC_STATE1, class PROBABILISTIC_STATE2>
50inline PROBABILISTIC_STATE2 lts_convert_probabilistic_state(const PROBABILISTIC_STATE1& )
51{
52 throw mcrl2::runtime_error("Translation of probabilistic states is not defined");
53}
54
55template <>
57lts_convert_probabilistic_state<probabilistic_state<std::size_t, lps::probabilistic_data_expression>,
58 probabilistic_state<std::size_t, lps::probabilistic_data_expression> >(
60{
61 return state_in;
62}
63
64template <>
66lts_convert_probabilistic_state<probabilistic_state<std::size_t, mcrl2::utilities::probabilistic_arbitrary_precision_fraction>,
67 probabilistic_state<std::size_t, mcrl2::utilities::probabilistic_arbitrary_precision_fraction> >(
69{
70 return state_in;
71}
72
73template <>
75lts_convert_probabilistic_state<probabilistic_state<std::size_t, mcrl2::utilities::probabilistic_arbitrary_precision_fraction>,
76 probabilistic_state<std::size_t, lps::probabilistic_data_expression> >(
78{
79 if (state_in.size()<=1) // There is only one state with probability 1.
80 {
81 return probabilistic_state<std::size_t, lps::probabilistic_data_expression>(state_in.get());
82 }
83 // There are more than one target states all with their own probabilities.
84 std::vector<lps::state_probability_pair<std::size_t, lps::probabilistic_data_expression> > result;
85 for(const lps::state_probability_pair<std::size_t, mcrl2::utilities::probabilistic_arbitrary_precision_fraction>& p: state_in)
86 {
87 result.emplace_back(p.state(), lps::probabilistic_data_expression(pp(p.probability().enumerator()), pp(p.probability().denominator())));
88 }
89 return probabilistic_state<std::size_t, lps::probabilistic_data_expression>(result.begin(), result.end());
90}
91
93{
94 const data::application& da=atermpp::down_cast<data::application>(d);
98 {
99 throw mcrl2::runtime_error("Cannot convert the probability " + pp(d) + " to an explicit denominator/enumerator pair.");
100 }
101 return mcrl2::utilities::probabilistic_arbitrary_precision_fraction(pp(da[0]),pp(da[1]));
102}
103
104template <>
106lts_convert_probabilistic_state<probabilistic_state<std::size_t, lps::probabilistic_data_expression>,
107 probabilistic_state<std::size_t, mcrl2::utilities::probabilistic_arbitrary_precision_fraction> >(
108 const probabilistic_state<std::size_t, lps::probabilistic_data_expression>& state_in)
109{
110 if (state_in.size()<=1) // There is only one state with probability 1.
111 {
112 return probabilistic_state<std::size_t, mcrl2::utilities::probabilistic_arbitrary_precision_fraction>(state_in.get());
113 }
114 // There are more than one target states all with their own probabilities.
115 std::vector<lps::state_probability_pair<std::size_t, mcrl2::utilities::probabilistic_arbitrary_precision_fraction> > result;
116 for(const lps::state_probability_pair<std::size_t, mcrl2::lps::probabilistic_data_expression>& p: state_in)
117 {
118 result.push_back(lps::state_probability_pair<std::size_t, mcrl2::utilities::probabilistic_arbitrary_precision_fraction>(
119 p.state(),
120 translate_probability_data_prob(p.probability())));
121 }
122 return probabilistic_state<std::size_t, mcrl2::utilities::probabilistic_arbitrary_precision_fraction>(result.begin(), result.end());
123}
124
125
126
127// ================================================================
128//
129// Below the translations for labelled transition system formats
130// to each other are provided. If a translation is not given,
131// the routines above are used to indicate at runtime that a
132// required translation does not exist.
133//
134// ================================================================
135
136// Default convertor, not doing anything.
137template <class BASE_LTS_IN, class BASE_LTS_OUT>
139{
140 public:
141 // Constructor
142 convertor(const BASE_LTS_IN& , const BASE_LTS_OUT& )
143 {}
144
145};
146
147// ====================== convert_core_lts =============================
148
149/* template <class CONVERTOR, class LTS_IN_TYPE, class LTS_OUT_TYPE>
150inline void convert_core_lts(CONVERTOR& c,
151 const LTS_IN_TYPE& lts_in,
152 LTS_OUT_TYPE& lts_out)
153{
154 if (lts_in.has_state_info())
155 {
156 for (std::size_t i=0; i<lts_in.num_states(); ++i)
157 {
158 lts_out.add_state(c.translate_state(lts_in.state_label(i)));
159 }
160 }
161 else
162 {
163 lts_out.set_num_states(lts_in.num_states(),false);
164 }
165
166 for (std::size_t i=0; i<lts_in.num_action_labels(); ++i)
167 {
168 lts_out.add_action(c.translate_label(lts_in.action_label(i)));
169 if (lts_in.is_tau(i))
170 {
171 lts_out.set_tau(i);
172 }
173 }
174
175 / * for (std::size_t i=0; i<lts_in.num_probabilistic_labels(); ++i)
176 {
177 lts_out.add_probabilistic_label(c.translate_probability_label(lts_in.probabilistic_label(i)));
178 }
179
180 for (std::size_t i=0; i<lts_in.num_states(); ++i)
181 {
182 if (lts_in.is_probabilistic(i))
183 {
184 lts_out.set_is_probabilistic(i,true);
185 }
186 } * /
187
188 const std::vector<transition>& trans=lts_in.get_transitions();
189 for (std::vector<transition>::const_iterator r=trans.begin(); r!=trans.end(); ++r)
190 {
191 lts_out.add_transition(*r);
192 }
193 lts_out.set_initial_state(lts_in.initial_state());
194} */
195
196// ========================================================================= REWRITTEN CODE ==============
197
199 const data::data_specification& data,
200 lps::multi_action_type_checker& typechecker)
201{
202 std::string l(l1);
203
204 // Remove quotes, if present in the action label string.
205 if ((l.size()>=2) &&
206 (l.substr(0,1)=="\"") &&
207 (l.substr(l.size()-1,l.size())=="\""))
208 {
209 l=l.substr(1,l.size()-1);
210 }
211
212 try
213 {
214 const action_label_lts al=parse_lts_action(l,data,typechecker);
215 return al;
216 }
217 catch (mcrl2::runtime_error& e)
218 {
219 throw mcrl2::runtime_error("Parse error in action label " + l1 + ".\n" + e.what());
220 }
221}
222
223// ====================== lts -> lts =============================
224
225inline void lts_convert_base_class(const lts_lts_base& base_in, lts_lts_base& base_out)
226{
227 base_out=base_in;
228}
229
230inline void lts_convert_base_class(const lts_lts_base& base_in,
231 lts_lts_base& base_out,
232 const data::data_specification& ,
233 const process::action_label_list& ,
234 const data::variable_list& ,
235 const bool extra_data_is_defined=true)
236{
237 if (extra_data_is_defined)
238 {
239 mCRL2log(log::warning) << "While translating .lts to .lts, additional information (data specification, action declarations and process parameters) is ignored.\n";
240 }
241 lts_convert_base_class(base_in, base_out);
242}
243
245{
246 return l_in;
247}
248
249inline void lts_convert_translate_state(const state_label_lts& state_label_in, state_label_lts& state_label_out, convertor<lts_lts_base, lts_lts_base>& /* c */)
250{
251 state_label_out=state_label_in;
252}
253
254// ====================== lts -> fsm =============================
255
256template<>
258{
259 public:
262
263 convertor(const lts_lts_base& lts_base_in, lts_fsm_base& lts_base_out):
266 lts_out(lts_base_out)
267 {
268 }
269};
270
271inline void lts_convert_base_class(const lts_lts_base& base_in, lts_fsm_base& base_out)
272{
274
275 for (const data::variable& v: base_in.process_parameters())
276 {
277 base_out.add_process_parameter(data::pp(v),data::pp(v.sort()));
278 }
279}
280
282{
283 return action_label_string(pp(l_in));
284}
285
286inline void lts_convert_base_class(const lts_lts_base& base_in,
287 lts_fsm_base& base_out,
288 const data::data_specification& ,
289 const process::action_label_list& ,
290 const data::variable_list& ,
291 const bool extra_data_is_defined=true)
292{
293 if (extra_data_is_defined)
294 {
295 mCRL2log(log::warning) << "While translating .lts to .fsm, additional information (data specification, action declarations and process parameters) are ignored.\n";
296 }
297 lts_convert_base_class(base_in, base_out);
298}
299
300inline void lts_convert_translate_state(const state_label_lts& state_label_in, state_label_fsm& state_label_out, convertor<lts_lts_base, lts_fsm_base>& c)
301{
302 state_label_out.clear();
303 std::size_t i=0;
304 state_label_lts local_state_label_in;
305 if (state_label_in.size()!=1)
306 {
307 assert(state_label_in.size()>1);
308 // In this case the state label consists of a list of labels. However, the .fsm format cannot deal
309 // with this, and we take only one of the labels in this list in the translation.
310 local_state_label_in=state_label_lts(state_label_in.front());
311 static bool warning_is_already_printed=false;
312 if (!warning_is_already_printed)
313 {
314 mCRL2log(log::warning) << "The state label " + pp(state_label_in) + " consists of " + std::to_string(state_label_in.size()) +
315 " state vectors and all but the first label are ignored. This warning is only printed once. ";
316 warning_is_already_printed=true;
317 }
318 }
319 else
320 {
321 local_state_label_in=state_label_in;
322 }
323 for (const data::data_expression& t: *local_state_label_in.begin())
324 {
325 std::map <data::data_expression , std::size_t >::const_iterator index=c.state_element_values_sets[i].find(t);
326 if (index==c.state_element_values_sets[i].end())
327 {
328 const std::size_t element_index=c.state_element_values_sets[i].size();
329 state_label_out.push_back(element_index);
330 c.lts_out.add_state_element_value(i,data::pp(t));
331 c.state_element_values_sets[i][t]=element_index;
332 }
333 else
334 {
335 state_label_out.push_back(index->second);
336 }
337 ++i;
338 }
339}
340
341// ====================== lts -> aut =============================
342
343inline void lts_convert_base_class(const lts_lts_base& /* base_in */, lts_aut_base& /* base_out */)
344{
345 // Nothing needs to be done.
346}
347
348inline void lts_convert_base_class(const lts_lts_base& base_in,
349 lts_aut_base& base_out,
350 const data::data_specification& ,
351 const process::action_label_list& ,
352 const data::variable_list& ,
353 const bool extra_data_is_defined=true)
354{
355 if (extra_data_is_defined)
356 {
357 mCRL2log(log::warning) << "While translating .lts to .aut, additional information (data specification, action declarations and process parameters) are ignored.\n";
358 }
359 lts_convert_base_class(base_in, base_out);
360}
361
363{
364 return action_label_string(pp(l_in));
365}
366
367inline void lts_convert_translate_state(const state_label_lts& /* state_label_in */, state_label_empty& state_label_out, convertor<lts_lts_base, lts_aut_base>& /* c */)
368{
369 state_label_out=state_label_empty();
370}
371
372// ====================== lts -> dot =============================
373
374template<>
376{
377 public:
379
380 convertor(const lts_lts_base& /* lts_base_in */, lts_dot_base& /* lts_base_out */):
382 {
383 }
384};
385
386inline void lts_convert_base_class(const lts_lts_base& /* base_in */, lts_dot_base& /* base_out */)
387{
388 // Nothing needs to be done.
389}
390
391inline void lts_convert_base_class(const lts_lts_base& base_in,
392 lts_dot_base& base_out,
393 const data::data_specification& ,
394 const process::action_label_list& ,
395 const data::variable_list& ,
396 const bool extra_data_is_defined=true)
397{
398 if (extra_data_is_defined)
399 {
400 mCRL2log(log::warning) << "While translating .lts to .dot, additional information (data specification, action declarations and process parameters) are ignored.\n";
401 }
402 lts_convert_base_class(base_in, base_out);
403}
404
406{
407 return action_label_string(pp(l_in));
408}
409
410inline void lts_convert_translate_state(const state_label_lts& state_label_in, state_label_dot& state_label_out, convertor<lts_lts_base, lts_dot_base>& c)
411{
412 std::stringstream state_name;
413 state_name << "s" << c.m_state_count;
415 state_label_out=state_label_dot(state_name.str(),pp(state_label_in));
416}
417
418// ====================== fsm -> lts =============================
419
420template<>
422
423{
424 public:
428
429 convertor(const lts_fsm_base& lts_base_in, lts_lts_base& lts_base_out):
430 m_lts_in(lts_base_in), m_lts_out(lts_base_out),
432 {
433 }
434};
435
436inline void lts_convert_base_class(const lts_fsm_base& /* base_in */, lts_lts_base& /* base_out */)
437{
438 throw mcrl2::runtime_error("Cannot translate .fsm into .lts format without additional LPS information (data, action declarations and process parameters).");
439}
440
441inline void lts_convert_base_class(const lts_fsm_base& base_in,
442 lts_lts_base& base_out,
443 const data::data_specification& data,
444 const process::action_label_list& action_labels,
445 const data::variable_list& process_parameters,
446 const bool extra_data_is_defined=true)
447{
448 if (extra_data_is_defined)
449 {
450 base_out.set_data(data);
451 base_out.set_action_label_declarations(action_labels);
452 base_out.set_process_parameters(process_parameters);
453 }
454 else
455 {
456 lts_convert_base_class(base_in,base_out);
457 }
458}
459
461{
462 return translate_label_aux(l1, c.m_lts_out.data(), c.m_typechecker);
463}
464
465inline void lts_convert_translate_state(const state_label_fsm& state_label_in,
466 state_label_lts& state_label_out,
468{
469 // If process_parameters are not empty, we use them to check that the sorts of its variables match.
470 std::vector < data::data_expression > state_label;
471 std::size_t idx=0;
473 data::variable_list::const_iterator parameter_iterator=parameters.begin();
474 for (state_label_fsm::const_iterator i=state_label_in.begin(); i!=state_label_in.end(); ++i, ++idx)
475 {
476 assert(parameters.empty() || parameter_iterator!=parameters.end());
477 data::data_expression d=data::parse_data_expression(c.m_lts_in.state_element_value(idx,*i),c.m_lts_out.data());
478 if (!parameters.empty() && (d.sort()!=parameter_iterator->sort()))
479 {
480 try
481 {
482 /* The type of the parsed expression may not exactly match the expected type.
483 Attempt to match exactly below.
484 TODO: replace this with a function parse_data_expression_with_expected_type when it exists */
485 data::data_type_checker typechecker(c.m_lts_out.data());
486 data::detail::variable_context variable_context;
487 variable_context.add_context_variables(data::variable_list(), typechecker);
488 d=typechecker.typecheck_data_expression(d, parameter_iterator->sort(), variable_context);
489 }
490 catch (mcrl2::runtime_error& e)
491 {
492 throw mcrl2::runtime_error("Sort of parameter " + pp(*parameter_iterator) + ":" +
493 pp(parameter_iterator->sort()) + " does not match with the sort " + pp(d.sort()) +
494 " of actual value " + pp(d) + ".\n" + e.what());
495 }
496 }
497 state_label.push_back(d);
498 if (!parameters.empty())
499 {
500 ++parameter_iterator;
501 }
502 }
503 assert(parameter_iterator==parameters.end());
504
505 state_label_out=state_label_lts(state_label);
506}
507
508// ====================== fsm -> fsm =============================
509
510inline void lts_convert_base_class(const lts_fsm_base& base_in, lts_fsm_base& base_out)
511{
512 base_out=base_in;
513}
514
515inline void lts_convert_base_class(const lts_fsm_base& base_in,
516 lts_fsm_base& base_out,
517 const data::data_specification& ,
518 const process::action_label_list& ,
519 const data::variable_list& ,
520 const bool extra_data_is_defined=true)
521{
522 if (extra_data_is_defined)
523 {
524 mCRL2log(log::warning) << "While translating .fsm to .fsm, additional information (data specification, action declarations and process parameters) are ignored.\n";
525 }
526 lts_convert_base_class(base_in,base_out);
527}
528
529inline void lts_convert_translate_state(const state_label_fsm& state_label_in, state_label_fsm& state_label_out, convertor<lts_fsm_base, lts_fsm_base>& /* c */)
530{
531 state_label_out=state_label_in;
532}
533
535{
536 return l_in;
537}
538
539// ====================== fsm -> aut =============================
540
541inline void lts_convert_base_class(const lts_fsm_base& /* base_in */, lts_aut_base& /* base_out */)
542{
543 // Nothing needs to be done.
544}
545
546inline void lts_convert_base_class(const lts_fsm_base& base_in,
547 lts_aut_base& base_out,
548 const data::data_specification& ,
549 const process::action_label_list& ,
550 const data::variable_list& ,
551 const bool extra_data_is_defined=true)
552{
553 if (extra_data_is_defined)
554 {
555 mCRL2log(log::warning) << "While translating .fsm to .aut, additional information (data specification, action declarations and process parameters) are ignored.\n";
556 }
557 lts_convert_base_class(base_in,base_out);
558}
559
561{
562 state_label_out=state_label_empty();
563}
564
566{
567 return l_in;
568}
569
570
571// ====================== fsm -> dot =============================
572
573template<>
575{
576 public:
579
580 convertor(const lts_fsm_base& lts_base_in, const lts_dot_base& /* lts_base_out */)
581 : m_state_count(0), m_lts_in(lts_base_in)
582 {
583 }
584};
585
586inline void lts_convert_base_class(const lts_fsm_base& /* base_in */, lts_dot_base& /* base_out */)
587{
588 // Nothing needs to be done.
589}
590
591inline void lts_convert_base_class(const lts_fsm_base& base_in,
592 lts_dot_base& base_out,
593 const data::data_specification& ,
594 const process::action_label_list& ,
595 const data::variable_list& ,
596 const bool extra_data_is_defined=true)
597{
598 if (extra_data_is_defined)
599 {
600 mCRL2log(log::warning) << "While translating .fsm to .aut, additional information (data specification, action declarations and process parameters) are ignored.\n";
601 }
602 lts_convert_base_class(base_in,base_out);
603}
604
605inline void lts_convert_translate_state(const state_label_fsm& state_label_in, state_label_dot& state_label_out, convertor<lts_fsm_base, lts_dot_base>& c)
606{
607 std::stringstream state_name;
608 state_name << "s" << c.m_state_count;
610
611 std::string state_label;
612 if (!state_label_in.empty())
613 {
614 state_label="(";
615 for (std::size_t i=0; i<state_label_in.size(); ++i)
616 {
617 state_label=state_label + c.m_lts_in.state_element_value(i,state_label_in[i])+(i+1==state_label_in.size()?")":",");
618 }
619 }
620
621 state_label_out=state_label_dot(state_name.str(),state_label);
622}
623
625{
626 return l_in;
627}
628
629
630// ====================== aut -> lts =============================
631
632template<>
634{
635 public:
638
639 convertor(const lts_aut_base& /* lts_base_in*/, const lts_lts_base& lts_base_out)
640 : m_data(lts_base_out.data()),
642 {
643 }
644};
645
646inline void lts_convert_base_class(const lts_aut_base& /* base_in */, lts_lts_base& /* base_out */)
647{
648 throw mcrl2::runtime_error("Cannot translate .aut into .lts format without additional information (data, action declarations and process parameters)");
649}
650
651inline void lts_convert_base_class(const lts_aut_base& base_in,
652 lts_lts_base& base_out,
653 const data::data_specification& data,
654 const process::action_label_list& action_labels,
655 const data::variable_list& process_parameters,
656 const bool extra_data_is_defined=true)
657{
658 if (extra_data_is_defined)
659 {
660 base_out.set_data(data);
661 base_out.set_action_label_declarations(action_labels);
662 base_out.set_process_parameters(process_parameters);
663 }
664 else
665 {
666 lts_convert_base_class(base_in,base_out);
667 }
668}
669
671{
672 return translate_label_aux(l_in, c.m_data, c.m_typechecker);
673}
674
675inline void lts_convert_translate_state(const state_label_empty& /* state_label_in */, state_label_lts& state_label_out, convertor<lts_aut_base, lts_lts_base>& /* c */)
676{
677 // There is no state label. Use the default.
678 state_label_out=state_label_lts();
679}
680
681/* data::data_expression translate_probability_label(const probabilistic_arbitrary_precision_fraction& d)
682{
683 return detail::translate_probability_prob_data_arbitrary_size(d);
684} */
685
686// ====================== aut -> fsm =============================
687
688inline void lts_convert_base_class(const lts_aut_base& /* base_in */, lts_fsm_base& base_out)
689{
690 //Reset lts_out
691 base_out=lts_fsm_base();
692}
693
694inline void lts_convert_base_class(const lts_aut_base& base_in,
695 lts_fsm_base& base_out,
696 const data::data_specification& ,
697 const process::action_label_list& ,
698 const data::variable_list& ,
699 const bool extra_data_is_defined=true)
700{
701 if (extra_data_is_defined)
702 {
703 mCRL2log(log::warning) << "While translating .aut to .fsm, additional information (data specification, action declarations and process parameters) are ignored.\n";
704 }
705 lts_convert_base_class(base_in,base_out);
706}
707
709{
710 return l_in;
711}
712
713inline void lts_convert_translate_state(const state_label_empty& /* state_label_in */, state_label_fsm& state_label_out, convertor<lts_aut_base, lts_fsm_base>& /* c */)
714{
715 state_label_out=state_label_fsm();
716}
717
718// ====================== aut -> aut =============================
719
720inline void lts_convert_base_class(const lts_aut_base& base_in, lts_aut_base& base_out)
721{
722 base_out=base_in;
723}
724
725inline void lts_convert_base_class(const lts_aut_base& base_in,
726 lts_aut_base& base_out,
727 const data::data_specification& ,
728 const process::action_label_list& ,
729 const data::variable_list& ,
730 const bool extra_data_is_defined=true)
731{
732 if (extra_data_is_defined)
733 {
734 mCRL2log(log::warning) << "While translating .aut to .aut, additional information (data specification, action declarations and process parameters) are ignored.\n";
735 }
736 lts_convert_base_class(base_in,base_out);
737}
738
739inline void lts_convert_translate_state(const state_label_empty& state_label_in, state_label_empty& state_label_out, convertor<lts_aut_base, lts_aut_base>& /* c */)
740{
741 state_label_out=state_label_in;
742}
743
745{
746 return l_in;
747}
748
749// ====================== aut -> dot =============================
750
751inline void lts_convert_base_class(const lts_aut_base& /* base_in */, lts_dot_base& /* base_out */)
752{
753 // Nothing needs to be done.
754}
755
756inline void lts_convert_base_class(const lts_aut_base& base_in,
757 lts_dot_base& base_out,
758 const data::data_specification& ,
759 const process::action_label_list& ,
760 const data::variable_list& ,
761 const bool extra_data_is_defined=true)
762{
763 if (extra_data_is_defined)
764 {
765 mCRL2log(log::warning) << "While translating .aut to .dot, additional information (data specification, action declarations and process parameters) are ignored.\n";
766 }
767 lts_convert_base_class(base_in,base_out);
768}
769
770inline void lts_convert_translate_state(const state_label_empty& /* state_label_in */, state_label_dot& state_label_out, convertor<lts_aut_base, lts_dot_base>& /* c */)
771{
772 state_label_out=state_label_dot();
773}
774
776{
777 return l_in;
778}
779
780
781// ====================== END CONCRETE LTS FORMAT CONVERSIONS =============================
782
783
784// ====================== BEGIN ACTUAL CONVERSIONS =============================
785
786
787// Actual conversion without base class conversion.
788template < class STATE_LABEL1, class ACTION_LABEL1, class LTS_BASE1, class STATE_LABEL2, class ACTION_LABEL2, class LTS_BASE2>
789inline void lts_convert_aux(const lts<STATE_LABEL1, ACTION_LABEL1, LTS_BASE1>& lts_in,
790 lts<STATE_LABEL2, ACTION_LABEL2, LTS_BASE2>& lts_out)
791{
792 convertor<LTS_BASE1, LTS_BASE2> c(lts_in, lts_out);
793
794 if (lts_in.has_state_info())
795 {
796 for (std::size_t i=0; i<lts_in.num_states(); ++i)
797 {
798 STATE_LABEL2 s;
799 lts_convert_translate_state(lts_in.state_label(i), s, c);
800 lts_out.add_state(s);
801 }
802 }
803 else
804 {
805 lts_out.set_num_states(lts_in.num_states(),false);
806 }
807
808 for (std::size_t i=0; i<lts_in.num_action_labels(); ++i)
809 {
810 lts_out.add_action(lts_convert_translate_label(lts_in.action_label(i),c));
811 }
812
813 const std::vector<transition>& trans=lts_in.get_transitions();
814 for (const transition& t: trans)
815 {
816 lts_out.add_transition(t);
817 }
818 lts_out.set_initial_state(lts_in.initial_state());
819
820 lts_out.set_hidden_label_set(lts_in.hidden_label_set());
821}
822
823// ====================== lts -> lts =============================
824
825template < class STATE_LABEL1, class ACTION_LABEL1, class LTS_BASE1, class STATE_LABEL2, class ACTION_LABEL2, class LTS_BASE2>
826inline void lts_convert(const lts<STATE_LABEL1, ACTION_LABEL1, LTS_BASE1>& lts_in,
827 lts<STATE_LABEL2, ACTION_LABEL2, LTS_BASE2>& lts_out)
828{
829 lts_convert_base_class(static_cast<const LTS_BASE1&>(lts_in), static_cast<LTS_BASE2&>(lts_out));
830 lts_convert_aux<STATE_LABEL1, ACTION_LABEL1, LTS_BASE1,STATE_LABEL2, ACTION_LABEL2, LTS_BASE2>(lts_in,lts_out);
831}
832
833template < class STATE_LABEL1, class ACTION_LABEL1, class LTS_BASE1,
834 class STATE_LABEL2, class ACTION_LABEL2, class LTS_BASE2>
835inline void lts_convert(const lts<STATE_LABEL1, ACTION_LABEL1, LTS_BASE1>& lts_in,
836 lts<STATE_LABEL2, ACTION_LABEL2, LTS_BASE2>& lts_out,
837 const data::data_specification& ds,
838 const process::action_label_list& all,
839 const data::variable_list& vl,
840 const bool extra_data_is_defined=true)
841{
842 lts_convert_base_class(static_cast<const LTS_BASE1&>(lts_in), static_cast<LTS_BASE2&>(lts_out), ds, all, vl, extra_data_is_defined);
843 lts_convert_aux<STATE_LABEL1, ACTION_LABEL1, LTS_BASE1,STATE_LABEL2, ACTION_LABEL2, LTS_BASE2>(lts_in,lts_out);
844}
845
846// ====================== probabilistic_lts -> lts =============================
847
848template < class STATE_LABEL1, class ACTION_LABEL1, class PROBABILISTIC_STATE1, class LTS_BASE1, class STATE_LABEL2, class ACTION_LABEL2, class LTS_BASE2>
849void remove_probabilities(const probabilistic_lts<STATE_LABEL1, ACTION_LABEL1, PROBABILISTIC_STATE1, LTS_BASE1>& lts_in,
850 lts<STATE_LABEL2, ACTION_LABEL2, LTS_BASE2>& lts_out)
851{
852 if (lts_in.initial_probabilistic_state().size()<=1)
853 {
854 lts_out.set_initial_state(lts_in.initial_probabilistic_state().get());
855 }
856 else
857 {
858 throw mcrl2::runtime_error("Initial state is probabilistic and cannot be transformed into a non probabilistic state.");
859 }
860
861 // Adapt the probabilistic target states to non probabilistic target states.
862 std::size_t transition_number=1;
863 for(transition& t: lts_out.get_transitions())
864 {
865 std::size_t probabilistic_target_state_number=t.to();
866 if (lts_in.probabilistic_state(probabilistic_target_state_number).size()>1)
867 {
868 throw mcrl2::runtime_error("Transition " + std::to_string(transition_number) + " is probabilistic.");
869 }
870 else
871 {
872 t=transition(t.from(), t.label(), lts_in.probabilistic_state(probabilistic_target_state_number).get());
873 }
874 transition_number++;
875 }
876}
877
878template < class STATE_LABEL1, class ACTION_LABEL1, class LTS_BASE1, class PROBABILISTIC_STATE1, class STATE_LABEL2, class ACTION_LABEL2, class LTS_BASE2>
879inline void lts_convert(const probabilistic_lts<STATE_LABEL1, ACTION_LABEL1, PROBABILISTIC_STATE1, LTS_BASE1>& lts_in,
880 lts<STATE_LABEL2, ACTION_LABEL2, LTS_BASE2>& lts_out)
881{
882 lts_convert<STATE_LABEL1, ACTION_LABEL1, LTS_BASE1, STATE_LABEL2, ACTION_LABEL2, LTS_BASE2>(lts_in,lts_out);
883 remove_probabilities(lts_in,lts_out);
884
885}
886
887
888
889template < class STATE_LABEL1, class ACTION_LABEL1, class PROBABILISTIC_STATE1, class LTS_BASE1,
890 class STATE_LABEL2, class ACTION_LABEL2, class LTS_BASE2>
891inline void lts_convert(const probabilistic_lts<STATE_LABEL1, ACTION_LABEL1, PROBABILISTIC_STATE1, LTS_BASE1>& lts_in,
892 lts<STATE_LABEL2, ACTION_LABEL2, LTS_BASE2>& lts_out,
893 const data::data_specification& data,
894 const process::action_label_list& action_label_list,
895 const data::variable_list& process_parameters,
896 const bool extra_data_is_defined=true)
897{
898 lts_convert<STATE_LABEL1, ACTION_LABEL1, LTS_BASE1,STATE_LABEL2, ACTION_LABEL2, LTS_BASE2>(lts_in,lts_out,data,action_label_list,process_parameters,extra_data_is_defined);
899 remove_probabilities(lts_in,lts_out);
900}
901
902// ====================== lts -> probabilistic_lts =============================
903
904template < class STATE_LABEL1, class ACTION_LABEL1, class LTS_BASE1,
905 class STATE_LABEL2, class ACTION_LABEL2, class PROBABILISTIC_STATE2, class LTS_BASE2>
906inline void add_probabilities(const lts<STATE_LABEL1, ACTION_LABEL1, LTS_BASE1>& lts_in,
907 probabilistic_lts<STATE_LABEL2, ACTION_LABEL2, PROBABILISTIC_STATE2, LTS_BASE2>& lts_out)
908{
909 lts_out.set_initial_probabilistic_state(PROBABILISTIC_STATE2(lts_in.initial_state()));
910 for(std::size_t i=0; i<lts_out.num_states(); ++i)
911 {
912 lts_out.add_probabilistic_state(PROBABILISTIC_STATE2(i));
913 }
914}
915
916
917template < class STATE_LABEL1, class ACTION_LABEL1, class LTS_BASE1, class STATE_LABEL2, class ACTION_LABEL2, class PROBABILISTIC_STATE2, class LTS_BASE2>
918inline void lts_convert(const lts<STATE_LABEL1, ACTION_LABEL1, LTS_BASE1>& lts_in,
919 probabilistic_lts<STATE_LABEL2, ACTION_LABEL2, PROBABILISTIC_STATE2, LTS_BASE2>& lts_out)
920{
921 lts_convert<STATE_LABEL1, ACTION_LABEL1, LTS_BASE1, STATE_LABEL2, ACTION_LABEL2, LTS_BASE2>(lts_in,lts_out);
922 add_probabilities(lts_in,lts_out);
923}
924
925template < class STATE_LABEL1, class ACTION_LABEL1, class LTS_BASE1,
926 class STATE_LABEL2, class ACTION_LABEL2, class PROBABILISTIC_STATE2, class LTS_BASE2>
927inline void lts_convert(const lts<STATE_LABEL1, ACTION_LABEL1, LTS_BASE1>& lts_in,
928 probabilistic_lts<STATE_LABEL2, ACTION_LABEL2, PROBABILISTIC_STATE2, LTS_BASE2>& lts_out,
929 const data::data_specification& data,
930 const process::action_label_list& action_label_list,
931 const data::variable_list& process_parameters,
932 const bool extra_data_is_defined=true)
933{
934 lts_convert<STATE_LABEL1, ACTION_LABEL1, LTS_BASE1,STATE_LABEL2, ACTION_LABEL2, LTS_BASE2>(lts_in,lts_out,data,action_label_list,process_parameters,extra_data_is_defined);
935 add_probabilities(lts_in, lts_out);
936}
937
938// ====================== probabilistic_lts -> probabilistic_lts =============================
939
940template < class STATE_LABEL1, class ACTION_LABEL1, class PROBABILISTIC_STATE1, class LTS_BASE1,
941 class STATE_LABEL2, class ACTION_LABEL2, class PROBABILISTIC_STATE2, class LTS_BASE2>
942inline void translate_probability_labels(const probabilistic_lts<STATE_LABEL1, ACTION_LABEL1, PROBABILISTIC_STATE1, LTS_BASE1>& lts_in,
943 probabilistic_lts<STATE_LABEL2, ACTION_LABEL2, PROBABILISTIC_STATE2, LTS_BASE2>& lts_out)
944{
945 lts_out.clear_probabilistic_states();
946 for(std::size_t i=0; i< lts_in.num_probabilistic_states(); ++i)
947 {
948 lts_out.add_probabilistic_state(lts_convert_probabilistic_state<PROBABILISTIC_STATE1,PROBABILISTIC_STATE2>(lts_in.probabilistic_state(i)));
949 }
950 lts_out.set_initial_probabilistic_state(lts_convert_probabilistic_state<PROBABILISTIC_STATE1,PROBABILISTIC_STATE2>(lts_in.initial_probabilistic_state()));
951}
952
953
954template < class STATE_LABEL1, class ACTION_LABEL1, class PROBABILISTIC_STATE1, class LTS_BASE1,
955 class STATE_LABEL2, class ACTION_LABEL2, class PROBABILISTIC_STATE2, class LTS_BASE2>
956inline void lts_convert(const probabilistic_lts<STATE_LABEL1, ACTION_LABEL1, PROBABILISTIC_STATE1, LTS_BASE1>& lts_in,
957 probabilistic_lts<STATE_LABEL2, ACTION_LABEL2, PROBABILISTIC_STATE2, LTS_BASE2>& lts_out)
958{
959 lts_convert(static_cast<const lts<STATE_LABEL1, ACTION_LABEL1, LTS_BASE1>& >(lts_in),
960 static_cast<lts<STATE_LABEL2, ACTION_LABEL2, LTS_BASE2>& >(lts_out));
961 translate_probability_labels(lts_in,lts_out);
962}
963
964template < class STATE_LABEL1, class ACTION_LABEL1, class PROBABILISTIC_STATE1, class LTS_BASE1,
965 class STATE_LABEL2, class ACTION_LABEL2, class PROBABILISTIC_STATE2, class LTS_BASE2>
966inline void lts_convert(const probabilistic_lts<STATE_LABEL1, ACTION_LABEL1, PROBABILISTIC_STATE1, LTS_BASE1>& lts_in,
967 probabilistic_lts<STATE_LABEL2, ACTION_LABEL2, PROBABILISTIC_STATE2, LTS_BASE2>& lts_out,
968 const data::data_specification& data,
969 const process::action_label_list& action_label_list,
970 const data::variable_list& process_parameters,
971 const bool extra_data_is_defined=true)
972{
973 lts_convert(static_cast<const lts<STATE_LABEL1, ACTION_LABEL1, LTS_BASE1>& >(lts_in),
974 static_cast<lts<STATE_LABEL2, ACTION_LABEL2, LTS_BASE2>& >(lts_out),
975 data, action_label_list, process_parameters, extra_data_is_defined);
976 translate_probability_labels(lts_in,lts_out);
977}
978
979// ====================== END ACTUAL CONVERSIONS =============================
980
981} // namespace detail
982} // namespace lts
983} // namespace mcrl2
984
985#endif
#define mCRL2complexity(unit, call, info_for_debug)
Assigns work to a counter and checks for errors.
The interface for a class that reads aterm from a stream. The default constructed term aterm() indica...
Definition aterm_io.h:59
The interface for a class that writes aterm to a stream. Every written term is retrieved by the corre...
Definition aterm_io.h:48
const aterm & operator[](const size_type i) const
Returns the i-th argument.
Definition aterm.h:187
aterm & operator=(const aterm &other) noexcept=default
const function_symbol & function() const
Returns the function symbol belonging to an aterm.
Definition aterm.h:144
aterm(const aterm &other) noexcept=default
This class has user-declared copy constructor so declare default copy and move operators.
const function_symbol & function() const noexcept
Definition aterm_core.h:55
bool operator!=(const function_symbol &f) const
Inequality test.
bool operator==(const function_symbol &f) const
Equality test.
unprotected_aterm_core m_stack[maximal_size_of_stack]
static constexpr std::size_t maximal_size_of_stack
void initialise(const term_balanced_tree< Term > &tree)
const Term & dereference() const
Dereference operator.
bool equal(const iterator &other) const
Equality operator.
iterator(const term_balanced_tree< Term > &tree)
void increment()
Increments the iterator.
bool is_node() const
Returns true iff the tree is a node with a left and right subtree.
friend void make_term_balanced_tree(term_balanced_tree< Term1 > &result, ForwardTraversalIterator p, const std::size_t size, Transformer transformer)
static void make_tree_helper(aterm &result, ForwardTraversalIterator &p, const std::size_t size, Transformer transformer)
term_balanced_tree & operator=(const term_balanced_tree &) noexcept=default
Assignment operator.
size_type size() const
Returns the size of the term_balanced_tree.
term_balanced_tree(term_balanced_tree &&) noexcept=default
Move constructor.
bool empty() const
Returns true if tree is empty.
Term & reference
Reference to T.
static const aterm & empty_tree()
static void make_tree(aterm &result, ForwardTraversalIterator &p, const std::size_t size, Transformer transformer)
term_balanced_tree(ForwardTraversalIterator first, const std::size_t size)
Creates an term_balanced_tree with a copy of a range.
std::size_t size_type
An unsigned integral type.
static const function_symbol & tree_single_node_function()
const aterm & left_branch() const
Get the left branch of the tree.
term_balanced_tree(const term_balanced_tree &) noexcept=default
Copy constructor.
Term value_type
The type of object, T stored in the term_balanced_tree.
term_balanced_tree(ForwardTraversalIterator first, const std::size_t size, Transformer transformer)
Creates an term_balanced_tree with a copy of a range, where a transformer is applied to each term bef...
static const function_symbol & tree_node_function()
const Term & operator[](std::size_t position) const
Element indexing operator.
iterator begin() const
Returns an iterator pointing to the beginning of the term_balanced_tree.
iterator end() const
Returns an iterator pointing to the end of the term_balanced_tree.
term_balanced_tree()
Default constructor. Creates an empty tree.
const aterm & right_branch() const
Get the left branch of the tree.
term_balanced_tree & operator=(term_balanced_tree &&) noexcept=default
Move assign operator.
const Term const_reference
Const reference to T.
term_balanced_tree(const aterm &tree)
Construction from aterm.
const Term & element_at(std::size_t position, std::size_t size) const
Get an element at the indicated position.
static const function_symbol & tree_empty_function()
term_balanced_tree(detail::_term_appl *t)
ptrdiff_t difference_type
A signed integral type.
A list of aterm objects.
Definition aterm_list.h:24
An unprotected term does not change the reference count of the shared term when it is copied or moved...
Definition aterm_core.h:32
void swap(unprotected_aterm_core &t) noexcept
Swaps this term with its argument.
Definition aterm_core.h:152
bool operator==(const unprotected_aterm_core &t) const
Comparison operator.
Definition aterm_core.h:83
bool defined() const
Returns true if this term is not equal to the term assigned by the default constructor of aterms,...
Definition aterm_core.h:143
const detail::_aterm * m_term
Definition aterm_core.h:36
bool operator!=(const unprotected_aterm_core &t) const
Inequality operator on two unprotected aterms.
Definition aterm_core.h:92
const function_symbol & function() const
Yields the function symbol in an aterm.
Definition aterm_core.h:161
hash_table2_iterator(hash_table2 *ht)
std::size_t get_x()
std::vector< bucket2 >::iterator bucket_it
hash_table2 * hash_table
std::size_t get_y()
std::vector< bucket2 > buckets
bool find(std::size_t x, std::size_t y)
std::size_t removed_count
std::size_t hash(std::size_t x, std::size_t y)
void remove(std::size_t x, std::size_t y)
void add(std::size_t x, std::size_t y)
std::size_t mask
std::size_t hfind(std::size_t h, std::size_t x, std::size_t y)
std::vector< std::size_t > table
hash_table2(std::size_t initsize)
std::vector< bucket3 >::iterator bucket_it
hash_table3_iterator(hash_table3 *ht)
void set_end(std::size_t i)
std::vector< bucket3 >::iterator end
hash_table3 * hash_table
void set(std::size_t i)
hash_table3(std::size_t initsize)
std::size_t hash(std::size_t x, std::size_t y, std::size_t z)
std::size_t mask
bool find(std::size_t x, std::size_t y, std::size_t z)
std::size_t get_num_elements()
void remove(std::size_t x, std::size_t y, std::size_t z)
void add(std::size_t x, std::size_t y, std::size_t z)
std::size_t removed_count
std::vector< bucket3 > buckets
std::size_t hfind(std::size_t h, std::size_t x, std::size_t y, std::size_t z)
std::vector< std::size_t > table
action_formula(action_formula &&) noexcept=default
action_formula & operator=(const action_formula &) noexcept=default
action_formula(const atermpp::aterm &term)
action_formula(const data::data_expression &x)
\brief Constructor Z6.
action_formula(const action_formula &) noexcept=default
Move semantics.
action_formula & operator=(action_formula &&) noexcept=default
action_formula(const data::untyped_data_parameter &x)
\brief Constructor Z6.
action_formula()
\brief Default constructor X3.
action_formula(const process::untyped_multi_action &x)
\brief Constructor Z6.
\brief The and operator for action formulas
and_ & operator=(const and_ &) noexcept=default
and_ & operator=(and_ &&) noexcept=default
and_(const action_formula &left, const action_formula &right)
\brief Constructor Z14.
and_()
\brief Default constructor X3.
and_(and_ &&) noexcept=default
const action_formula & left() const
and_(const atermpp::aterm &term)
and_(const and_ &) noexcept=default
Move semantics.
const action_formula & right() const
\brief The at operator for action formulas
at(const atermpp::aterm &term)
const data::data_expression & time_stamp() const
at & operator=(at &&) noexcept=default
const action_formula & operand() const
at(const at &) noexcept=default
Move semantics.
at(at &&) noexcept=default
at()
\brief Default constructor X3.
at & operator=(const at &) noexcept=default
at(const action_formula &operand, const data::data_expression &time_stamp)
\brief Constructor Z14.
\brief The existential quantification operator for action formulas
exists(const atermpp::aterm &term)
exists & operator=(exists &&) noexcept=default
exists(exists &&) noexcept=default
exists(const exists &) noexcept=default
Move semantics.
exists()
\brief Default constructor X3.
const data::variable_list & variables() const
exists & operator=(const exists &) noexcept=default
const action_formula & body() const
exists(const data::variable_list &variables, const action_formula &body)
\brief Constructor Z14.
\brief The value false for action formulas
false_(const atermpp::aterm &term)
false_()
\brief Default constructor X3.
false_(false_ &&) noexcept=default
false_(const false_ &) noexcept=default
Move semantics.
false_ & operator=(const false_ &) noexcept=default
false_ & operator=(false_ &&) noexcept=default
\brief The universal quantification operator for action formulas
forall & operator=(const forall &) noexcept=default
const action_formula & body() const
forall & operator=(forall &&) noexcept=default
forall(const atermpp::aterm &term)
const data::variable_list & variables() const
forall()
\brief Default constructor X3.
forall(const data::variable_list &variables, const action_formula &body)
\brief Constructor Z14.
forall(const forall &) noexcept=default
Move semantics.
forall(forall &&) noexcept=default
\brief The implication operator for action formulas
const action_formula & left() const
imp(const imp &) noexcept=default
Move semantics.
imp(imp &&) noexcept=default
imp & operator=(imp &&) noexcept=default
imp(const action_formula &left, const action_formula &right)
\brief Constructor Z14.
imp()
\brief Default constructor X3.
imp & operator=(const imp &) noexcept=default
imp(const atermpp::aterm &term)
const action_formula & right() const
\brief The multi action for action formulas
multi_action(const multi_action &) noexcept=default
Move semantics.
multi_action(multi_action &&) noexcept=default
multi_action(const process::action_list &actions)
\brief Constructor Z14.
multi_action(const atermpp::aterm &term)
multi_action & operator=(const multi_action &) noexcept=default
multi_action()
\brief Default constructor X3.
const process::action_list & actions() const
multi_action & operator=(multi_action &&) noexcept=default
\brief The not operator for action formulas
not_(const action_formula &operand)
\brief Constructor Z14.
not_()
\brief Default constructor X3.
const action_formula & operand() const
not_(const atermpp::aterm &term)
not_(not_ &&) noexcept=default
not_(const not_ &) noexcept=default
Move semantics.
not_ & operator=(const not_ &) noexcept=default
not_ & operator=(not_ &&) noexcept=default
\brief The or operator for action formulas
or_ & operator=(const or_ &) noexcept=default
or_(or_ &&) noexcept=default
or_()
\brief Default constructor X3.
or_ & operator=(or_ &&) noexcept=default
or_(const action_formula &left, const action_formula &right)
\brief Constructor Z14.
or_(const atermpp::aterm &term)
or_(const or_ &) noexcept=default
Move semantics.
const action_formula & right() const
const action_formula & left() const
\brief The value true for action formulas
true_(true_ &&) noexcept=default
true_ & operator=(const true_ &) noexcept=default
true_()
\brief Default constructor X3.
true_(const true_ &) noexcept=default
Move semantics.
true_(const atermpp::aterm &term)
true_ & operator=(true_ &&) noexcept=default
data_expression & operator=(const data_expression &) noexcept=default
data_expression & operator=(data_expression &&) noexcept=default
sort_expression sort() const
Returns the sort of the data expression.
Definition data.cpp:108
data_expression(const data_expression &) noexcept=default
Move semantics.
data_expression(data_expression &&) noexcept=default
Rewriter that operates on data expressions.
Definition rewriter.h:81
data_expression operator()(const data_expression &d) const
Rewrites a data expression.
Definition rewriter.h:158
void add_sort(const basic_sort &s)
Adds a sort to this specification.
\brief A data variable
Definition variable.h:28
Class for logging messages.
Definition logger.h:129
static void set_reporting_level(const log_level_t level)
Set reporting level.
Definition logger.h:210
logger(const log_level_t l)
Default constructor.
Definition logger.h:164
Read-only singly linked list of action rename rules.
\brief A timed multi-action
multi_action(const multi_action &) noexcept=default
Move semantics.
const process::action_list & actions() const
const data::data_expression & time() const
multi_action(multi_action &&) noexcept=default
multi_action(const process::action_list &actions=process::action_list(), data::data_expression time=data::undefined_real())
Constructor.
This class contains labels for probabilistic transistions, consisting of a numerator and a denumerato...
static probabilistic_data_expression one()
Constant one.
probabilistic_data_expression operator+(const probabilistic_data_expression &other) const
Standard addition operator. Note that the expression is not evaluated. For this the rewriter has to b...
probabilistic_data_expression(const data::data_expression &d)
Construct a probabilistic_data_expression from a data_expression, which must be of sort real.
bool operator==(const probabilistic_data_expression &other) const
probabilistic_data_expression(std::size_t enumerator, std::size_t denominator)
bool operator!=(const probabilistic_data_expression &other) const
bool operator>=(const probabilistic_data_expression &other) const
bool operator<(const probabilistic_data_expression &other) const
bool operator<=(const probabilistic_data_expression &other) const
bool operator>(const probabilistic_data_expression &other) const
probabilistic_data_expression operator-(const probabilistic_data_expression &other) const
Standard subtraction operator.
static data::data_specification data_specification_with_real()
static probabilistic_data_expression zero()
Constant zero.
Linear process specification.
STATE & state()
Get the state in a state probability pair.
state_probability_pair(state_probability_pair &&p)=default
state_probability_pair & operator=(state_probability_pair &&p)=default
state_probability_pair(const state_probability_pair &p)=default
Copy constructor;.
state_probability_pair & operator=(const state_probability_pair &p)=default
Standard assignment.
const PROBABILITY & probability() const
get the probability from a state proability pair.
const STATE & state() const
Get the state from a state probability pair.
PROBABILITY & probability()
Set the probability in a state probability pair.
state_probability_pair(const STATE &state, const PROBABILITY &probability)
constructor.
bool operator==(const state_probability_pair &other) const
Standard equality operator.
A class containing the values for action labels for the .lts format.
Definition lts_lts.h:144
action_label_lts & operator=(const action_label_lts &)=default
Copy assignment.
static mcrl2::lps::multi_action sort_multiactions(const mcrl2::lps::multi_action &a)
A function to sort a multi action to guarantee that multi-actions are compared properly.
Definition lts_lts.h:190
void hide_actions(const std::vector< std::string > &tau_actions)
Hide the actions with labels in tau_actions.
Definition lts_lts.h:166
action_label_lts(const action_label_lts &)=default
Copy constructor.
static const action_label_lts & tau_action()
Definition lts_lts.h:182
action_label_lts()
Default constructor.
Definition lts_lts.h:148
action_label_lts(const mcrl2::lps::multi_action &a)
Constructor.
Definition lts_lts.h:158
This class contains strings to be used as values for action labels in lts's.
static std::string sort_multiactions(const std::string &s)
Sort multiactions in a string.
void hide_actions(const std::vector< std::string > &string_vector)
action_label_string & operator=(const action_label_string &)=default
Copy assignment.
static const action_label_string & tau_action()
action_label_string(const std::string &s)
bool operator<(const action_label_string &l) const
action_label_string(const action_label_string &)=default
Copy constructor.
A simple class storing the index of a label and an index.
action_index_pair(std::size_t label_index, std::size_t previous_entry_index)
information about a transition sorted per (action, target block) pair
action_block_entry * begin_or_before_end
pointer to delimit the slice of transitions in the same (action, block) pair
succ_entry * succ
circular iterator to link the four transition arrays
action_block_entry * action_block_slice_begin(ONLY_IF_DEBUG(const action_block_entry *const action_block_begin, const action_block_entry *const action_block_orig_inert_begin))
find the beginning of the action_block-slice
information about a transition grouped per (source block, bunch) pair
block_bunch_slice_iter_or_null_t slice
block_bunch-slice of which this transition is part
pred_entry * pred
circular iterator to link the four transition arrays
Information about a set of transitions with the same source block, in the same bunch.
void make_unstable()
register that the block_bunch-slice is not stable
bool is_stable() const
returns true iff the block_bunch-slice is registered as stable
bool empty() const
returns true iff the block_bunch-slice is empty
check_complexity::block_bunch_dnj_counter_t work_counter
bool add_work_to_bottom_transns(enum check_complexity::counter_type const ctr, unsigned const max_value, const bisim_partitioner_dnj< LTS_TYPE > &partitioner) const
add work to transitions starting in bottom states
block_bunch_slice_t(block_bunch_entry *const new_end, bunch_t *const new_bunch, bool const new_is_stable)
constructor
bunch_t * bunch
bunch to which this slice belongs
std::string debug_id(const bisim_partitioner_dnj< LTS_TYPE > &partitioner) const
print a block_bunch-slice identification for debugging
block_bunch_entry * end
pointer past the end of the transitions in the block_bunch array
void make_stable()
register that the block_bunch-slice is stable
block_bunch_entry * marked_begin
pointer to the first marked transition in the block_bunch array
block_t * source_block() const
compute the source block of the transitions in this slice
stores information about a block
std::string debug_id(const bisim_partitioner_dnj< LTS_TYPE > &partitioner) const
print a block identification for debugging
state_type size() const
provides the number of states in the block
permutation_entry * nonbottom_begin
iterator to the first non-bottom state of the block
permutation_entry * begin
iterator to the first state of the block
bool mark_nonbottom(permutation_entry *const s)
mark a non-bottom state
check_complexity::block_dnj_counter_t work_counter
permutation_entry * marked_bottom_begin
iterator to the first marked bottom state of the block
state_type marked_size() const
provides the number of marked states in the block
state_type marked_bottom_size() const
provides the number of marked bottom states in the block
permutation_entry * end
iterator past the last state of the block
simple_list< block_bunch_slice_t > stable_block_bunch
list of stable block_bunch-slices with transitions from this block
state_type unmarked_bottom_size() const
provides the number of unmarked bottom states in the block
state_type bottom_size() const
provides the number of bottom states in the block
bool mark(permutation_entry *const s)
mark a state
const state_type seqnr
unique sequence number of this block
permutation_entry * marked_nonbottom_begin
iterator to the first marked non-bottom state of the block
block_t(permutation_entry *const new_begin, permutation_entry *const new_end, state_type const new_seqnr)
constructor
state_type unmarked_nonbottom_size() const
provides the number of unmarked nonbottom states in the block
action_block_entry * end
pointer past the last transition in the bunch
std::string debug_id(const bisim_partitioner_dnj< LTS_TYPE > &partitioner) const
print a long bunch identification for debugging
std::string debug_id_short(const bisim_partitioner_dnj< LTS_TYPE > &partitioner) const
print a short bunch identification for debugging
action_block_entry * begin
first transition in the bunch
int max_work_counter(const bisim_partitioner_dnj< LTS_TYPE > &partitioner) const
calculates the maximal allowed value for work counters associated with this bunch
check_complexity::bunch_dnj_counter_t work_counter
bool is_trivial() const
returns true iff the bunch is trivial
bunch_t(action_block_entry *const new_begin, action_block_entry *const new_end)
constructor
refinable partition data structure
void assert_consistency(const bisim_partitioner_dnj< LTS_TYPE > &partitioner) const
asserts that the partition of states is consistent
fixed_vector< state_info_entry > state_info
array with all other information about states
state_type nr_of_blocks
total number of blocks with unique sequence number allocated
void print_block(const block_t *const B, const char *const message, const permutation_entry *begin_print, const permutation_entry *const end_print, const bisim_partitioner_dnj< LTS_TYPE > &partitioner) const
print a slice of the partition (typically a block)
permutation_t permutation
permutation array
const block_t * block(state_type const s) const
find the block of a state
part_state_t(state_type const num_states)
constructor
state_type state_size() const
calculate the size of the state space
void print_part(const bisim_partitioner_dnj< LTS_TYPE > &partitioner) const
print the partition per block
fixed_vector< pred_entry > pred
array containing all predecessor entries
state_type nr_of_new_bottom_states
number of new bottom states found until now.
action_block_entry * action_block_inert_begin
pointer to the first inert transition in action_block
fixed_vector< block_bunch_entry > block_bunch
array containing all block_bunch entries
block_bunch_entry * block_bunch_inert_begin
pointer to the first inert transition in block_bunch
const action_block_entry * action_block_orig_inert_begin
pointer to the first inert transition in the initial partition
void second_move_transition_to_new_action_block(pred_entry *const pred_iter)
handle one transition after a block has been split, phase 2
fixed_vector< succ_entry > succ
array containing all successor entries
succ_entry * move_out_slice_to_new_block(succ_entry *out_slice_end, ONLY_IF_DEBUG(const bisim_partitioner_dnj< LTS_TYPE > &partitioner,) block_t *const old_block, block_bunch_slice_const_iter_t const splitter_T)
Adapt the non-inert transitions in an out-slice to a new block.
bool make_noninert(pred_entry *const old_pred_pos, block_bunch_slice_iter_or_null_t *const new_noninert_block_bunch_ptr)
adapt data structures for a transition that has become non-inert
part_trans_t(trans_type num_transitions, trans_type num_actions)
constructor
void print_trans(const bisim_partitioner_dnj< LTS_TYPE > &partitioner) const
print all transitions
simple_list< block_bunch_slice_t > splitter_list
list of unstable block_bunch-slices
void first_move_transition_to_new_bunch(action_block_entry *const action_block_iter, bunch_t *const bunch_T_a_Bprime, bool const first_transition_of_state)
transition is moved to a new bunch
void make_nontrivial(bunch_t *const bunch)
insert a bunch into the list of nontrivial bunches
fixed_vector< action_block_entry > action_block
array containing all action_block entries
void adapt_transitions_for_new_block(block_t *const new_block, block_t *const old_block, ONLY_IF_DEBUG(const bisim_partitioner_dnj< LTS_TYPE > &partitioner,) bool const add_new_noninert_to_splitter, const block_bunch_slice_iter_t splitter_T, enum new_block_mode_t const new_block_mode)
Split all data structures after a new block has been created.
bunch_t * get_some_nontrivial()
provide some bunch from the list of non-trivial bunches
void first_move_transition_to_new_action_block(pred_entry *const pred_iter)
handle one transition after a block has been split
trans_type nr_of_bunches
counters to measure progress
void make_trivial(bunch_t *const bunch)
remove a bunch from the list of nontrivial bunches
void second_move_transition_to_new_bunch(action_block_entry *const action_block_iter, ONLY_IF_DEBUG(const bisim_partitioner_dnj< LTS_TYPE > &partitioner, bunch_t *const bunch_T_a_Bprime,) bunch_t *const large_splitter_bunch)
transition is moved to a new bunch, phase 2
bunch_t * first_nontrivial
pointer to first non-trivial bunch
entry in the permutation array
permutation_entry(const permutation_entry &&other) noexcept
move constructor
permutation_entry()=default
default constructor (should not be deleted)
void operator=(const permutation_entry &&other) noexcept
move assignment operator
state_info_entry * st
pointer to the state information data structure
information about a transition sorted per target state
state_info_entry * target
target state of the transition
action_block_entry * action_block
circular iterator to link the four transition arrays
std::string debug_id_short(const bisim_partitioner_dnj< LTS_TYPE > &partitioner) const
print a short transition identification for debugging
state_info_entry * source
source state of the transition
std::string debug_id(const bisim_partitioner_dnj< LTS_TYPE > &partitioner) const
print a transition identification for debugging
check_complexity::trans_dnj_counter_t work_counter
stores information about a single state
permutation_entry * pos
position of the state in the permutation array
iterator_or_counter< pred_entry * > pred_inert
iterator to first inert incoming transition
check_complexity::state_dnj_counter_t work_counter
std::string debug_id_short(const bisim_partitioner_dnj< LTS_TYPE > &partitioner) const
print a short state identification for debugging
iterator_or_counter< succ_entry * > untested_to_U_eqv
number of inert transitions to non-U-states
iterator_or_counter< succ_entry * > succ_inert
iterator to first inert outgoing transition
std::string debug_id(const bisim_partitioner_dnj< LTS_TYPE > &partitioner) const
print a state identification for debugging
information about a transition sorted per source state
succ_entry * begin_or_before_end
pointer to delimit the slice of transitions in the same bunch
block_bunch_entry * block_bunch
circular iterator to link the four transition arrays
stores information about a block
stores information about a constellation
stores information about a single state
bool surely_has_no_transition_to(const constln_t *const SpC) const
quick check to find out whether the state has no transition to SpC
bool surely_has_transition_to(const constln_t *const SpC) const
quick check to find out whether the state has a transition to SpC
void refine_partition_until_it_becomes_stable()
Run (branching) bisimulation minimisation in time O(m log n)
state_type num_eq_classes() const
Calculate the number of equivalence classes.
void create_initial_partition()
Create a partition satisfying the main invariant.
bool in_same_class(state_type const s, state_type const t) const
Check whether two states are in the same equivalence class.
bisim_dnj::block_t * handle_new_noninert_transns(bisim_dnj::block_t *const block_R, bisim_dnj::block_bunch_slice_const_iter_t bbslice_Tprime_R)
Handle a block with new non-inert transitions.
void assert_stability() const
assert that the data structure is consistent and stable
bisim_dnj::part_trans_t part_tr
partitions of the transitions (with bunches and action_block-slices)
LTS_TYPE & aut
automaton that is being reduced
state_type get_eq_class(state_type const s) const
Get the equivalence class of a state.
bisim_dnj::block_t * split(bisim_dnj::block_t *const block_B, const bisim_dnj::block_bunch_slice_iter_t splitter_T, enum refine_mode_t mode)
Split a block according to a splitter.
void finalize_minimized_LTS()
Adapt the LTS after minimisation.
std::clock_t end_initial_part
time measurement after the end of create_initial_partition()
bisim_partitioner_dnj(LTS_TYPE &new_aut, bool const new_branching=false, bool const new_preserve_divergence=false)
constructor
bool const branching
true iff branching (not strong) bisimulation has been requested
refine_mode_t
modes that determine details of how split() should work
bisim_dnj::part_state_t part_st
partition of the state space into blocks
bool const preserve_divergence
true iff divergence-preserving branching bisimulation has been requested
fixed_vector< bisim_dnj::iterator_or_counter< bisim_dnj::action_block_entry * > > action_label
action label slices
state_index number_of_states_in_block(const block_type &B) const
return the number of states in block B
void finalize_minimized_LTS()
Adapt the LTS after minimisation.
label_index label_or_divergence(const transition &t, const label_index divergent_label=-2) const
void swap_states_in_states_in_block(state_in_block_pointer *pos1, state_in_block_pointer *pos2)
swap the contents of pos1 and pos2 if they are different
LTS_TYPE & m_aut
automaton that is being reduced
block_type * select_and_remove_a_block_in_a_non_trivial_constellation()
Select a block that is not the largest block in a non-trivial constellation.
std::string ptr(const transition &t) const
std::unordered_set< state_index > set_of_states_type
std::vector< block_type * > m_blocks_with_new_bottom_states
std::unordered_set< transition_index > set_of_transitions_type
std::vector< constellation_type * > m_non_trivial_constellations
The following variable contains all non-trivial constellations.
void swap_states_in_states_in_block(state_in_block_pointer *pos1, state_in_block_pointer *pos2, state_in_block_pointer *pos3)
Move the contents of pos1 to pos2, those of pos2 to pos3 and those of pos3 to pos1
void multiple_swap_states_in_states_in_block(state_in_block_pointer *pos1, state_in_block_pointer *pos2, state_index count, const state_in_block_pointer *assign_work_to, unsigned char const max_B, enum check_complexity::counter_type const ctr=check_complexity::multiple_swap_states_in_block__swap_state_in_small_block)
Swap the range [pos1, pos1 + count) with the range [pos2, pos2 + count)
bool is_inert_during_init(const transition &t) const
state_index no_of_new_bottom_states
number of new bottom states found after constructing the initial partition
linked_list< BLC_indicators >::const_iterator next_target_constln_in_same_saC(state_in_block_pointer const src, BLC_list_const_iterator const splitter_it) const
find the next constellation after splitter_it's in the same_saC slice of the outgoing transitions
bool is_inert_during_init_if_branching(const transition &t) const
std::vector< linked_list< BLC_indicators >::iterator > m_BLC_indicators_to_be_deleted
void mark_BLC_transition(const outgoing_transitions_it out_pos)
marks the transition indicated by out_pos.
void check_incoming_tau_transitions_become_noninert(block_type *NewBotSt_block_index, state_in_block_pointer *start_bottom, state_in_block_pointer *const end_non_bottom)
makes incoming transitions from block NewBotSt_block_index non-block-inert
std::clock_t end_initial_part
time measurement after creating the initial partition (but before the first call to stabilizeB())
void move_nonbottom_states_to(const todo_state_vector &R, state_in_block_pointer *to_pos, state_index new_block_bottom_size)
Move states in a set to a specific position in m_states_in_block
linked_list< BLC_indicators >::iterator find_inert_co_transition_for_block(block_type *const index_block_B, const constellation_type *const old_constellation, const constellation_type *const new_constellation) const
find a splitter for the tau-transitions from the new constellation to the old constellation
state_index get_eq_class(const state_index si) const
Get the equivalence class of a state.
void swap_states_in_states_in_block_never_equal(state_in_block_pointer *pos1, state_in_block_pointer *pos2)
swap the contents of pos1 and pos2, assuming they are different
bool swap_in_the_doubly_linked_list_LBC_in_blocks_new_block(const transition_index ti, linked_list< BLC_indicators >::iterator new_BLC_block, linked_list< BLC_indicators >::iterator old_BLC_block)
Swap transition ti from BLC set old_BLC_block to BLC set new_BLC_block
std::size_t num_eq_classes() const
Calculate the number of equivalence classes.
bool check_data_structures(const std::string &tag, const bool initialisation=false, const bool check_temporary_complexity_counters=true) const
Checks whether data structures are consistent.
fixed_vector< transition_type > m_transitions
void order_BLC_transitions_single_BLC_set(state_in_block_pointer *const pos, BLC_list_iterator start_same_BLC, const BLC_list_iterator end_same_BLC)
create one BLC set for the block starting at pos
const bool m_branching
true iff branching (not strong) bisimulation has been requested
void display_BLC_list(const block_type *const bi) const
Prints the list of BLC sets as debug output.
void clear_state_counters(std::vector< state_in_block_pointer >::const_iterator begin, std::vector< state_in_block_pointer >::const_iterator const end, block_type *const block)
reset a range of state counters to undefined
state_index number_of_states_in_constellation(const constellation_type &C) const
return the number of states in constellation C
void swap_three_iterators_and_update_m_transitions(const BLC_list_iterator i1, const BLC_list_iterator i2, const BLC_list_iterator i3)
Move the content of i1 to i2, i2 to i3 and i3 to i1.
block_type * create_new_block(state_in_block_pointer *start_bottom_states, state_in_block_pointer *const start_non_bottom_states, state_in_block_pointer *const end_states, block_type *const old_block_index, constellation_type *const old_constellation, constellation_type *const new_constellation)
create a new block and adapt the BLC sets, and reset state counters
void order_BLC_transitions(const BLC_list_iterator start_same_BLC, const BLC_list_iterator end_same_BLC, state_in_block_pointer *min_block, state_in_block_pointer *max_block)
order m_BLC_transition entries according to source block
void check_transitions(const bool initialisation, const bool check_temporary_complexity_counters, const bool check_block_to_constellation=true) const
Checks whether the transition data structure is correct.
const bool m_preserve_divergence
true iff divergence-preserving branching bisimulation has been requested
fixed_vector< outgoing_transition_type > m_outgoing_transitions
transitions ordered per source state
void make_stable_and_move_to_start_of_BLC(block_type *const from_block, const linked_list< BLC_indicators >::iterator splitter)
Makes splitter stable and moves it to the beginning of the list.
void update_the_doubly_linked_list_LBC_new_block(block_type *const old_bi, block_type *const new_bi, const transition_index ti, constellation_type *old_constellation, constellation_type *const new_constellation)
Update the BLC list of transition ti, which now starts in block new_bi
fixed_vector< state_type_gj > m_states
information about states
fixed_vector< transition_index > m_BLC_transitions
static LTS_TYPE::labels_size_type m_aut_apply_hidden_label_map(typename LTS_TYPE::labels_size_type l)
void change_non_bottom_state_to_bottom_state(const fixed_vector< state_type_gj >::iterator si)
Moves the former non-bottom state si to the bottom states.
bool swap_in_the_doubly_linked_list_LBC_in_blocks_new_constellation(const transition_index ti, linked_list< BLC_indicators >::iterator new_BLC_block, linked_list< BLC_indicators >::iterator old_BLC_block)
Swap transition ti from BLC set old_BLC_block to BLC set new_BLC_block
block_type * four_way_splitB(block_type *const bi, linked_list< BLC_indicators >::iterator const small_splitter, linked_list< BLC_indicators >::iterator const large_splitter, constellation_type *const old_constellation, constellation_type *const new_constellation)
split a block (using main and co-splitter) into up to four subblocks
void swap_states_in_states_in_block_23_never_equal(state_in_block_pointer *pos1, state_in_block_pointer *pos2, state_in_block_pointer *pos3)
Move the contents of pos1 to pos2, those of pos2 to pos3 and those of pos3 to pos1
transition_index accumulate_entries(std::vector< transition_index > &action_counter, const std::vector< label_index > &todo_stack) const
fixed_vector< state_in_block_pointer > m_states_in_blocks
transition_index no_of_non_constellation_inert_BLC_sets
number of non-inert BLC sets in the partition
block_type * update_BLC_sets_new_block(block_type *const old_bi, block_type *const new_bi, constellation_type *const old_constellation, constellation_type *const new_constellation)
Update all BLC sets after a new block has been created.
bool update_the_doubly_linked_list_LBC_new_constellation(block_type *const index_block_B, const transition &t, const transition_index ti)
Move transition t with transition index ti to a new BLC set.
void print_data_structures(const std::string &header, const bool initialisation=false) const
Prints the partition refinement data structure as debug output.
bisim_partitioner_gj(LTS_TYPE &aut, const bool branching=false, const bool preserve_divergence=false)
constructor
bool in_same_class(state_index const s, state_index const t) const
Check whether two states are in the same equivalence class.
bool check_stability(const std::string &tag, const std::vector< std::pair< BLC_list_iterator, BLC_list_iterator > > *calM=nullptr, const std::pair< BLC_list_iterator, BLC_list_iterator > *calM_elt=nullptr, const constellation_type *const old_constellation=null_constellation, const constellation_type *const new_constellation=null_constellation) const
Checks the main invariant of the partition refinement algorithm.
implements the main algorithm for the stutter equivalence quotient
void set_truths(formula &f)
Compute and set the truth values of a formula f.
std::pair< label_type, block_index_type > observation_t
level_type gca_level(const block_index_type B1, const block_index_type B2)
Auxiliarry function that computes the level of the greatest common ancestor. In other words a lvl i s...
regular_formulas::regular_formula create_regular_formula(const mcrl2::lts::action_label_string &a) const
create_regular_formula Creates a regular formula that represents action a
bisim_partitioner_minimal_depth(LTS_TYPE &l, const std::size_t init_l2)
Creates a bisimulation partitioner for an LTS.
mcrl2::state_formulas::state_formula dist_formula_mindepth(const std::size_t s, const std::size_t t)
Creates a state formula that distinguishes state s from state t.
formula distinguish(const block_index_type b1, const block_index_type b2)
Creates a formula that distinguishes a block b1 from the block b2.
~bisim_partitioner_minimal_depth()=default
Destroys this partitioner.
std::map< std::pair< block_index_type, block_index_type >, level_type > greatest_common_ancestor
regular_formulas::regular_formula create_regular_formula(const mcrl2::lps::multi_action &a) const
create_regular_formula Creates a regular formula that represents action a
bool in_same_class(const std::size_t s, const std::size_t t)
block_index_type lift_block(const block_index_type B1, level_type goal)
mcrl2::state_formulas::state_formula conjunction(std::vector< formula > &conjunctions)
conjunction Creates a conjunction of state formulas
mcrl2::state_formulas::state_formula convert_formula(formula &f)
void split_BL(level_type lvl)
Performs the splits based on the blocks in Bsplit and the flags set in state_flags.
mcrl2::state_formulas::state_formula conjunction(std::set< mcrl2::state_formulas::state_formula > terms) const
conjunction Creates a conjunction of state formulas
regular_formulas::regular_formula create_regular_formula(const mcrl2::lts::action_label_string &a) const
create_regular_formula Creates a regular formula that represents action a
regular_formulas::regular_formula create_regular_formula(const mcrl2::lps::multi_action &a) const
create_regular_formula Creates a regular formula that represents action a
std::vector< bool > block_is_in_to_be_processed
std::map< block_index_type, block_index_type > right_child
std::vector< block_index_type > BL
bool in_same_class(const std::size_t s, const std::size_t t) const
Returns whether two states are in the same bisimulation equivalence class.
mcrl2::state_formulas::state_formula until_formula(const mcrl2::state_formulas::state_formula &phi1, const label_type &a, const mcrl2::state_formulas::state_formula &phi2)
until_formula Creates a state formula that corresponds to the until operator phi1phi2 from HMLU
std::size_t get_eq_class(const std::size_t s) const
Gives the bisimulation equivalence class number of a state.
bisim_partitioner(LTS_TYPE &l, const bool branching=false, const bool preserve_divergence=false, const bool generate_counter_examples=false)
Creates a bisimulation partitioner for an LTS.
~bisim_partitioner()=default
Destroys this partitioner.
std::map< block_index_type, std::set< block_index_type > > r_tauP
std::map< block_index_type, label_type > split_by_action
std::size_t num_eq_classes() const
Gives the number of bisimulation equivalence classes of the LTS.
void order_recursively_on_tau_reachability(const state_type s, std::map< state_type, std::vector< state_type > > &inert_transition_map, std::vector< non_bottom_state > &new_non_bottom_states, std::set< state_type > &visited)
std::vector< block_index_type > to_be_processed
std::map< block_index_type, block_index_type > split_by_block
void replace_transition_system(const bool branching, const bool preserve_divergences)
Replaces the transition relation of the current lts by the transitions of the bisimulation reduced tr...
void order_on_tau_reachability(std::vector< non_bottom_state > &non_bottom_states)
void split_the_blocks_in_BL(bool &partition_is_unstable, const label_type splitter_label, const block_index_type splitter_block)
void refine_partition_until_it_becomes_stable(const bool branching, const bool preserve_divergence)
void create_initial_partition(const bool branching, const bool preserve_divergences)
std::vector< state_type > block_index_of_a_state
std::map< block_index_type, std::set< block_index_type > > r_alpha
mcrl2::state_formulas::state_formula counter_formula_aux(const block_index_type B1, const block_index_type B2)
mcrl2::state_formulas::state_formula counter_formula(const std::size_t s, const std::size_t t)
Creates a state formula that distinguishes state s from state t.
void check_internal_consistency_of_the_partitioning_data_structure(const bool branching, const bool preserve_divergence) const
outgoing_transitions_per_state_action_t outgoing_transitions
const state_in_block_pointer * data() const
void swap_vec(std::vector< state_in_block_pointer > &other_vec)
std::vector< state_in_block_pointer >::iterator iterator
void reserve(std::vector< state_in_block_pointer >::size_type new_cap)
const state_in_block_pointer * data_end() const
const state_in_block_pointer & front() const
bool find(const state_in_block_pointer s) const
std::vector< state_in_block_pointer >::const_iterator const_iterator
mcrl2::state_formulas::state_formula conjunction(std::vector< mcrl2::state_formulas::state_formula > &conjunctions)
conjunction Creates a conjunction of state formulas
regular_formulas::regular_formula make_tau_hat(regular_formulas::regular_formula &f)
void split_and_intersect(std::set< block_index_type > &truths, std::pair< block_index_type, block_index_type > liftedB1B2)
branching_bisim_partitioner_minimal_depth(LTS_TYPE &l, const std::size_t init_l2)
Creates a branching bisimulation partitioner for an LTS.
mcrl2::state_formulas::state_formula dist_formula(block_index_type block_index1, block_index_type block_index2)
std::map< std::pair< block_index_type, block_index_type >, std::set< block_index_type > > blockpair2truths
std::map< std::pair< block_index_type, block_index_type >, mcrl2::state_formulas::state_formula > blockpair2formula
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
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
bool is_dist(std::set< blockpair_type > &dist_blockpairs, std::set< block_index_type > &to_dist)
is_dist Checks if a given conjunction correctly exludes a set of blocks.
std::vector< mcrl2::state_formulas::state_formula > filtered_dist_conjunction(std::map< blockpair_type, mcrl2::state_formulas::state_formula > &Phi, std::set< block_index_type > &Tdist, std::set< block_index_type > &Truths)
mcrl2::state_formulas::state_formula dist_formula_mindepth(size_t s, size_t t)
Creates a state formula that distinguishes state s from state t.
bool is_dist(const std::set< blockpair_type > &dist_blockpairs, const std::set< block_index_type > &to_dist, std::set< block_index_type > &truths)
is_dist overloaded to also maintain the truth values computed at the end.
std::tuple< block_index_type, label_type, block_index_type > branching_observation_type
std::pair< block_index_type, block_index_type > min_split_blockpair(block_index_type b1, block_index_type b2)
class for time complexity checks
static int ilog2(state_type size)
calculate the base-2 logarithm, rounded down
static void wait(trans_type units=1)
do some work that cannot be assigned directly
static unsigned char log_n
value of floor(log2(n)) for easy access
counter_type
Type for complexity budget counters.
static void check_temporary_work()
check that not too much superfluous work has been done
static void print_grand_totals()
print grand total of work in the coroutines (to measure overhead)
static void init(state_type n)
starts counting for a new refinement run
compare_transitions_lts(const std::set< std::size_t > &hide_action_set)
Definition transition.h:72
bool operator()(const transition &t1, const transition &t2)
Definition transition.h:76
const std::set< std::size_t > & m_hide_action_set
Definition transition.h:69
const std::set< std::size_t > & m_hide_action_set
Definition transition.h:37
bool operator()(const transition &t1, const transition &t2)
Definition transition.h:44
compare_transitions_slt(const std::set< std::size_t > &hide_action_set)
Definition transition.h:40
bool operator()(const transition &t1, const transition &t2)
Definition transition.h:188
bool operator()(const transition &t1, const transition &t2)
Definition transition.h:166
compare_transitions_tl(const std::set< std::size_t > &hide_action_set)
Definition transition.h:162
const std::set< std::size_t > & m_hide_action_set
Definition transition.h:159
const std::set< std::size_t > & m_hide_action_set
Definition transition.h:98
compare_transitions_tls(const std::set< std::size_t > &hide_action_set)
Definition transition.h:101
bool operator()(const transition &t1, const transition &t2)
Definition transition.h:105
compare_transitions_tsl(const std::set< std::size_t > &hide_action_set)
Definition transition.h:133
const std::set< std::size_t > & m_hide_action_set
Definition transition.h:130
bool operator()(const transition &t1, const transition &t2)
Definition transition.h:137
convertor(const lts_aut_base &, const lts_lts_base &lts_base_out)
convertor(const lts_fsm_base &lts_base_in, const lts_dot_base &)
convertor(const lts_fsm_base &lts_base_in, lts_lts_base &lts_base_out)
convertor(const lts_lts_base &, lts_dot_base &)
std::vector< std::map< data::data_expression, std::size_t > > state_element_values_sets
convertor(const lts_lts_base &lts_base_in, lts_fsm_base &lts_base_out)
convertor(const BASE_LTS_IN &, const BASE_LTS_OUT &)
A class that can be used to store counterexample trees and.
void save_counter_example(index_type index, const LTS_TYPE &l, const std::vector< size_t > &extra_actions=std::vector< size_t >()) const
static index_type root_index()
Return the index of the root.
std::deque< action_index_pair > m_backward_tree
index_type add_transition(std::size_t label_index, index_type previous_entry)
This function stores a label to the counterexample tree.
bool is_dummy() const
This function indicates that this is not a dummy counterexample class and that a serious counterexamp...
bool is_structured() const
Returns whether this counter-example is printed in a machine-readable way to stdout If false is retur...
A class that can be used to construct counter examples if no.
bool is_dummy() const
This function indicates that this is a dummy counterexample class and that no counterexample is requi...
void save_counter_example(index_type, const LTS_TYPE &, const std::vector< size_t > &=std::vector< size_t >()) const
index_type add_transition(std::size_t, index_type)
bool is_structured() const
Returns whether this counter-example is printed in a machine-readable way to stdout If false is retur...
indexed_sorted_vector_for_tau_transitions(const LTS_TYPE &aut, bool outgoing)
Definition liblts_scc.h:44
const std::vector< state_type > & get_transitions() const
Definition liblts_scc.h:96
std::vector< state_type > m_states_with_outgoing_or_incoming_tau_transition
Definition liblts_scc.h:39
std::pair< label_type, state_type > label_state_pair
indexed_sorted_vector_for_transitions(const std::vector< transition > &transitions, state_type num_states, bool outgoing)
const std::vector< CONTENT > & get_transitions() const
void swap(lts_aut_base &)
Standard swap function.
Definition lts_aut.h:48
lts_type type()
Provides the type of this lts, in casu lts_aut.
Definition lts_aut.h:42
bool operator==(const lts_aut_base &) const
Standard equality function.
Definition lts_aut.h:55
bool stable(const state_type s) const
std::vector< std::vector< state_type > > m_tau_reachable_states
std::vector< action_label_set > m_enabled_actions
const std::vector< state_type > & tau_reachable_states(const state_type s) const
const action_label_set & action_labels(const state_type s) const
const std::vector< transition > & transitions(const state_type s) const
std::vector< std::vector< transition > > m_sorted_transitions
void calculate_weak_property_cache(const bool weak_reduction)
bool diverges(const state_type s) const
lts_cache(LTS_TYPE &l, const bool weak_reduction)
lts_type type() const
The lts_type of state_label_dot. In this case lts_dot.
Definition lts_dot.h:117
void swap(lts_dot_base &)
The standard swap function.
Definition lts_dot.h:124
void clear()
Clear the transitions system.
Definition lts_fsm.h:135
const std::vector< std::string > & state_element_values(std::size_t idx) const
Provides the vector of strings that correspond to the values of the number at position idx in a vecto...
Definition lts_fsm.h:147
std::size_t add_state_element_value(std::size_t idx, const std::string &s)
Adds a string to the state element values for the idx-th position in a state vector....
Definition lts_fsm.h:179
bool operator==(const lts_fsm_base &other) const
Definition lts_fsm.h:109
void clear_process_parameters()
Clear the state parameters for this LTS.
Definition lts_fsm.h:226
std::vector< std::vector< std::string > > m_state_element_values
state_element_values contain the values that can occur at the i-th position of a state label
Definition lts_fsm.h:100
lts_type type() const
The lts_type of this labelled transition system. In this case lts_fsm.
Definition lts_fsm.h:118
std::string state_element_value(std::size_t parameter_index, std::size_t element_index) const
Returns the element_index'th element for the parameter with index parameter_index.
Definition lts_fsm.h:194
std::pair< std::string, std::string > process_parameter(std::size_t i) const
Returns the i-th parameter of the state vectors stored in this LTS.
Definition lts_fsm.h:218
std::vector< std::pair< std::string, std::string > > m_parameters
m_parameters contain the parameters corresponding to the consecutive elements of a state vector....
Definition lts_fsm.h:105
std::vector< std::pair< std::string, std::string > > process_parameters() const
Return the parameters of the state vectors stored in this LTS.
Definition lts_fsm.h:209
void add_process_parameter(const std::string &name, const std::string &sort)
Set the state parameters for this LTS.
Definition lts_fsm.h:236
std::string state_label_to_string(const state_label_fsm &l) const
Pretty print a state value of this FSM.
Definition lts_fsm.h:157
void swap(lts_fsm_base &other)
Standard swap function.
Definition lts_fsm.h:124
a base class for lts_lts_t and probabilistic_lts_t.
Definition lts_lts.h:282
static lts_type type()
Yields the type of this lts, in this case lts_lts.
Definition lts_lts.h:311
void set_process_parameters(const data::variable_list &params)
Set the state parameters for this LTS.
Definition lts_lts.h:369
bool operator==(const lts_lts_base &other) const
Standard equality function;.
Definition lts_lts.h:294
process::action_label_list m_action_decls
Definition lts_lts.h:286
void swap(lts_lts_base &l)
Definition lts_lts.h:301
void set_action_label_declarations(const process::action_label_list &decls)
Set the action label information for this LTS.
Definition lts_lts.h:333
const data::variable & process_parameter(std::size_t i) const
Returns the i-th parameter of the state vectors stored in this LTS.
Definition lts_lts.h:356
data::data_specification m_data_spec
Definition lts_lts.h:284
const data::variable_list & process_parameters() const
Return the process parameters stored in this LTS.
Definition lts_lts.h:348
void set_data(const data::data_specification &spec)
Set the mCRL2 data specification of this LTS.
Definition lts_lts.h:341
lts_lts_base()
Default constructor.
Definition lts_lts.h:290
const process::action_label_list & action_label_declarations() const
Return action label declarations stored in this LTS.
Definition lts_lts.h:325
data::variable_list m_parameters
Definition lts_lts.h:285
char data[NR_ELEMENTS *sizeof(T)]
pool_block_t(pool_block_t *const new_next_block)
void * first_free_T
first freed element
pool_block_t * first_block
first chunk in list of chunks
void * begin_used_in_first_block
start of part in the first chunk that is already in use
U * construct_othersize(Args &&... args)
allocate and construct a new element of a size that doesn't fit the free list
static void *& deref_void(void *addr)
U * construct_samesize(Args &&... args)
allocate and construct a new element of the same size as the free list
U * construct(Args &&... args)
allocate and construct a new element (of any type)
void destroy(U *const old_el)
destroy and delete some element
std::string print_structure(hash_table2 *struc)
This class contains an scc partitioner removing inert tau loops.
Definition liblts_scc.h:128
std::size_t get_eq_class(const std::size_t s) const
Gives the equivalence class number of a state. The equivalence class numbers range from 0 upto (and e...
Definition liblts_scc.h:339
void dfs_numbering(const state_type t, const indexed_sorted_vector_for_tau_transitions< LTS_TYPE > &src_tgt, std::vector< bool > &visited)
Definition liblts_scc.h:373
std::size_t num_eq_classes() const
Gives the number of bisimulation equivalence classes of the LTS.
Definition liblts_scc.h:333
void group_components(const state_type t, const state_type equivalence_class_index, const indexed_sorted_vector_for_tau_transitions< LTS_TYPE > &src_tgt_src, std::vector< bool > &visited)
Definition liblts_scc.h:353
scc_partitioner(LTS_TYPE &l)
Creates an scc partitioner for an LTS.
Definition liblts_scc.h:210
void replace_transition_system(const bool preserve_divergence_loops)
The lts for which this partioner is created is replaced by the lts modulo the calculated partition.
Definition liblts_scc.h:248
~scc_partitioner()=default
Destroys this partitioner.
bool in_same_class(const std::size_t s, const std::size_t t) const
Returns whether two states are in the same bisimulation equivalence class.
Definition liblts_scc.h:345
std::vector< state_type > block_index_of_a_state
Definition liblts_scc.h:194
std::vector< state_type > dfsn2state
Definition liblts_scc.h:195
std::vector< ptrdiff_t > contents_t
Definition liblts_sim.h:110
std::string print_reverse_topological_sort(const std::vector< std::size_t > &Sort)
std::vector< std::size_t > touched_blocks
Definition liblts_sim.h:122
std::string print_structure(hash_table3 *struc)
std::size_t get_eq_class(std::size_t s) const
Definition liblts_sim.h:824
void initialise_Sigma(std::size_t gamma, std::size_t l)
Definition liblts_sim.h:341
std::vector< bool > state_touched
Definition liblts_sim.h:104
bool in_same_class(std::size_t s, std::size_t t) const
Definition liblts_sim.h:836
std::vector< std::vector< std::size_t > > pre_forall
Definition liblts_sim.h:116
std::vector< ptrdiff_t > contents_u
Definition liblts_sim.h:111
std::vector< bool > block_touched
Definition liblts_sim.h:105
void dfs_visit(std::size_t u, std::vector< bool > &visited, std::vector< std::size_t > &Sort)
Definition liblts_sim.h:475
void cleanup(std::size_t alpha, std::size_t beta)
Definition liblts_sim.h:726
std::vector< std::vector< bool > > stable
Definition liblts_sim.h:112
std::vector< std::size_t > block_Pi
Definition liblts_sim.h:107
std::string print_relation(std::size_t s, std::vector< std::vector< bool > > &R)
mcrl2::lts::outgoing_transitions_per_state_action_t trans_index
Definition liblts_sim.h:101
std::size_t num_eq_classes() const
Definition liblts_sim.h:818
std::string print_block(std::size_t b)
std::vector< mcrl2::lts::transition > get_transitions() const
Definition liblts_sim.h:768
std::vector< std::vector< std::size_t > > pre_exists
Definition liblts_sim.h:115
std::vector< std::size_t > parent
Definition liblts_sim.h:108
void filter(std::size_t S, std::vector< std::vector< bool > > &R, bool B)
Definition liblts_sim.h:670
std::vector< state_bucket > state_buckets
Definition liblts_sim.h:106
std::vector< std::size_t > contents
Definition liblts_sim.h:123
void touch(std::size_t a, std::size_t alpha)
Definition liblts_sim.h:490
std::vector< std::vector< bool > > P
Definition liblts_sim.h:118
void untouch(std::size_t alpha)
Definition liblts_sim.h:518
std::vector< std::vector< std::size_t > > children
Definition liblts_sim.h:109
void reverse_topological_sort(std::vector< std::size_t > &Sort)
Definition liblts_sim.h:462
std::vector< std::vector< bool > > Q
Definition liblts_sim.h:119
bool in_preorder(std::size_t s, std::size_t t) const
Definition liblts_sim.h:830
void initialise_Pi(std::size_t gamma, std::size_t l)
Definition liblts_sim.h:299
constant iterator class for simple_list
const_iterator & operator=(const const_iterator &other)=default
bool operator!=(const const_iterator &other) const
bool operator==(const const_iterator &other) const
const_iterator(const const_iterator &other)=default
entry(entry *const new_next, entry *const new_prev, Args &&... args)
class that stores either an iterator or a null value
bool operator==(const T *const other) const
bool operator!=(const T *const other) const
iterator class for simple_list
iterator(const iterator &other)=default
iterator & operator=(const iterator &other)=default
a simple implementation of lists
bool empty() const
return true iff the list is empty
const_iterator before_end() const
iterator before_end()
return an iterator to the last element of the list
iterator prev(iterator pos) const
const_iterator cbegin() const
return a constant iterator to the first element of the list
static iterator end()
return an iterator past the last element of the list
iterator emplace_after(iterator pos, Args &&... args)
construct a new list entry after pos
const_iterator prev(const_iterator pos) const
entry * first
pointer to the beginning of the list
const_iterator next(const_iterator pos) const
const_iterator begin() const
return a constant iterator to the first element of the list
iterator emplace_front(Args &&... args)
construct a new list entry at the beginning
void splice_to_after(iterator const to_pos, simple_list< T > &from_list, iterator const from_pos)
iterator next(iterator pos) const
bool operator==(const simple_list &other) const
void splice(iterator const to_pos, simple_list< T > &from_list, iterator const from_pos)
move a list entry from one position to another (possibly in a different list) The function moves the ...
static my_pool< entry > & get_pool()
T & back()
return a reference to the last element of the list
T & front()
return a reference to the first element of the list
iterator begin()
return an iterator to the first element of the list
void erase(iterator const pos)
erase an element from a list
bool operator!=(const simple_list &other) const
iterator emplace(iterator pos, Args &&... args)
construct a new list entry before pos
static const_iterator cend()
return a constant iterator past the last element of the list
iterator emplace_back(Args &&... args)
Puts a new element at the end.
state_states_counter_example_index_triple(const state_type state, set_of_states states, const typename COUNTER_EXAMPLE_CONSTRUCTOR::index_type &counter_example_index)
Constructor.
const set_of_states & states() const
Get the set of states.
const COUNTER_EXAMPLE_CONSTRUCTOR::index_type & counter_example_index() const
Get the counter example index.
A simple labelled transition format with only strings as action labels.
Definition lts_aut.h:70
void load(const std::string &filename)
Load the labelled transition system from a file.
void load(std::istream &is)
Load the labelled transition system from an input stream.
void save(const std::string &filename) const
Save the labelled transition system to file.
void swap(lts_default_base &)
Standard swap function.
Definition lts.h:53
lts_type type()
Provides the type of this lts, in casu lts_none.
Definition lts.h:47
bool operator==(const lts_default_base &) const
Standard equality function.
Definition lts.h:60
A class to contain labelled transition systems in graphviz format.
Definition lts_dot.h:137
void save(std::ostream &os) const
Save the labelled transition system to a stream.
The class lts_fsm_t contains labelled transition systems in .fsm format.
Definition lts_fsm.h:255
lts< state_label_fsm, action_label_string, detail::lts_fsm_base > super
Definition lts_fsm.h:257
void load(const std::string &filename)
Save the labelled transition system to file.
void save(const std::string &filename) const
Save the labelled transition system to file.
This class contains labelled transition systems in .lts format.
Definition lts_lts.h:385
lts_lts_t()
Creates an object containing no information.
Definition lts_lts.h:388
A class that contains a labelled transition system.
Definition lts.h:83
states_size_type num_state_labels() const
Gets the number of state labels of this LTS.
Definition lts.h:271
labels_size_type num_action_labels() const
Gets the number of action labels of this LTS.
Definition lts.h:327
states_size_type m_init_state
Definition lts.h:117
void add_transition(const transition &t)
Add a transition to the lts.
Definition lts.h:563
void set_num_action_labels(const labels_size_type n)
Sets the number of action labels of this LTS.
Definition lts.h:319
bool has_action_info() const
Checks whether this LTS has labels associated with its actions, which are numbers.
Definition lts.h:664
bool is_tau(labels_size_type action) const
Checks whether an action is a tau action.
Definition lts.h:572
std::set< labels_size_type > & hidden_label_set()
Returns the hidden label set that tells for each label what its corresponding hidden label is.
Definition lts.h:431
states_size_type num_states() const
Gets the number of states of this LTS.
Definition lts.h:245
void set_hidden_label_set(const std::set< labels_size_type > &m)
Sets the hidden label map that tells for each label what its corresponding hidden label is.
Definition lts.h:439
void clear_transitions(const std::size_t n=0)
Clear the transitions of an lts.
Definition lts.h:493
void set_num_transitions(const std::size_t n)
Sets the number of transitions of this LTS and tries to shrink the datastructure.
Definition lts.h:310
void clear_actions()
Clear the action labels of an lts.
Definition lts.h:504
void set_num_states(const states_size_type n, const bool has_state_labels=true)
Sets the number of states of this LTS.
Definition lts.h:280
void store_action_label_to_be_renamed(const ACTION_LABEL_T &a, const labels_size_type i, std::map< labels_size_type, labels_size_type > &action_rename_map)
Definition lts.h:146
void add_state_number_as_state_information()
Label each state with its state number.
Definition lts.h:521
static constexpr bool is_probabilistic_lts
An indicator that this is not a probabilistic lts.
Definition lts.h:112
bool is_probabilistic(const states_size_type state) const
Gets the label of a state.
Definition lts.h:469
ACTION_LABEL_T action_label_t
The type of action labels.
Definition lts.h:92
const std::set< labels_size_type > & hidden_label_set() const
Returns the hidden label set that tells for each label what its corresponding hidden label is.
Definition lts.h:423
std::vector< transition > m_transitions
Definition lts.h:118
std::vector< STATE_LABEL_T > & state_labels()
Provides the state labels of an LTS.
Definition lts.h:253
ACTION_LABEL_T action_label(const labels_size_type action) const
Gets the label of an action.
Definition lts.h:479
const labels_size_type tau_label_index() const
Provide the index of the label that represents tau.
Definition lts.h:385
const std::vector< ACTION_LABEL_T > & action_labels() const
The action labels in this lts.
Definition lts.h:402
bool has_state_info() const
Checks whether this LTS has state values associated with its states.
Definition lts.h:655
lts(const lts &l)
Creates a copy of the supplied LTS.
Definition lts.h:180
void set_initial_state(const states_size_type state)
Sets the initial state number of this LTS.
Definition lts.h:343
void set_action_label(const labels_size_type action, const ACTION_LABEL_T &label)
Sets the label of an action.
Definition lts.h:411
void rename_labels(const std::map< labels_size_type, labels_size_type > &action_rename_map)
Definition lts.h:127
std::set< labels_size_type > m_hidden_label_set
Definition lts.h:124
std::vector< STATE_LABEL_T >::size_type states_size_type
The sort that contains the indices of states.
Definition lts.h:100
void apply_hidden_actions(const std::vector< std::string > &tau_actions)
Rename actions in the lts by hiding the actions in the vector tau_actions.
Definition lts.h:628
labels_size_type apply_hidden_label_map(const labels_size_type action) const
If the action label is registered hidden, it returns tau, otherwise the original label.
Definition lts.h:447
std::vector< transition > & get_transitions()
Gets a reference to the vector of transitions of the current lts.
Definition lts.h:554
std::vector< ACTION_LABEL_T >::size_type labels_size_type
The sort that represents the indices of labels.
Definition lts.h:104
lts & operator=(const lts &l)
Standard assignment operator.
Definition lts.h:194
const std::vector< STATE_LABEL_T > & state_labels() const
Provides the state labels of an LTS.
Definition lts.h:261
std::vector< STATE_LABEL_T > m_state_labels
Definition lts.h:119
STATE_LABEL_T state_label(const states_size_type state) const
Gets the label of a state.
Definition lts.h:459
states_size_type add_state(const STATE_LABEL_T &label=STATE_LABEL_T())
Adds a state to this LTS.
Definition lts.h:356
STATE_LABEL_T state_label_t
The type of state labels.
Definition lts.h:88
void clear()
Clear the transitions system.
Definition lts.h:533
lts()
Creates an empty LTS.
Definition lts.h:172
bool operator==(const lts &other) const
Standard equality operator.
Definition lts.h:209
states_size_type m_nstates
Definition lts.h:116
const std::vector< transition > & get_transitions() const
Gets a const reference to the vector of transitions of the current lts.
Definition lts.h:545
LTS_BASE base_t
The type of the used lts base.
Definition lts.h:96
std::vector< transition >::size_type transitions_size_type
The sort that contains indices of transitions.
Definition lts.h:108
states_size_type initial_state() const
Gets the initial state number of this LTS.
Definition lts.h:335
void clear_state_labels()
Clear the labels of an lts.
Definition lts.h:514
void swap(lts &l)
Swap this lts with the supplied supplied LTS.
Definition lts.h:222
void record_hidden_actions(const std::vector< std::string > &tau_actions)
Records all actions with a string that occurs in tau_actions internally.
Definition lts.h:589
std::vector< ACTION_LABEL_T > m_action_labels
Definition lts.h:120
transitions_size_type num_transitions() const
Gets the number of transitions of this LTS.
Definition lts.h:302
void set_state_label(const states_size_type state, const STATE_LABEL_T &label)
Sets the label of a state.
Definition lts.h:393
labels_size_type add_action(const ACTION_LABEL_T &label)
Adds an action with a label to this LTS.
Definition lts.h:370
A simple labelled transition format with only strings as action labels.
Definition lts_aut.h:103
void load(const std::string &filename)
Load the labelled transition system from a file.
void load(std::istream &is)
Load the labelled transition system from an input stream.
void save(const std::string &filename) const
Save the labelled transition system to file.
A class to contain labelled transition systems in graphviz format.
Definition lts_dot.h:163
void save(std::ostream &os) const
Save the labelled transition system to a stream.
The class lts_fsm_t contains labelled transition systems in .fsm format.
Definition lts_fsm.h:283
probabilistic_lts< state_label_fsm, action_label_string, probabilistic_state_t, detail::lts_fsm_base > super
Definition lts_fsm.h:286
void save(const std::string &filename) const
Save the labelled transition system to file.
void load(const std::string &filename)
Save the labelled transition system to file.
This class contains probabilistic labelled transition systems in .lts format.
Definition lts_lts.h:413
probabilistic_lts_lts_t()
Creates an object containing no information.
Definition lts_lts.h:416
A class that contains a labelled transition system.
probabilistic_lts(probabilistic_lts &&other)=default
Standard move constructor.
void set_initial_probabilistic_state(const PROBABILISTIC_STATE_T &state)
Sets the probabilistic initial state number of this LTS.
const PROBABILISTIC_STATE_T & initial_probabilistic_state() const
Gets the initial state number of this LTS.
super::transitions_size_type transitions_size_type
bool operator==(const probabilistic_lts &other) const
Standard equality operator.
void swap(probabilistic_lts &other)
Swap this lts with the supplied supplied LTS.
super::states_size_type states_size_type
labels_size_type num_probabilistic_states() const
Gets the number of probabilistic states of this LTS.
static constexpr bool is_probabilistic_lts
An indicator that this is a probabilistic lts.
void clear_probabilistic_states()
Clear the probabilistic states in this probabilistic transitions system.
lts< STATE_LABEL_T, ACTION_LABEL_T, LTS_BASE > super
states_size_type add_and_reset_probabilistic_state(PROBABILISTIC_STATE_T &s)
Adds a probabilistic state to this LTS and resets the state to empty.
void set_initial_state(const states_size_type s)
void clear()
Clear the transitions system.
probabilistic_lts & operator=(probabilistic_lts &&other)=default
Standard assignment move operator.
PROBABILISTIC_STATE_T probabilistic_state_t
The type of probabilistic labels.
probabilistic_lts & operator=(const probabilistic_lts &other)=default
Standard assignment operator.
std::vector< PROBABILISTIC_STATE_T > m_probabilistic_states
probabilistic_lts(const probabilistic_lts &other)=default
Standard copy constructor.
states_size_type add_probabilistic_state(const PROBABILISTIC_STATE_T &s)
Adds a probabilistic state to this LTS.
super::state_label_t state_label_t
states_size_type initial_state() const
PROBABILISTIC_STATE_T m_init_probabilistic_state
super::labels_size_type labels_size_type
super::action_label_t action_label_t
const PROBABILISTIC_STATE_T & probabilistic_state(const states_size_type index) const
Gets the probabilistic label of an index.
probabilistic_lts()
Creates an empty LTS.
void set_probabilistic_state(const states_size_type index, const PROBABILISTIC_STATE_T &s)
Sets the probabilistic label corresponding to some index.
A class that contains a probabilistic state.
void set(const STATE &s)
Set this probabilistic state to a single state with probability one.
const_iterator begin() const
Gets an iterator over pairs of state and probability. This can only be used when the state is stored ...
void construct_internal_vector_representation()
Guarantee that this probabilistic state is internally stored as a vector, such that begin/end,...
probabilistic_state & operator=(const probabilistic_state &other)
Copy assignment constructor.
const_reverse_iterator rbegin() const
Gets a reverse iterator over pairs of state and probability. This can only be used when the state is ...
std::size_t size() const
Gets the number of probabilistic states in the vector representation of this state....
bool operator!=(const probabilistic_state &other) const
Standard equality operator.
iterator begin()
Gets an iterator over pairs of state and probability. This can only be used if the state is internall...
std::vector< state_probability_pair >::const_iterator const_iterator
STATE get() const
Get a probabilistic state if is is simple, i.e., consists of a single state.
iterator end()
Gets the end iterator over pairs of state and probability.
reverse_iterator rbegin()
Gets a reverse iterator over pairs of state and probability. This can only be used if the state is in...
std::vector< state_probability_pair > m_probabilistic_state
const_iterator end() const
Gets the end iterator over pairs of state and probability.
std::vector< state_probability_pair >::iterator iterator
void swap(probabilistic_state &other)
Swap this probabilistic state.
reverse_iterator rend()
Gets the reverse end iterator over pairs of state and probability.
std::vector< state_probability_pair >::const_reverse_iterator const_reverse_iterator
bool operator==(const probabilistic_state &other) const
Standard equality operator.
void clear()
Makes the probabilistic state empty.
probabilistic_state(const STATE_PROBABILITY_PAIR_ITERATOR begin, const STATE_PROBABILITY_PAIR_ITERATOR end)
Creates a probabilistic state on the basis of state_probability_pairs.
std::vector< state_probability_pair >::reverse_iterator reverse_iterator
probabilistic_state(const probabilistic_state &other)
Copy constructor.
void shrink_to_fit()
If a probabilistic state is ready, shrinking it to minimal size might be useful to reduce its memory ...
probabilistic_state()
Default constructor.
probabilistic_state(const STATE &s)
Constructor of a probabilistic state from a non probabilistic state.
void add(const STATE &s, const PROBABILITY &p)
Add a state with a probability to the probabilistic state.
const_reverse_iterator rend() const
Gets the reverse end iterator over pairs of state and probability.
Class for computing the signature for strong bisimulation.
Definition sigref.h:75
virtual void compute_signature(const std::vector< std::size_t > &partition)
Definition sigref.h:90
signature_bisim(const LTS_T &lts_)
Constructor.
Definition sigref.h:82
Class for computing the signature for branching bisimulation.
Definition sigref.h:105
virtual void compute_signature(const std::vector< std::size_t > &partition)
Definition sigref.h:156
outgoing_transitions_per_state_t m_prev_transitions
Store the incoming transitions per state.
Definition sigref.h:111
signature_branching_bisim(const LTS_T &lts_)
Constructor
Definition sigref.h:148
void insert(const std::vector< std::size_t > &partition, const std::size_t t, const std::size_t label_, const std::size_t block)
Insert function.
Definition sigref.h:126
virtual void quotient_transitions(std::set< transition > &transitions, const std::vector< std::size_t > &partition)
Definition sigref.h:170
Class for computing the signature for divergence preserving branching bisimulation.
Definition sigref.h:185
virtual void quotient_transitions(std::set< transition > &transitions, const std::vector< std::size_t > &partition)
Definition sigref.h:326
virtual void compute_signature(const std::vector< std::size_t > &partition)
Definition sigref.h:311
signature_divergence_preserving_branching_bisim(const LTS_T &lts_)
Constructor.
Definition sigref.h:298
void compute_tau_sccs()
Iterative implementation of Tarjan's SCC algorithm.
Definition sigref.h:201
std::vector< bool > m_divergent
Record for each vertex whether it is in a tau-scc.
Definition sigref.h:192
Base class for signature computation.
Definition sigref.h:30
const LTS_T & m_lts
The labelled transition system for which the signature is computed.
Definition sigref.h:33
virtual const signature_t & get_signature(std::size_t i) const
Return the signature for state i.
Definition sigref.h:66
virtual void quotient_transitions(std::set< transition > &transitions, const std::vector< std::size_t > &partition)
Compute the transitions for the quotient according to partition.
Definition sigref.h:54
virtual void compute_signature(const std::vector< std::size_t > &partition)=0
Compute a new signature based on partition.
std::vector< signature_t > m_sig
Signature stored per state.
Definition sigref.h:36
signature(const LTS_T &lts_)
Constructor.
Definition sigref.h:41
Signature based reductions for labelled transition systems.
Definition sigref.h:350
void compute_partition()
Compute the partition. Repeatedly updates the signatures, and the partition, until the partition stab...
Definition sigref.h:382
LTS_T & m_lts
The LTS that we are reducing.
Definition sigref.h:361
void run()
Perform the reduction, modulo the equivalence for which the signature has been passed in as template ...
Definition sigref.h:458
std::vector< std::size_t > m_partition
Current partition; for each state (std::size_t) the block in which it resides is recorded.
Definition sigref.h:355
std::size_t m_count
The number of blocks in the current partition.
Definition sigref.h:358
std::string print_sig(const signature_t &sig)
Print a signature (for debugging purposes)
Definition sigref.h:368
sigref(LTS_T &lts_)
Constructor.
Definition sigref.h:448
Signature m_signature
Instance of a class performing the signature computation for the current equivalence.
Definition sigref.h:365
void quotient()
Perform the quotient with respect to the partition that has been computed.
Definition sigref.h:425
This class contains labels for states in dot format.
Definition lts_dot.h:37
std::string name() const
This method returns the string in the name field of a state label.
Definition lts_dot.h:64
std::string label() const
This method returns the label in the name field of a state label.
Definition lts_dot.h:78
state_label_dot()
The default constructor.
Definition lts_dot.h:46
std::string m_state_label
Definition lts_dot.h:40
bool operator==(const state_label_dot &l) const
Standard comparison operator, comparing both the string in the name field, as well as the one in the ...
Definition lts_dot.h:86
bool operator!=(const state_label_dot &l) const
Standard inequality operator. Just the negation of equality.
Definition lts_dot.h:93
Contains empty state values, used for lts's without state valued.
bool operator==(const state_label_empty &) const
static state_label_empty number_to_label(const std::size_t)
Create a state label consisting of a number as the only list element. For empty state labels this doe...
bool operator!=(const state_label_empty &other) const
state_label_empty operator+(const state_label_empty &) const
An operator to concatenate two state labels.
This class contains state labels for the fsm format.
Definition lts_fsm.h:38
state_label_fsm(const state_label_fsm &)=default
Copy constructor.
state_label_fsm & operator=(const state_label_fsm &)=default
Copy assignment.
static state_label_fsm number_to_label(const std::size_t n)
Create a state label consisting of a number as the only list element.
Definition lts_fsm.h:70
state_label_fsm()
Default constructor. The label becomes an empty vector.
Definition lts_fsm.h:42
state_label_fsm(const std::vector< std::size_t > &v)
Default constructor. The label is set to the vector v.
Definition lts_fsm.h:53
state_label_fsm operator+(const state_label_fsm &l) const
An operator to concatenate two state labels. Fsm labels cannot be concatenated. Therefore,...
Definition lts_fsm.h:59
This class contains state labels for an labelled transition system in .lts format.
Definition lts_lts.h:40
state_label_lts()
Default constructor.
Definition lts_lts.h:46
state_label_lts(const state_label_lts &)=default
Copy constructor.
state_label_lts operator+(const state_label_lts &l) const
An operator to concatenate two state labels.
Definition lts_lts.h:81
state_label_lts(const super &l)
Construct a state label out of list of balanced trees of data expressions, representing a state label...
Definition lts_lts.h:73
atermpp::term_list< lps::state > super
Definition lts_lts.h:42
state_label_lts(const lps::state &l)
Construct a state label out of a balanced tree of data expressions, representing a state label.
Definition lts_lts.h:66
state_label_lts & operator=(const state_label_lts &)=default
Copy assignment.
static state_label_lts number_to_label(const std::size_t n)
Create a state label consisting of a number as the only list element.
Definition lts_lts.h:96
state_label_lts(const CONTAINER &l)
Construct a single state label out of the elements in a container.
Definition lts_lts.h:58
This class contains a trace consisting of a sequence of (timed) actions possibly with intermediate st...
Definition trace.h:52
void load(const std::string &filename, trace_format tf=tfUnknown)
Replace the trace with the trace in the file.
Definition trace.h:358
void set_position(std::size_t pos)
Set the current position after the m_pos'th action of the trace.
Definition trace.h:191
mcrl2::data::data_specification m_spec
Definition trace.h:86
std::size_t number_of_states() const
Get the number of states in the current trace.
Definition trace.h:219
void increase_position()
Increase the current position by one, except if this brings one beyond the end of the trace.
Definition trace.h:169
trace(const mcrl2::data::data_specification &spec, const mcrl2::process::action_label_list &act_decls)
Constructor for an empty trace.
Definition trace.h:105
void save_text_to_stream(std::ostream &os, std::string separator) const
Definition trace.h:604
bool current_action_exists() const
Indicate whether the current action exists.
Definition trace.h:272
bool m_data_specification_and_act_decls_are_defined
Definition trace.h:88
const std::vector< lps::state > & states() const
Definition trace.h:426
bool operator<(const trace &t) const
Definition trace.h:153
void set_state(const lps::state &s)
Set the state at the current position.
Definition trace.h:332
const lps::state & next_state() const
Get the state at the current position in the trace.
Definition trace.h:245
bool current_state_exists() const
Indicate whether a current state exists.
Definition trace.h:234
const lps::state & current_state() const
Get the state at the current position in the trace.
Definition trace.h:260
void save_line(const std::string &filename) const
Definition trace.h:640
mcrl2::data::data_expression current_time()
Get the time of the current state in the trace.
Definition trace.h:294
trace_format
Formats in which traces can be saved on disk.
Definition trace.h:67
process::action_label_list m_act_decls
Definition trace.h:87
void clear_current_state()
Remove the current state and all states following it.
Definition trace.h:226
void save_mcrl2(const std::string &filename) const
Definition trace.h:566
std::size_t get_position() const
Get the current position in the trace.
Definition trace.h:203
void save_text(const std::string &filename, std::string separator) const
Definition trace.h:619
trace(const std::string &filename, const mcrl2::data::data_specification &spec, const mcrl2::process::action_label_list &act_decls, trace_format tf=tfUnknown)
Construct the trace on the basis of an input file.
Definition trace.h:134
void reset_position()
Set the current position back to the beginning of the trace.
Definition trace.h:161
std::size_t number_of_actions() const
Get the number of actions in the current trace.
Definition trace.h:211
std::vector< mcrl2::lps::multi_action > m_actions
Definition trace.h:83
void save(const std::string &filename, trace_format tf=tfMcrl2) const
Output the trace into a file with the indicated name.
Definition trace.h:401
trace()
Default constructor for an empty trace.
Definition trace.h:94
void load_plain(std::istream &is)
Definition trace.h:531
mcrl2::lps::multi_action current_action()
Get the outgoing action from the current position in the trace.
Definition trace.h:283
void load_mcrl2(const std::string &filename)
Definition trace.h:463
std::size_t m_pos
Definition trace.h:84
void save_plain(const std::string &filename) const
Definition trace.h:645
void decrease_position()
Decrease the current position in the trace by one provided the largest position is larger than 0.
Definition trace.h:179
trace(const std::string &filename, trace_format tf=tfUnknown)
Construct the trace on the basis of an input file.
Definition trace.h:119
std::vector< lps::state > m_states
Definition trace.h:82
trace_format detectFormat(std::istream &is)
Definition trace.h:444
void truncate()
Truncates the trace at the current position.
Definition trace.h:304
const std::vector< lps::multi_action > & actions() const
Definition trace.h:431
void add_action(const mcrl2::lps::multi_action &action)
Add an action to the current trace.
Definition trace.h:319
A class containing triples, source label and target representing transitions.
Definition transition.h:48
void set_label(const size_type label)
Set the label of the transition.
Definition transition.h:116
transition & operator=(const transition &t)=default
Assignment.
void set_to(const size_type to)
Set the target of the transition.
Definition transition.h:123
bool operator<(const transition &t) const
Standard lexicographic ordering on transitions.
Definition transition.h:147
transition(const std::size_t f, const std::size_t l, const std::size_t t)
Constructor (there is no default constructor).
Definition transition.h:67
size_type from() const
The source of the transition.
Definition transition.h:89
transition & operator=(transition &&t)=default
Move assignment.
bool operator!=(const transition &t) const
Standard inequality on transitions.
Definition transition.h:137
size_type label() const
The label of the transition.
Definition transition.h:95
size_type to() const
The target of the transition.
Definition transition.h:102
void set_from(const size_type from)
Set the source of the transition.
Definition transition.h:109
transition(transition &&t)=default
Move constructor.
transition(const transition &t)=default
Copy constructor.
std::size_t size_type
The type of the elements in a transition.
Definition transition.h:51
bool operator==(const transition &t) const
Standard equality on transitions.
Definition transition.h:130
bool is_set_empty(ptrdiff_t set)
Definition tree_set.cpp:205
ptrdiff_t get_set_child_left(ptrdiff_t set)
Definition tree_set.cpp:185
ptrdiff_t find_set(ptrdiff_t child_l, ptrdiff_t child_r)
Definition tree_set.cpp:126
ptrdiff_t create_set(std::vector< ptrdiff_t > &elems)
Definition tree_set.cpp:139
ptrdiff_t get_set(ptrdiff_t tag)
Definition tree_set.cpp:180
ptrdiff_t get_set_child_right(ptrdiff_t set)
Definition tree_set.cpp:190
ptrdiff_t build_set(ptrdiff_t child_l, ptrdiff_t child_r)
Definition tree_set.cpp:114
ptrdiff_t set_set_tag(ptrdiff_t set)
Definition tree_set.cpp:210
ptrdiff_t get_set_size(ptrdiff_t set)
Definition tree_set.cpp:195
\brief An action label
action_label(const core::identifier_string &name, const data::sort_expression_list &sorts)
\brief Constructor Z12.
action(const action_label &label, const data::data_expression_list &arguments)
\brief Constructor Z14.
Process specification consisting of a data specification, action labels, a sequence of process equati...
process::action_label_list & action_labels()
Returns the action label specification.
\brief An untyped multi action or data application
\brief The alt operator for regular formulas
alt(const atermpp::aterm &term)
alt()
\brief Default constructor X3.
alt & operator=(alt &&) noexcept=default
const regular_formula & right() const
alt(const regular_formula &left, const regular_formula &right)
\brief Constructor Z14.
alt(const alt &) noexcept=default
Move semantics.
alt(alt &&) noexcept=default
alt & operator=(const alt &) noexcept=default
const regular_formula & left() const
regular_formula()
\brief Default constructor X3.
regular_formula(const action_formulas::action_formula &x)
\brief Constructor Z6.
regular_formula(const atermpp::aterm &term)
regular_formula(const regular_formula &) noexcept=default
Move semantics.
regular_formula(const data::data_expression &x)
\brief Constructor Z6.
regular_formula & operator=(const regular_formula &) noexcept=default
regular_formula(regular_formula &&) noexcept=default
regular_formula & operator=(regular_formula &&) noexcept=default
\brief The seq operator for regular formulas
seq(const regular_formula &left, const regular_formula &right)
\brief Constructor Z14.
const regular_formula & right() const
seq & operator=(const seq &) noexcept=default
seq(const seq &) noexcept=default
Move semantics.
const regular_formula & left() const
seq(seq &&) noexcept=default
seq()
\brief Default constructor X3.
seq & operator=(seq &&) noexcept=default
seq(const atermpp::aterm &term)
\brief The 'trans or nil' operator for regular formulas
trans_or_nil & operator=(trans_or_nil &&) noexcept=default
trans_or_nil & operator=(const trans_or_nil &) noexcept=default
trans_or_nil(const trans_or_nil &) noexcept=default
Move semantics.
trans_or_nil(const regular_formula &operand)
\brief Constructor Z14.
trans_or_nil()
\brief Default constructor X3.
trans_or_nil(trans_or_nil &&) noexcept=default
trans_or_nil(const atermpp::aterm &term)
const regular_formula & operand() const
\brief The trans operator for regular formulas
trans(const atermpp::aterm &term)
trans(trans &&) noexcept=default
const regular_formula & operand() const
trans & operator=(const trans &) noexcept=default
trans & operator=(trans &&) noexcept=default
trans()
\brief Default constructor X3.
trans(const trans &) noexcept=default
Move semantics.
trans(const regular_formula &operand)
\brief Constructor Z14.
\brief An untyped regular formula or action formula
untyped_regular_formula()
\brief Default constructor X3.
untyped_regular_formula & operator=(untyped_regular_formula &&) noexcept=default
untyped_regular_formula & operator=(const untyped_regular_formula &) noexcept=default
untyped_regular_formula(const std::string &name, const regular_formula &left, const regular_formula &right)
\brief Constructor Z2.
untyped_regular_formula(const core::identifier_string &name, const regular_formula &left, const regular_formula &right)
\brief Constructor Z14.
const core::identifier_string & name() const
untyped_regular_formula(const untyped_regular_formula &) noexcept=default
Move semantics.
untyped_regular_formula(untyped_regular_formula &&) noexcept=default
Standard exception class for reporting runtime errors.
Definition exception.h:27
\brief The and operator for state formulas
and_(and_ &&) noexcept=default
const state_formula & right() const
and_(const atermpp::aterm &term)
and_(const and_ &) noexcept=default
Move semantics.
and_(const state_formula &left, const state_formula &right)
\brief Constructor Z14.
and_ & operator=(const and_ &) noexcept=default
and_()
\brief Default constructor X3.
and_ & operator=(and_ &&) noexcept=default
const state_formula & left() const
\brief The multiply operator for state formulas with values
const_multiply_alt & operator=(const const_multiply_alt &) noexcept=default
const state_formula & left() const
const_multiply_alt(const state_formula &left, const data::data_expression &right)
\brief Constructor Z14.
const_multiply_alt(const const_multiply_alt &) noexcept=default
Move semantics.
const_multiply_alt(const_multiply_alt &&) noexcept=default
const data::data_expression & right() const
const_multiply_alt(const atermpp::aterm &term)
const_multiply_alt & operator=(const_multiply_alt &&) noexcept=default
const_multiply_alt()
\brief Default constructor X3.
\brief The multiply operator for state formulas with values
const data::data_expression & left() const
const_multiply(const const_multiply &) noexcept=default
Move semantics.
const_multiply(const data::data_expression &left, const state_formula &right)
\brief Constructor Z14.
const_multiply()
\brief Default constructor X3.
const_multiply(const_multiply &&) noexcept=default
const_multiply & operator=(const const_multiply &) noexcept=default
const_multiply & operator=(const_multiply &&) noexcept=default
const_multiply(const atermpp::aterm &term)
const state_formula & right() const
\brief The timed delay operator for state formulas
delay_timed(const atermpp::aterm &term)
delay_timed()
\brief Default constructor X3.
delay_timed & operator=(const delay_timed &) noexcept=default
const data::data_expression & time_stamp() const
delay_timed(const data::data_expression &time_stamp)
\brief Constructor Z14.
delay_timed(const delay_timed &) noexcept=default
Move semantics.
delay_timed(delay_timed &&) noexcept=default
delay_timed & operator=(delay_timed &&) noexcept=default
\brief The delay operator for state formulas
delay & operator=(delay &&) noexcept=default
delay()
\brief Default constructor X3.
delay(const delay &) noexcept=default
Move semantics.
delay(delay &&) noexcept=default
delay(const atermpp::aterm &term)
delay & operator=(const delay &) noexcept=default
\brief The existential quantification operator for state formulas
exists(const data::variable_list &variables, const state_formula &body)
\brief Constructor Z14.
const state_formula & body() const
exists(const exists &) noexcept=default
Move semantics.
exists(exists &&) noexcept=default
exists & operator=(const exists &) noexcept=default
exists & operator=(exists &&) noexcept=default
exists()
\brief Default constructor X3.
exists(const atermpp::aterm &term)
const data::variable_list & variables() const
\brief The value false for state formulas
false_(false_ &&) noexcept=default
false_ & operator=(const false_ &) noexcept=default
false_ & operator=(false_ &&) noexcept=default
false_(const atermpp::aterm &term)
false_(const false_ &) noexcept=default
Move semantics.
false_()
\brief Default constructor X3.
\brief The universal quantification operator for state formulas
const state_formula & body() const
forall(const atermpp::aterm &term)
const data::variable_list & variables() const
forall & operator=(const forall &) noexcept=default
forall & operator=(forall &&) noexcept=default
forall(const forall &) noexcept=default
Move semantics.
forall(const data::variable_list &variables, const state_formula &body)
\brief Constructor Z14.
forall(forall &&) noexcept=default
forall()
\brief Default constructor X3.
\brief The implication operator for state formulas
imp()
\brief Default constructor X3.
imp(imp &&) noexcept=default
imp(const state_formula &left, const state_formula &right)
\brief Constructor Z14.
imp & operator=(const imp &) noexcept=default
const state_formula & left() const
const state_formula & right() const
imp(const atermpp::aterm &term)
imp(const imp &) noexcept=default
Move semantics.
imp & operator=(imp &&) noexcept=default
\brief The infimum over a data type for state formulas
infimum(const infimum &) noexcept=default
Move semantics.
infimum()
\brief Default constructor X3.
infimum(const data::variable_list &variables, const state_formula &body)
\brief Constructor Z14.
infimum & operator=(infimum &&) noexcept=default
const data::variable_list & variables() const
const state_formula & body() const
infimum(const atermpp::aterm &term)
infimum(infimum &&) noexcept=default
infimum & operator=(const infimum &) noexcept=default
\brief The may operator for state formulas
const state_formula & operand() const
may()
\brief Default constructor X3.
const regular_formulas::regular_formula & formula() const
may & operator=(const may &) noexcept=default
may & operator=(may &&) noexcept=default
may(const regular_formulas::regular_formula &formula, const state_formula &operand)
\brief Constructor Z14.
may(may &&) noexcept=default
may(const atermpp::aterm &term)
may(const may &) noexcept=default
Move semantics.
\brief The minus operator for state formulas
minus & operator=(minus &&) noexcept=default
minus(minus &&) noexcept=default
minus(const minus &) noexcept=default
Move semantics.
minus(const atermpp::aterm &term)
minus(const state_formula &operand)
\brief Constructor Z14.
const state_formula & operand() const
minus & operator=(const minus &) noexcept=default
minus()
\brief Default constructor X3.
\brief The mu operator for state formulas
const core::identifier_string & name() const
const data::assignment_list & assignments() const
mu(const mu &) noexcept=default
Move semantics.
mu(const std::string &name, const data::assignment_list &assignments, const state_formula &operand)
\brief Constructor Z2.
mu(const core::identifier_string &name, const data::assignment_list &assignments, const state_formula &operand)
\brief Constructor Z14.
mu & operator=(const mu &) noexcept=default
mu(mu &&) noexcept=default
mu & operator=(mu &&) noexcept=default
mu(const atermpp::aterm &term)
mu()
\brief Default constructor X3.
const state_formula & operand() const
\brief The must operator for state formulas
must(must &&) noexcept=default
must & operator=(must &&) noexcept=default
must(const atermpp::aterm &term)
must(const regular_formulas::regular_formula &formula, const state_formula &operand)
\brief Constructor Z14.
const regular_formulas::regular_formula & formula() const
must(const must &) noexcept=default
Move semantics.
const state_formula & operand() const
must()
\brief Default constructor X3.
must & operator=(const must &) noexcept=default
\brief The not operator for state formulas
not_(not_ &&) noexcept=default
not_(const not_ &) noexcept=default
Move semantics.
not_ & operator=(const not_ &) noexcept=default
not_ & operator=(not_ &&) noexcept=default
not_()
\brief Default constructor X3.
not_(const atermpp::aterm &term)
const state_formula & operand() const
not_(const state_formula &operand)
\brief Constructor Z14.
\brief The nu operator for state formulas
nu(const atermpp::aterm &term)
nu(nu &&) noexcept=default
nu(const core::identifier_string &name, const data::assignment_list &assignments, const state_formula &operand)
\brief Constructor Z14.
nu()
\brief Default constructor X3.
nu & operator=(const nu &) noexcept=default
nu & operator=(nu &&) noexcept=default
const core::identifier_string & name() const
nu(const std::string &name, const data::assignment_list &assignments, const state_formula &operand)
\brief Constructor Z2.
const state_formula & operand() const
nu(const nu &) noexcept=default
Move semantics.
const data::assignment_list & assignments() const
\brief The or operator for state formulas
or_(or_ &&) noexcept=default
or_()
\brief Default constructor X3.
or_(const or_ &) noexcept=default
Move semantics.
or_(const state_formula &left, const state_formula &right)
\brief Constructor Z14.
or_ & operator=(const or_ &) noexcept=default
const state_formula & right() const
or_ & operator=(or_ &&) noexcept=default
or_(const atermpp::aterm &term)
const state_formula & left() const
\brief The plus operator for state formulas with values
plus & operator=(plus &&) noexcept=default
plus & operator=(const plus &) noexcept=default
plus(const plus &) noexcept=default
Move semantics.
const state_formula & left() const
plus(const atermpp::aterm &term)
plus()
\brief Default constructor X3.
const state_formula & right() const
plus(plus &&) noexcept=default
plus(const state_formula &left, const state_formula &right)
\brief Constructor Z14.
state_formula(const state_formula &) noexcept=default
Move semantics.
state_formula()
\brief Default constructor X3.
state_formula(state_formula &&) noexcept=default
bool has_time() const
Returns true if the formula is timed.
state_formula(const data::untyped_data_parameter &x)
\brief Constructor Z6.
state_formula & operator=(state_formula &&) noexcept=default
state_formula(const data::data_expression &x)
\brief Constructor Z6.
state_formula(const atermpp::aterm &term)
state_formula & operator=(const state_formula &) noexcept=default
\brief The sum over a data type for state formulas
sum(const sum &) noexcept=default
Move semantics.
sum(sum &&) noexcept=default
sum(const atermpp::aterm &term)
sum(const data::variable_list &variables, const state_formula &body)
\brief Constructor Z14.
sum & operator=(sum &&) noexcept=default
sum()
\brief Default constructor X3.
const data::variable_list & variables() const
const state_formula & body() const
sum & operator=(const sum &) noexcept=default
\brief The supremum over a data type for state formulas
supremum & operator=(supremum &&) noexcept=default
supremum(supremum &&) noexcept=default
supremum(const atermpp::aterm &term)
supremum()
\brief Default constructor X3.
supremum(const supremum &) noexcept=default
Move semantics.
supremum & operator=(const supremum &) noexcept=default
const state_formula & body() const
const data::variable_list & variables() const
supremum(const data::variable_list &variables, const state_formula &body)
\brief Constructor Z14.
\brief The value true for state formulas
true_()
\brief Default constructor X3.
true_ & operator=(const true_ &) noexcept=default
true_(true_ &&) noexcept=default
true_(const true_ &) noexcept=default
Move semantics.
true_(const atermpp::aterm &term)
true_ & operator=(true_ &&) noexcept=default
\brief The state formula variable
variable & operator=(const variable &) noexcept=default
variable(const core::identifier_string &name, const data::data_expression_list &arguments)
\brief Constructor Z14.
variable(const variable &) noexcept=default
Move semantics.
variable(const std::string &name, const data::data_expression_list &arguments)
\brief Constructor Z2.
variable()
\brief Default constructor X3.
variable & operator=(variable &&) noexcept=default
const core::identifier_string & name() const
const data::data_expression_list & arguments() const
variable(variable &&) noexcept=default
variable(const atermpp::aterm &term)
\brief The timed yaled operator for state formulas
yaled_timed(yaled_timed &&) noexcept=default
yaled_timed & operator=(const yaled_timed &) noexcept=default
yaled_timed()
\brief Default constructor X3.
yaled_timed & operator=(yaled_timed &&) noexcept=default
yaled_timed(const yaled_timed &) noexcept=default
Move semantics.
yaled_timed(const data::data_expression &time_stamp)
\brief Constructor Z14.
yaled_timed(const atermpp::aterm &term)
const data::data_expression & time_stamp() const
\brief The yaled operator for state formulas
yaled()
\brief Default constructor X3.
yaled(const atermpp::aterm &term)
yaled & operator=(const yaled &) noexcept=default
yaled(const yaled &) noexcept=default
Move semantics.
yaled(yaled &&) noexcept=default
yaled & operator=(yaled &&) noexcept=default
void div_mod(const big_natural_number &other, big_natural_number &result, big_natural_number &remainder, big_natural_number &calculation_buffer_divisor) const
bool is_number(std::size_t n) const
Returns whether this number equals a number of std::size_t.
big_natural_number(const std::size_t n)
big_natural_number operator*(const big_natural_number &other) const
operator std::size_t() const
Transforms this number to a std::size_t, provided it is sufficiently small. If not an mcrl2::runtime_...
bool operator>=(const big_natural_number &other) const
std::size_t operator[](const std::size_t n) const
Give the n-th digit where the most significant digit is positioned last.
void add(const big_natural_number &other)
std::vector< std::size_t > m_number
big_natural_number operator+(const big_natural_number &other) const
bool operator==(const big_natural_number &other) const
std::size_t divide_by(std::size_t n)
big_natural_number operator%(const big_natural_number &other) const
std::size_t size() const
Give the number of digits in this big number.
big_natural_number operator-(const big_natural_number &other) const
friend void swap(big_natural_number &x, big_natural_number &y)
Standard overload of swap.
bool operator<=(const big_natural_number &other) const
big_natural_number operator/(const big_natural_number &other) const
void clear()
Sets the number to zero.
bool operator!=(const big_natural_number &other) const
bool is_zero() const
Returns whether this number equals zero.
void multiply(const big_natural_number &other, big_natural_number &result, big_natural_number &calculation_buffer_for_multiplicand) const
void push_back(const std::size_t n)
bool operator<(const big_natural_number &other) const
void subtract(const big_natural_number &other)
bool operator>(const big_natural_number &other) const
void multiply_by(std::size_t n, std::size_t carry)
This class contains labels for probabilistic transistions, consisting of a numerator and a denominato...
probabilistic_arbitrary_precision_fraction operator*(const probabilistic_arbitrary_precision_fraction &other) const
static void greatest_common_divisor_destructive(utilities::big_natural_number &x, utilities::big_natural_number &y, utilities::big_natural_number &buffer_divide, utilities::big_natural_number &buffer_remainder, utilities::big_natural_number &buffer)
bool operator>=(const probabilistic_arbitrary_precision_fraction &other) const
static void remove_common_factors(utilities::big_natural_number &enumerator, utilities::big_natural_number &denominator)
bool operator!=(const probabilistic_arbitrary_precision_fraction &other) const
probabilistic_arbitrary_precision_fraction operator+(const probabilistic_arbitrary_precision_fraction &other) const
bool operator<(const probabilistic_arbitrary_precision_fraction &other) const
bool operator>(const probabilistic_arbitrary_precision_fraction &other) const
static probabilistic_arbitrary_precision_fraction & one()
Constant one.
static utilities::big_natural_number greatest_common_divisor(utilities::big_natural_number x, utilities::big_natural_number y)
probabilistic_arbitrary_precision_fraction operator-(const probabilistic_arbitrary_precision_fraction &other) const
static probabilistic_arbitrary_precision_fraction & zero()
Constant zero.
probabilistic_arbitrary_precision_fraction operator/(const probabilistic_arbitrary_precision_fraction &other) const
bool operator<=(const probabilistic_arbitrary_precision_fraction &other) const
probabilistic_arbitrary_precision_fraction(const utilities::big_natural_number &enumerator, const utilities::big_natural_number &denominator)
bool operator==(const probabilistic_arbitrary_precision_fraction &other) const
#define ABORT_THIS_COROUTINE()
indicates that this coroutine gives up control to the other one
Definition coroutine.h:363
#define _coroutine_ENUMDEF(lblseq)
Definition coroutine.h:118
#define _coroutine_ENUMDEF_1(r, data, label)
Definition coroutine.h:120
#define END_COROUTINE
Ends the definition of code for a coroutine.
Definition coroutine.h:200
#define ABORT_OTHER_COROUTINE()
indicates that the other coroutine should give up control
Definition coroutine.h:378
#define COROUTINE_FOR(location, init, condition, update)
a for loop where every iteration incurs one unit of work
Definition coroutine.h:271
#define COROUTINE_WHILE(location, condition)
a while loop where every iteration incurs one unit of work
Definition coroutine.h:227
#define COROUTINES_SECTION
begin a section with two coroutines
Definition coroutine.h:142
#define COROUTINE_DO_WHILE(location, condition)
a do { } while loop where every iteration incurs one unit of work
Definition coroutine.h:314
#define END_COROUTINES_SECTION
Close a section containing coroutines.
Definition coroutine.h:208
#define COROUTINE
Define the code for a coroutine.
Definition coroutine.h:192
#define END_COROUTINE_WHILE
ends a loop started with COROUTINE_WHILE
Definition coroutine.h:252
#define END_COROUTINE_FOR
ends a loop started with COROUTINE_FOR
Definition coroutine.h:297
#define COROUTINE_LABELS(locations)
Declare the interrupt locations for the coroutines.
Definition coroutine.h:161
#define END_COROUTINE_DO_WHILE
ends a loop started with COROUTINE_DO_WHILE
Definition coroutine.h:336
#define TERMINATE_COROUTINE_SUCCESSFULLY()
terminate the pair of coroutines successfully
Definition coroutine.h:348
bool bisimulation_compare_gjkw(const LTS_TYPE &l1, const LTS_TYPE &l2, bool branching=false, bool preserve_divergence=false)
Checks whether the two initial states of two LTSs are strong or branching bisimilar.
void bisimulation_reduce_gjkw(LTS_TYPE &l, bool branching=false, bool preserve_divergence=false)
Reduce transition system l with respect to strong or (divergence preserving) branching bisimulation.
bool bisimulation_compare_dnj(const LTS_TYPE &l1, const LTS_TYPE &l2, bool const branching=false, bool const preserve_divergence=false)
Checks whether the two initial states of two LTSs are strong or (divergence-preserving) branching bis...
bool destructive_bisimulation_compare_dnj(LTS_TYPE &l1, LTS_TYPE &l2, bool const branching=false, bool const preserve_divergence=false, bool const generate_counter_examples=false, const std::string &="", bool=false)
Checks whether the two initial states of two LTSs are strong or (divergence-preserving) branching bis...
bool destructive_bisimulation_compare_gjkw(LTS_TYPE &l1, LTS_TYPE &l2, bool branching=false, bool preserve_divergence=false, bool generate_counter_examples=false)
Checks whether the two initial states of two LTSs are strong or branching bisimilar.
void bisimulation_reduce_dnj(LTS_TYPE &l, bool const branching=false, bool const preserve_divergence=false)
Reduce transition system l with respect to strong or (divergence-preserving) branching bisimulation.
bool destructive_bisimulation_compare_gjkw(LTS_TYPE &l1, LTS_TYPE &l2, bool branching, bool preserve_divergence, bool generate_counter_examples, const std::string &, bool)
std::string debug_id() const
print a B_to_C slice identification for debugging
std::string debug_id() const
print a constellation identification for debugging
std::string debug_id() const
print a block identification for debugging
bisim_partitioner_gjkw(LTS_TYPE &l, bool branching=false, bool preserve_divergence=false)
check_complexity::trans_counter_t work_counter
succ_iter_t change_to_C(pred_iter_t pred_iter, ONLY_IF_DEBUG(constln_t *SpC, constln_t *NewC,) bool first_transition_of_state, bool first_transition_of_block)
transition target is moved to a new constellation
block_t * refinable_next
next block in the list of refinable blocks
static permutation_const_iter_t permutation_begin()
provide an iterator to the beginning of the permutation array
permutation_const_iter_t end() const
iterator past the last state in the block
void split_inert_to_C(block_t *B)
handle the transitions from the splitter to its own constellation
void set_inert_begin(B_to_C_iter_t new_inert_begin)
void replace_transition_system(bool branching, bool preserve_divergence)
void assert_stability(const part_state_t &part_st) const
assert that the data structure is consistent and stable
bisim_gjkw::bisim_partitioner_gjkw_initialise_helper< LTS_TYPE > init_helper
const constln_t * to_constln() const
compute the goal constellation of the transitions in this slice
static state_type nr_of_blocks
total number of blocks with unique sequence number allocated
state_type unmarked_bottom_size() const
provides the number of unmarked bottom states in the block
void replace_transition_system(const part_state_t &part_st, ONLY_IF_DEBUG(bool branching,) bool preserve_divergence)
Replaces the transition relation of the current LTS by the transitions of the bisimulation-reduced tr...
bool split_s_inert_out(state_info_ptr s ONLY_IF_DEBUG(, constln_t *OldC))
Split outgoing transitions of a state in the splitter.
void set_marked_bottom_begin(permutation_iter_t new_marked_bottom_begin)
void SetFromRed(B_to_C_desc_iter_t new_fromred)
set FromRed to an existing element in to_constln
void make_nontrivial()
makes a constellation non-trivial (i. e. inserts it into the respective list)
permutation_const_iter_t nonbottom_begin() const
iterator to the first non-bottom state in the block
pred_const_iter_t inert_pred_end() const
iterator one past the last inert incoming transition
const block_t * from_block() const
compute the source block of the transitions in this slice
bisim_gjkw::block_t * refine(bisim_gjkw::block_t *RfnB, const bisim_gjkw::constln_t *SpC, const bisim_gjkw::B_to_C_descriptor *FromRed, bool postprocessing, const bisim_gjkw::constln_t *NewC=nullptr)
refine a block into the part that can reach SpC and the part that cannot
block_t * split_off_small_block()
split off a single block from the constellation
bisim_gjkw::block_t * postprocess_new_bottom(bisim_gjkw::block_t *RedB)
Split a block with new bottom states as needed.
B_to_C_iter_t postprocess_begin
iterator to the first transition into this constellation that needs postprocessing
bool add_work_to_bottom_transns(enum check_complexity::counter_type ctr, unsigned max_value)
bool operator>(const constln_t &other) const
const constln_t * constln() const
get constellation where the state belongs
permutation_const_iter_t begin() const
iterator to the first state in the block
void make_trivial()
makes a constellation trivial (i. e. removes it from the respective list)
void swap_B_to_C(succ_iter_t const pos1, succ_iter_t const pos2)
succ_iter_t state_inert_out_end
iterator past the last inert outgoing transition
B_to_C_descriptor(B_to_C_iter_t begin_, B_to_C_iter_t end_)
bool surely_has_no_transition_to(const constln_t *SpC) const
bool needs_postprocessing() const
returns true iff the slice is marked for postprocessing
void set_begin(permutation_iter_t new_begin)
permutation_const_iter_t marked_nonbottom_begin() const
iterator to the first marked non-bottom state in the block
permutation_iter_t pos
position of the state in the permutation array
state_type get_eq_class(state_type s) const
static constln_t * nontrivial_first
first constellation in the list of non-trivial constellations
bool operator>=(const constln_t &other) const
permutation_const_iter_t end() const
constant iterator past the last state in the constellation
permutation_const_iter_t unmarked_bottom_begin() const
iterator to the first unmarked bottom state in the block
void set_inert_begin_and_end(B_to_C_iter_t new_inert_begin, B_to_C_iter_t new_inert_end)
B_to_C_const_iter_t inert_begin() const
iterator to the first inert transition of the block
void make_nonrefinable()
makes a block non-refinable (i. e. removes it from the respective list)
permutation_const_iter_t marked_bottom_begin() const
iterator to the first marked bottom state in the block
pred_const_iter_t noninert_pred_begin() const
iterator to first non-inert incoming transition
bool mark_nonbottom(state_info_ptr s)
mark a non-bottom state
permutation_const_iter_t bottom_begin() const
iterator to the first bottom state in the block
std::string debug_id_short() const
print a short state identification for debugging
permutation_iter_t int_marked_bottom_begin
iterator to the first marked bottom state of the block
void swap_out(pred_iter_t const pos1, pred_iter_t const pos2)
state_type size() const
provides the number of states in the block
void init_transitions(part_state_t &part_st, part_trans_t &part_tr, bool branching, bool preserve_divergence)
initialise the state in part_st and the transitions in part_tr
permutation_iter_t int_begin
iterator to the first state in the constellation
succ_iter_t int_current_constln
iterator to first outgoing transition to the constellation of interest
block_t * split_off_blue(permutation_iter_t blue_nonbottom_end)
refine the block (the blue subblock is smaller)
permutation_iter_t int_bottom_begin
iterator to the first bottom state of the block
permutation_const_iter_t marked_bottom_end() const
iterator past the last marked bottom state in the block
void set_slice_begin_or_before_end(succ_iter_t new_value)
state_type notblue
number of inert transitions to non-blue states
permutation_const_iter_t marked_nonbottom_end() const
iterator one past the last marked non-bottom state in the block
check_complexity::state_counter_t work_counter
const state_type sort_key
sort key to order constellation-related information
state_type marked_bottom_size() const
provides the number of marked bottom states in the block
bool is_trivial() const
returns true iff the constellation is trivial
permutation_iter_t int_marked_nonbottom_begin
iterator to the first marked non-bottom state of the block
void make_noninert(succ_iter_t const succ_iter)
permutation_iter_t int_end
iterator past the last state of the block
B_to_C_desc_list to_constln
list of B_to_C with transitions from this block
state_type get_nr_of_states() const
provides the number of states in the Kripke structure
static block_t * get_some_refinable()
provides an arbitrary refinable block
static succ_iter_t slice_end(succ_iter_t this_)
block_t * block
block where the state belongs
void create_initial_partition_gjkw(bool branching, bool preserve_divergence)
const constln_t * get_nontrivial_next() const
provides the next non-trivial constellation
void set_constln(constln_t *new_constln)
void set_marked_nonbottom_begin(permutation_iter_t new_marked_nonbottom_begin)
#define BLOCK_NO_SEQNR
static permutation_const_iter_t perm_begin
bool operator<(const constln_t &other) const
compares two constellations for ordering them
bool make_refinable()
makes a block refinable (i. e. inserts it into the respective list)
fixed_vector< state_info_entry > state_info
array with all other information about states
state_type state_size() const
provide size of state space
state_type size() const
returns number of states in the constellation
B_to_C_const_iter_t inert_end() const
iterator past the last inert transition of the block
const constln_t * constln() const
constellation where the block belongs to
constln_t * int_constln
constellation to which the block belongs
permutation_const_iter_t bottom_end() const
iterator past the last bottom state in the block
static block_t * refinable_first
first block in the list of refinable blocks
static void slice_add_work_to_transns(succ_const_iter_t this_, enum check_complexity::counter_type ctr, unsigned max_value)
void swap_in(B_to_C_iter_t const pos1, B_to_C_iter_t const pos2)
state_type int_seqnr
unique sequence number of this block
succ_const_iter_t succ_begin() const
iterator to first outgoing transition
bool operator<=(const constln_t &other) const
void new_red_block_created(block_t *OldB, block_t *NewB, bool postprocessing)
handle B_to_C slices after a new red block has been created
void set_end(permutation_iter_t new_end)
void print_trans() const
print all transitions
bool is_refinable() const
checks whether the block is refinable
block_t * split_off_red(permutation_iter_t red_nonbottom_begin)
refine the block (the red subblock is smaller)
succ_iter_t int_slice_begin_or_before_end
points to the last or the first transition to the same constellation
succ_const_iter_t inert_succ_begin() const
iterator to first inert outgoing transition
permutation_const_iter_t begin() const
constant iterator to the first state in the constellation
pred_iter_t state_in_begin
iterator to first incoming transition
permutation_iter_t int_begin
iterator to the first state of the block
pred_iter_t state_inert_in_begin
iterator to first inert incoming transition
void assign_seqnr()
assigns a unique sequence number
std::unordered_map< Key, state_type, KeyHasher > extra_kripke_states
void new_blue_block_created(block_t *OldB, block_t *NewB)
handle B_to_C slices after a new blue block has been created
permutation_iter_t begin()
iterator to the first state in the constellation
static state_info_const_ptr s_i_begin
pointer at the first entry in the state_info array
check_complexity::B_to_C_counter_t work_counter
static constln_t * get_some_nontrivial()
provides an arbitrary non-trivial constellation
permutation_const_iter_t unmarked_bottom_end() const
iterator past the last unmarked bottom state in the block
bool operator<(const block_t &other) const
compares two blocks for ordering them
void set_bottom_begin(permutation_iter_t new_bottom_begin)
void set_nonbottom_end(permutation_iter_t new_nonbottom_end)
std::string debug_id() const
print a state identification for debugging
void set_inert_pred_begin(pred_iter_t new_inert_in_begin)
void clear()
deallocates constellations and blocks
constln_t(state_type sort_key_, permutation_iter_t begin_, permutation_iter_t end_, B_to_C_iter_t postprocess_none)
constructor
void set_inert_succ_begin_and_end(succ_iter_t new_inert_out_begin, succ_iter_t new_inert_out_end)
void swap3_B_to_C(succ_iter_t const pos1, succ_iter_t const pos2, succ_iter_t const pos3)
block_t(constln_t *const constln_, permutation_iter_t const begin_, permutation_iter_t const end_)
constructor
const block_t * block(state_type s) const
find block of a state
succ_const_iter_t inert_succ_end() const
iterator past the last inert outgoing transition
permutation_iter_t end()
iterator past the last state in the constellation
succ_const_iter_t slice_begin_or_before_end() const
check_complexity::block_counter_t work_counter
bisim_partitioner_gjkw_initialise_helper(LTS_TYPE &l, bool branching, bool preserve_divergence)
constructor of the helper class
succ_iter_t state_out_begin
iterator to first outgoing transition
pred_const_iter_t inert_pred_begin() const
iterator to first inert incoming transition
std::string debug_id() const
print a transition identification for debugging
B_to_C_iter_t int_inert_begin
iterator to the first inert transition of the block
void set_unmarked_bottom_end(permutation_iter_t new_unmarked_bottom_end)
pred_const_iter_t noninert_pred_end() const
iterator past the last non-inert incoming transition
void set_inert_end(B_to_C_iter_t new_inert_end)
pred_const_iter_t pred_end() const
iterator past the last incoming transition
constln_t * nontrivial_next
next constellation in the list of non-trivial constellations
bool in_same_class(state_type s, state_type t) const
B_to_C_iter_t int_inert_end
iterator past the last inert transition of the block
static state_info_const_ptr s_i_end
pointer past the last actual entry in the state_info array
permutation_const_iter_t unmarked_nonbottom_begin() const
iterator to the first unmarked non-bottom state in the block
void set_end(permutation_iter_t new_end)
set the iterator past the last state in the constellation
permutation_const_iter_t nonbottom_end() const
iterator past the last non-bottom state in the block
succ_const_iter_t succ_end() const
iterator past the last outgoing transition
void set_unmarked_nonbottom_end(permutation_iter_t new_unmarked_nonbottom_end)
B_to_C_descriptor * FromRed(const constln_t *SpC)
read FromRed
std::string debug_id_short() const
print a short transition identification for debugging
permutation_const_iter_t unmarked_nonbottom_end() const
iterator past the last unmarked non-bottom state in the block
void print_block(const char *message, const block_t *B, permutation_const_iter_t begin, permutation_const_iter_t end) const
print a slice of the partition (typically a block)
state_type marked_size() const
provides the number of marked states in the block
B_to_C_iter_t postprocess_end
iterator past the last transition into this constellation that needs postprocessing
trans_type get_nr_of_transitions() const
provides the number of transitions in the Kripke structure
void print_part(const part_trans_t &part_tr) const
print the partition as a tree (per constellation and block)
permutation_iter_t int_end
iterator past the last state in the constellation
void set_current_constln(succ_iter_t const new_current_constln)
void set_inert_succ_begin(succ_iter_t const new_inert_out_begin)
bool mark(state_info_ptr s)
mark a state
succ_iter_t state_inert_out_begin
iterator to first inert outgoing transition
pred_const_iter_t pred_begin() const
iterator to first incoming transition
bool surely_has_transition_to(const constln_t *SpC) const
void set_begin(permutation_iter_t new_begin)
set the iterator to the first state in the constellation
fixed_vector< permutation_entry > permutation_t
iterator_or_null_t< block_bunch_slice_t > block_bunch_slice_iter_or_null_t
simple_list< block_bunch_slice_t >::iterator block_bunch_slice_iter_t
simple_list< block_bunch_slice_t >::const_iterator block_bunch_slice_const_iter_t
bunch_t * split_off_small_action_block_slice(part_trans_t &part_tr)
split off a single action_block-slice from the bunch
succ_entry * out_slice_begin(ONLY_IF_DEBUG(const fixed_vector< succ_entry > &succ))
find the beginning of the out-slice
block_t * split_off_block(enum new_block_mode_t new_block_mode, ONLY_IF_DEBUG(const bisim_partitioner_dnj< LTS_TYPE > &partitioner,) state_type new_seqnr)
refine a block
static void add_work_to_out_slice(const bisim_partitioner_dnj< LTS_TYPE > &partitioner, const succ_entry *out_slice_begin, enum check_complexity::counter_type ctr, unsigned max_value)
assign work to the transitions in an out-slice (i.e. the transitions from one state in a specific bun...
bunch_t * bunch() const
find the bunch of the transition
#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 LIST_END
Definition liblts_sim.h:157
#define UNIVERSAL_PART
Definition liblts_sim.h:158
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
Definition logger.h:391
#define BRANCH_BIS_EXPERIMENT_JFG
global_function_symbol g_tree_node("@node@", 2)
global_function_symbol g_empty("@empty@", 0)
global_function_symbol g_single_tree_node("@single_node@", 1)
The main namespace for the aterm++ library.
Definition algorithm.h:21
term_balanced_tree< aterm > aterm_balanced_tree
A term_balanced_tree with elements of type aterm.
void make_term_balanced_tree(term_balanced_tree< Term > &result, ForwardTraversalIterator p, const std::size_t size, Transformer transformer)
bool is_aterm_balanced_tree(const aterm &t)
void make_exists(atermpp::aterm &t, const ARGUMENTS &... args)
std::vector< action_formula > action_formula_vector
\brief vector of action_formulas
bool is_at(const atermpp::aterm &x)
void swap(multi_action &t1, multi_action &t2)
\brief swap overload
atermpp::term_list< action_formula > action_formula_list
\brief list of action_formulas
void swap(true_ &t1, true_ &t2)
\brief swap overload
std::string pp(const action_formulas::action_formula &x)
void swap(false_ &t1, false_ &t2)
\brief swap overload
void make_not_(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const action_formulas::exists &x)
void swap(action_formula &t1, action_formula &t2)
\brief swap overload
std::string pp(const action_formulas::and_ &x)
std::set< data::variable > find_all_variables(const action_formulas::action_formula &x)
std::string pp(const action_formulas::at &x)
void swap(not_ &t1, not_ &t2)
\brief swap overload
bool is_or(const atermpp::aterm &x)
void swap(exists &t1, exists &t2)
\brief swap overload
bool is_true(const atermpp::aterm &x)
bool is_forall(const atermpp::aterm &x)
std::string pp(const action_formulas::imp &x)
void make_and_(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_false(const atermpp::aterm &x)
bool is_not(const atermpp::aterm &x)
std::string pp(const action_formulas::multi_action &x)
std::string pp(const action_formulas::or_ &x)
void make_imp(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const action_formulas::forall &x)
bool is_imp(const atermpp::aterm &x)
bool is_and(const atermpp::aterm &x)
void make_forall(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(at &t1, at &t2)
\brief swap overload
void swap(imp &t1, imp &t2)
\brief swap overload
void make_or_(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(forall &t1, forall &t2)
\brief swap overload
std::string pp(const action_formulas::not_ &x)
std::string pp(const action_formulas::false_ &x)
void make_multi_action(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(or_ &t1, or_ &t2)
\brief swap overload
bool is_multi_action(const atermpp::aterm &x)
void swap(and_ &t1, and_ &t2)
\brief swap overload
std::string pp(const action_formulas::true_ &x)
void make_at(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_exists(const atermpp::aterm &x)
bool is_action_formula(const atermpp::aterm &x)
const atermpp::function_symbol & function_symbol_StateImp()
const atermpp::function_symbol & function_symbol_StateMinus()
const atermpp::function_symbol & function_symbol_ActForall()
const atermpp::function_symbol & function_symbol_StateForall()
const atermpp::function_symbol & function_symbol_StateYaledTimed()
const atermpp::function_symbol & function_symbol_RegSeq()
const atermpp::function_symbol & function_symbol_StateNu()
const atermpp::function_symbol & function_symbol_StateConstantMultiplyAlt()
const atermpp::function_symbol & function_symbol_StateExists()
const atermpp::function_symbol & function_symbol_StateVar()
const atermpp::function_symbol & function_symbol_ActMultAct()
const atermpp::function_symbol & function_symbol_StateNot()
const atermpp::function_symbol & function_symbol_ActImp()
const atermpp::function_symbol & function_symbol_StateSum()
const atermpp::function_symbol & function_symbol_ActAt()
const atermpp::function_symbol & function_symbol_StateMu()
const atermpp::function_symbol & function_symbol_RegTransOrNil()
const atermpp::function_symbol & function_symbol_StateMay()
const atermpp::function_symbol & function_symbol_StatePlus()
const atermpp::function_symbol & function_symbol_RegTrans()
const atermpp::function_symbol & function_symbol_RegAlt()
const atermpp::function_symbol & function_symbol_ActAnd()
const atermpp::function_symbol & function_symbol_StateDelayTimed()
const atermpp::function_symbol & function_symbol_StateConstantMultiply()
const atermpp::function_symbol & function_symbol_StateOr()
const atermpp::function_symbol & function_symbol_ActOr()
const atermpp::function_symbol & function_symbol_StateAnd()
const atermpp::function_symbol & function_symbol_StateInfimum()
const atermpp::function_symbol & function_symbol_ActNot()
const atermpp::function_symbol & function_symbol_ActExists()
const atermpp::function_symbol & function_symbol_UntypedRegFrm()
const atermpp::function_symbol & function_symbol_StateSupremum()
const atermpp::function_symbol & function_symbol_StateMust()
atermpp::aterm_string identifier_string
String type of the LPS library. Identifier strings are represented internally as ATerms.
static data_specification const & default_specification()
Definition parse.h:31
Namespace for system defined sort bool_.
Definition bool.h:32
const function_symbol & false_()
Constructor for function symbol false.
Definition bool.h:109
const function_symbol & true_()
Constructor for function symbol true.
Definition bool.h:77
Namespace for system defined sort int_.
application cint(const data_expression &arg0)
Application of function symbol @cInt.
Definition int1.h:104
bool is_integer_constant(const data_expression &n)
Determines whether n is an integer constant.
const basic_sort & int_()
Constructor for sort expression Int.
Definition int1.h:47
Namespace for system defined sort nat.
const basic_sort & nat()
Constructor for sort expression Nat.
Definition nat1.h:46
application cnat(const data_expression &arg0)
Application of function symbol @cNat.
Definition nat1.h:164
data_expression nat(const std::string &n)
Constructs expression of type Nat from a string.
Namespace for system defined sort pos.
bool is_positive_constant(const data_expression &n)
Determines whether n is a positive constant.
const function_symbol & c1()
Constructor for function symbol @c1.
Definition pos1.h:78
data_expression pos(const std::string &n)
Constructs expression of type Pos from a string.
const basic_sort & pos()
Constructor for sort expression Pos.
Definition pos1.h:45
Namespace for system defined sort real_.
const function_symbol & creal()
Constructor for function symbol @cReal.
Definition real1.h:107
data_expression & real_one()
application creal(const data_expression &arg0, const data_expression &arg1)
Application of function symbol @cReal.
Definition real1.h:132
data_expression & real_zero()
const basic_sort & real_()
Constructor for sort expression Real.
Definition real1.h:48
application plus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol +.
Definition real1.h:1115
application minus(const data_expression &arg0, const data_expression &arg1)
Application of function symbol -.
Definition real1.h:1200
Namespace for all data library functionality.
Definition data.cpp:22
bool is_data_expression(const atermpp::aterm &x)
Test for a data_expression expression.
application less(const data_expression &arg0, const data_expression &arg1)
Application of function symbol <.
Definition standard.h:258
atermpp::term_list< data_expression > data_expression_list
\brief list of data_expressions
bool is_untyped_data_parameter(const atermpp::aterm &x)
atermpp::term_list< variable > variable_list
\brief list of variables
atermpp::term_list< assignment > assignment_list
\brief list of assignments
Definition assignment.h:146
application equal_to(const data_expression &arg0, const data_expression &arg1)
Application of function symbol ==.
Definition standard.h:144
@ warning
Definition logger.h:34
@ verbose
Definition logger.h:37
bool mCRL2logEnabled(const log_level_t level)
Definition logger.h:383
multi_action complete_multi_action(process::untyped_multi_action &x, const process::action_label_list &action_decls, const data::data_specification &data_spec=data::detail::default_specification())
Definition lps.cpp:132
void remove_common_divisor(std::size_t &enumerator, std::size_t &denominator)
void complete_action_rename_specification(action_rename_specification &x, const lps::stochastic_specification &spec)
Definition lps.cpp:150
multi_action complete_multi_action(process::untyped_multi_action &x, multi_action_type_checker &typechecker, const data::data_specification &data_spec=data::detail::default_specification())
Definition lps.cpp:124
std::size_t greatest_common_divisor(std::size_t x, std::size_t y)
The main namespace for the LPS library.
Definition constelm.h:21
void complete_data_specification(stochastic_specification &spec)
Adds all sorts that appear in the process of l to the data specification of l.
void parse_lps(std::istream &, Specification &)
Definition parse.h:159
void complete_data_specification(specification &spec)
Adds all sorts that appear in the process of l to the data specification of l.
atermpp::term_balanced_tree< data::data_expression > state
Definition state.h:24
exploration_strategy parse_exploration_strategy(const std::string &s)
std::string pp(const probabilistic_data_expression &l)
multi_action parse_multi_action(std::stringstream &in, multi_action_type_checker &typechecker, const data::data_specification &data_spec=data::detail::default_specification())
Parses a multi_action from an input stream.
Definition parse.h:56
action_rename_specification parse_action_rename_specification(std::istream &in, const lps::stochastic_specification &spec)
Parses a process specification from an input stream.
Definition parse.h:94
std::string description(const exploration_strategy strat)
multi_action parse_multi_action(std::stringstream &in, const process::action_label_list &action_decls, const data::data_specification &data_spec=data::detail::default_specification())
Parses a multi_action from an input stream.
Definition parse.h:42
std::string print_exploration_strategy(const exploration_strategy es)
std::istream & operator>>(std::istream &is, exploration_strategy &strat)
void parse_lps< specification >(std::istream &from, specification &result)
Definition parse.h:166
void make_state(state &result, ForwardTraversalIterator p, const std::size_t size)
Definition state.h:37
void parse_lps< stochastic_specification >(std::istream &from, stochastic_specification &result)
Parses a stochastic linear process specification from an input stream.
Definition parse.h:183
std::string pp(const lps::state &x)
Definition state.h:49
specification parse_linear_process_specification(std::istream &spec_stream)
Parses a linear process specification from an input stream.
Definition parse.h:128
void make_state(state &result, ForwardTraversalIterator p, const std::size_t size, Transformer transformer)
Definition state.h:27
static void finalise_U_is_smaller(const block_t *const block_U, const block_t *const block_R, const bisim_partitioner_dnj< LTS_TYPE > &partitioner)
moves temporary work counters to normal ones if the U-block is smaller
static void finalise_R_is_smaller(const block_t *const block_U, const block_t *const block_R, const bisim_partitioner_dnj< LTS_TYPE > &partitioner)
moves temporary work counters to normal ones if the R-block is smaller
const state_info_entry * state_info_const_ptr
fixed_vector< pred_entry >::iterator pred_iter_t
fixed_vector< succ_entry >::const_iterator succ_const_iter_t
permutation_t::iterator permutation_iter_t
fixed_vector< pred_entry >::const_iterator pred_const_iter_t
fixed_vector< state_info_ptr > permutation_t
permutation_t::const_iterator permutation_const_iter_t
std::list< B_to_C_descriptor > B_to_C_desc_list
B_to_C_desc_list::const_iterator B_to_C_desc_const_iter_t
B_to_C_desc_list::iterator B_to_C_desc_iter_t
fixed_vector< B_to_C_entry >::iterator B_to_C_iter_t
fixed_vector< succ_entry >::iterator succ_iter_t
fixed_vector< B_to_C_entry >::const_iterator B_to_C_const_iter_t
static void swap_permutation(permutation_iter_t s1, permutation_iter_t s2)
swap two permutations
constexpr constellation_type * null_constellation
constexpr transition_index undefined
default counter value if the counter field of a state is not in use currently
fixed_vector< outgoing_transition_type >::const_iterator outgoing_transitions_const_it
fixed_vector< outgoing_transition_type >::iterator outgoing_transitions_it
constexpr transition_index marked_NewBotSt
counter value to indicate that a state is in the NewBotSt subset
const transition_index * BLC_list_const_iterator
constexpr transition_index marked_range
the number of counter values that can be used for one subblock
static void clear(CONTAINER &c)
static constexpr bool is_in_marked_range_of(transition_index counter, enum subblocks subblock)
checks whether a counter value is a marking for a given subblock
constexpr transition_index null_transition
constexpr transition_index marked_HitSmall
static constexpr transition_index marked(enum subblocks subblock)
base marking value for a subblock
A base class for the lts_dot labelled transition system.
action_label_string lts_convert_translate_label(const action_label_string &l_in, convertor< lts_aut_base, lts_fsm_base > &)
void lts_convert(const lts< STATE_LABEL1, ACTION_LABEL1, LTS_BASE1 > &lts_in, probabilistic_lts< STATE_LABEL2, ACTION_LABEL2, PROBABILISTIC_STATE2, LTS_BASE2 > &lts_out)
void lts_convert(const lts< STATE_LABEL1, ACTION_LABEL1, LTS_BASE1 > &lts_in, lts< STATE_LABEL2, ACTION_LABEL2, LTS_BASE2 > &lts_out, const data::data_specification &ds, const process::action_label_list &all, const data::variable_list &vl, const bool extra_data_is_defined=true)
action_label_string lts_convert_translate_label(const action_label_lts &l_in, convertor< lts_lts_base, lts_aut_base > &)
bool bisimulation_compare(const LTS_TYPE &l1, const LTS_TYPE &l2, const bool branching=false, const bool preserve_divergences=false, const bool generate_counter_examples=false, const std::string &counter_example_file="", const bool structured_output=false)
Checks whether the two initial states of two lts's are strong or branching bisimilar.
void merge(LTS_TYPE &l1, const LTS_TYPE &l2)
void translate_probability_labels(const probabilistic_lts< STATE_LABEL1, ACTION_LABEL1, PROBABILISTIC_STATE1, LTS_BASE1 > &lts_in, probabilistic_lts< STATE_LABEL2, ACTION_LABEL2, PROBABILISTIC_STATE2, LTS_BASE2 > &lts_out)
std::string supported_lts_formats_text(lts_type default_format, const std::set< lts_type > &supported)
Gives a textual list describing supported LTS formats.
Definition liblts.cpp:153
void lts_convert_base_class(const lts_aut_base &base_in, lts_fsm_base &base_out, const data::data_specification &, const process::action_label_list &, const data::variable_list &, const bool extra_data_is_defined=true)
bool destructive_branching_bisimulation_compare_minimal_depth(LTS_TYPE &l1, LTS_TYPE &l2, const std::string &counter_example_file)
void lts_convert_base_class(const lts_lts_base &, lts_aut_base &)
static std::string mime_type_strings[]
Definition liblts.cpp:85
boost::container::flat_set< label_type > action_label_set
action_label_string lts_convert_translate_label(const action_label_string &l_in, convertor< lts_fsm_base, lts_dot_base > &)
bool operator!=(const cs_game_node &n0, const cs_game_node &n1)
std::string supported_lts_formats_text(const std::set< lts_type > &supported)
Gives a textual list describing supported LTS formats.
Definition liblts.cpp:185
void lts_convert_translate_state(const state_label_empty &, state_label_lts &state_label_out, convertor< lts_aut_base, lts_lts_base > &)
const unsigned char NODE_ATK
action_label_string lts_convert_translate_label(const action_label_string &l_in, convertor< lts_fsm_base, lts_fsm_base > &)
bool coupled_simulation_compare(LTS_TYPE &l1, LTS_TYPE &l2)
void lts_convert_base_class(const lts_fsm_base &, lts_lts_base &)
void lts_convert_base_class(const lts_fsm_base &base_in, lts_dot_base &base_out, const data::data_specification &, const process::action_label_list &, const data::variable_list &, const bool extra_data_is_defined=true)
void weak_bisimulation_reduce(LTS_TYPE &l, const bool preserve_divergences=false)
Reduce LTS l with respect to (divergence-preserving) weak bisimulation.
bool destructive_bisimulation_compare_minimal_depth(LTS_TYPE &l1, LTS_TYPE &l2, const std::string &counter_example_file)
action_label_lts lts_convert_translate_label(const action_label_string &l_in, convertor< lts_aut_base, lts_lts_base > &c)
void lts_convert_base_class(const lts_lts_base &base_in, lts_fsm_base &base_out, const data::data_specification &, const process::action_label_list &, const data::variable_list &, const bool extra_data_is_defined=true)
const unsigned char NODE_DEF
void lts_convert_base_class(const lts_aut_base &, lts_lts_base &)
std::size_t state_type
type used to store state (numbers and) counts
void lts_convert_translate_state(const state_label_fsm &state_label_in, state_label_fsm &state_label_out, convertor< lts_fsm_base, lts_fsm_base > &)
void lts_convert(const probabilistic_lts< STATE_LABEL1, ACTION_LABEL1, PROBABILISTIC_STATE1, LTS_BASE1 > &lts_in, probabilistic_lts< STATE_LABEL2, ACTION_LABEL2, PROBABILISTIC_STATE2, LTS_BASE2 > &lts_out)
void lts_convert(const lts< STATE_LABEL1, ACTION_LABEL1, LTS_BASE1 > &lts_in, lts< STATE_LABEL2, ACTION_LABEL2, LTS_BASE2 > &lts_out)
void lts_convert_aux(const lts< STATE_LABEL1, ACTION_LABEL1, LTS_BASE1 > &lts_in, lts< STATE_LABEL2, ACTION_LABEL2, LTS_BASE2 > &lts_out)
set_of_states collect_reachable_states_via_taus(const set_of_states &s, const lts_cache< LTS_TYPE > &weak_property_cache, const bool weak_reduction)
void lts_convert_base_class(const lts_aut_base &base_in, lts_lts_base &base_out, const data::data_specification &data, const process::action_label_list &action_labels, const data::variable_list &process_parameters, const bool extra_data_is_defined=true)
boost::container::flat_set< state_type > set_of_states
void bisimulation_reduce(LTS_TYPE &l, const bool branching=false, const bool preserve_divergences=false)
Reduce transition system l with respect to strong or (divergence preserving) branching bisimulation.
bool operator<(const cs_game_move &m0, const cs_game_move &m1)
std::string extension_for_type(const lts_type type)
Gives the filename extension associated with an LTS format.
Definition liblts.cpp:118
void unmark_explicit_divergence_transitions(LTS_TYPE &l, const std::size_t divergent_transition_label)
bool bisimulation_compare_gj(const LTS_TYPE &l1, const LTS_TYPE &l2, const bool branching=false, const bool preserve_divergence=false)
Checks whether the two initial states of two LTSs are strong or (divergence-preserving) branching bis...
action_label_string lts_convert_translate_label(const action_label_lts &l_in, convertor< lts_lts_base, lts_dot_base > &)
bool equals(const cs_game_move &m0, const cs_game_move &m1, bool weak_transition=false)
std::map< std::size_t, std::set< typename lts< STATE_LABEL_T, ACTION_LABEL_T, LTS_BASE_CLASS >::states_size_type > > calculate_non_reflexive_transitive_tau_closure(lts< STATE_LABEL_T, ACTION_LABEL_T, LTS_BASE_CLASS > &l, const bool forward)
This procedure calculates the transitive tau closure as a separate vector of transitions,...
bool antichain_include(anti_chain_type &anti_chain, const detail::state_type &impl, const detail::set_of_states &spec)
std::string string_for_type(const lts_type type)
Gives a string representation of an LTS format.
Definition liblts.cpp:113
bool weak_bisimulation_compare(const LTS_TYPE &l1, const LTS_TYPE &l2, const bool preserve_divergences=false)
Checks whether the initial states of two LTSs are weakly bisimilar.
void lts_convert_translate_state(const state_label_fsm &, state_label_empty &state_label_out, convertor< lts_fsm_base, lts_aut_base > &)
void lts_convert_base_class(const lts_lts_base &base_in, lts_lts_base &base_out)
bool antichain_include_inverse(anti_chain_type &anti_chain, const detail::state_type &impl, const detail::set_of_states &spec)
lts_type parse_format(std::string const &s)
Determines the LTS format from a format specification string.
Definition liblts.cpp:92
void lts_convert_translate_state(const state_label_empty &state_label_in, state_label_empty &state_label_out, convertor< lts_aut_base, lts_aut_base > &)
void lts_convert_translate_state(const state_label_lts &state_label_in, state_label_fsm &state_label_out, convertor< lts_lts_base, lts_fsm_base > &c)
bool destructive_bisimulation_compare(LTS_TYPE &l1, LTS_TYPE &l2, const bool branching=false, const bool preserve_divergences=false, const bool generate_counter_examples=false, const std::string &counter_example_file="", const bool structured_output=false)
Checks whether the two initial states of two lts's are strong or branching bisimilar.
void remove_probabilities(const probabilistic_lts< STATE_LABEL1, ACTION_LABEL1, PROBABILISTIC_STATE1, LTS_BASE1 > &lts_in, lts< STATE_LABEL2, ACTION_LABEL2, LTS_BASE2 > &lts_out)
static std::string type_desc_strings[]
Definition liblts.cpp:75
void add_an_action_loop_to_each_state(LTS_TYPE &l, std::size_t action)
action_label_string lts_convert_translate_label(const action_label_string &l_in, convertor< lts_aut_base, lts_dot_base > &)
LABEL_TYPE make_divergence_label(const std::string &s)
void lts_convert_translate_state(const state_label_lts &state_label_in, state_label_lts &state_label_out, convertor< lts_lts_base, lts_lts_base > &)
const std::set< lts_type > & supported_lts_formats()
Gives the set of all supported LTS formats.
Definition liblts.cpp:140
bool destructive_bisimulation_compare_gj(LTS_TYPE &l1, LTS_TYPE &l2, const bool branching=false, const bool preserve_divergence=false, const bool generate_counter_examples=false, const std::string &="", bool=false)
Checks whether the two initial states of two LTSs are strong or (divergence-preserving) branching bis...
std::size_t label_type
type used to store label numbers and counts
utilities::probabilistic_arbitrary_precision_fraction translate_probability_data_to_arbitrary_size_probability(const data::data_expression &d)
Translate a fraction given as a data_expression to a representation with an arbitrary size fraction.
Definition lts_convert.h:37
std::size_t trans_type
type used to store transition (numbers and) counts
void lts_convert_base_class(const lts_aut_base &base_in, lts_aut_base &base_out, const data::data_specification &, const process::action_label_list &, const data::variable_list &, const bool extra_data_is_defined=true)
void lts_convert_base_class(const lts_lts_base &base_in, lts_dot_base &base_out, const data::data_specification &, const process::action_label_list &, const data::variable_list &, const bool extra_data_is_defined=true)
std::string lts_extensions_as_string(const std::set< lts_type > &supported)
Gives a list of extensions for supported LTS formats.
Definition liblts.cpp:220
static const std::string type_strings[]
Definition liblts.cpp:71
bool lts_named_cmp(const std::string N[], T a, T b)
Definition liblts.cpp:148
void lts_convert_translate_state(const state_label_lts &state_label_in, state_label_dot &state_label_out, convertor< lts_lts_base, lts_dot_base > &c)
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
PROBABILISTIC_STATE2 lts_convert_probabilistic_state(const PROBABILISTIC_STATE1 &)
Definition lts_convert.h:50
set_of_states collect_reachable_states_via_taus(const state_type s, const lts_cache< LTS_TYPE > &weak_property_cache, const bool weak_reduction)
std::size_t mark_explicit_divergence_transitions(LTS_TYPE &l)
lts_type guess_format(std::string const &s, const bool be_verbose)
Determines the LTS format from a filename by its extension.
Definition liblts.cpp:26
action_label_lts translate_label_aux(const action_label_string &l1, const data::data_specification &data, lps::multi_action_type_checker &typechecker)
action_label_string lts_convert_translate_label(const action_label_string &l_in, convertor< lts_fsm_base, lts_aut_base > &)
void lts_convert_base_class(const lts_fsm_base &, lts_aut_base &)
void lts_convert_base_class(const lts_aut_base &base_in, lts_dot_base &base_out, const data::data_specification &, const process::action_label_list &, const data::variable_list &, const bool extra_data_is_defined=true)
const set_of_states & calculate_tau_reachable_states(const set_of_states &states, const lts_cache< LTS_TYPE > &weak_property_cache)
set_of_states collect_reachable_states_via_an_action(const state_type s, const label_type e, const lts_cache< LTS_TYPE > &weak_property_cache, const bool weak_reduction, const LTS_TYPE &l)
const unsigned char NODE_CPL
void lts_convert_base_class(const lts_aut_base &, lts_dot_base &)
void lts_convert_base_class(const lts_fsm_base &, lts_dot_base &)
bool operator<(const cs_game_node &n0, const cs_game_node &n1)
void lts_convert_translate_state(const state_label_fsm &state_label_in, state_label_lts &state_label_out, convertor< lts_fsm_base, lts_lts_base > &c)
void lts_convert(const probabilistic_lts< STATE_LABEL1, ACTION_LABEL1, PROBABILISTIC_STATE1, LTS_BASE1 > &lts_in, lts< STATE_LABEL2, ACTION_LABEL2, LTS_BASE2 > &lts_out)
void lts_convert_base_class(const lts_lts_base &, lts_dot_base &)
bool operator==(const cs_game_node &n0, const cs_game_node &n1)
bool refusals_contained_in(const state_type impl, const set_of_states &spec, const lts_cache< LTS_TYPE > &weak_property_cache, label_type &culprit, const LTS_TYPE &l, const bool provide_a_counter_example, const bool structured_output)
This function checks that the refusals(impl) are contained in the refusals of spec,...
void lts_convert_base_class(const lts_fsm_base &base_in, lts_aut_base &base_out, const data::data_specification &, const process::action_label_list &, const data::variable_list &, const bool extra_data_is_defined=true)
bool destructive_weak_bisimulation_compare(LTS_TYPE &l1, LTS_TYPE &l2, const bool preserve_divergences=false)
Checks whether the initial states of two LTSs are weakly bisimilar.
void lts_convert(const probabilistic_lts< STATE_LABEL1, ACTION_LABEL1, PROBABILISTIC_STATE1, LTS_BASE1 > &lts_in, probabilistic_lts< STATE_LABEL2, ACTION_LABEL2, PROBABILISTIC_STATE2, LTS_BASE2 > &lts_out, const data::data_specification &data, const process::action_label_list &action_label_list, const data::variable_list &process_parameters, const bool extra_data_is_defined=true)
void lts_convert_translate_state(const state_label_empty &, state_label_fsm &state_label_out, convertor< lts_aut_base, lts_fsm_base > &)
void lts_convert_base_class(const lts_lts_base &base_in, lts_aut_base &base_out, const data::data_specification &, const process::action_label_list &, const data::variable_list &, const bool extra_data_is_defined=true)
void remove_redundant_transitions(lts< STATE_LABEL_T, ACTION_LABEL_T, LTS_BASE_CLASS > &l)
Removes each transition s-a->s' if also transitions s-a->-tau->s' or s-tau->-a->s' are present....
void lts_convert_base_class(const lts_fsm_base &base_in, lts_fsm_base &base_out, const data::data_specification &, const process::action_label_list &, const data::variable_list &, const bool extra_data_is_defined=true)
void bisimulation_reduce_gj(LTS_TYPE &l, const bool branching=false, const bool preserve_divergence=false)
nonmember functions serving as interface with the rest of mCRL2
void lts_convert_translate_state(const state_label_fsm &state_label_in, state_label_dot &state_label_out, convertor< lts_fsm_base, lts_dot_base > &c)
void lts_convert_base_class(const lts_aut_base &, lts_fsm_base &base_out)
action_label_string lts_convert_translate_label(const action_label_lts &l_in, convertor< lts_lts_base, lts_fsm_base > &)
void reflexive_transitive_tau_closure(lts< STATE_LABEL_T, ACTION_LABEL_T, LTS_BASE_CLASS > &l)
void lts_convert_base_class(const lts_fsm_base &base_in, lts_lts_base &base_out, const data::data_specification &data, const process::action_label_list &action_labels, const data::variable_list &process_parameters, const bool extra_data_is_defined=true)
std::multimap< detail::state_type, detail::set_of_states > anti_chain_type
void lts_convert_base_class(const lts_aut_base &base_in, lts_aut_base &base_out)
static const std::string extension_strings[]
Definition liblts.cpp:73
void lts_convert_translate_state(const state_label_lts &, state_label_empty &state_label_out, convertor< lts_lts_base, lts_aut_base > &)
void lts_convert(const lts< STATE_LABEL1, ACTION_LABEL1, LTS_BASE1 > &lts_in, probabilistic_lts< STATE_LABEL2, ACTION_LABEL2, PROBABILISTIC_STATE2, LTS_BASE2 > &lts_out, const data::data_specification &data, const process::action_label_list &action_label_list, const data::variable_list &process_parameters, const bool extra_data_is_defined=true)
mcrl2::utilities::probabilistic_arbitrary_precision_fraction translate_probability_data_prob(const data::data_expression &d)
Definition lts_convert.h:92
bool antichain_insert(anti_chain_type &anti_chain, const detail::state_type &impl, const detail::set_of_states &spec)
void get_trans(const outgoing_transitions_per_state_t &begin, tree_set_store &tss, std::size_t d, std::vector< transition > &d_trans, LTS_TYPE &aut)
void lts_convert_base_class(const lts_lts_base &base_in, lts_lts_base &base_out, const data::data_specification &, const process::action_label_list &, const data::variable_list &, const bool extra_data_is_defined=true)
void lts_convert_base_class(const lts_lts_base &base_in, lts_fsm_base &base_out)
std::string to_string(const cs_game_node &n)
void add_probabilities(const lts< STATE_LABEL1, ACTION_LABEL1, LTS_BASE1 > &lts_in, probabilistic_lts< STATE_LABEL2, ACTION_LABEL2, PROBABILISTIC_STATE2, LTS_BASE2 > &lts_out)
std::size_t apply_hidden_labels(const std::size_t n, const std::set< std::size_t > &hidden_action_set)
Definition transition.h:25
void tau_star_reduce(lts< STATE_LABEL_T, ACTION_LABEL_T, LTS_BASE_CLASS > &l)
bool destructive_impossible_futures(LTS &l1, LTS &l2, const lps::exploration_strategy strategy)
Checks impossible futures refinement for the given LTSs. Impossible futures are defined in the articl...
std::string mime_type_for_type(const lts_type type)
Gives the MIME type associated with an LTS format.
Definition liblts.cpp:123
void lts_convert_translate_state(const state_label_empty &, state_label_dot &state_label_out, convertor< lts_aut_base, lts_dot_base > &)
action_label_string lts_convert_translate_label(const action_label_string &l_in, convertor< lts_aut_base, lts_aut_base > &)
void lts_convert_base_class(const lts_fsm_base &base_in, lts_fsm_base &base_out)
static const std::set< lts_type > & initialise_supported_lts_formats()
Definition liblts.cpp:128
void lts_convert(const probabilistic_lts< STATE_LABEL1, ACTION_LABEL1, PROBABILISTIC_STATE1, LTS_BASE1 > &lts_in, lts< STATE_LABEL2, ACTION_LABEL2, LTS_BASE2 > &lts_out, const data::data_specification &data, const process::action_label_list &action_label_list, const data::variable_list &process_parameters, const bool extra_data_is_defined=true)
action_label_lts lts_convert_translate_label(const action_label_string &l1, convertor< lts_fsm_base, lts_lts_base > &c)
action_label_lts lts_convert_translate_label(const action_label_lts &l_in, convertor< lts_lts_base, lts_lts_base > &)
The main LTS namespace.
std::size_t label(const outgoing_transitions_per_state_action_t::const_iterator &i)
Label of an iterator exploring transitions per outgoing state and action.
std::string pp(const state_label_dot &l)
Pretty print function for a state_label_dot. Only prints the label field.
Definition lts_dot.h:101
lts_equivalence
LTS equivalence relations.
@ lts_eq_branching_bisim_sigref
@ lts_eq_divergence_preserving_weak_bisim
@ lts_eq_branching_bisim_gjkw
@ lts_eq_branching_bisim_gv
@ lts_eq_divergence_preserving_branching_bisim_sigref
@ lts_eq_divergence_preserving_branching_bisim
@ lts_eq_branching_bisim_gj
@ lts_eq_divergence_preserving_branching_bisim_gjkw
@ lts_eq_divergence_preserving_branching_bisim_gv
@ lts_eq_divergence_preserving_branching_bisim_gj
std::string pp(const state_label_lts &label)
Pretty print a state value of this LTS.
Definition lts_lts.h:108
bool is_deterministic(const LTS_TYPE &l)
Checks whether this LTS is deterministic.
bool check_trace_inclusion(LTS_TYPE &l1, const detail::lts_cache< LTS_TYPE > &weak_property_cache, std::deque< detail::state_states_counter_example_index_triple< COUNTER_EXAMPLE_CONSTRUCTOR > > &working, refinement_statistics< detail::state_states_counter_example_index_triple< COUNTER_EXAMPLE_CONSTRUCTOR > > &stats, detail::anti_chain_type &anti_chain, detail::anti_chain_type &anti_chain_positive, detail::anti_chain_type &anti_chain_negative, COUNTER_EXAMPLE_CONSTRUCTOR &generate_counter_example, detail::state_type init_l1, detail::state_type init_l2, bool weak_reduction, const lps::exploration_strategy strategy)
lts_type
The enumerated type lts_type contains an index for every type type of labelled transition system that...
Definition lts_type.h:37
@ lts_fsm_probabilistic
Definition lts_type.h:45
@ lts_type_min
Definition lts_type.h:46
@ lts_lts_probabilistic
Definition lts_type.h:43
@ lts_aut_probabilistic
Definition lts_type.h:44
@ lts_type_max
Definition lts_type.h:47
bool destructive_compare(LTS_TYPE &l1, LTS_TYPE &l2, const lts_preorder pre, const bool generate_counter_example, const std::string &counter_example_file="", const bool structured_output=false, const lps::exploration_strategy strategy=lps::es_breadth, const bool preprocess=true)
Checks whether this LTS is smaller than another LTS according to a preorder.
transition_sort_style
Transition sort styles.
Definition transition.h:35
std::string description(const lts_preorder pre)
Gives a description of a preorder.
std::multimap< std::pair< transition::size_type, transition::size_type >, transition::size_type > outgoing_transitions_per_state_action_t
Type for exploring transitions per state and action.
std::string pp(const state_label_empty &)
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair_reversed(const std::vector< transition > &trans)
Provide the transitions as a multimap accessible per from state and label, ordered backwardly.
lts_preorder
LTS preorder relations.
void group_transitions_on_label_tgt(std::vector< transition > &transitions, const std::size_t number_of_labels, const std::size_t tau_label_index, const std::size_t number_of_states)
static std::vector< std::size_t > bogus_todo_stack
std::istream & operator>>(std::istream &is, lts_preorder &eq)
std::istream & operator>>(std::istream &is, lts_equivalence &eq)
void report_statistics(refinement_statistics< T > &stats)
Print a message to debugging containing information about the given statistics.
void write_transition(atermpp::aterm_ostream &stream, std::size_t from, const lps::multi_action &label, const probabilistic_lts_lts_t::probabilistic_state_t &to)
void group_transitions_on_label(std::vector< transition > &transitions, std::function< std::size_t(const transition &)> get_label, const std::size_t number_of_labels, const std::size_t tau_label_index)
std::size_t to(const outgoing_pair_t &p)
Target state of a label state pair.
std::string pp(const state_label_fsm &label)
Pretty print an fsm state label.
Definition lts_fsm.h:78
std::string print_equivalence(const lts_equivalence eq)
Gives the short name of an equivalence.
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair(const std::vector< transition > &trans)
Provide the transitions as a multimap accessible per from state and label.
std::size_t to(const outgoing_transitions_per_state_action_t::const_iterator &i)
To state of an iterator exploring transitions per outgoing state and action.
std::string print_preorder(const lts_preorder pre)
Gives the short name of a preorder.
std::set< std::pair< std::size_t, std::size_t > > signature_t
A signature is a pair of an action label and a block.
Definition sigref.h:25
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 write_lts_header(atermpp::aterm_ostream &stream, const data::data_specification &data, const data::variable_list &parameters, const process::action_label_list &action_labels)
Writes the start of an LTS stream.
void sort_transitions(std::vector< transition > &transitions, transition_sort_style ts=src_lbl_tgt)
Sorts the transitions using a sort style.
void determinise(LTS_TYPE &l)
Determinises this LTS.
void write_initial_state(atermpp::aterm_ostream &stream, std::size_t index)
Write the initial state to the LTS stream.
atermpp::aterm_istream & operator>>(atermpp::aterm_istream &stream, probabilistic_lts_lts_t &lts)
void group_transitions_on_tgt_label(std::vector< transition > &transitions, const std::size_t number_of_labels, const std::size_t tau_label_index, const std::size_t number_of_states)
void write_state_label(atermpp::aterm_ostream &stream, const state_label_lts &label)
Write a state label to the LTS stream.
@ mcrl2_e
Definition lts_io.h:33
std::string pp(const probabilistic_state< STATE, PROBABILITY > &l)
void reduce(LTS_TYPE &l, lts_equivalence eq)
Applies a reduction algorithm to this LTS.
detail::indexed_sorted_vector_for_transitions< outgoing_pair_t > outgoing_transitions_per_state_t
void group_transitions_on_tgt_label(LTS_TYPE &aut)
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair_reversed(const std::vector< transition > &trans, const std::set< transition::size_type > &hide_label_set)
Provide the transitions as a multimap accessible per from state and label, ordered backwardly.
bool destructive_compare(LTS_TYPE &l1, LTS_TYPE &l2, const lts_equivalence eq, const bool generate_counter_examples=false, const std::string &counter_example_file=std::string(), const bool structured_output=false)
Checks whether this LTS is equivalent to another LTS.
std::string ptr(const transition t)
Sorts the transitions on labels. Action with the tau label are put first.
std::pair< std::size_t, bool > reduce(LTS_TYPE &lts, const bool weak_reduction, const bool preserve_divergence, std::size_t l2_init)
Preprocess the LTS for destructive refinement checking.
std::string pp(const action_label_lts &l)
Print the action label to string.
Definition lts_lts.h:202
outgoing_transitions_per_state_action_t transitions_per_outgoing_state_action_pair(const std::vector< transition > &trans, const std::set< transition::size_type > &hide_label_set)
Provide the transitions as a multimap accessible per from state and label.
void merge(LTS_TYPE &l1, const LTS_TYPE &l2)
Merge the second lts into the first lts.
bool reachability_check(lts< SL, AL, BASE > &l, bool remove_unreachable=false)
Checks whether all states in this LTS are reachable from the initial state and remove unreachable sta...
bool destructive_refinement_checker(LTS_TYPE &l1, LTS_TYPE &l2, const refinement_type refinement, const bool weak_reduction, const lps::exploration_strategy strategy, const bool preprocess=true, COUNTER_EXAMPLE_CONSTRUCTOR generate_counter_example=detail::dummy_counter_example_constructor())
This function checks using algorithms in the paper mentioned above whether transition system l1 is in...
std::size_t label(const outgoing_pair_t &p)
Label of a pair of a label and target state.
std::size_t from(const outgoing_transitions_per_state_action_t::const_iterator &i)
From state of an iterator exploring transitions per outgoing state and action.
void scc_reduce(LTS_TYPE &l, const bool preserve_divergence_loops=false)
Definition liblts_scc.h:394
void write_transition(atermpp::aterm_ostream &stream, std::size_t from, const lps::multi_action &label, std::size_t to)
Write a transition to the LTS stream.
void group_transitions_on_label(const std::vector< transition >::iterator begin, const std::vector< transition >::iterator end, std::function< std::size_t(const transition &)> get_label, std::vector< std::pair< std::size_t, std::size_t > > &count_sum_transitions_per_action, const std::size_t tau_label_index=0, std::vector< std::size_t > &todo_stack=bogus_todo_stack)
static const std::size_t const_tau_label_index
Definition transition.h:28
bool reachability_check(probabilistic_lts< SL, AL, PROBABILISTIC_STATE, BASE > &l, bool remove_unreachable=false)
Checks whether all states in a probabilistic LTS are reachable from the initial state and remove unre...
lts_preorder parse_preorder(std::string const &s)
Determines the preorder from a string.
std::pair< transition::size_type, transition::size_type > outgoing_pair_t
Type for exploring transitions per state.
bool compare(const LTS_TYPE &l1, const LTS_TYPE &l2, const lts_preorder pre, const bool generate_counter_example, const std::string &counter_example_file="", const bool structured_output=false, const lps::exploration_strategy strategy=lps::es_breadth, const bool preprocess=true)
Checks whether this LTS is smaller than another LTS according to a preorder.
atermpp::aterm_istream & operator>>(atermpp::aterm_istream &stream, lts_lts_t &lts)
Read a (probabilistic) LTS from the given stream.
lts_equivalence parse_equivalence(std::string const &s)
Determines the equivalence from a string.
std::string pp(const action_label_string &l)
std::string description(const lts_equivalence eq)
Gives a description of an equivalence.
bool compare(const LTS_TYPE &l1, const LTS_TYPE &l2, const lts_equivalence eq, const bool generate_counter_examples=false, const std::string &counter_example_file="", const bool structured_output=false)
Checks whether this LTS is equivalent to another LTS.
The main namespace for the Process library.
bool is_linear(const process_specification &p, bool verbose=false)
Returns true if the process specification is linear.
Definition is_linear.h:347
atermpp::term_list< action_label > action_label_list
\brief list of action_labels
std::vector< action > action_vector
\brief vector of actions
atermpp::term_list< action > action_list
\brief list of actions
bool is_untyped_multi_action(const atermpp::aterm &x)
process_specification parse_process_specification(std::istream &in)
Parses a process specification from an input stream.
Definition parse.h:43
std::string pp(const regular_formulas::regular_formula &x)
bool is_alt(const atermpp::aterm &x)
bool is_untyped_regular_formula(const atermpp::aterm &x)
void make_trans(atermpp::aterm &t, const ARGUMENTS &... args)
void make_seq(atermpp::aterm &t, const ARGUMENTS &... args)
void make_trans_or_nil(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_trans(const atermpp::aterm &x)
void swap(alt &t1, alt &t2)
\brief swap overload
std::string pp(const regular_formulas::seq &x)
void make_alt(atermpp::aterm &t, const ARGUMENTS &... args)
void make_untyped_regular_formula(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_trans_or_nil(const atermpp::aterm &x)
bool is_regular_formula(const atermpp::aterm &x)
void swap(trans &t1, trans &t2)
\brief swap overload
bool is_seq(const atermpp::aterm &x)
std::string pp(const regular_formulas::alt &x)
std::vector< regular_formula > regular_formula_vector
\brief vector of regular_formulas
void swap(untyped_regular_formula &t1, untyped_regular_formula &t2)
\brief swap overload
std::string pp(const regular_formulas::untyped_regular_formula &x)
atermpp::term_list< regular_formula > regular_formula_list
\brief list of regular_formulas
void swap(seq &t1, seq &t2)
\brief swap overload
std::string pp(const regular_formulas::trans_or_nil &x)
void swap(regular_formula &t1, regular_formula &t2)
\brief swap overload
std::string pp(const regular_formulas::trans &x)
void swap(trans_or_nil &t1, trans_or_nil &t2)
\brief swap overload
bool is_timed(const state_formula &x)
bool is_infimum(const atermpp::aterm &x)
std::string pp(const state_formulas::or_ &x)
std::string pp(const state_formulas::plus &x)
void swap(nu &t1, nu &t2)
\brief swap overload
bool is_and(const atermpp::aterm &x)
std::string pp(const state_formulas::yaled_timed &x)
std::string pp(const state_formulas::may &x)
bool is_delay_timed(const atermpp::aterm &x)
bool is_const_multiply(const atermpp::aterm &x)
std::string pp(const state_formulas::must &x)
void swap(const_multiply &t1, const_multiply &t2)
\brief swap overload
bool is_minus(const atermpp::aterm &x)
std::string pp(const state_formulas::not_ &x)
void make_imp(atermpp::aterm &t, const ARGUMENTS &... args)
atermpp::term_list< state_formula > state_formula_list
\brief list of state_formulas
bool is_exists(const atermpp::aterm &x)
std::string pp(const state_formulas::delay &x)
bool is_not(const atermpp::aterm &x)
void swap(and_ &t1, and_ &t2)
\brief swap overload
bool is_state_formula(const atermpp::aterm &x)
void make_const_multiply(atermpp::aterm &t, const ARGUMENTS &... args)
void make_exists(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(yaled_timed &t1, yaled_timed &t2)
\brief swap overload
bool is_supremum(const atermpp::aterm &x)
bool is_must(const atermpp::aterm &x)
std::set< data::variable > find_all_variables(const state_formulas::state_formula &x)
bool is_yaled(const atermpp::aterm &x)
std::string pp(const state_formulas::const_multiply &x)
void swap(infimum &t1, infimum &t2)
\brief swap overload
void make_and_(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::exists &x)
std::string pp(const state_formulas::const_multiply_alt &x)
std::set< data::variable > find_free_variables(const state_formulas::state_formula &x)
void swap(imp &t1, imp &t2)
\brief swap overload
bool is_true(const atermpp::aterm &x)
void swap(minus &t1, minus &t2)
\brief swap overload
std::string pp(const state_formulas::and_ &x)
void swap(may &t1, may &t2)
\brief swap overload
std::string pp(const state_formulas::state_formula &x)
void swap(exists &t1, exists &t2)
\brief swap overload
void swap(plus &t1, plus &t2)
\brief swap overload
std::string pp(const state_formulas::infimum &x)
void swap(mu &t1, mu &t2)
\brief swap overload
void make_plus(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::minus &x)
bool is_variable(const atermpp::aterm &x)
void make_not_(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(variable &t1, variable &t2)
\brief swap overload
void swap(supremum &t1, supremum &t2)
\brief swap overload
void make_infimum(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(true_ &t1, true_ &t2)
\brief swap overload
bool is_may(const atermpp::aterm &x)
bool is_yaled_timed(const atermpp::aterm &x)
bool is_imp(const atermpp::aterm &x)
void make_delay_timed(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::forall &x)
std::string pp(const state_formulas::imp &x)
std::string pp(const state_formulas::yaled &x)
std::vector< state_formula > state_formula_vector
\brief vector of state_formulas
void make_const_multiply_alt(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::sum &x)
void make_may(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(const_multiply_alt &t1, const_multiply_alt &t2)
\brief swap overload
bool is_sum(const atermpp::aterm &x)
void swap(or_ &t1, or_ &t2)
\brief swap overload
std::string pp(const state_formulas::delay_timed &x)
void swap(delay_timed &t1, delay_timed &t2)
\brief swap overload
state_formulas::state_formula translate_user_notation(const state_formulas::state_formula &x)
void make_must(atermpp::aterm &t, const ARGUMENTS &... args)
state_formulas::state_formula normalize_sorts(const state_formulas::state_formula &x, const data::sort_specification &sortspec)
std::string pp(const state_formulas::false_ &x)
void swap(must &t1, must &t2)
\brief swap overload
bool is_nu(const atermpp::aterm &x)
void swap(not_ &t1, not_ &t2)
\brief swap overload
bool is_delay(const atermpp::aterm &x)
std::string pp(const state_formulas::true_ &x)
std::string pp(const state_formulas::mu &x)
std::string pp(const state_formulas::supremum &x)
bool is_false(const atermpp::aterm &x)
void make_variable(atermpp::aterm &t, const ARGUMENTS &... args)
void make_nu(atermpp::aterm &t, const ARGUMENTS &... args)
void make_supremum(atermpp::aterm &t, const ARGUMENTS &... args)
void make_sum(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_plus(const atermpp::aterm &x)
void swap(state_formula &t1, state_formula &t2)
\brief swap overload
void swap(false_ &t1, false_ &t2)
\brief swap overload
void swap(sum &t1, sum &t2)
\brief swap overload
void make_forall(atermpp::aterm &t, const ARGUMENTS &... args)
bool is_mu(const atermpp::aterm &x)
void swap(yaled &t1, yaled &t2)
\brief swap overload
bool is_forall(const atermpp::aterm &x)
void swap(delay &t1, delay &t2)
\brief swap overload
void make_minus(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::nu &x)
bool is_const_multiply_alt(const atermpp::aterm &x)
bool is_or(const atermpp::aterm &x)
void make_or_(atermpp::aterm &t, const ARGUMENTS &... args)
void swap(forall &t1, forall &t2)
\brief swap overload
void make_yaled_timed(atermpp::aterm &t, const ARGUMENTS &... args)
std::string pp(const state_formulas::variable &x)
std::set< data::sort_expression > find_sort_expressions(const state_formulas::state_formula &x)
bool find_nil(const state_formulas::state_formula &x)
std::set< process::action_label > find_action_labels(const state_formulas::state_formula &x)
void make_mu(atermpp::aterm &t, const ARGUMENTS &... args)
std::set< core::identifier_string > find_identifiers(const state_formulas::state_formula &x)
void remove_common_divisor(std::size_t &p, std::size_t &q)
std::size_t hash_combine(const std::size_t h1, const std::size_t h2)
std::size_t multiply_single_number(const std::size_t n1, const std::size_t n2, std::size_t &multiplication_carry)
Definition big_numbers.h:95
std::size_t divide_single_number(const std::size_t p, const std::size_t q, std::size_t &remainder)
std::size_t add_single_number(const std::size_t n1, const std::size_t n2, std::size_t &carry)
Definition big_numbers.h:49
std::size_t greatest_common_divisor(std::size_t p, std::size_t q)
std::size_t subtract_single_number(const std::size_t n1, const std::size_t n2, std::size_t &carry)
Definition big_numbers.h:72
std::string pp(const probabilistic_arbitrary_precision_fraction &l)
std::string pp(const big_natural_number &l)
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
void swap(atermpp::term_balanced_tree< T > &t1, atermpp::term_balanced_tree< T > &t2)
Swaps two balanced trees.
#define USE_SIMPLE_LIST
Definition simple_list.h:60
#define USE_POOL_ALLOCATOR
Definition simple_list.h:66
std::size_t next
std::size_t y
std::size_t x
std::size_t next
std::size_t z
std::size_t x
std::size_t y
static const atermpp::aterm StateMay
static const atermpp::aterm StateOr
static const atermpp::aterm UntypedRegFrm
static const atermpp::aterm StateFrm
static const atermpp::aterm StateYaled
static const atermpp::aterm RegAlt
static const atermpp::aterm ActNot
static const atermpp::aterm ActImp
static const atermpp::aterm ActTrue
static const atermpp::aterm StateInfimum
static const atermpp::aterm StateAnd
static const atermpp::aterm StateExists
static const atermpp::aterm RegTrans
static const atermpp::aterm ActOr
static const atermpp::aterm StateConstantMultiplyAlt
static const atermpp::aterm ActFrm
static const atermpp::aterm ActForall
static const atermpp::aterm StateYaledTimed
static const atermpp::aterm ActFalse
static const atermpp::aterm StateFalse
static const atermpp::aterm RegFrm
static const atermpp::aterm StateDelay
static const atermpp::aterm StatePlus
static const atermpp::aterm StateMinus
static const atermpp::aterm StateNu
static const atermpp::aterm ActAnd
static const atermpp::aterm StateDelayTimed
static const atermpp::aterm StateSupremum
static const atermpp::aterm StateSum
static const atermpp::aterm ActAt
static const atermpp::aterm ActExists
static const atermpp::aterm StateMu
static const atermpp::aterm RegTransOrNil
static const atermpp::aterm StateVar
static const atermpp::aterm StateImp
static const atermpp::aterm RegSeq
static const atermpp::aterm StateTrue
static const atermpp::aterm StateForall
static const atermpp::aterm StateMust
static const atermpp::aterm StateNot
static const atermpp::aterm ActMultAct
static const atermpp::aterm StateConstantMultiply
static const atermpp::function_symbol UntypedRegFrm
static const atermpp::function_symbol StateMu
static const atermpp::function_symbol ActMultAct
static const atermpp::function_symbol RegSeq
static const atermpp::function_symbol StateConstantMultiply
static const atermpp::function_symbol ActNot
static const atermpp::function_symbol StateSum
static const atermpp::function_symbol ActAnd
static const atermpp::function_symbol StateConstantMultiplyAlt
static const atermpp::function_symbol StateForall
static const atermpp::function_symbol StateOr
static const atermpp::function_symbol ActFalse
static const atermpp::function_symbol RegTransOrNil
static const atermpp::function_symbol StateYaledTimed
static const atermpp::function_symbol StateExists
static const atermpp::function_symbol ActExists
static const atermpp::function_symbol StateVar
static const atermpp::function_symbol StateTrue
static const atermpp::function_symbol StateFalse
static const atermpp::function_symbol StateImp
static const atermpp::function_symbol RegAlt
static const atermpp::function_symbol RegTrans
static const atermpp::function_symbol StateMinus
static const atermpp::function_symbol StateNot
static const atermpp::function_symbol StateInfimum
static const atermpp::function_symbol StateDelay
static const atermpp::function_symbol StateYaled
static const atermpp::function_symbol ActAt
static const atermpp::function_symbol StateMay
static const atermpp::function_symbol StateDelayTimed
static const atermpp::function_symbol ActImp
static const atermpp::function_symbol ActTrue
static const atermpp::function_symbol ActForall
static const atermpp::function_symbol StatePlus
static const atermpp::function_symbol StateMust
static const atermpp::function_symbol StateNu
static const atermpp::function_symbol StateAnd
static const atermpp::function_symbol ActOr
static const atermpp::function_symbol StateSupremum
std::vector< transition > non_inert_transitions
std::vector< non_bottom_state > non_bottom_states
non_bottom_state(const state_type s, const std::vector< state_type > &it)
std::set< std::pair< label_type, block_index_type > > outgoing_observations
bool operator!=(const BLC_indicators &other) const
std::string debug_id(const bisim_partitioner_gj< LTS_TYPE > &partitioner, const block_type *from_block=nullptr) const
print a B_to_C slice identification for debugging
BLC_indicators(BLC_list_iterator start, BLC_list_iterator end, bool is_stable)
bool operator==(const BLC_indicators &other) const
check_complexity::BLC_gj_counter_t work_counter
std::string debug_id(const bisim_partitioner_gj< LTS_TYPE > &partitioner) const
print a block identification for debugging
state_in_block_pointer * end_states
pointer past the last state in the block
block_type(state_in_block_pointer *start_bottom, state_in_block_pointer *start_non_bottom, state_in_block_pointer *end, constellation_type *new_c)
constructor
check_complexity::block_gj_counter_t work_counter
bool contains_new_bottom_states
a boolean that is true iff the block contains new bottom states
block_type(const block_type &other)
copy constructor. Required by MSCV.
constellation_type(state_in_block_pointer *const new_start, state_in_block_pointer *const new_end)
state_in_block_pointer * end_const_states
points past the last state in m_states_in_blocks
std::string debug_id(const bisim_partitioner_gj< LTS_TYPE > &partitioner) const
print a constellation identification for debugging
state_in_block_pointer * start_const_states
points to the first state in m_states_in_blocks
information about a transition stored in m_outgoing_transitions
outgoing_transition_type(const outgoing_transitions_it sssaC)
a pointer to a state, i.e. a reference to a state
bool operator!=(const state_in_block_pointer &other) const
bool operator==(const state_in_block_pointer &other) const
state_in_block_pointer(fixed_vector< state_type_gj >::iterator new_ref_state)
transition_index no_of_outgoing_block_inert_transitions
number of outgoing block-inert transitions
std::vector< transition >::iterator start_incoming_transitions
first incoming transition
check_complexity::state_gj_counter_t work_counter
state_in_block_pointer * ref_states_in_blocks
pointer to the corresponding entry in m_states_in_blocks
std::string debug_id(const bisim_partitioner_gj< LTS_TYPE > &partitioner) const
print a state identification for debugging
std::string debug_id_short(const bisim_partitioner_gj< LTS_TYPE > &partitioner) const
print a short state identification for debugging
outgoing_transitions_it start_outgoing_transitions
first outgoing transition
check_complexity::trans_gj_counter_t work_counter
std::string debug_id(const bisim_partitioner_gj< LTS_TYPE > &partitioner) const
print a transition identification for debugging
linked_list< BLC_indicators >::iterator transitions_per_block_to_constellation
std::string debug_id_short(const bisim_partitioner_gj< LTS_TYPE > &partitioner) const
print a short transition identification for debugging
refinement_statistics(detail::anti_chain_type &antichain, std::deque< T > &working)
Converts a process expression into linear process format. Use the convert member functions for this.
lps::specification convert(const process_specification &p)
Converts a process_specification into a specification. Throws non_linear_process if a non-linear sub-...
Converts a process expression into linear process format. Use the convert member functions for this.
lps::stochastic_specification convert(const process_specification &p)
Converts a process_specification into a stochastic_specification. Throws non_linear_process if a non-...
std::size_t operator()(const atermpp::aterm &t) const
Definition aterm.h:483
std::size_t operator()(const atermpp::detail::reference_aterm< T > &t) const
std::size_t operator()(const atermpp::term_balanced_tree< T > &t) const
std::size_t operator()(const mcrl2::lps::multi_action &ma) const
std::size_t operator()(const mcrl2::lps::probabilistic_data_expression &p) const
std::size_t operator()(const mcrl2::lps::state_probability_pair< STATE, PROBABILITY > &p) const
std::size_t operator()(const mcrl2::lts::action_label_lts &as) const
Definition lts_lts.h:440
std::size_t operator()(const mcrl2::lts::action_label_string &as) const
std::size_t operator()(const mcrl2::lts::probabilistic_state< STATE, PROBABILITY > &p) const
std::size_t operator()(const mcrl2::lts::transition &t) const
Definition transition.h:164
std::size_t operator()(const mcrl2::utilities::big_natural_number &n) const
std::size_t operator()(const mcrl2::utilities::probabilistic_arbitrary_precision_fraction &p) const
pointer to next non-trivial bunch (in the single-linked list) or label
bunch_t * next_nontrivial
pointer to the next non-trivial bunch in the single-linked list
union: either iterator or counter (for initialisation)
iterator_or_counter()
Construct the object as a counter.
trans_type count
counter (used during initialisation)
Iterator begin
iterator (used during main part of the algorithm)
~iterator_or_counter()
Destruct the object as an iterator.
void convert_to_iterator(const Iterator other)
Convert the object from counter to iterator.
block where the state belongs
block_t * ock
pred_entry * ed_noninert_end
linked_list< BLC_indicators > to_constellation
list of descriptors of all BLC sets that contain transitions starting in the block
std::vector< state_in_block_pointer > * R
used during initialisation for a pointer to a vector of marked states
static bool if_R_is_nullptr_then_to_constellation_is_empty_list()
indicates whether the default values of the union members agree
state_in_block_pointer * first_unmarked_bottom_state
used during initialisation for the first unmarked bottom state
state_index te_in_reduced_LTS
used during finalizing for the state index in the reduced LTS
BLC_list_iterator BLC_transitions
pointer to the corresponding entry in m_BLC_transitions (used during main part of the algorithm)
transition_index transitions
transition index (used during initialisation)
void convert_to_iterator(const BLC_list_iterator other)
Convert the object from counter to iterator.