spot  1.2.1a
unioncheck.hh
1 // Copyright (C) 2013 Laboratoire de Recherche et Développement
2 // de l'Epita (LRDE).
3 //
4 // This file is part of Spot, a model checking library.
5 //
6 // Spot is free software; you can redistribute it and/or modify it
7 // under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // Spot is distributed in the hope that it will be useful, but WITHOUT
12 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 // License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 #ifndef SPOT_FASTTGBAALGOS_EC_UNIONCHECK_HH
20 # define SPOT_FASTTGBAALGOS_EC_UNIONCHECK_HH
21 
22 #include <stack>
23 #include <tuple>
24 #include "misc/hash.hh"
25 #include "union_find.hh"
26 #include "fasttgba/fasttgba.hh"
27 #include "ec.hh"
28 #include "root_stack.hh"
29 
30 namespace spot
31 {
32 
36  class SPOT_API unioncheck : public ec
37  {
38  public:
39 
41  unioncheck(instanciator* i, std::string otpion = "");
42 
44  virtual ~unioncheck();
45 
47  bool check();
48 
50  std::string extra_info_csv();
51 
52  protected:
53 
55  virtual void init();
56 
57  // ------------------------------------------------------------
58  // For classic algorithm with stack and UF
59  // ------------------------------------------------------------
60 
62  virtual void dfs_push(fasttgba_state*);
63 
65  virtual void dfs_pop();
66 
68  virtual bool merge(fasttgba_state*);
69 
71  virtual void main();
72 
75 
77  const fasttgba* a_;
78 
79  // An element in Todo stack
81  {
83  fasttgba_succ_iterator* lasttr;
84  };
85 
87  std::vector<pair_state_iter> todo;
88 
91 
94 
97 
98  unsigned int max_dfs_size_;
106  int K;
108  };
109 
110 
111  class SPOT_API tarjanunioncheck : public ec
112  {
113  public:
114 
116  tarjanunioncheck(instanciator* i, std::string otpion = "");
117 
119  virtual ~tarjanunioncheck();
120 
122  bool check();
123 
125  std::string extra_info_csv();
126 
127  protected:
128 
130  virtual void init();
131 
132  // ------------------------------------------------------------
133  // For classic algorithm with stack and UF
134  // ------------------------------------------------------------
135 
137  virtual void dfs_push(fasttgba_state*);
138 
140  virtual void dfs_pop();
141 
143  virtual bool dfs_update(fasttgba_state*);
144 
146  virtual void main();
147 
150 
152  const fasttgba* a_;
153 
154  // An element in Todo stack
155  struct dfs_element
156  {
158  fasttgba_succ_iterator* lasttr;
159  int pos;
160  };
161 
163  std::vector<dfs_element> todo;
164 
167 
170 
173 
174  unsigned int max_dfs_size_;
182  int K;
184  };
185 }
186 
187 #endif // SPOT_FASTTGBAALGOS_EC_UNIONCHECK_HH
int update_loop_cpt_
count UPDATE loop iterations
Definition: unioncheck.hh:100
const instance_automaton * inst
The instance automaton.
Definition: unioncheck.hh:96
this class acts like a wrapper to the C code of the open_set.
Definition: public.hh:32
int update_loop_cpt_
count UPDATE loop iterations
Definition: unioncheck.hh:176
unsigned int max_dfs_size_
keep peack size
Definition: unioncheck.hh:98
std::vector< dfs_element > todo
the todo stack
Definition: unioncheck.hh:163
Definition: fasttgba.hh:33
std::vector< pair_state_iter > todo
the todo stack
Definition: unioncheck.hh:87
union_find * uf
the union_find used for the storage
Definition: unioncheck.hh:93
Definition: root_stack.hh:250
This class act as an interface for all classes.
Definition: fasttgba_state.hh:30
int transitions_cpt_
count transitions
Definition: unioncheck.hh:103
unsigned int max_dfs_size_
keep peack size
Definition: unioncheck.hh:174
bool counterexample_found
the automaton that will be used for the Emptiness check
Definition: unioncheck.hh:149
Abstract class for states.
Definition: state.hh:40
int memory_cost_
evaluates memory
Definition: unioncheck.hh:180
Definition: unioncheck.hh:111
const instance_automaton * inst
The instance automaton.
Definition: unioncheck.hh:172
int memory_usage_
memory consumption
Definition: unioncheck.hh:183
union_find * uf
the union_find used for the storage
Definition: unioncheck.hh:169
Definition: unioncheck.hh:36
Definition: ec.hh:71
int update_cpt_
count UPDATE calls
Definition: unioncheck.hh:99
generic_stack * stack_
Root of stack.
Definition: unioncheck.hh:90
int roots_poped_cpt_
count UPDATE loop iterations
Definition: unioncheck.hh:101
int update_cpt_
count UPDATE calls
Definition: unioncheck.hh:175
A simple wrapper for an automaton.
Definition: ec.hh:40
Definition: unioncheck.hh:155
generic_stack * stack_
Root of stack.
Definition: unioncheck.hh:166
Iterate over the successors of a state.
Definition: fasttgba_succ_iterator.hh:35
int memory_cost_
evaluates memory
Definition: unioncheck.hh:104
int states_cpt_
count states
Definition: unioncheck.hh:102
int states_cpt_
count states
Definition: unioncheck.hh:178
int trivial_scc_
count trivial SCCs
Definition: unioncheck.hh:105
Definition: unioncheck.hh:80
int memory_usage_
memory consumption
Definition: unioncheck.hh:107
int trivial_scc_
count trivial SCCs
Definition: unioncheck.hh:181
Definition: union_find.hh:46
int transitions_cpt_
count transitions
Definition: unioncheck.hh:179
bool counterexample_found
the automaton that will be used for the Emptiness check
Definition: unioncheck.hh:74
int roots_poped_cpt_
count UPDATE loop iterations
Definition: unioncheck.hh:177
Definition: ec.hh:28

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Fri Jun 5 2015 11:31:18 for spot by doxygen 1.8.9.1