spot  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
powerset.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2011, 2013 Laboratoire de Recherche et Développement
3 // de l'Epita.
4 // Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
5 // département Systèmes Répartis Coopératifs (SRC), Université Pierre
6 // 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 #ifndef SPOT_TGBAALGOS_POWERSET_HH
24 # define SPOT_TGBAALGOS_POWERSET_HH
25 
26 # include <list>
27 # include <map>
28 # include "tgba/tgbaexplicit.hh"
29 
30 namespace spot
31 {
32 
33  struct SPOT_API power_map
34  {
35  typedef std::set<const state*, state_ptr_less_than> power_state;
36  typedef std::map<int, power_state> power_map_data;
37  typedef Sgi::hash_set<const state*, state_ptr_hash,
38  state_ptr_equal> state_set;
39 
40  ~power_map()
41  {
42  // Release all states.
43  state_set::const_iterator i = states.begin();
44  while (i != states.end())
45  {
46  // Advance the iterator before deleting the key.
47  const state* s = *i;
48  ++i;
49  s->destroy();
50  }
51  }
52 
53  const power_state&
54  states_of(int s) const
55  {
56  return map_.find(s)->second;
57  }
58 
59  const state*
60  canonicalize(const state* s)
61  {
62  state_set::const_iterator i = states.find(s);
63  if (i != states.end())
64  {
65  s->destroy();
66  s = *i;
67  }
68  else
69  {
70  states.insert(s);
71  }
72  return s;
73  }
74 
75  power_map_data map_;
76  state_set states;
77  };
78 
79 
91 
92  SPOT_API tgba_explicit_number*
93  tgba_powerset(const tgba* aut, power_map& pm, bool merge = true);
94  SPOT_API tgba_explicit_number*
95  tgba_powerset(const tgba* aut);
97 
98 
134  SPOT_API tgba_explicit_number*
135  tba_determinize(const tgba* aut,
136  unsigned threshold_states = 0,
137  unsigned threshold_cycles = 0);
138 
166  SPOT_API tgba*
167  tba_determinize_check(const tgba* aut,
168  unsigned threshold_states = 0,
169  unsigned threshold_cycles = 0,
170  const ltl::formula* f = 0,
171  const tgba* neg_aut = 0);
172 
173 }
174 
175 #endif // SPOT_TGBAALGOS_POWERSET_HH

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Sat Dec 6 2014 12:28:44 for spot by doxygen 1.8.4