12#ifndef MCRL2_LTS_LIBLTS_READY_SIM_H
13#define MCRL2_LTS_LIBLTS_READY_SIM_H
25template <
class LTS_TYPE>
111template <
class LTS_TYPE>
114 initialise_datastructures();
119 mCRL2log(
log::debug) <<
"--------------------- READY PRE-REDUCTION-------------------------" << std::endl;
125template <
class LTS_TYPE>
129 ready2sim_reduction();
130 partitioning_algorithmG();
136template <
class LTS_TYPE>
141 std::vector<std::size_t> v;
143 children.assign(s_Pi,v);
147 for (alpha = 0; alpha < s_Pi; ++alpha)
149 children[alpha].push_back(alpha);
150 parent[alpha] = alpha;
155 mCRL2log(
log::debug) <<
"---------------- Refinei ---------------------------------------" << std::endl;
160 std::vector<std::size_t>::iterator alphai, last;
164 for (l = 0; l < aut.num_action_labels(); ++l)
166 mCRL2log(
log::debug) <<
"---------------------------------------------------" << std::endl;
169 touched_blocks.clear();
173 last = touched_blocks.end();
174 for (alphai = touched_blocks.begin(); alphai != last; ++alphai)
181 children[parent[alpha]].push_back(s_Pi);
182 parent.push_back(parent[alpha]);
183 block_touched.push_back(
false);
187 contents_u.push_back(contents_u[alpha]);
191 for (ptrdiff_t i = contents_u[s_Pi]; i !=
LIST_END;
192 i = state_buckets[i].next)
205template <
class LTS_TYPE>
209 mCRL2log(
log::debug) <<
"--------------- Updatei ---------------------------------------" << std::endl;
211 std::size_t l,alpha,gamma;
212 std::vector<std::size_t>::iterator alphai, last;
219 for (l = 0; l < aut.num_action_labels(); ++l)
221 for (gamma = 0; gamma < s_Sigma; ++gamma)
223 touched_blocks.clear();
224 initialise_Sigma(gamma,l);
225 last = touched_blocks.end();
226 for (alphai = touched_blocks.begin(); alphai != last; ++alphai)
229 exists2->add(alpha,l);
232 forall2->add(alpha,l);
252 for (l = 0; l < aut.num_action_labels(); ++l)
254 for (beta = 0; beta < s_Pi; ++beta)
256 if (exists2->find(beta,l))
258 for (alpha = 0; alpha < s_Pi; ++alpha)
259 if (Q[alpha][beta] && !forall2->find(alpha,l))
260 Q[alpha][beta] = false ;
273template <
class LTS_TYPE>
277 std::stringstream result;
288template <
class LTS_TYPE>
void ready2sim_reduction()
ready_sim_partitioner(LTS_TYPE &l)
std::string print_structure(hash_table2 *struc)
virtual void partitioning_algorithm()
std::vector< ptrdiff_t > contents_t
std::vector< std::size_t > touched_blocks
void initialise_Sigma(std::size_t gamma, std::size_t l)
std::vector< ptrdiff_t > contents_u
std::vector< bool > block_touched
std::vector< std::size_t > block_Pi
std::string print_Sigma_P()
std::string print_relation(std::size_t s, std::vector< std::vector< bool > > &R)
std::vector< std::size_t > parent
std::vector< state_bucket > state_buckets
void initialise_datastructures()
void touch(std::size_t a, std::size_t alpha)
std::vector< std::vector< bool > > P
void untouch(std::size_t alpha)
std::vector< std::vector< std::size_t > > children
std::vector< std::vector< bool > > Q
void partitioning_algorithmG()
Header file for the simulation preorder algorithm.
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
std::string pp(const abstraction &x)
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...