mCRL2
Loading...
Searching...
No Matches
lts_dot.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
19#ifndef MCRL2_LTS_LTS_DOT_H
20#define MCRL2_LTS_LTS_DOT_H
21
23#include "mcrl2/core/print.h"
26
27
28namespace mcrl2
29{
30namespace lts
31{
32
37{
38 private:
39 std::string m_state_name;
40 std::string m_state_label;
41
42 public:
43
47 {}
48
51 state_label_dot(const std::string& state_name,
52 const std::string& state_label):m_state_name(state_name),m_state_label(state_label)
53 {}
54
57 void set_name(const std::string& s)
58 {
60 }
61
64 std::string name() const
65 {
66 return m_state_name;
67 }
68
71 void set_label(const std::string& s)
72 {
74 }
75
78 std::string label() const
79 {
80 return m_state_label;
81 }
82
86 bool operator ==(const state_label_dot& l) const
87 {
88 return m_state_name==l.name() && m_state_label==l.label();
89 }
90
93 bool operator !=(const state_label_dot& l) const
94 {
95 return !(*this==l);
96 }
97};
98
101inline std::string pp(const state_label_dot& l)
102{
103 return l.label();
104}
105
109namespace detail
110{
111
113{
114 public:
118 {
119 return lts_dot;
120 }
121
125 {
126 // Intentionally empty.
127 }
128
129};
130
131} // end namespace detail
132
136class lts_dot_t : public lts< state_label_dot, action_label_string, detail::lts_dot_base >
137{
138
139 public:
140
144 void save(std::ostream& os) const;
145
150 void save(const std::string& filename) const;
151};
152
153
158 public probabilistic_lts<
159 state_label_dot,
160 action_label_string,
161 probabilistic_state<std::size_t, mcrl2::utilities::probabilistic_arbitrary_precision_fraction>,
162 detail::lts_dot_base >
163{
164
165 public:
166
170 void save(std::ostream& os) const;
171
176 void save(const std::string& filename) const;
177};
178
179
180
181} // namespace lts
182} // namespace mcrl2
183
184#endif
This file contains a class that contains labelled transition systems in aut format.
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
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.
A class that contains a labelled transition system.
Definition lts.h:83
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.
A class that contains a labelled transition system.
This class contains labels for states in dot format.
Definition lts_dot.h:37
void set_name(const std::string &s)
This method sets the name of the state label to the string s.
Definition lts_dot.h:57
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
void set_label(const std::string &s)
This method sets the label field of the state label to the string s.
Definition lts_dot.h:71
state_label_dot(const std::string &state_name, const std::string &state_label)
A constructor setting the name and label of this state label to the indicated values.
Definition lts_dot.h:51
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
Functions for pretty printing ATerms.
std::string pp(const abstraction &x)
Definition data.cpp:39
lts_type
The enumerated type lts_type contains an index for every type type of labelled transition system that...
Definition lts_type.h:37
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
This file contains a class that contains labels for probabilistic transitions. These consist of a 64 ...
The file containing the core class for transition systems.