Minor fixes.
* src/misc/bddop.hh, src/tgba/taa.hh, src/tgbaalgos/ltl2taa.hh: Fix sanity (incorrect include guard). * src/tgba/tgbacomplement.cc, src/tgba/tgbacomplement.hh: Copyright 2009. * src/tgbaalgos/eltl2tgba_lacim.cc: Use abbreviations. * src/tgbatest/taa.cc: Fix it.
This commit is contained in:
parent
627b667712
commit
84060b49e5
8 changed files with 70 additions and 36 deletions
11
ChangeLog
11
ChangeLog
|
|
@ -1,3 +1,14 @@
|
|||
2009-10-16 Damien Lefortier <dam@lrde.epita.fr>
|
||||
|
||||
Minor fixes.
|
||||
|
||||
* src/misc/bddop.hh, src/tgba/taa.hh, src/tgbaalgos/ltl2taa.hh:
|
||||
Fix sanity (incorrect include guard).
|
||||
* src/tgba/tgbacomplement.cc, src/tgba/tgbacomplement.hh:
|
||||
Copyright 2009.
|
||||
* src/tgbaalgos/eltl2tgba_lacim.cc: Use abbreviations.
|
||||
* src/tgbatest/taa.cc: Fix it.
|
||||
|
||||
2009-10-16 Damien Lefortier <dam@lrde.epita.fr>
|
||||
|
||||
Add a new algorithm (from Tauriainen) to translate LTL formulae to
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@
|
|||
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
|
||||
#ifndef SPOT_MISC_BDDOP_HH_
|
||||
# define SPOT_MISC_BDDOP_HH_
|
||||
#ifndef SPOT_MISC_BDDOP_HH
|
||||
# define SPOT_MISC_BDDOP_HH
|
||||
|
||||
#include "bdd.h"
|
||||
|
||||
|
|
@ -31,4 +31,4 @@ namespace spot
|
|||
bdd compute_all_acceptance_conditions(bdd neg_acceptance_conditions);
|
||||
}
|
||||
|
||||
#endif /* !SPOT_MISC_BDDOP_HH_ */
|
||||
#endif // SPOT_MISC_BDDOP_HH
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@
|
|||
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
|
||||
#ifndef SPOT_TGBA_TAA_HH_
|
||||
# define SPOT_TGBA_TAA_HH_
|
||||
#ifndef SPOT_TGBA_TAA_HH
|
||||
# define SPOT_TGBA_TAA_HH
|
||||
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
|
@ -172,4 +172,4 @@ namespace spot
|
|||
};
|
||||
}
|
||||
|
||||
#endif /* !SPOT_TGBA_TAAEXPLICIT_HH_ */
|
||||
#endif // SPOT_TGBA_TAA_HH
|
||||
|
|
|
|||
|
|
@ -1,3 +1,24 @@
|
|||
// Copyright (C) 2009 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 <vector>
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,24 @@
|
|||
// Copyright (C) 2009 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_TGBA_TGBACOMPLEMENT_HH
|
||||
#define SPOT_TGBA_TGBACOMPLEMENT_HH
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace spot
|
|||
using namespace ltl;
|
||||
|
||||
/// \brief Recursively translate a formula into a BDD.
|
||||
class eltl_trad_visitor: public const_visitor
|
||||
class eltl_trad_visitor : public const_visitor
|
||||
{
|
||||
public:
|
||||
eltl_trad_visitor(tgba_bdd_concrete_factory& fact, bool root = false)
|
||||
|
|
@ -290,7 +290,7 @@ namespace spot
|
|||
// Traverse the formula and draft the automaton in a factory.
|
||||
tgba_bdd_concrete_factory fact(dict);
|
||||
eltl_trad_visitor v(fact, true);
|
||||
f->accept(v);
|
||||
f2->accept(v);
|
||||
ltl::destroy(f2);
|
||||
fact.finish();
|
||||
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@
|
|||
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
|
||||
#ifndef SPOT_TAAALGOS_LTL2TAA_HH_
|
||||
# define SPOT_TAAALGOS_LTL2TAA_HH_
|
||||
#ifndef SPOT_TGBAALGOS_LTL2TAA_HH
|
||||
# define SPOT_TGBAALGOS_LTL2TAA_HH
|
||||
|
||||
#include "ltlast/formula.hh"
|
||||
#include "tgba/taa.hh"
|
||||
|
|
@ -51,4 +51,4 @@ namespace spot
|
|||
taa* ltl_to_taa(const ltl::formula* f, bdd_dict* dict);
|
||||
}
|
||||
|
||||
#endif /* !SPOT_TAAALGOS_LTL2TAA_HH_ */
|
||||
#endif // SPOT_TGBAALGOS_LTL2TAA_HH
|
||||
|
|
|
|||
|
|
@ -24,29 +24,9 @@
|
|||
#include "misc/hash.hh"
|
||||
#include "ltlenv/defaultenv.hh"
|
||||
#include "ltlast/allnodes.hh"
|
||||
#include "tgbaalgos/dotty.hh"
|
||||
#include "tgba/taa.hh"
|
||||
|
||||
typedef Sgi::hash_set<
|
||||
const spot::state*, spot::state_ptr_hash, spot::state_ptr_equal
|
||||
> mset;
|
||||
|
||||
void
|
||||
dfs(spot::taa* a, const spot::state* s, mset& m)
|
||||
{
|
||||
if (m.find(s) != m.end())
|
||||
return;
|
||||
m.insert(s);
|
||||
|
||||
spot::tgba_succ_iterator* i = a->succ_iter(s);
|
||||
assert(i);
|
||||
for (i->first(); !i->done(); i->next())
|
||||
{
|
||||
std::cout << a->format_state(i->current_state()) << std::endl;
|
||||
dfs(a, i->current_state(), m);
|
||||
}
|
||||
delete i;
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
|
|
@ -70,11 +50,12 @@ main()
|
|||
a->add_condition(t2, e.require("b"));
|
||||
a->add_condition(t3, e.require("c"));
|
||||
|
||||
mset m;
|
||||
spot::state* init = a->get_init_state();
|
||||
dfs(a, init, m);
|
||||
spot::dotty_reachable(std::cout, a);
|
||||
|
||||
delete init;
|
||||
delete a;
|
||||
delete dict;
|
||||
assert(spot::ltl::atomic_prop::instance_count() == 0);
|
||||
assert(spot::ltl::unop::instance_count() == 0);
|
||||
assert(spot::ltl::binop::instance_count() == 0);
|
||||
assert(spot::ltl::multop::instance_count() == 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue