tgtaexplicit.cc 2.05 KB
Newer Older
1 2
// -*- coding: utf-8 -*-
// Copyright (C) 2010, 2011, 2012, 2014 Laboratoire de Recherche et
3
// Developpement 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 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
18
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 20 21 22 23 24 25 26 27 28 29 30

#include "ltlast/atomic_prop.hh"
#include "ltlast/constant.hh"
#include "tgtaexplicit.hh"
#include "tgba/formula2bdd.hh"
#include "ltlvisit/tostring.hh"

#include "tgba/bddprint.hh"

namespace spot
{

31
  tgta_explicit::tgta_explicit(const const_twa_ptr& tgba,
32
			       unsigned n_acc,
33
			       state_ta_explicit* artificial_initial_state) :
34 35
    tgta(tgba->get_dict()),
    ta_(make_ta_explicit(tgba, n_acc, artificial_initial_state))
36 37 38 39 40 41
  {
  }

  state*
  tgta_explicit::get_init_state() const
  {
42
    return ta_->get_artificial_initial_state();
43 44
  }

45
  twa_succ_iterator*
46
  tgta_explicit::succ_iter(const spot::state* state) const
47
  {
48
    return ta_->succ_iter(state);
49 50 51 52 53
  }

  bdd
  tgta_explicit::compute_support_conditions(const spot::state* in) const
  {
54 55
    const state_ta_explicit* s = down_cast<const state_ta_explicit*>(in);
    assert(s);
56
    return ta_->get_tgba()->support_conditions(s->get_tgba_state());
57 58
  }

59
  bdd_dict_ptr
60 61
  tgta_explicit::get_dict() const
  {
62
    return ta_->get_dict();
63 64 65 66 67
  }

  std::string
  tgta_explicit::format_state(const spot::state* s) const
  {
68
    return ta_->format_state(s);
69 70
  }

71
  spot::twa_succ_iterator*
72 73
  tgta_explicit::succ_iter_by_changeset(const spot::state* s, bdd chngset) const
  {
74
    return ta_->succ_iter(s, chngset);
75 76 77
  }

}