spot  1.99.7
emptinessta.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2008, 2012, 2013, 2014 Laboratoire de Recherche et
3 // Dévelopment de l'Epita (LRDE).
4 // Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de
5 // Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
6 // Université Pierre et Marie Curie.
7 //
8 // This file is part of Spot, a model checking library.
9 //
10 // Spot is free software; you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation; either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Spot is distributed in the hope that it will be useful, but WITHOUT
16 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
18 // License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with this program. If not, see <http://www.gnu.org/licenses/>.
22 
23 #pragma once
24 
25 #include <spot/ta/taproduct.hh>
26 #include <spot/misc/optionmap.hh>
27 #include <spot/twaalgos/emptiness_stats.hh>
28 #include <stack>
29 #include <queue>
30 
31 namespace spot
32 {
33 
34  namespace
35  {
36  typedef std::pair<const spot::state*,
37  ta_succ_iterator_product*> pair_state_iter;
38  }
39 
52 
65 
87  class SPOT_API ta_check : public ec_statistics
88  {
89  typedef std::unordered_map<const state*, int,
90  state_ptr_hash, state_ptr_equal> hash_type;
91  public:
92  ta_check(const const_ta_product_ptr& a, option_map o = option_map());
93  virtual
94  ~ta_check();
95 
113  virtual bool
114  check(bool disable_second_pass = false,
115  bool disable_heuristic_for_livelock_detection = false);
116 
121  virtual bool
122  livelock_detection(const const_ta_product_ptr& t);
123 
125  virtual std::ostream&
126  print_stats(std::ostream& os) const;
127 
128  protected:
129  void
130  clear(hash_type& h, std::stack<pair_state_iter> todo, std::queue<
131  const spot::state*> init_set);
132 
133  void
134  clear(hash_type& h, std::stack<pair_state_iter> todo,
135  spot::ta_succ_iterator* init_states_it);
136 
139  bool
140  heuristic_livelock_detection(const state * stuttering_succ,
141  hash_type& h, int h_livelock_root, std::set<const state*,
142  state_ptr_less_than> liveset_curr);
143 
144  const_ta_product_ptr a_;
146 
147  // Force the second pass
148  bool is_full_2_pass_;
149 
150  // scc: a stack of strongly connected components (SCC)
151  scc_stack_ta scc;
152 
153  // sscc: a stack of strongly stuttering-connected components (SSCC)
154  scc_stack_ta sscc;
155 
156  };
157 
159 
162 }
Definition: graph.hh:32
Emptiness-check statistics.
Definition: emptiness_stats.hh:121
Manage a map of options.
Definition: optionmap.hh:36
An Equivalence Relation for state*.
Definition: twa.hh:141
Definition: ta.hh:222
Abstract class for states.
Definition: twa.hh:43
const_ta_product_ptr a_
The automaton.
Definition: emptinessta.hh:144
An implementation of the emptiness-check algorithm for a product between a TA and a Kripke structure...
Definition: emptinessta.hh:87
option_map o_
The options.
Definition: emptinessta.hh:145
Hash Function for state*.
Definition: twa.hh:165
Iterate over the successors of a state.
Definition: ta.hh:197
Strict Weak Ordering for state*.
Definition: twa.hh:118

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Fri Jan 15 2016 13:01:50 for spot by doxygen 1.8.9.1