spot  0.9.2
kripkeexplicit.hh
Go to the documentation of this file.
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2011, 2012 Laboratoire de Recherche et Développement
3 // 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 2 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 Spot; see the file COPYING. If not, write to the Free
19 // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 // 02111-1307, USA.
21 
22 
23 #ifndef SPOT_KRIPKE_KRIPKEEXPLICIT_HH
24 # define SPOT_KRIPKE_KRIPKEEXPLICIT_HH
25 
26 # include <iosfwd>
27 # include "kripke.hh"
28 # include "ltlast/formula.hh"
29 # include "kripkeprint.hh"
30 
31 namespace spot
32 {
34  class state_kripke : public state
35  {
36  friend class kripke_explicit;
38  private:
39  state_kripke();
40 
49  virtual int compare (const state* other) const;
50 
52  virtual size_t hash() const;
53 
55  virtual state_kripke* clone() const;
56 
59  void add_conditions(bdd f);
60 
63  void add_succ(state_kripke* succ);
64 
65  virtual bdd
66  as_bdd() const
67  {
68  return bdd_;
69  }
70 
73  virtual void
74  destroy() const
75  {
76  }
77 
78  virtual
80  {
81  }
82 
84  // Management for succ_iterator
85 
86  const std::list<state_kripke*>& get_succ() const;
87 
88  bdd bdd_;
89  std::list<state_kripke*> succ_;
90  };
91 
92 
96  {
97  public:
99 
101 
102  virtual void first();
103  virtual void next();
104  virtual bool done() const;
105 
106  virtual state_kripke* current_state() const;
107 
108  private:
109  const state_kripke* s_;
110  std::list<state_kripke*>::const_iterator it_;
111  };
112 
113 
116  class kripke_explicit : public kripke
117  {
118  public:
122 
123  bdd_dict* get_dict() const;
124  state_kripke* get_init_state() const;
125 
129  succ_iter(const spot::state* local_state,
130  const spot::state* global_state = 0,
131  const tgba* global_automaton = 0) const;
132 
134  bdd state_condition(const state* s) const;
136  bdd state_condition(const std::string) const;
137 
139  std::string format_state(const state*) const;
140 
141 
145  void add_state(std::string);
146 
148  void add_transition(std::string source,
149  std::string dest);
150 
155  void add_conditions(bdd add,
156  std::string on_me);
157 
162  void add_condition(const ltl::formula* f,
163  std::string on_me);
164 
166  const std::map<const state_kripke*, std::string>&
167  sn_get() const;
168 
169  private:
171  void add_state(std::string, state_kripke*);
172 
173  void add_conditions(bdd add,
174  state_kripke* on_me);
175 
176  void add_transition(std::string source,
177  const state_kripke* dest);
178 
179  void add_transition(state_kripke* source,
180  const state_kripke* dest);
181 
184  std::map<const std::string, state_kripke*> ns_nodes_;
185  std::map<const state_kripke*, std::string> sn_nodes_;
186  };
187 }
188 #endif /* !SPOT_KRIPKEEXPLICIT_HH_ */

Please comment this page and report errors about it on the RefDocComments page.
Generated on Mon Jul 2 2012 17:35:47 for spot by doxygen 1.8.1.1