gtec: replace nsheap by a simple unordered_map
nsheap was an horror full of virtual functions required to customize gtec to implement inclusion-based emptiness-check in GreatSPN support. Since this support has been removed, we can remove the nsheap cruft as well. Note that nsheap was also used in emptinessta for no good reason (the code from emptinessta was simply copied from gtec without cleanup). * src/tgbaalgos/gtec/nsheap.cc, src/tgbaalgos/gtec/nsheap.hh: Delete. * src/tgbaalgos/gtec/Makefile.am: Adjust. * src/taalgos/emptinessta.cc, src/taalgos/emptinessta.hh, src/taalgos/tgba2ta.cc, src/tgbaalgos/gtec/ce.cc, src/tgbaalgos/gtec/gtec.cc, src/tgbaalgos/gtec/gtec.hh, src/tgbaalgos/gtec/status.cc, src/tgbaalgos/gtec/status.hh: Use a simple unordered_map.
This commit is contained in:
parent
46e4408a85
commit
393637f18a
11 changed files with 235 additions and 672 deletions
|
|
@ -1,5 +1,8 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2014 Laboratoire de Recherche et Développement de
|
||||
// l'Epita (LRDE).
|
||||
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -22,31 +25,34 @@
|
|||
|
||||
namespace spot
|
||||
{
|
||||
couvreur99_check_status::couvreur99_check_status
|
||||
(const tgba* aut,
|
||||
const numbered_state_heap_factory* nshf)
|
||||
: aut(aut),
|
||||
h(nshf->build())
|
||||
couvreur99_check_status::couvreur99_check_status(const tgba* aut)
|
||||
: aut(aut)
|
||||
{
|
||||
}
|
||||
|
||||
couvreur99_check_status::~couvreur99_check_status()
|
||||
{
|
||||
delete h;
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
couvreur99_check_status::print_stats(std::ostream& os) const
|
||||
{
|
||||
os << h->size() << " unique states visited" << std::endl;
|
||||
os << h.size() << " unique states visited" << std::endl;
|
||||
os << root.size()
|
||||
<< " strongly connected components in search stack"
|
||||
<< std::endl;
|
||||
<< " strongly connected components in search stack\n";
|
||||
}
|
||||
|
||||
int
|
||||
couvreur99_check_status::states() const
|
||||
{
|
||||
return h->size();
|
||||
return h.size();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue