tgtaexplicit.hh 2.28 KB
Newer Older
1
// -*- coding: utf-8 -*-
2 3
// Copyright (C) 2010, 2011, 2012, 2013, 2014 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 23 24 25 26 27 28 29

#include "misc/hash.hh"
#include <list>
#include "tgba/tgba.hh"
#include <set>
#include "ltlast/formula.hh"
#include <cassert>
#include "misc/bddlt.hh"
#include "taexplicit.hh"
30
#include "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 : 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 46
    virtual spot::state* get_init_state() const;

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

50
    virtual bdd_dict_ptr
51
    get_dict() const;
52

53 54
    const_ta_explicit_ptr get_ta() const { return ta_; }
    ta_explicit_ptr get_ta() { return ta_; }
55 56

    virtual std::string format_state(const spot::state* s) const;
57

58
    virtual twa_succ_iterator*
59 60
    succ_iter_by_changeset(const spot::state* s, bdd change_set) const;
  protected:
61
    virtual bdd compute_support_conditions(const spot::state* state) const;
62

63
    ta_explicit_ptr ta_;
64 65
  };

66 67 68
  typedef std::shared_ptr<tgta_explicit> tgta_explicit_ptr;
  typedef std::shared_ptr<const tgta_explicit> const_tgta_explicit_ptr;

69
  inline tgta_explicit_ptr make_tgta_explicit(const const_twa_ptr& tgba,
70
					      unsigned n_acc,
71 72 73
					      state_ta_explicit*
					      artificial_initial_state = 0)
  {
74
    return std::make_shared<tgta_explicit>(tgba, n_acc,
75 76
					   artificial_initial_state);
  }
77
}