spot  1.2.1a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
opt_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_OPT_OPT_DIJKSTRA_SCC_HH
20 # define SPOT_FASTTGBAALGOS_EC_OPT_OPT_DIJKSTRA_SCC_HH
21 
22 #include <stack>
23 #include <tuple>
24 #include "misc/hash.hh"
25 #include "fasttgba/fasttgba.hh"
26 #include "fasttgbaalgos/ec/ec.hh"
27 #include "fasttgbaalgos/ec/root_stack.hh"
28 #include "fasttgbaalgos/ec/deadstore.hh"
29 
30 namespace spot
31 {
32 
37  class SPOT_API opt_dijkstra_scc : public ec
38  {
39  public:
40 
42  opt_dijkstra_scc(instanciator* i, std::string option = "",
43  bool swarm = false);
44 
46  virtual ~opt_dijkstra_scc();
47 
49  bool check();
50 
52  std::string extra_info_csv();
53 
54  protected:
55 
57  virtual void init();
58 
60  virtual void dfs_push(fasttgba_state*);
61 
63  virtual void dfs_pop();
64 
66  virtual bool merge(fasttgba_state*);
67 
69  virtual void main();
70 
72  enum color {Alive, Dead, Unknown};
73 
74  virtual color get_color(const fasttgba_state*);
75 
78 
80  const fasttgba* a_;
81 
82  // An element in Todo stack
84  {
86  fasttgba_succ_iterator* lasttr;
87  long unsigned int position;
88  };
89 
91  std::vector<pair_state_iter> todo;
92  std::vector<const spot::fasttgba_state*> live;
93 
96 
99 
101  typedef Sgi::hash_map<const fasttgba_state*, int,
104  seen_map H;
105 
108 
109  markset* empty_;
110  unsigned int max_live_size_;
111  unsigned int max_dfs_size_;
119  bool swarm_;
120  };
121 
124  class SPOT_API opt_dijkstra_ec : public opt_dijkstra_scc
125  {
126  public :
127  opt_dijkstra_ec(instanciator* i, std::string option = "")
128  : opt_dijkstra_scc(i, option)
129  {}
130 
131 
133  virtual bool merge(fasttgba_state*);
134  };
135 }
136 
137 #endif // SPOT_FASTTGBAALGOS_EC_OPT_OPT_DIJKSTRA_SCC_HH
stack_of_roots * roots_stack_
Root of stack.
Definition: opt_dijkstra_scc.hh:95
unsigned int max_live_size_
keep peack size
Definition: opt_dijkstra_scc.hh:110
int memory_cost_
evaluates memory
Definition: opt_dijkstra_scc.hh:117
Definition: fasttgba.hh:33
int transitions_cpt_
count transitions
Definition: opt_dijkstra_scc.hh:116
This class act as an interface for all classes.
Definition: fasttgba_state.hh:30
bool swarm_
shall use swarming?
Definition: opt_dijkstra_scc.hh:119
Abstract class for states.
Definition: state.hh:40
bool counterexample_found
the automaton that will be used for the Emptiness check
Definition: opt_dijkstra_scc.hh:77
Definition: ec.hh:64
This is the Dijkstra SCC computation algorithm This class also include the optimisation for the live ...
Definition: opt_dijkstra_scc.hh:37
transform the previous algorithm into an emptiness check. Only refine specific methods ...
Definition: opt_dijkstra_scc.hh:124
A simple wrapper for an automaton.
Definition: ec.hh:40
Definition: root_stack.hh:35
Iterate over the successors of a state.
Definition: fasttgba_succ_iterator.hh:35
int roots_poped_cpt_
count UPDATE loop iterations
Definition: opt_dijkstra_scc.hh:114
Definition: fasttgba_state.hh:76
Sgi::hash_map< const fasttgba_state *, int, fasttgba_state_ptr_hash, fasttgba_state_ptr_equal > seen_map
the storage
Definition: opt_dijkstra_scc.hh:103
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
color
The color for a new State.
Definition: opt_dijkstra_scc.hh:72
Definition: opt_dijkstra_scc.hh:83
int update_cpt_
count UPDATE calls
Definition: opt_dijkstra_scc.hh:112
Definition: fasttgba_state.hh:88
std::vector< pair_state_iter > todo
the todo stack
Definition: opt_dijkstra_scc.hh:91
deadstore * deadstore_
The store of dead states.
Definition: opt_dijkstra_scc.hh:98
int update_loop_cpt_
count UPDATE loop iterations
Definition: opt_dijkstra_scc.hh:113
int states_cpt_
count states
Definition: opt_dijkstra_scc.hh:115
unsigned int max_dfs_size_
keep peack size
Definition: opt_dijkstra_scc.hh:111
Definition: ec.hh:28
const instance_automaton * inst
The instance automaton.
Definition: opt_dijkstra_scc.hh:107
int trivial_scc_
count trivial SCCs
Definition: opt_dijkstra_scc.hh:118

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