projrun: modernize

* src/tgbaalgos/emptiness.hh (step): Add constructors...
* src/tgbaalgos/projrun.cc: ... to simplify this.
This commit is contained in:
Alexandre Duret-Lutz 2015-01-08 23:05:13 +01:00
parent 94577d6519
commit 3a70b57067
2 changed files with 20 additions and 19 deletions

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2011, 2013, 2014 Laboratoire de Recherche et
// Copyright (C) 2011, 2013, 2014, 2015 Laboratoire de Recherche et
// Developpement de l'Epita (LRDE).
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
@ -270,6 +270,14 @@ namespace spot
const state* s;
bdd label;
acc_cond::mark_t acc;
step(const state* s, bdd label, acc_cond::mark_t acc)
: s(s), label(label), acc(acc)
{
}
step()
{
}
};
typedef std::list<step> steps;

View file

@ -1,5 +1,8 @@
// Copyright (C) 2004, 2014 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// -*- coding: utf-8 -*-
// Copyright (C) 2014, 2015 Laboratoire de Recherche et Développement
// de l'Epita (LRDE)
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
//
// This file is part of Spot, a model checking library.
@ -30,22 +33,12 @@ namespace spot
const const_tgba_run_ptr& run)
{
auto res = std::make_shared<tgba_run>();
for (tgba_run::steps::const_iterator i = run->prefix.begin();
i != run->prefix.end(); ++i)
{
tgba_run::step s = { a_run->project_state(i->s, a_proj),
i->label,
i->acc };
res->prefix.push_back(s);
}
for (tgba_run::steps::const_iterator i = run->cycle.begin();
i != run->cycle.end(); ++i)
{
tgba_run::step s = { a_run->project_state(i->s, a_proj),
i->label,
i->acc };
res->cycle.push_back(s);
}
for (auto& i: run->prefix)
res->prefix.emplace_back(a_run->project_state(i.s, a_proj),
i.label, i.acc);
for (auto& i: run->cycle)
res->prefix.emplace_back(a_run->project_state(i.s, a_proj),
i.label, i.acc);
return res;
}
}