tgtaproduct.hh 2.74 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (C) 2011 Laboratoire de Recherche et Dveloppement
// de l'Epita (LRDE).
// Copyright (C) 2003, 2004, 2006 Laboratoire d'Informatique de Paris
// 6 (LIP6), dpartement Systmes Rpartis Coopratifs (SRC),
// Universit Pierre et Marie Curie.
//
// This file is part of Spot, a model checking library.
//
// Spot is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// Spot is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
// License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Spot; see the file COPYING.  If not, write to the Free
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.

24
25
#ifndef SPOT_tgta_TGBAPRODUCT_HH
# define SPOT_tgta_TGBAPRODUCT_HH
26
27
28
29
30

#include "tgba/tgba.hh"
#include "tgba/tgbaproduct.hh"
#include "misc/fixpool.hh"
#include "kripke/kripke.hh"
31
#include "tgta.hh"
32
33
34
35
36

namespace spot
{

  /// \brief A lazy product.  (States are computed on the fly.)
37
  class tgta_product : public tgba_product
38
39
40
  {
  public:

41
    tgta_product(const kripke* left, const tgta* right);
42
43
44
45
46
47
48
49
50
51
52
53

    virtual state*
    get_init_state() const;

    virtual tgba_succ_iterator*
    succ_iter(const state* local_state, const state* global_state = 0,
        const tgba* global_automaton = 0) const;


  };

  /// \brief Iterate over the successors of a product computed on the fly.
54
  class tgta_succ_iterator_product : public tgba_succ_iterator
55
56
  {
  public:
57
    tgta_succ_iterator_product(const state_product* s, const kripke* k, const tgta* tgta, fixed_size_pool* pool);
58
59

    virtual
60
    ~tgta_succ_iterator_product();
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93

    // iteration
    void
    first();
    void
    next();
    bool
    done() const;

    // inspection
    state_product*
    current_state() const;
    bdd
    current_condition() const;

    bdd
    current_acceptance_conditions() const;

  private:
    //@{
    /// Internal routines to advance to the next successor.
    void
    step_();
    void
    find_next_succ_();

    void
    next_kripke_dest();

    //@}

  protected:
    const state_product* source_;
94
    const tgta* tgta_;
95
96
    const kripke* kripke_;
    fixed_size_pool* pool_;
97
    tgba_succ_iterator* tgta_succ_it_;
98
99
100
101
102
103
104
105
106
107
108
109
    tgba_succ_iterator* kripke_succ_it_;
    state_product* current_state_;
    bdd current_condition_;
    bdd current_acceptance_conditions_;
    bdd kripke_source_condition;
    state * kripke_current_dest_state;


  };

}

110
#endif // SPOT_tgta_TGBAPRODUCT_HH