graph: rename num_transitions() as num_edges()
And in fact, rename most "trans*" as "edges*", because that what they really are. * src/bin/autfilt.cc, src/bin/ltlcross.cc, src/bin/randaut.cc, src/dstarparse/dra2ba.cc, src/dstarparse/dstarparse.yy, src/dstarparse/nra2nba.cc, src/dstarparse/nsa2tgba.cc, src/graph/graph.hh, src/graph/ngraph.hh, src/ltlvisit/exclusive.cc, src/parseaut/parseaut.yy, src/tests/complementation.cc, src/tests/graph.cc, src/tests/ltl2tgba.cc, src/tests/ngraph.cc, src/tests/twagraph.cc, src/twa/twagraph.cc, src/twa/twagraph.hh, src/twa/twamask.hh, src/twaalgos/are_isomorphic.cc, src/twaalgos/are_isomorphic.hh, src/twaalgos/canonicalize.cc, src/twaalgos/cleanacc.cc, src/twaalgos/complete.cc, src/twaalgos/compsusp.cc, src/twaalgos/cycles.cc, src/twaalgos/degen.cc, src/twaalgos/dot.cc, src/twaalgos/dtbasat.cc, src/twaalgos/dtgbacomp.cc, src/twaalgos/dtgbasat.cc, src/twaalgos/dupexp.cc, src/twaalgos/emptiness.cc, src/twaalgos/isunamb.cc, src/twaalgos/isweakscc.cc, src/twaalgos/ltl2tgba_fm.cc, src/twaalgos/mask.hh, src/twaalgos/minimize.cc, src/twaalgos/postproc.cc, src/twaalgos/powerset.cc, src/twaalgos/product.cc, src/twaalgos/randomgraph.cc, src/twaalgos/randomize.cc, src/twaalgos/randomize.hh, src/twaalgos/relabel.cc, src/twaalgos/remfin.cc, src/twaalgos/safety.cc, src/twaalgos/sbacc.cc, src/twaalgos/sccfilter.cc, src/twaalgos/sepsets.cc, src/twaalgos/simulation.cc, src/twaalgos/stutter.cc, src/twaalgos/totgba.cc: Rename these.
This commit is contained in:
parent
a1ba0a89c5
commit
af8634d8c4
53 changed files with 685 additions and 693 deletions
|
|
@ -198,7 +198,7 @@ int main(int argc, char* argv[])
|
|||
auto buchi = spot::degeneralize(a);
|
||||
std::cout << "Buchi: "
|
||||
<< buchi->num_states()
|
||||
<< buchi->num_transitions()
|
||||
<< buchi->num_edges()
|
||||
<< buchi->acc().num_sets()
|
||||
<< std::endl;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2014 Laboratoire de Recherche et Développement de
|
||||
// l'Epita.
|
||||
// Copyright (C) 2014, 2015 Laboratoire de Recherche et Développement
|
||||
// de l'Epita.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -89,12 +89,12 @@ bool f1()
|
|||
auto s1 = g.new_state();
|
||||
auto s2 = g.new_state();
|
||||
auto s3 = g.new_state();
|
||||
g.new_transition(s1, s2);
|
||||
g.new_transition(s1, s3);
|
||||
g.new_transition(s2, s3);
|
||||
g.new_transition(s3, s1);
|
||||
g.new_transition(s3, s2);
|
||||
g.new_transition(s3, s3);
|
||||
g.new_edge(s1, s2);
|
||||
g.new_edge(s1, s3);
|
||||
g.new_edge(s2, s3);
|
||||
g.new_edge(s3, s1);
|
||||
g.new_edge(s3, s2);
|
||||
g.new_edge(s3, s3);
|
||||
|
||||
dot(std::cout, g);
|
||||
|
||||
|
|
@ -118,10 +118,10 @@ bool f2()
|
|||
auto s1 = g.new_state(1);
|
||||
auto s2 = g.new_state(2);
|
||||
auto s3 = g.new_state(3);
|
||||
g.new_transition(s1, s2);
|
||||
g.new_transition(s1, s3);
|
||||
g.new_transition(s2, s3);
|
||||
g.new_transition(s3, s2);
|
||||
g.new_edge(s1, s2);
|
||||
g.new_edge(s1, s3);
|
||||
g.new_edge(s2, s3);
|
||||
g.new_edge(s3, s2);
|
||||
|
||||
dot(std::cout, g);
|
||||
|
||||
|
|
@ -140,10 +140,10 @@ bool f3()
|
|||
auto s1 = g.new_state();
|
||||
auto s2 = g.new_state();
|
||||
auto s3 = g.new_state();
|
||||
g.new_transition(s1, s2, 1);
|
||||
g.new_transition(s1, s3, 2);
|
||||
g.new_transition(s2, s3, 3);
|
||||
g.new_transition(s3, s2, 4);
|
||||
g.new_edge(s1, s2, 1);
|
||||
g.new_edge(s1, s3, 2);
|
||||
g.new_edge(s2, s3, 3);
|
||||
g.new_edge(s3, s2, 4);
|
||||
|
||||
dot(std::cout, g);
|
||||
|
||||
|
|
@ -162,10 +162,10 @@ bool f4()
|
|||
auto s1 = g.new_state(2);
|
||||
auto s2 = g.new_state(3);
|
||||
auto s3 = g.new_state(4);
|
||||
g.new_transition(s1, s2, 1);
|
||||
g.new_transition(s1, s3, 2);
|
||||
g.new_transition(s2, s3, 3);
|
||||
g.new_transition(s3, s2, 4);
|
||||
g.new_edge(s1, s2, 1);
|
||||
g.new_edge(s1, s3, 2);
|
||||
g.new_edge(s2, s3, 3);
|
||||
g.new_edge(s3, s2, 4);
|
||||
|
||||
dot(std::cout, g);
|
||||
|
||||
|
|
@ -184,10 +184,10 @@ bool f5()
|
|||
auto s1 = g.new_state();
|
||||
auto s2 = g.new_state();
|
||||
auto s3 = g.new_state();
|
||||
g.new_transition(s1, s2, std::make_pair(1, 1.2f));
|
||||
g.new_transition(s1, s3, std::make_pair(2, 1.3f));
|
||||
g.new_transition(s2, s3, std::make_pair(3, 1.4f));
|
||||
g.new_transition(s3, s2, std::make_pair(4, 1.5f));
|
||||
g.new_edge(s1, s2, std::make_pair(1, 1.2f));
|
||||
g.new_edge(s1, s3, std::make_pair(2, 1.3f));
|
||||
g.new_edge(s2, s3, std::make_pair(3, 1.4f));
|
||||
g.new_edge(s3, s2, std::make_pair(4, 1.5f));
|
||||
|
||||
int f = 0;
|
||||
float h = 0;
|
||||
|
|
@ -206,10 +206,10 @@ bool f6()
|
|||
auto s1 = g.new_state();
|
||||
auto s2 = g.new_state();
|
||||
auto s3 = g.new_state();
|
||||
g.new_transition(s1, s2, 1, 1.2f);
|
||||
g.new_transition(s1, s3, 2, 1.3f);
|
||||
g.new_transition(s2, s3, 3, 1.4f);
|
||||
g.new_transition(s3, s2, 4, 1.5f);
|
||||
g.new_edge(s1, s2, 1, 1.2f);
|
||||
g.new_edge(s1, s3, 2, 1.3f);
|
||||
g.new_edge(s2, s3, 3, 1.4f);
|
||||
g.new_edge(s3, s2, 4, 1.5f);
|
||||
|
||||
int f = 0;
|
||||
float h = 0;
|
||||
|
|
@ -227,10 +227,10 @@ bool f7()
|
|||
auto s1 = g.new_state(2);
|
||||
auto s2 = g.new_state(3);
|
||||
auto s3 = g.new_state(4);
|
||||
g.new_transition(s1, {s2, s3}, 1);
|
||||
g.new_transition(s1, {s3}, 2);
|
||||
g.new_transition(s2, {s3}, 3);
|
||||
g.new_transition(s3, {s2}, 4);
|
||||
g.new_edge(s1, {s2, s3}, 1);
|
||||
g.new_edge(s1, {s3}, 2);
|
||||
g.new_edge(s2, {s3}, 3);
|
||||
g.new_edge(s3, {s2}, 4);
|
||||
|
||||
int f = 0;
|
||||
for (auto& t: g.out(s1))
|
||||
|
|
@ -273,10 +273,10 @@ bool f8()
|
|||
auto s1 = g.new_state(2, 4);
|
||||
auto s2 = g.new_state(3, 6);
|
||||
auto s3 = g.new_state(4, 8);
|
||||
g.new_transition(s1, s2, 1, 3);
|
||||
g.new_transition(s1, s3, 2, 5);
|
||||
g.new_transition(s2, s3, 3, 7);
|
||||
g.new_transition(s3, s2, 4, 9);
|
||||
g.new_edge(s1, s2, 1, 3);
|
||||
g.new_edge(s1, s3, 2, 5);
|
||||
g.new_edge(s2, s3, 3, 7);
|
||||
g.new_edge(s3, s2, 4, 9);
|
||||
|
||||
dot(std::cout, g);
|
||||
|
||||
|
|
|
|||
|
|
@ -613,7 +613,7 @@ checked_main(int argc, char** argv)
|
|||
if (spot::format_parse_aut_errors(std::cerr,
|
||||
argv[formula_index] + 2, pel))
|
||||
return 2;
|
||||
daut->aut->merge_transitions();
|
||||
daut->aut->merge_edges();
|
||||
system_aut = daut->aut;
|
||||
tm.stop("reading -P's argument");
|
||||
}
|
||||
|
|
@ -1018,7 +1018,7 @@ checked_main(int argc, char** argv)
|
|||
tm.stop("parsing hoa");
|
||||
if (spot::format_parse_aut_errors(std::cerr, input, pel))
|
||||
return 2;
|
||||
daut->aut->merge_transitions();
|
||||
daut->aut->merge_edges();
|
||||
a = daut->aut;
|
||||
assume_sba = a->is_sba();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2014 Laboratoire de Recherche et Développement de
|
||||
// l'Epita.
|
||||
// Copyright (C) 2014, 2015 Laboratoire de Recherche et Développement
|
||||
// de l'Epita.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -128,12 +128,12 @@ bool f1()
|
|||
auto s1 = gg.new_state("s1");
|
||||
auto s2 = gg.new_state("s2");
|
||||
auto s3 = gg.new_state("s3");
|
||||
gg.new_transition("s1", "s2");
|
||||
gg.new_transition("s1", "s3");
|
||||
gg.new_transition("s2", "s3");
|
||||
gg.new_transition("s3", "s1");
|
||||
gg.new_transition("s3", "s2");
|
||||
gg.new_transition("s3", "s3");
|
||||
gg.new_edge("s1", "s2");
|
||||
gg.new_edge("s1", "s3");
|
||||
gg.new_edge("s2", "s3");
|
||||
gg.new_edge("s3", "s1");
|
||||
gg.new_edge("s3", "s2");
|
||||
gg.new_edge("s3", "s3");
|
||||
|
||||
dot(std::cout, gg);
|
||||
|
||||
|
|
@ -158,10 +158,10 @@ bool f2()
|
|||
auto s1 = gg.new_state("s1", 1);
|
||||
gg.new_state("s2", 2);
|
||||
gg.new_state("s3", 3);
|
||||
gg.new_transition("s1", "s2");
|
||||
gg.new_transition("s1", "s3");
|
||||
gg.new_transition("s2", "s3");
|
||||
gg.new_transition("s3", "s2");
|
||||
gg.new_edge("s1", "s2");
|
||||
gg.new_edge("s1", "s3");
|
||||
gg.new_edge("s2", "s3");
|
||||
gg.new_edge("s3", "s2");
|
||||
|
||||
dot(std::cout, gg);
|
||||
|
||||
|
|
@ -181,10 +181,10 @@ bool f3()
|
|||
auto s1 = gg.new_state("s1");
|
||||
gg.new_state("s2");
|
||||
gg.new_state("s3");
|
||||
gg.new_transition("s1", "s2", 1);
|
||||
gg.new_transition("s1", "s3", 2);
|
||||
gg.new_transition("s2", "s3", 3);
|
||||
gg.new_transition("s3", "s2", 4);
|
||||
gg.new_edge("s1", "s2", 1);
|
||||
gg.new_edge("s1", "s3", 2);
|
||||
gg.new_edge("s2", "s3", 3);
|
||||
gg.new_edge("s3", "s2", 4);
|
||||
|
||||
dot(std::cout, gg);
|
||||
|
||||
|
|
@ -204,10 +204,10 @@ bool f4()
|
|||
auto s1 = gg.new_state("s1", 2);
|
||||
gg.new_state("s2", 3);
|
||||
gg.new_state("s3", 4);
|
||||
gg.new_transition("s1", "s2", 1);
|
||||
gg.new_transition("s1", "s3", 2);
|
||||
gg.new_transition("s2", "s3", 3);
|
||||
gg.new_transition("s3", "s2", 4);
|
||||
gg.new_edge("s1", "s2", 1);
|
||||
gg.new_edge("s1", "s3", 2);
|
||||
gg.new_edge("s2", "s3", 3);
|
||||
gg.new_edge("s3", "s2", 4);
|
||||
|
||||
dot(std::cout, gg);
|
||||
|
||||
|
|
@ -228,10 +228,10 @@ bool f5()
|
|||
auto s1 = gg.new_state("s1");
|
||||
gg.new_state("s2");
|
||||
gg.new_state("s3");
|
||||
gg.new_transition("s1", "s2", std::make_pair(1, 1.2f));
|
||||
gg.new_transition("s1", "s3", std::make_pair(2, 1.3f));
|
||||
gg.new_transition("s2", "s3", std::make_pair(3, 1.4f));
|
||||
gg.new_transition("s3", "s2", std::make_pair(4, 1.5f));
|
||||
gg.new_edge("s1", "s2", std::make_pair(1, 1.2f));
|
||||
gg.new_edge("s1", "s3", std::make_pair(2, 1.3f));
|
||||
gg.new_edge("s2", "s3", std::make_pair(3, 1.4f));
|
||||
gg.new_edge("s3", "s2", std::make_pair(4, 1.5f));
|
||||
|
||||
int f = 0;
|
||||
float h = 0;
|
||||
|
|
@ -252,10 +252,10 @@ bool f6()
|
|||
auto s1 = gg.new_state("s1");
|
||||
gg.new_state("s2");
|
||||
gg.new_state("s3");
|
||||
gg.new_transition("s1", "s2", 1, 1.2f);
|
||||
gg.new_transition("s1", "s3", 2, 1.3f);
|
||||
gg.new_transition("s2", "s3", 3, 1.4f);
|
||||
gg.new_transition("s3", "s2", 4, 1.5f);
|
||||
gg.new_edge("s1", "s2", 1, 1.2f);
|
||||
gg.new_edge("s1", "s3", 2, 1.3f);
|
||||
gg.new_edge("s2", "s3", 3, 1.4f);
|
||||
gg.new_edge("s3", "s2", 4, 1.5f);
|
||||
|
||||
int f = 0;
|
||||
float h = 0;
|
||||
|
|
@ -276,10 +276,10 @@ bool f7()
|
|||
auto s1 = gg.new_state("s1", 2);
|
||||
gg.new_state("s2", 3);
|
||||
gg.new_state("s3", 4);
|
||||
gg.new_transition("s1", {"s2", "s3"}, 1);
|
||||
gg.new_transition("s1", {"s3"}, 2);
|
||||
gg.new_transition("s2", {"s3"}, 3);
|
||||
gg.new_transition("s3", {"s2"}, 4);
|
||||
gg.new_edge("s1", {"s2", "s3"}, 1);
|
||||
gg.new_edge("s1", {"s3"}, 2);
|
||||
gg.new_edge("s2", {"s3"}, 3);
|
||||
gg.new_edge("s3", {"s2"}, 4);
|
||||
|
||||
int f = 0;
|
||||
for (auto& t: g.out(s1))
|
||||
|
|
@ -324,10 +324,10 @@ bool f8()
|
|||
auto s1 = gg.new_state("s1", 2, 4);
|
||||
gg.new_state("s2", 3, 6);
|
||||
gg.new_state("s3", 4, 8);
|
||||
gg.new_transition("s1", "s2", 1, 3);
|
||||
gg.new_transition("s1", "s3", 2, 5);
|
||||
gg.new_transition("s2", "s3", 3, 7);
|
||||
gg.new_transition("s3", "s2", 4, 9);
|
||||
gg.new_edge("s1", "s2", 1, 3);
|
||||
gg.new_edge("s1", "s3", 2, 5);
|
||||
gg.new_edge("s2", "s3", 3, 7);
|
||||
gg.new_edge("s3", "s2", 4, 9);
|
||||
|
||||
dot(std::cout, gg);
|
||||
|
||||
|
|
@ -392,10 +392,10 @@ bool f9()
|
|||
auto s3 = gg.new_state("s3");
|
||||
gg.alias_state(s3, "s3b");
|
||||
|
||||
gg.new_transition("s1", "s2", 1, 3);
|
||||
gg.new_transition("s1", "s3", 2, 5);
|
||||
gg.new_transition("s2", "s3b", 3, 7);
|
||||
gg.new_transition("s3", "s2", 4, 9);
|
||||
gg.new_edge("s1", "s2", 1, 3);
|
||||
gg.new_edge("s1", "s3", 2, 5);
|
||||
gg.new_edge("s2", "s3b", 3, 7);
|
||||
gg.new_edge("s3", "s2", 4, 9);
|
||||
|
||||
dot(std::cout, gg);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2014 Laboratoire de Recherche et Développement de
|
||||
// l'Epita.
|
||||
// Copyright (C) 2014, 2015 Laboratoire de Recherche et Développement
|
||||
// de l'Epita.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -42,13 +42,13 @@ void f1()
|
|||
auto s1 = tg->new_state();
|
||||
auto s2 = tg->new_state();
|
||||
auto s3 = tg->new_state();
|
||||
tg->new_transition(s1, s1, bddfalse, 0U);
|
||||
tg->new_transition(s1, s2, p1, 0U);
|
||||
tg->new_transition(s1, s3, p2, tg->acc().mark(1));
|
||||
tg->new_transition(s2, s3, p1 & p2, tg->acc().mark(0));
|
||||
tg->new_transition(s3, s1, p1 | p2, tg->acc().marks({0, 1}));
|
||||
tg->new_transition(s3, s2, p1 >> p2, 0U);
|
||||
tg->new_transition(s3, s3, bddtrue, tg->acc().marks({0, 1}));
|
||||
tg->new_edge(s1, s1, bddfalse, 0U);
|
||||
tg->new_edge(s1, s2, p1, 0U);
|
||||
tg->new_edge(s1, s3, p2, tg->acc().mark(1));
|
||||
tg->new_edge(s2, s3, p1 & p2, tg->acc().mark(0));
|
||||
tg->new_edge(s3, s1, p1 | p2, tg->acc().marks({0, 1}));
|
||||
tg->new_edge(s3, s2, p1 >> p2, 0U);
|
||||
tg->new_edge(s3, s3, bddtrue, tg->acc().marks({0, 1}));
|
||||
|
||||
spot::print_dot(std::cout, tg);
|
||||
|
||||
|
|
@ -69,19 +69,19 @@ void f1()
|
|||
}
|
||||
|
||||
auto all = tg->acc().marks({0, 1});
|
||||
tg->new_transition(s3, s1, p1 | p2, all);
|
||||
tg->new_transition(s3, s2, p1 >> p2, 0U);
|
||||
tg->new_transition(s3, s1, bddtrue, all);
|
||||
tg->new_edge(s3, s1, p1 | p2, all);
|
||||
tg->new_edge(s3, s2, p1 >> p2, 0U);
|
||||
tg->new_edge(s3, s1, bddtrue, all);
|
||||
|
||||
std::cerr << tg->num_transitions() << '\n';
|
||||
assert(tg->num_transitions() == 7);
|
||||
std::cerr << tg->num_edges() << '\n';
|
||||
assert(tg->num_edges() == 7);
|
||||
|
||||
spot::print_dot(std::cout, tg);
|
||||
tg->merge_transitions();
|
||||
tg->merge_edges();
|
||||
spot::print_dot(std::cout, tg);
|
||||
|
||||
std::cerr << tg->num_transitions() << '\n';
|
||||
assert(tg->num_transitions() == 5);
|
||||
std::cerr << tg->num_edges() << '\n';
|
||||
assert(tg->num_edges() == 5);
|
||||
|
||||
// Add enough states so that the state vector is reallocated.
|
||||
for (unsigned i = 0; i < 100; ++i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue