Safra: Fix usage of multiple acceptance conditions and fix text output.
* src/tgba/tgbasafracomplement.cc (tgba_safra_complement::tgba_safra_complement) (tgba_safra_complement::succ_iter): Correct the declaration and use of multiple acceptance conditions. (state_complement::to_string): Output the L set, not U. The previous code caused different states to share the same names, causing issues with the text-based output (state with identical names get merged). * src/tgba/tgbasafracomplement.hh (tgba_safra_complement::acceptance_cond_vec_): Adjust type to store BDDs. * src/tgbatest/complementation.cc: Implement a new "-b" option to output automata in Spot's syntax. * src/tgbatest/complementation.test: Add a test-case supplied by Martin Dieguez Lodeiro. * THANKS: Add Martin.
This commit is contained in:
parent
ff3c02f51d
commit
a4d1e18bf3
6 changed files with 77 additions and 23 deletions
|
|
@ -21,6 +21,7 @@
|
|||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include "tgbaalgos/dotty.hh"
|
||||
#include "tgbaalgos/save.hh"
|
||||
#include "tgbaparse/public.hh"
|
||||
#include "tgba/tgbaproduct.hh"
|
||||
#include "tgbaalgos/gtec/gtec.hh"
|
||||
|
|
@ -40,6 +41,7 @@ void usage(const char* prog)
|
|||
{
|
||||
std::cout << "usage: " << prog << " [options]" << std::endl;
|
||||
std::cout << "with options" << std::endl
|
||||
<< "-b Output in spot's format" << std::endl
|
||||
<< "-S Use Safra's complementation "
|
||||
<< "instead of Kupferman&Vardi's" << std::endl
|
||||
<< "-s buchi_automaton display the safra automaton"
|
||||
|
|
@ -63,6 +65,7 @@ int main(int argc, char* argv[])
|
|||
bool formula = false;
|
||||
bool safra = false;
|
||||
bool print_formula = false;
|
||||
bool save_spot = false;
|
||||
|
||||
if (argc < 3)
|
||||
{
|
||||
|
|
@ -74,6 +77,12 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
if (argv[i][0] == '-')
|
||||
{
|
||||
if (strcmp(argv[i] + 1, "b") == 0)
|
||||
{
|
||||
save_spot = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcmp(argv[i] + 1, "astat") == 0)
|
||||
{
|
||||
stats = true;
|
||||
|
|
@ -134,7 +143,12 @@ int main(int argc, char* argv[])
|
|||
complement = new spot::tgba_kv_complement(a);
|
||||
|
||||
if (print_automaton)
|
||||
spot::dotty_reachable(std::cout, complement);
|
||||
{
|
||||
if (save_spot)
|
||||
spot::tgba_save_reachable(std::cout, complement);
|
||||
else
|
||||
spot::dotty_reachable(std::cout, complement);
|
||||
}
|
||||
|
||||
if (print_safra)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue