spot  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
kripkeexplicit.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2011, 2012, 2013 Laboratoire de Recherche et
3 // Développement 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 
21 #ifndef SPOT_KRIPKE_KRIPKEEXPLICIT_HH
22 # define SPOT_KRIPKE_KRIPKEEXPLICIT_HH
23 
24 # include <iosfwd>
25 # include "kripke.hh"
26 # include "ltlast/formula.hh"
27 # include "kripkeprint.hh"
28 
29 namespace spot
30 {
32  class SPOT_API state_kripke : public state
33  {
34  friend class kripke_explicit;
35  friend class kripke_explicit_succ_iterator;
36  private:
37  state_kripke();
38 
47  virtual int compare (const state* other) const;
48 
50  virtual size_t hash() const;
51 
53  virtual state_kripke* clone() const;
54 
57  void add_conditions(bdd f);
58 
61  void add_succ(state_kripke* succ);
62 
63  virtual bdd
64  as_bdd() const
65  {
66  return bdd_;
67  }
68 
71  virtual void
72  destroy() const
73  {
74  }
75 
76  virtual
77  ~state_kripke ()
78  {
79  }
80 
82  // Management for succ_iterator
83 
84  const std::list<state_kripke*>& get_succ() const;
85 
86  bdd bdd_;
87  std::list<state_kripke*> succ_;
88  };
89 
90 
94  {
95  public:
97 
99 
100  virtual void first();
101  virtual void next();
102  virtual bool done() const;
103 
104  virtual state_kripke* current_state() const;
105 
106  private:
107  const state_kripke* s_;
108  std::list<state_kripke*>::const_iterator it_;
109  };
110 
111 
114  class SPOT_API kripke_explicit : public kripke
115  {
116  public:
119  ~kripke_explicit();
120 
121  bdd_dict* get_dict() const;
122  state_kripke* get_init_state() const;
123 
127  succ_iter(const spot::state* local_state,
128  const spot::state* global_state = 0,
129  const tgba* global_automaton = 0) const;
130 
132  bdd state_condition(const state* s) const;
134  bdd state_condition(const std::string&) const;
135 
137  std::string format_state(const state*) const;
138 
139 
143  void add_state(std::string);
144 
146  void add_transition(std::string source,
147  std::string dest);
148 
153  void add_conditions(bdd add,
154  std::string on_me);
155 
160  void add_condition(const ltl::formula* f,
161  std::string on_me);
162 
164  const std::map<const state_kripke*, std::string>&
165  sn_get() const;
166 
167  private:
169  void add_state(std::string, state_kripke*);
170 
171  void add_conditions(bdd add,
172  state_kripke* on_me);
173 
174  void add_transition(std::string source,
175  const state_kripke* dest);
176 
177  void add_transition(state_kripke* source,
178  const state_kripke* dest);
179 
180  bdd_dict* dict_;
181  state_kripke* init_;
182  std::map<const std::string, state_kripke*> ns_nodes_;
183  std::map<const state_kripke*, std::string> sn_nodes_;
184  };
185 }
186 #endif // SPOT_KRIPKE_KRIPKEEXPLICIT_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:43 for spot by doxygen 1.8.4