spot  1.2.1a
opt_ndfs.hh
1 // Copyright (C) 2012 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_NDFS_HH
20 # define SPOT_FASTTGBAALGOS_EC_OPT_OPT_NDFS_HH
21 
22 #include <tuple>
23 
24 #include <stack>
25 #include <map>
26 
27 #include "fasttgbaalgos/ec/ec.hh"
28 #include "fasttgbaalgos/ec/deadstore.hh"
29 #include "fasttgbaalgos/ec/lowlink_stack.hh"
30 #include "fasttgbaalgos/ec/root_stack.hh"
31 
32 namespace spot
33 {
34 
40  class SPOT_API opt_ndfs : public ec
41  {
42  protected:
43  enum rcol {Blue, Cyan, Red};
44 
46  typedef Sgi::hash_map<const fasttgba_state*, rcol,
49 
50  public:
51 
53  opt_ndfs(instanciator* i, std::string option = "",
54  bool swarm = false, int tid = 0);
55 
57  virtual ~opt_ndfs();
58 
60  bool check();
61 
64  std::string extra_info_csv();
65 
66  protected:
67 
69  void init();
70 
72  virtual void dfs_push(fasttgba_state*);
73 
75  virtual void dfs_pop();
76 
78  virtual bool dfs_update (fasttgba_state* s);
79 
81  virtual void main();
82 
83  virtual void nested_dfs(const spot::fasttgba_state* a);
84 
86  enum color {Alive, Dead, Unknown};
87 
88  // An element in Todo stack
90  {
92  fasttgba_succ_iterator* lasttr;
93  bool allred;
94  };
95 
97  std::vector<pair_state_iter> todo;
98 
100  // stack_of_lowlink* dstack_;
101  // generic_stack* stack_;
102 
104  virtual opt_ndfs::color get_color(const fasttgba_state*);
105 
107  bool counterexample_found;
108 
110  const fasttgba* a_;
111 
112  // /// \brief The live stack
113  // std::vector<const spot::fasttgba_state*> live;
114 
116  seen_map H;
117 
120 
123 
124  unsigned int dfs_size_;
125  unsigned int max_live_size_;
126  unsigned int max_dfs_size_;
133  bool swarm_;
134  int tid_;
135  };
136 }
137 
138 #endif // SPOT_FASTTGBAALGOS_EC_OPT_OPT_NDFS_HH
this class acts like a wrapper to the C code of the open_set.
Definition: public.hh:32
const fasttgba * a_
the automaton that will be used for the Emptiness check
Definition: opt_ndfs.hh:110
Definition: fasttgba.hh:33
int roots_poped_cpt_
count UPDATE loop iterations
Definition: opt_ndfs.hh:128
This class act as an interface for all classes.
Definition: fasttgba_state.hh:30
std::vector< pair_state_iter > todo
the todo stack
Definition: opt_ndfs.hh:97
Abstract class for states.
Definition: state.hh:40
Sgi::hash_map< const fasttgba_state *, rcol, fasttgba_state_ptr_hash, fasttgba_state_ptr_equal > seen_map
The map of visited states.
Definition: opt_ndfs.hh:48
Definition: ec.hh:71
unsigned int max_live_size_
keep peack size
Definition: opt_ndfs.hh:125
int tid_
the thread id
Definition: opt_ndfs.hh:134
const instance_automaton * inst
The instance automaton.
Definition: opt_ndfs.hh:122
bool swarm_
shall use swarming?
Definition: opt_ndfs.hh:133
A simple wrapper for an automaton.
Definition: ec.hh:40
deadstore * deadstore_
The store for Deads states.
Definition: opt_ndfs.hh:119
int update_cpt_
count UPDATE calls
Definition: opt_ndfs.hh:127
Iterate over the successors of a state.
Definition: fasttgba_succ_iterator.hh:35
int memory_cost_
evaluates memory
Definition: opt_ndfs.hh:131
Definition: fasttgba_state.hh:76
unsigned int dfs_size_
keep dfs size
Definition: opt_ndfs.hh:124
Compute the SCCs of a TGBA.
Definition: opt_ndfs.hh:40
Definition: opt_ndfs.hh:89
int transitions_cpt_
count transitions
Definition: opt_ndfs.hh:130
This class represent a dead store. For now it's just a set but it can be combined with bitstate hasin...
Definition: deadstore.hh:41
int trivial_scc_
count trivial SCCs
Definition: opt_ndfs.hh:132
Definition: fasttgba_state.hh:88
color
The color for a new State.
Definition: opt_ndfs.hh:86
int states_cpt_
count states
Definition: opt_ndfs.hh:129
unsigned int max_dfs_size_
keep peack size
Definition: opt_ndfs.hh:126
seen_map H
the HashMap Live
Definition: opt_ndfs.hh:116
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