tgtaexplicit.hh 2.22 KB
Newer Older
1
// -*- coding: utf-8 -*-
2
3
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 Laboratoire
// de Recherche et Développement de l'Epita (LRDE).
4
5
6
7
8
//
// 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
9
// the Free Software Foundation; either version 3 of the License, or
10
11
12
13
14
15
16
17
// (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 MERCHANta_explicitBILITY
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
// License for more deta_explicitils.
//
// 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 <spot/misc/hash.hh>
23
#include <list>
24
#include <spot/twa/twa.hh>
25
#include <set>
26
#include <spot/tl/formula.hh>
27
#include <cassert>
28
29
30
#include <spot/misc/bddlt.hh>
#include <spot/ta/taexplicit.hh>
#include <spot/ta/tgta.hh>
31
32
33

namespace spot
{
34
35
36

  /// Explicit representation of a spot::tgta.
  /// \ingroup ta_representation
37
  class SPOT_API tgta_explicit final : public tgta
38
39
  {
  public:
40
    tgta_explicit(const const_twa_ptr& tgba,
41
		  unsigned n_acc,
42
		  state_ta_explicit* artificial_initial_state);
43

44
    // tgba interface
45
    virtual spot::state* get_init_state() const override;
46

47
    virtual twa_succ_iterator*
48
    succ_iter(const spot::state* local_state) const override;
49

50
51
    const_ta_explicit_ptr get_ta() const { return ta_; }
    ta_explicit_ptr get_ta() { return ta_; }
52

53
    virtual std::string format_state(const spot::state* s) const override;
54

55
    virtual twa_succ_iterator*
56
    succ_iter_by_changeset(const spot::state* s, bdd change_set) const override;
57
  protected:
58
    ta_explicit_ptr ta_;
59
60
  };

61
62
63
  typedef std::shared_ptr<tgta_explicit> tgta_explicit_ptr;
  typedef std::shared_ptr<const tgta_explicit> const_tgta_explicit_ptr;

64
65
66
  inline tgta_explicit_ptr
  make_tgta_explicit(const const_twa_ptr& tgba, unsigned n_acc,
		     state_ta_explicit* artificial_initial_state = nullptr)
67
  {
68
    return std::make_shared<tgta_explicit>(tgba, n_acc,
69
70
					   artificial_initial_state);
  }
71
}