spot  1.99.4
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
tgtaproduct.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2011, 2012, 2013, 2014 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 #pragma once
21 
22 #include "twa/twa.hh"
23 #include "twa/twaproduct.hh"
24 #include "misc/fixpool.hh"
25 #include "kripke/kripke.hh"
26 #include "tgta.hh"
27 
28 namespace spot
29 {
30 
32  class SPOT_API tgta_product : public twa_product
33  {
34  public:
35  tgta_product(const const_kripke_ptr& left,
36  const const_tgta_ptr& right);
37 
38  virtual state*
39  get_init_state() const;
40 
41  virtual twa_succ_iterator*
42  succ_iter(const state* local_state) const;
43  };
44 
45  inline twa_ptr product(const const_kripke_ptr& left,
46  const const_tgta_ptr& right)
47  {
48  return std::make_shared<tgta_product>(left, right);
49  }
50 
53  {
54  public:
56  const const_kripke_ptr& k,
57  const const_tgta_ptr& tgta,
58  fixed_size_pool* pool);
59 
60  virtual
62 
63  // iteration
64  bool first();
65  bool next();
66  bool done() const;
67 
68  // inspection
70  current_state() const;
71  bdd
72  current_condition() const;
73 
75  current_acceptance_conditions() const;
76 
77  private:
79  void
81  step_();
82  bool find_next_succ_();
83 
84  void
85  next_kripke_dest();
86 
88 
89  protected:
90  const state_product* source_;
91  const_tgta_ptr tgta_;
92  const_kripke_ptr kripke_;
93  fixed_size_pool* pool_;
94  twa_succ_iterator* tgta_succ_it_;
95  twa_succ_iterator* kripke_succ_it_;
96  state_product* current_state_;
97  bdd current_condition_;
98  acc_cond::mark_t current_acceptance_conditions_;
99  bdd kripke_source_condition;
100  state* kripke_current_dest_state;
101  };
102 }
Definition: graph.hh:31
A lazy product. (States are computed on the fly.)
Definition: twaproduct.hh:80
Abstract class for states.
Definition: twa.hh:42
Iterate over the successors of a product computed on the fly.
Definition: tgtaproduct.hh:52
A lazy product. (States are computed on the fly.)
Definition: tgtaproduct.hh:32
Iterate over the successors of a state.
Definition: twa.hh:331
A state for spot::twa_product.
Definition: twaproduct.hh:36
A Transition-based Generalized Testing Automaton (TGTA).
Definition: tgta.hh:59
Definition: acc.hh:34
A fixed-size memory pool implementation.
Definition: fixpool.hh:31

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Thu Oct 1 2015 05:49:14 for spot by doxygen 1.8.8