19#ifndef MCRL2_LTS_ACTION_LABEL_STRING_H
20#define MCRL2_LTS_ACTION_LABEL_STRING_H
66 std::string::iterator b = begin();
67 std::string::iterator c = begin();
72 while (c != end() && *c !=
'(' && *c !=
'|')
77 if (c != end() && *c ==
'(')
84 case '(': ++nd;
break;
85 case ')': --nd;
break;
88 while (nd > 0 && c != end());
91 while (c != end() && *c !=
'|')
96 if (std::find(string_vector.begin(), string_vector.end(), a) == string_vector.end())
106 if (c != end() && *c ==
'|')
127 return std::string(*
this)<std::string(l);
147 static std::multiset<std::string> split_actions;
148 assert(split_actions.empty());
149 size_t nested_bracket_counter=0;
150 size_t start_of_current_action=0;
151 for(
size_t i=0; i<s.size(); ++i)
155 {
if (nested_bracket_counter==0)
161 nested_bracket_counter--;
166 nested_bracket_counter++;
168 else if (c==
'|' && nested_bracket_counter==0)
170 split_actions.insert(s.substr(start_of_current_action,i-start_of_current_action));
171 start_of_current_action=i+1;
174 if (start_of_current_action==s.size())
178 if (split_actions.size()==0)
183 split_actions.insert(s.substr(start_of_current_action,s.size()-start_of_current_action));
185 for(
const std::string& s: split_actions)
193 split_actions.clear();
217 hash<std::string> hasher;
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 class that contains a labelled transition system.
Standard exception class for reporting runtime errors.
Exception classes for use in libraries and tools.
std::string pp(const abstraction &x)
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
std::size_t operator()(const mcrl2::lts::action_label_string &as) const
String manipulation functions.