bin: implement --output for automata

Fixes #56.

* src/bin/common_aoutput.cc, src/bin/common_aoutput.hh,
src/bin/dstar2tgba.cc: Implement it.
* src/bin/autfilt.cc, src/bin/ltl2tgba.cc, src/bin/ltldo.cc,
src/bin/randaut.cc: Fix main() to catch exceptions from the
constructor of the automaton printer as well.
* src/tgbatest/randaut.test: Add a test case.
* doc/org/oaut.org: Document it.
This commit is contained in:
Alexandre Duret-Lutz 2015-02-15 12:23:28 +01:00
parent d17d7469c3
commit 1e7c1e5cdd
9 changed files with 214 additions and 78 deletions

View file

@ -23,6 +23,7 @@
#include "common_sys.hh"
#include <argp.h>
#include <memory>
#include "hoaparse/public.hh"
@ -32,6 +33,7 @@
#include "tgbaalgos/reducerun.hh"
#include "tgbaalgos/word.hh"
#include "tgbaalgos/isdet.hh"
#include "common_file.hh"
// Format for automaton output
@ -97,6 +99,7 @@ public:
}
using spot::formater::declare;
using spot::formater::set_output;
/// \brief print the configured statistics.
///
@ -205,6 +208,9 @@ class automaton_printer
hoa_stat_printer statistics;
std::ostringstream name;
hoa_stat_printer namer;
std::ostringstream outputname;
hoa_stat_printer outputnamer;
std::map<std::string, std::unique_ptr<output_file>> outputfiles;
public: