* src/tgbaalgos/reachiter.cc (tgba_reachable_iterator::run)
Reuse s->second to avoid a hash lookup. * src/tgbaalgos/save.cc (save_bfs::process_state): Delete dest.
This commit is contained in:
parent
95f6f2a639
commit
791c389080
6 changed files with 236 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
## Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
## Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
## département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
## et Marie Curie.
|
||||
##
|
||||
|
|
@ -28,10 +28,12 @@ check_SCRIPTS = defs
|
|||
check_PROGRAMS = \
|
||||
bddprod \
|
||||
explicit \
|
||||
expldot \
|
||||
explprod \
|
||||
ltl2tgba \
|
||||
ltlprod \
|
||||
mixprod \
|
||||
powerset \
|
||||
readsave \
|
||||
tgbaread \
|
||||
tripprod
|
||||
|
|
@ -40,10 +42,13 @@ check_PROGRAMS = \
|
|||
bddprod_SOURCES = ltlprod.cc
|
||||
bddprod_CXXFLAGS = -DBDD_CONCRETE_PRODUCT
|
||||
explicit_SOURCES = explicit.cc
|
||||
expldot_SOURCES = powerset.cc
|
||||
expldot_CXXFLAGS = -DDOTTY
|
||||
explprod_SOURCES = explprod.cc
|
||||
ltl2tgba_SOURCES = ltl2tgba.cc
|
||||
ltlprod_SOURCES = ltlprod.cc
|
||||
mixprod_SOURCES = mixprod.cc
|
||||
powerset_SOURCES = powerset.cc
|
||||
readsave_SOURCES = readsave.cc
|
||||
tgbaread_SOURCES = tgbaread.cc
|
||||
tripprod_SOURCES = tripprod.cc
|
||||
|
|
|
|||
50
src/tgbatest/powerset.cc
Normal file
50
src/tgbatest/powerset.cc
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
#include <iostream>
|
||||
#include <cassert>
|
||||
#include "tgba/tgbaexplicit.hh"
|
||||
#include "tgbaalgos/powerset.hh"
|
||||
#include "tgbaparse/public.hh"
|
||||
#include "tgbaalgos/save.hh"
|
||||
#include "ltlast/allnodes.hh"
|
||||
#include "tgbaalgos/dotty.hh"
|
||||
|
||||
void
|
||||
syntax(char* prog)
|
||||
{
|
||||
std::cerr << prog << " file" << std::endl;
|
||||
exit(2);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
int exit_code = 0;
|
||||
|
||||
if (argc != 2)
|
||||
syntax(argv[0]);
|
||||
|
||||
spot::bdd_dict* dict = new spot::bdd_dict();
|
||||
|
||||
spot::ltl::environment& env(spot::ltl::default_environment::instance());
|
||||
spot::tgba_parse_error_list pel;
|
||||
spot::tgba_explicit* a = spot::tgba_parse(argv[1], pel, dict, env);
|
||||
if (spot::format_tgba_parse_errors(std::cerr, pel))
|
||||
return 2;
|
||||
|
||||
|
||||
#ifndef DOTTY
|
||||
spot::tgba_explicit* e = spot::tgba_powerset(a);
|
||||
spot::tgba_save_reachable(std::cout, e);
|
||||
delete e;
|
||||
#else
|
||||
spot::dotty_reachable(std::cout, a);
|
||||
#endif
|
||||
|
||||
assert(spot::ltl::unop::instance_count() == 0);
|
||||
assert(spot::ltl::binop::instance_count() == 0);
|
||||
assert(spot::ltl::multop::instance_count() == 0);
|
||||
assert(spot::ltl::atomic_prop::instance_count() != 0);
|
||||
delete a;
|
||||
assert(spot::ltl::atomic_prop::instance_count() == 0);
|
||||
delete dict;
|
||||
return exit_code;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue