* src/tgbaalgos/projrun.hh, src/tgbaalgos/projrun.cc: New files.
* src/tgbaalgos/Makefile.am (tgbaalgos_HEADERS, libtgbaalgos_la_SOURCES): Add them. * iface/gspn/ltlgspn.cc (main): Call project_tgba_run if -P.
This commit is contained in:
parent
0fd665f3a2
commit
e3de75f677
5 changed files with 126 additions and 4 deletions
|
|
@ -36,6 +36,7 @@ tgbaalgos_HEADERS = \
|
|||
magic.hh \
|
||||
neverclaim.hh \
|
||||
powerset.hh \
|
||||
projrun.hh \
|
||||
reachiter.hh \
|
||||
replayrun.hh \
|
||||
save.hh \
|
||||
|
|
@ -53,6 +54,7 @@ libtgbaalgos_la_SOURCES = \
|
|||
magic.cc \
|
||||
neverclaim.cc \
|
||||
powerset.cc \
|
||||
projrun.cc \
|
||||
reachiter.cc \
|
||||
replayrun.cc \
|
||||
save.cc \
|
||||
|
|
|
|||
51
src/tgbaalgos/projrun.cc
Normal file
51
src/tgbaalgos/projrun.cc
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
// 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.
|
||||
//
|
||||
// Spot is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Spot is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Spot; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
|
||||
#include "projrun.hh"
|
||||
#include "tgba/tgba.hh"
|
||||
#include "tgbaalgos/emptiness.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
||||
tgba_run*
|
||||
project_tgba_run(const tgba* a_run, const tgba* a_proj, const tgba_run* run)
|
||||
{
|
||||
tgba_run* res = new 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);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
47
src/tgbaalgos/projrun.hh
Normal file
47
src/tgbaalgos/projrun.hh
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
// 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.
|
||||
//
|
||||
// Spot is free software; you can redistribute it and/or modify it
|
||||
// under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation; either version 2 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Spot is distributed in the hope that it will be useful, but WITHOUT
|
||||
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
|
||||
// License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Spot; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
|
||||
#ifndef SPOT_TGBAALGOS_PROJRUN_HH
|
||||
# define SPOT_TGBAALGOS_PROJRUN_HH
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
namespace spot
|
||||
{
|
||||
struct tgba_run;
|
||||
class tgba;
|
||||
|
||||
/// \brief Project a tgba_run on a tgba.
|
||||
///
|
||||
/// If a tgba_run has been generated on a product, or any other
|
||||
/// on-the-fly algorithm with tgba operands,
|
||||
///
|
||||
/// \param run the run to replay
|
||||
/// \param a_run the automata on which the run was generated
|
||||
/// \param a_proj the automata on which to project the run
|
||||
/// \param os the stream on which the replay should be traced
|
||||
/// \return true iff the run could be completed
|
||||
tgba_run* project_tgba_run(const tgba* a_run,
|
||||
const tgba* a_proj,
|
||||
const tgba_run* run);
|
||||
}
|
||||
|
||||
#endif // SPOT_TGBAALGOS_PROJRUN_HH
|
||||
Loading…
Add table
Add a link
Reference in a new issue