status.cc 1.63 KB
Newer Older
1
2
3
// -*- coding: utf-8 -*-
// Copyright (C) 2014 Laboratoire de Recherche et Développement de
// l'Epita (LRDE).
4
// Copyright (C) 2004  Laboratoire d'Informatique de Paris 6 (LIP6),
5
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
6
7
8
9
10
11
// 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
12
// the Free Software Foundation; either version 3 of the License, or
13
14
15
16
17
18
19
20
// (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
21
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
22

23
#include <ostream>
24
25
26
27
#include "status.hh"

namespace spot
{
28
  couvreur99_check_status::couvreur99_check_status(const const_twa_ptr& aut)
29
    : aut(aut)
30
31
32
  {
  }

33
  couvreur99_check_status::~couvreur99_check_status()
34
  {
35
36
37
38
39
40
41
42
    hash_type::iterator i = h.begin();
    while (i != h.end())
      {
	// Advance the iterator before deleting the key.
	const state* s = i->first;
	++i;
	s->destroy();
      }
43
44
45
  }

  void
46
  couvreur99_check_status::print_stats(std::ostream& os) const
47
  {
48
    os << h.size() << " unique states visited" << std::endl;
49
    os << root.size()
50
       << " strongly connected components in search stack\n";
51
  }
52
53
54
55

  int
  couvreur99_check_status::states() const
  {
56
    return h.size();
57
  }
58
}