spot  1.2.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
tgbaunion.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2009, 2011, 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 #ifndef SPOT_TGBA_TGBAUNION_HH
21 # define SPOT_TGBA_TGBAUNION_HH
22 
23 #include "tgba.hh"
24 
25 namespace spot
26 {
36  class SPOT_API state_union : public state
37  {
38  public:
44  state_union(state* left, state* right)
45  : left_(left),
46  right_(right)
47  {
48  }
49 
51  state_union(const state_union& o);
52 
53  virtual ~state_union();
54 
55  state*
56  left() const
57  {
58  return left_;
59  }
60 
61  state*
62  right() const
63  {
64  return right_;
65  }
66 
67  virtual int compare(const state* other) const;
68  virtual size_t hash() const;
69  virtual state_union* clone() const;
70 
71  private:
72  state* left_;
73  state* right_;
75  };
77 
80  {
81  public:
83  tgba_succ_iterator* right,
84  bdd left_missing,
85  bdd right_missing, bdd left_var, bdd right_var);
86 
87  virtual ~tgba_succ_iterator_union();
88 
89  // iteration
90  void first();
91  void next();
92  bool done() const;
93 
94  // inspection
95  state_union* current_state() const;
96  bdd current_condition() const;
97  bdd current_acceptance_conditions() const;
98 
99  protected:
100  tgba_succ_iterator* left_;
101  tgba_succ_iterator* right_;
102  bdd current_cond_;
103  bdd left_missing_;
104  bdd right_missing_;
105  bdd left_neg_;
106  bdd right_neg_;
107  friend class tgba_union;
108  };
109 
111  class SPOT_API tgba_union: public tgba
112  {
113  public:
117  tgba_union(const tgba* left, const tgba* right);
118 
119  virtual ~tgba_union();
120 
121  virtual state* get_init_state() const;
122 
123  virtual tgba_succ_iterator_union*
124  succ_iter(const state* local_state,
125  const state* global_state = 0,
126  const tgba* global_automaton = 0) const;
127 
128  virtual bdd_dict* get_dict() const;
129 
130  virtual std::string format_state(const state* state) const;
131 
132  virtual state* project_state(const state* s, const tgba* t) const;
133 
134  virtual bdd all_acceptance_conditions() const;
135  virtual bdd neg_acceptance_conditions() const;
136 
137  protected:
138  virtual bdd compute_support_conditions(const state* state) const;
139  virtual bdd compute_support_variables(const state* state) const;
140 
141  private:
142  bdd_dict* dict_;
143  const tgba* left_;
144  const tgba* right_;
145  bdd left_acc_missing_;
146  bdd right_acc_missing_;
147  bdd left_acc_complement_;
148  bdd right_acc_complement_;
149  bdd left_var_missing_;
150  bdd right_var_missing_;
151  bdd all_acceptance_conditions_;
152  bdd neg_acceptance_conditions_;
153  // Disallow copy.
154  tgba_union(const tgba_union&);
155  tgba_union& operator=(const tgba_union&);
156  };
157 
158 
159 }
160 
161 #endif // SPOT_TGBA_TGBAUNION_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