Commit c9ddbd0a authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

ltlsynt: use reduce_parity()

* bin/ltlsynt.cc: Here.
* tests/core/ltlsynt.test: Adjust.
parent c66b3d88
Pipeline #10127 passed with stage
in 110 minutes and 37 seconds
......@@ -198,7 +198,7 @@ namespace
dpa->merge_edges();
if (opt_print_pg)
dpa = spot::sbacc(dpa);
spot::colorize_parity_here(dpa, true);
spot::reduce_parity_here(dpa, true);
spot::change_parity_here(dpa, spot::parity_kind_max,
spot::parity_style_odd);
assert((
......@@ -317,17 +317,17 @@ namespace
{
auto tmp = to_dpa(aut);
if (verbose)
std::cerr << "determinization done\n"
<< "dpa has " << tmp->num_states() << " states" << std::endl;
std::cerr << "determinization done\nDPA has "
<< dpa->num_states() << " states, "
<< dpa->num_sets() << " colors\n";
tmp->merge_states();
if (verbose)
std::cerr << "simulation done\n"
<< "dpa has " << tmp->num_states() << " states" << std::endl;
std::cerr << "simplification done\nDPA has "
<< tmp->num_states() << " states\n";
dpa = split_2step(tmp, all_inputs);
if (verbose)
std::cerr << "split inputs and outputs done\n"
<< "automaton has " << dpa->num_states() << " states"
<< std::endl;
std::cerr << "split inputs and outputs done\nautomaton has "
<< dpa->num_states() << " states\n";
spot::colorize_parity_here(dpa, true);
break;
}
......@@ -335,17 +335,17 @@ namespace
{
auto split = split_2step(aut, all_inputs);
if (verbose)
std::cerr << "split inputs and outputs done\n"
<< "automaton has " << split->num_states() << " states"
<< std::endl;
std::cerr << "split inputs and outputs done\nautomaton has "
<< split->num_states() << " states\n";
dpa = to_dpa(split);
if (verbose)
std::cerr << "determinization done\n"
<< "dpa has " << dpa->num_states() << " states" << std::endl;
std::cerr << "determinization done\nDPA has "
<< dpa->num_states() << " states, "
<< dpa->num_sets() << " colors\n";
dpa->merge_states();
if (verbose)
std::cerr << "simulation done\n"
<< "dpa has " << dpa->num_states() << " states" << std::endl;
std::cerr << "simplification done\nDPA has "
<< dpa->num_states() << " states\n";
break;
}
case LAR:
......@@ -353,17 +353,16 @@ namespace
dpa = split_2step(aut, all_inputs);
dpa->merge_states();
if (verbose)
std::cerr << "split inputs and outputs done\n"
<< "automaton has " << dpa->num_states() << " states"
<< std::endl;
std::cerr << "split inputs and outputs done\nautomaton has "
<< dpa->num_states() << " states\n";
dpa = spot::to_parity(dpa);
spot::cleanup_parity_here(dpa);
spot::reduce_parity_here(dpa, true);
spot::change_parity_here(dpa, spot::parity_kind_max,
spot::parity_style_odd);
if (verbose)
std::cerr << "LAR construction done\n"
<< "dpa has " << dpa->num_states() << " states" << std::endl;
spot::colorize_parity_here(dpa, true);
std::cerr << "LAR construction done\nDPA has "
<< dpa->num_states() << " states, "
<< dpa->num_sets() << " colors\n";
break;
}
}
......
#! /bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2017 Laboratoire de Recherche et Développement
# Copyright (C) 2017, 2019 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
......@@ -23,54 +23,54 @@
set -e
cat >exp <<EOF
parity 19;
0 0 0 1,2 "INIT";
2 0 1 3;
parity 17;
0 1 0 1,2 "INIT";
2 1 1 3;
3 2 0 4,5;
5 0 1 3,6;
5 1 1 3,6;
6 3 0 4,5;
4 0 1 7,8;
8 0 0 9,10;
10 0 1 11,12;
12 0 0 9,13;
13 1 1 11,12;
11 2 0 9,10;
4 1 1 7,8;
8 1 0 9,10;
10 1 1 11,12;
12 1 0 9,10;
9 3 1 3,6;
7 0 0 14,15;
15 1 1 7,11;
14 2 1 3,6;
1 0 1 3,16;
16 3 0 2,17;
17 3 1 3,16;
11 2 0 9,10;
7 1 0 13,14;
14 1 1 7,11;
13 2 1 3,6;
1 1 1 3,15;
15 1 0 2,1;
EOF
ltlsynt --ins='a' --outs='b' -f 'GFa <-> GFb' --print-pg > out
ltlsynt --ins=a --outs=b -f 'GFa <-> GFb' --print-pg >out
diff out exp
cat >exp <<EOF
REALIZABLE
aag 17 1 2 1 14
aag 23 1 2 1 16
2
4 31
6 33
35
4 3
6 45
47
8 5 7
10 3 8
12 2 8
14 4 7
16 3 14
18 2 14
16 2 14
20 5 6
22 2 20
24 3 20
26 19 23
28 11 13
30 28 26
32 17 25
34 11 26
22 3 20
24 2 20
26 4 6
28 2 26
30 3 26
36 29 31
38 25 36
40 17 23
42 13 40
44 42 38
46 25 29
i0 a
o0 b
EOF
ltlsynt --ins='a' --outs='b' -f 'GFa <-> GFb' --aiger > out
ltlsynt --ins=a --outs=b -f 'GFa <-> GFb' --aiger >out
diff out exp
cat >exp <<EOF
......@@ -98,7 +98,7 @@ i0 a
o0 b
o1 c
EOF
ltlsynt --ins='a' --outs='b,c' -f 'GFa <-> (GFb & GFc)' --aiger > out
ltlsynt --ins=a --outs=b,c -f 'GFa <-> (GFb & GFc)' --aiger >out
diff out exp
cat >exp <<EOF
......@@ -106,9 +106,9 @@ translating formula done
split inputs and outputs done
automaton has 9 states
determinization done
dpa has 14 states
simulation done
dpa has 14 states
DPA has 14 states, 4 colors
simplification done
DPA has 11 states
parity game built
EOF
ltlsynt --ins='a' --outs='b' -f 'GFa <-> GFb' --verbose --realizability 2> out
......
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