22 #include <bricks/brick-hash> 23 #include <bricks/brick-hashset> 24 #include <spot/kripke/kripke.hh> 25 #include <spot/ltsmin/spins_interface.hh> 26 #include <spot/misc/fixpool.hh> 27 #include <spot/misc/mspool.hh> 28 #include <spot/misc/intvcomp.hh> 29 #include <spot/misc/intvcmp2.hh> 30 #include <spot/twacube/cube.hh> 50 bool operator()(
const cspins_state lhs,
const cspins_state rhs)
const 52 return 0 == memcmp(lhs, rhs, (2+rhs[1])*
sizeof(
int));
59 size_t operator()(
const cspins_state that)
const 70 brick::hash::hash128_t hash(cspins_state t)
const 74 return std::make_pair(t[0], t[0]);
76 bool equal(cspins_state lhs, cspins_state rhs)
const 78 return 0 == memcmp(lhs, rhs, (2+rhs[1])*
sizeof(
int));
83 typedef brick::hashset::FastConcurrent<cspins_state, cspins_state_hasher>
93 int* unbox_state(cspins_state s)
const;
95 cspins_state alloc_setup(
int *dst,
int* cmp,
size_t cmpsize);
96 void decompress(cspins_state s,
int* uncompressed,
unsigned size)
const;
97 void dealloc(cspins_state s);
98 unsigned int size()
const;
104 const unsigned int state_size_;
105 void (*fn_compress_)(
const int*, size_t,
int*,
size_t&);
106 void (*fn_decompress_)(
const int*, size_t,
int*, size_t);
115 std::vector<cspins_state>* succ;
137 int dead_idx,
unsigned tid);
139 void recycle(cspins_state s,
146 cubeset& cubeset,
int dead_idx,
unsigned tid);
151 cspins_state
state()
const;
152 cube condition()
const;
155 std::vector<cspins_state> successors_;
156 unsigned int current_;
168 OP_EQ_VAR, OP_NE_VAR, OP_LT_VAR, OP_GT_VAR, OP_LE_VAR, OP_GE_VAR,
169 VAR_OP_EQ, VAR_OP_NE, VAR_OP_LT, VAR_OP_GT, VAR_OP_LE, VAR_OP_GE,
170 VAR_OP_EQ_VAR, VAR_OP_NE_VAR, VAR_OP_LT_VAR,
171 VAR_OP_GT_VAR, VAR_OP_LE_VAR, VAR_OP_GE_VAR, VAR_DEAD
183 typedef std::vector<one_prop> prop_set;
187 kripkecube(spins_interface_ptr sip,
bool compress,
188 std::vector<std::string> visible_aps,
189 bool selfloopize, std::string dead_prop,
190 unsigned int nb_threads);
192 cspins_state initial(
unsigned tid);
193 std::string to_string(
const cspins_state s,
unsigned tid = 0)
const;
196 const std::vector<std::string> get_ap();
197 unsigned get_threads();
205 void match_aps(std::vector<std::string>& aps, std::string dead_prop);
209 void compute_condition(
cube c, cspins_state s,
unsigned tid = 0);
211 spins_interface_ptr sip_;
215 std::vector<std::vector<cspins_iterator*>> recycle_;
220 std::vector<std::string> aps_;
222 unsigned int nb_threads_;
232 #include <spot/ltsmin/spins_kripke.hxx>
Definition: spins_kripke.hh:126
Abstract class for states.
Definition: twa.hh:50
This class provides a hasher as required by the bricks classes.
Definition: spins_kripke.hh:66
This class is a template representation of a Kripke structure. It is composed of two template paramet...
Definition: kripke.hh:37
This class provides the ability to hash a state.
Definition: spins_kripke.hh:57
A multiple-size memory pool implementation.
Definition: mspool.hh:32
brick::hashset::FastConcurrent< cspins_state, cspins_state_hasher > cspins_state_map
Shortcut to avoid long names...
Definition: spins_kripke.hh:84
std::shared_ptr< spot::kripkecube< spot::cspins_state, spot::cspins_iterator > > ltsmin_kripkecube_ptr
shortcut to manipulate the kripke below
Definition: spins_kripke.hh:228
This class provides the ability to compare two states.
Definition: spins_kripke.hh:48
Definition: spins_kripke.hh:112
op
Operator types.
Definition: formula.hh:62
unsigned * cube
A cube is only a set of bits in memory.
Definition: cube.hh:66
int * cspins_state
A Spins state is represented as an array of integer Note that this array has two reserved slots (posi...
Definition: spins_kripke.hh:45
The management of states (i.e. allocation/deallocation) can be painless since every time we have to c...
Definition: spins_kripke.hh:89
Definition: spins_interface.hh:39
A fixed-size memory pool implementation.
Definition: fixpool.hh:31