spot  1.2.1a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dijkstra_scc.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_DIJKSTRA_SCC_HH
20 # define SPOT_FASTTGBAALGOS_EC_DIJKSTRA_SCC_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 #include "deadstore.hh"
30 
31 namespace spot
32 {
33 
37  class SPOT_API dijkstra_scc : public ec
38  {
39  public:
40 
42  dijkstra_scc(instanciator* i, std::string option = "");
43 
45  virtual ~dijkstra_scc();
46 
48  bool check();
49 
51  std::string extra_info_csv();
52 
53  protected:
54 
56  inline void init();
57 
58  // ------------------------------------------------------------
59  // For classic algorithm with stack and UF
60  // ------------------------------------------------------------
61 
63  virtual void dfs_push(fasttgba_state*);
64 
66  virtual void dfs_pop();
67 
69  virtual bool merge(fasttgba_state*);
70 
72  virtual void main();
73 
75  enum color {Alive, Dead, Unknown};
76 
77  color get_color(const fasttgba_state*);
78 
81 
83  const fasttgba* a_;
84 
85  // An element in Todo stack
87  {
89  fasttgba_succ_iterator* lasttr;
90  long unsigned int position;
91  };
92 
94  std::vector<pair_state_iter> todo;
95  std::vector<const spot::fasttgba_state*> live;
96 
99 
102 
104  typedef Sgi::hash_map<const fasttgba_state*, int,
107  seen_map H;
108 
111 
112  markset* empty_;
113  unsigned int max_live_size_;
114  unsigned int max_dfs_size_;
122  };
123 }
124 
125 #endif // SPOT_FASTTGBAALGOS_EC_DIJKSTRA_SCC_HH
Definition: fasttgba.hh:33
This class act as an interface for all classes.
Definition: fasttgba_state.hh:30
bool counterexample_found
the automaton that will be used for the Emptiness check
Definition: dijkstra_scc.hh:80
Abstract class for states.
Definition: state.hh:40
Definition: dijkstra_scc.hh:37
Definition: ec.hh:64
int update_cpt_
count UPDATE calls
Definition: dijkstra_scc.hh:115
Definition: dijkstra_scc.hh:86
color
The color for a new State.
Definition: dijkstra_scc.hh:75
A simple wrapper for an automaton.
Definition: ec.hh:40
Sgi::hash_map< const fasttgba_state *, int, fasttgba_state_ptr_hash, fasttgba_state_ptr_equal > seen_map
the storage
Definition: dijkstra_scc.hh:106
Definition: root_stack.hh:35
Iterate over the successors of a state.
Definition: fasttgba_succ_iterator.hh:35
int update_loop_cpt_
count UPDATE loop iterations
Definition: dijkstra_scc.hh:116
Definition: fasttgba_state.hh:76
This class represents a set of acceptance marks.
Definition: markset.hh:35
This class represent a dead store. For now it&#39;s just a set but it can be combined with bitstate hasin...
Definition: deadstore.hh:41
std::vector< pair_state_iter > todo
the todo stack
Definition: dijkstra_scc.hh:94
unsigned int max_live_size_
keep peack size
Definition: dijkstra_scc.hh:113
int states_cpt_
count states
Definition: dijkstra_scc.hh:118
unsigned int max_dfs_size_
keep peack size
Definition: dijkstra_scc.hh:114
Definition: fasttgba_state.hh:88
deadstore * deadstore_
The store of dead states.
Definition: dijkstra_scc.hh:101
int transitions_cpt_
count transitions
Definition: dijkstra_scc.hh:119
int trivial_scc_
count trivial SCCs
Definition: dijkstra_scc.hh:121
int memory_cost_
evaluates memory
Definition: dijkstra_scc.hh:120
stack_of_roots * roots_stack_
Root of stack.
Definition: dijkstra_scc.hh:98
Definition: ec.hh:28
const instance_automaton * inst
The instance automaton.
Definition: dijkstra_scc.hh:110
int roots_poped_cpt_
count UPDATE loop iterations
Definition: dijkstra_scc.hh:117

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Tue Jan 21 2014 16:52:01 for spot by doxygen 1.8.5