Commit f2e941cd authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

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.
parent 09bba54b
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.
......
// 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();
}
}
}
// 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.
......
// 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;
}
......@@ -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;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment