spot  2.5.2
emptinessta.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2012-2014, 2016, 2018 Laboratoire de Recherche
3 // et Dévelopment de l'Epita (LRDE).
4 //
5 // This file is part of Spot, a model checking library.
6 //
7 // Spot is free software; you can redistribute it and/or modify it
8 // under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // Spot is distributed in the hope that it will be useful, but WITHOUT
13 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 // License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 
20 #pragma once
21 
22 #include <spot/ta/taproduct.hh>
23 #include <spot/misc/optionmap.hh>
24 #include <spot/twaalgos/emptiness_stats.hh>
25 #include <stack>
26 #include <queue>
27 
28 namespace spot
29 {
30 
31  namespace
32  {
33  typedef std::pair<const spot::state*,
34  ta_succ_iterator_product*> pair_state_iter;
35  }
36 
39 
50 
63 
85  class SPOT_API ta_check : public ec_statistics
86  {
87  typedef state_map<int> hash_type;
88  public:
89  ta_check(const const_ta_product_ptr& a, option_map o = option_map());
90  virtual
91  ~ta_check();
92 
110  bool
111  check(bool disable_second_pass = false,
112  bool disable_heuristic_for_livelock_detection = false);
113 
118  bool
119  livelock_detection(const const_ta_product_ptr& t);
120 
122  std::ostream&
123  print_stats(std::ostream& os) const;
124 
125  protected:
126  void
127  clear(hash_type& h, std::stack<pair_state_iter> todo, std::queue<
128  const spot::state*> init_set);
129 
130  void
131  clear(hash_type& h, std::stack<pair_state_iter> todo,
132  spot::ta_succ_iterator* init_states_it);
133 
136  bool
137  heuristic_livelock_detection(const state * stuttering_succ,
138  hash_type& h, int h_livelock_root, std::set<const state*,
139  state_ptr_less_than> liveset_curr);
140 
141  const_ta_product_ptr a_;
143 
144  // Force the second pass
145  bool is_full_2_pass_;
146 
147  // scc: a stack of strongly connected components (SCC)
148  scc_stack_ta scc;
149 
150  // sscc: a stack of strongly stuttering-connected components (SSCC)
151  scc_stack_ta sscc;
152 
153  };
154 
156 
157 }
Definition: automata.hh:26
Emptiness-check statistics.
Definition: emptiness_stats.hh:60
Manage a map of options.
Definition: optionmap.hh:37
Definition: ta.hh:208
Abstract class for states.
Definition: twa.hh:50
const_ta_product_ptr a_
The automaton.
Definition: emptinessta.hh:141
Check whether the language of a product (spot::ta_product) between a Kripke structure and a TA is emp...
Definition: emptinessta.hh:85
option_map o_
The options.
Definition: emptinessta.hh:142
Iterate over the successors of a state.
Definition: ta.hh:197
Strict Weak Ordering for state*.
Definition: twa.hh:127

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Fri Feb 27 2015 10:00:07 for spot by doxygen 1.8.13