tgbasgba.hh 2.42 KB
Newer Older
1
// Copyright (C) 2009, 2013 Laboratoire de Recherche et Développement
Guillaume Sadegh's avatar
Guillaume Sadegh committed
2
// de l'Epita (LRDE).
3
4
5
6
7
//
// 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
8
// the Free Software Foundation; either version 3 of the License, or
9
10
11
12
13
14
15
16
// (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
17
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19
20
21
22
23
24
25
26
27

#ifndef SPOT_TGBA_TGBASGBA_HH
# define SPOT_TGBA_TGBASGBA_HH

#include "tgba.hh"
#include "misc/bddlt.hh"

namespace spot
{

28
  /// \ingroup tgba_on_the_fly_algorithms
29
30
31
32
33
34
  /// \brief Change the labeling-mode of spot::tgba on the fly, producing a
  /// state-based generalized Büchi automaton.
  ///
  /// This class acts as a proxy in front of a spot::tgba, that should
  /// label on states on-the-fly.  The result is still a spot::tgba,
  /// but acceptances conditions are also on states.
35
  class SPOT_API tgba_sgba_proxy : public tgba
36
37
  {
  public:
38
    tgba_sgba_proxy(const tgba* a, bool no_zero_acc = true);
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

    virtual ~tgba_sgba_proxy();

    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;

    virtual bdd_dict* get_dict() const;

    virtual std::string format_state(const state* state) const;

    virtual bdd all_acceptance_conditions() const;
    virtual bdd neg_acceptance_conditions() const;

    /// \brief Retrieve the acceptance condition of a state.
    bdd state_acceptance_conditions(const state* state) const;
  protected:
    virtual bdd compute_support_conditions(const state* state) const;
    virtual bdd compute_support_variables(const state* state) const;

  private:
    const tgba* a_;
64
65
66
67
    // If the automaton has no acceptance condition,
    // every state is accepting.
    bool emulate_acc_cond_;
    bdd acceptance_condition_;
68
    // Disallow copy.
69
70
    tgba_sgba_proxy(const tgba_sgba_proxy&) = delete;
    tgba_sgba_proxy& operator=(const tgba_sgba_proxy&) = delete;
71
72
73
74
  };

}
#endif // SPOT_TGBA_TGBASGBA_HH