* src/tgbaalgos/cutscc.cc: Cosmetics.

This commit is contained in:
Alexandre Duret-Lutz 2013-07-10 08:34:34 +02:00
parent 26f48b1df2
commit 7f31d70345

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2009, 2011, 2012 Laboratoire de Recherche et // Copyright (C) 2009, 2011, 2012, 2013 Laboratoire de Recherche et
// Developpement de l'Epita (LRDE). // Developpement de l'Epita (LRDE).
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
@ -25,7 +25,10 @@
namespace spot namespace spot
{ {
tgba* cut_scc(const tgba* a, const scc_map& m, namespace
{
static tgba*
cut_scc(const tgba* a, const scc_map& m,
const std::set<unsigned>& s) const std::set<unsigned>& s)
{ {
tgba_explicit_string* sub_a = new tgba_explicit_string(a->get_dict()); tgba_explicit_string* sub_a = new tgba_explicit_string(a->get_dict());
@ -76,9 +79,8 @@ namespace spot
state_explicit_string::transition* t = state_explicit_string::transition* t =
sub_a->create_transition(cur_format, dst_format); sub_a->create_transition(cur_format, dst_format);
sub_a->add_conditions(t, sit->current_condition()); sub_a->add_conditions(t, sit->current_condition());
sub_a-> bdd acc = sit->current_acceptance_conditions();
add_acceptance_conditions(t, sub_a->add_acceptance_conditions(t, acc);
sit->current_acceptance_conditions());
} }
else else
{ {
@ -95,16 +97,7 @@ namespace spot
return sub_a; return sub_a;
} }
void print_set(const sccs_set* s) static unsigned set_distance(const sccs_set* s1,
{
std::cout << "set : ";
std::set<unsigned>::iterator vit;
for (vit = s->sccs.begin(); vit != s->sccs.end(); ++vit)
std::cout << *vit << " ";
std::cout << std::endl;
}
unsigned set_distance(const sccs_set* s1,
const sccs_set* s2, const sccs_set* s2,
const std::vector<unsigned>& scc_sizes) const std::vector<unsigned>& scc_sizes)
{ {
@ -121,7 +114,7 @@ namespace spot
return s1->size + s2->size - 2*inter_sum; return s1->size + s2->size - 2*inter_sum;
} }
sccs_set* set_union(sccs_set* s1, static sccs_set* set_union(sccs_set* s1,
sccs_set* s2, sccs_set* s2,
const std::vector<unsigned>& scc_sizes) const std::vector<unsigned>& scc_sizes)
{ {
@ -144,7 +137,7 @@ namespace spot
std::vector<std::vector<sccs_set* > >* rec_paths; std::vector<std::vector<sccs_set* > >* rec_paths;
}; };
void find_paths_sub(unsigned init_scc, static void find_paths_sub(unsigned init_scc,
const scc_map& m, const scc_map& m,
recurse_data& d, recurse_data& d,
const std::vector<unsigned>& scc_sizes) const std::vector<unsigned>& scc_sizes)
@ -234,6 +227,7 @@ namespace spot
} }
return; return;
} }
}
std::vector<std::vector<sccs_set* > >* find_paths(tgba* a, const scc_map& m) std::vector<std::vector<sccs_set* > >* find_paths(tgba* a, const scc_map& m)
{ {