Add missing instance_count() in automatop and eltl2tgba.

* src/ltlast/automatop.hh, src/ltlast/automatop.cc: Add missing
instance_count() functions.
* src/tgbatests/eltl2tgba.cc: Add missing instance_count()
assertions at the end.
* src/tgbatests/ltl2tgba.cc: Also call automatop::instance_count(),
even if automatop are not used in ltl2tgba yet.  This way we won't
forget once eltl2tgba and ltl2tgba are merged.
This commit is contained in:
Alexandre Duret-Lutz 2009-11-07 02:20:53 +01:00
parent 09bba54b5f
commit f2e941cd07
5 changed files with 35 additions and 9 deletions

View file

@ -1,3 +1,15 @@
2009-11-07 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Add missing instance_count() in automatop and eltl2tgba.
* src/ltlast/automatop.hh, src/ltlast/automatop.cc: Add missing
instance_count() functions.
* src/tgbatests/eltl2tgba.cc: Add missing instance_count()
assertions at the end.
* src/tgbatests/ltl2tgba.cc: Also call automatop::instance_count(),
even if automatop are not used in ltl2tgba yet. This way we won't
forget once eltl2tgba and ltl2tgba are merged.
2009-11-07 Damien Lefortier <dam@lrde.epita.fr>
* src/tgba/taa.cc, src/tgbatest/taa.cc: Adjust.

View file

@ -1,6 +1,5 @@
// Copyright (C) 2008 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
// Copyright (C) 2008, 2009 Laboratoire de Recherche et Developpement
// de l'Epita (LRDE)
//
// This file is part of Spot, a model checking library.
//
@ -112,5 +111,11 @@ namespace spot
{
return negated_;
}
unsigned
automatop::instance_count()
{
return instances.size();
}
}
}

View file

@ -1,6 +1,5 @@
// Copyright (C) 2008 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
// Copyright (C) 2008, 2009 Laboratoire de Recherche et Developpement
// de l'Epita (LRDE)
//
// This file is part of Spot, a model checking library.
//
@ -70,6 +69,9 @@ namespace spot
bool is_negated() const;
/// Number of instantiated multop operators. For debugging.
static unsigned instance_count();
protected:
typedef std::pair<std::pair<nfa::ptr, bool>, vec*> triplet;
/// Comparison functor used internally by ltl::automatop.

View file

@ -1,6 +1,5 @@
// Copyright (C) 2008 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
// Copyright (C) 2008, 2009 Laboratoire de Recherche et Developpement
// de l'Epita (LRDE)
//
// This file is part of Spot, a model checking library.
//
@ -32,6 +31,7 @@
#include "tgbaalgos/save.hh"
#include "ltlvisit/destroy.hh"
#include "ltlvisit/tostring.hh"
#include "ltlast/allnodes.hh"
void
syntax(char* prog)
@ -142,5 +142,11 @@ main(int argc, char** argv)
spot::ltl::destroy(f);
delete concrete;
assert(spot::ltl::atomic_prop::instance_count() == 0);
assert(spot::ltl::unop::instance_count() == 0);
assert(spot::ltl::binop::instance_count() == 0);
assert(spot::ltl::multop::instance_count() == 0);
assert(spot::ltl::automatop::instance_count() == 0);
delete dict;
}

View file

@ -930,6 +930,7 @@ main(int argc, char** argv)
assert(spot::ltl::unop::instance_count() == 0);
assert(spot::ltl::binop::instance_count() == 0);
assert(spot::ltl::multop::instance_count() == 0);
assert(spot::ltl::automatop::instance_count() == 0);
delete dict;
return exit_code;
}