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:
Damien Lefortier 2009-10-16 17:00:46 +02:00
parent 627b667712
commit 84060b49e5
8 changed files with 70 additions and 36 deletions

View file

@ -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> 2009-10-16 Damien Lefortier <dam@lrde.epita.fr>
Add a new algorithm (from Tauriainen) to translate LTL formulae to Add a new algorithm (from Tauriainen) to translate LTL formulae to

View file

@ -19,8 +19,8 @@
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA. // 02111-1307, USA.
#ifndef SPOT_MISC_BDDOP_HH_ #ifndef SPOT_MISC_BDDOP_HH
# define SPOT_MISC_BDDOP_HH_ # define SPOT_MISC_BDDOP_HH
#include "bdd.h" #include "bdd.h"
@ -31,4 +31,4 @@ namespace spot
bdd compute_all_acceptance_conditions(bdd neg_acceptance_conditions); bdd compute_all_acceptance_conditions(bdd neg_acceptance_conditions);
} }
#endif /* !SPOT_MISC_BDDOP_HH_ */ #endif // SPOT_MISC_BDDOP_HH

View file

@ -19,8 +19,8 @@
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA. // 02111-1307, USA.
#ifndef SPOT_TGBA_TAA_HH_ #ifndef SPOT_TGBA_TAA_HH
# define SPOT_TGBA_TAA_HH_ # define SPOT_TGBA_TAA_HH
#include <set> #include <set>
#include <vector> #include <vector>
@ -172,4 +172,4 @@ namespace spot
}; };
} }
#endif /* !SPOT_TGBA_TAAEXPLICIT_HH_ */ #endif // SPOT_TGBA_TAA_HH

View file

@ -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 <vector>
#include <cassert> #include <cassert>
#include <sstream> #include <sstream>

View file

@ -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 #ifndef SPOT_TGBA_TGBACOMPLEMENT_HH
#define SPOT_TGBA_TGBACOMPLEMENT_HH #define SPOT_TGBA_TGBACOMPLEMENT_HH

View file

@ -37,7 +37,7 @@ namespace spot
using namespace ltl; using namespace ltl;
/// \brief Recursively translate a formula into a BDD. /// \brief Recursively translate a formula into a BDD.
class eltl_trad_visitor: public const_visitor class eltl_trad_visitor : public const_visitor
{ {
public: public:
eltl_trad_visitor(tgba_bdd_concrete_factory& fact, bool root = false) 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. // Traverse the formula and draft the automaton in a factory.
tgba_bdd_concrete_factory fact(dict); tgba_bdd_concrete_factory fact(dict);
eltl_trad_visitor v(fact, true); eltl_trad_visitor v(fact, true);
f->accept(v); f2->accept(v);
ltl::destroy(f2); ltl::destroy(f2);
fact.finish(); fact.finish();

View file

@ -19,8 +19,8 @@
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA. // 02111-1307, USA.
#ifndef SPOT_TAAALGOS_LTL2TAA_HH_ #ifndef SPOT_TGBAALGOS_LTL2TAA_HH
# define SPOT_TAAALGOS_LTL2TAA_HH_ # define SPOT_TGBAALGOS_LTL2TAA_HH
#include "ltlast/formula.hh" #include "ltlast/formula.hh"
#include "tgba/taa.hh" #include "tgba/taa.hh"
@ -51,4 +51,4 @@ namespace spot
taa* ltl_to_taa(const ltl::formula* f, bdd_dict* dict); taa* ltl_to_taa(const ltl::formula* f, bdd_dict* dict);
} }
#endif /* !SPOT_TAAALGOS_LTL2TAA_HH_ */ #endif // SPOT_TGBAALGOS_LTL2TAA_HH

View file

@ -24,29 +24,9 @@
#include "misc/hash.hh" #include "misc/hash.hh"
#include "ltlenv/defaultenv.hh" #include "ltlenv/defaultenv.hh"
#include "ltlast/allnodes.hh" #include "ltlast/allnodes.hh"
#include "tgbaalgos/dotty.hh"
#include "tgba/taa.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 int
main() main()
{ {
@ -70,11 +50,12 @@ main()
a->add_condition(t2, e.require("b")); a->add_condition(t2, e.require("b"));
a->add_condition(t3, e.require("c")); a->add_condition(t3, e.require("c"));
mset m; spot::dotty_reachable(std::cout, a);
spot::state* init = a->get_init_state();
dfs(a, init, m);
delete init;
delete a; delete a;
delete dict; 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);
} }