twa: introduce the state_map template alias
* spot/twa/twa.hh: Introduce the type. * spot/taalgos/emptinessta.cc, spot/taalgos/emptinessta.hh, spot/taalgos/minimize.cc, spot/taalgos/reachiter.cc, spot/taalgos/reachiter.hh, spot/taalgos/tgba2ta.cc, spot/twa/twasafracomplement.cc, spot/twaalgos/dtwasat.cc, spot/twaalgos/emptiness.cc, spot/twaalgos/gtec/status.cc, spot/twaalgos/gtec/status.hh, spot/twaalgos/gv04.cc, spot/twaalgos/magic.cc, spot/twaalgos/minimize.cc, spot/twaalgos/minimize.hh, spot/twaalgos/reachiter.cc, spot/twaalgos/reachiter.hh, spot/twaalgos/se05.cc, spot/twaalgos/tau03.cc, spot/twaalgos/tau03opt.cc: Use it.
This commit is contained in:
parent
6230f320bf
commit
9b95b697a5
21 changed files with 89 additions and 117 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 Laboratoire de
|
||||
// Recherche et Développement de l'Epita (LRDE).
|
||||
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 Laboratoire
|
||||
// de Recherche et Développement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -74,9 +74,7 @@ namespace spot
|
|||
trace
|
||||
<< "PASS 1" << std::endl;
|
||||
|
||||
std::unordered_map<const state*,
|
||||
std::set<const state*, state_ptr_less_than>,
|
||||
state_ptr_hash, state_ptr_equal> liveset;
|
||||
state_map<std::set<const state*, state_ptr_less_than>> liveset;
|
||||
|
||||
std::stack<spot::state*> livelock_roots;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2008, 2012, 2013, 2014 Laboratoire de Recherche et
|
||||
// Dévelopment de l'Epita (LRDE).
|
||||
// Copyright (C) 2008, 2012, 2013, 2014, 2016 Laboratoire de Recherche
|
||||
// et Dévelopment de l'Epita (LRDE).
|
||||
// Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de
|
||||
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
// Université Pierre et Marie Curie.
|
||||
|
|
@ -86,8 +86,7 @@ namespace spot
|
|||
/// See the paper cited above.
|
||||
class SPOT_API ta_check : public ec_statistics
|
||||
{
|
||||
typedef std::unordered_map<const state*, int,
|
||||
state_ptr_hash, state_ptr_equal> hash_type;
|
||||
typedef state_map<int> hash_type;
|
||||
public:
|
||||
ta_check(const const_ta_product_ptr& a, option_map o = option_map());
|
||||
virtual
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 Laboratoire de
|
||||
// Recherche et Développement de l'Epita (LRDE).
|
||||
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 Laboratoire
|
||||
// de Recherche et Développement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -39,10 +39,8 @@
|
|||
|
||||
namespace spot
|
||||
{
|
||||
typedef std::unordered_set<const state*,
|
||||
state_ptr_hash, state_ptr_equal> hash_set;
|
||||
typedef std::unordered_map<const state*, unsigned,
|
||||
state_ptr_hash, state_ptr_equal> hash_map;
|
||||
typedef state_set hash_set;
|
||||
typedef state_map<unsigned> hash_map;
|
||||
typedef std::list<hash_set*> partition_t;
|
||||
|
||||
namespace
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2010, 2012, 2014, 2015 Laboratoire de Recherche et
|
||||
// Développement de l'Epita (LRDE).
|
||||
// Copyright (C) 2010, 2012, 2014, 2015, 2016 Laboratoire de Recherche
|
||||
// et Développement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -34,7 +34,7 @@ namespace spot
|
|||
}
|
||||
ta_reachable_iterator::~ta_reachable_iterator()
|
||||
{
|
||||
seen_map::const_iterator s = seen.begin();
|
||||
auto s = seen.begin();
|
||||
while (s != seen.end())
|
||||
{
|
||||
// Advance the iterator before deleting the "key" pointer.
|
||||
|
|
@ -81,7 +81,7 @@ namespace spot
|
|||
for (si->first(); !si->done(); si->next())
|
||||
{
|
||||
const state* current = si->dst();
|
||||
seen_map::const_iterator s = seen.find(current);
|
||||
auto s = seen.find(current);
|
||||
bool ws = want_state(current);
|
||||
if (s == seen.end())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2010, 2011, 2012, 2013, 2014 Laboratoire de Recherche
|
||||
// et Développement de l'Epita (LRDE).
|
||||
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2016 Laboratoire de
|
||||
// Recherche et Développement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -88,9 +88,7 @@ namespace spot
|
|||
|
||||
const_ta_ptr t_automata_; ///< The spot::ta to explore.
|
||||
|
||||
typedef std::unordered_map<const state*, int,
|
||||
state_ptr_hash, state_ptr_equal> seen_map;
|
||||
seen_map seen; ///< States already seen.
|
||||
state_map<int> seen; ///< States already seen.
|
||||
};
|
||||
|
||||
/// \ingroup ta_generic
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015 Laboratoire de
|
||||
// Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 Laboratoire de
|
||||
// Recherche et Développement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -160,9 +160,7 @@ namespace spot
|
|||
|
||||
// * h: a hash of all visited nodes, with their order,
|
||||
// (it is called "Hash" in Couvreur's paper)
|
||||
typedef std::unordered_map<const state*, int,
|
||||
state_ptr_hash, state_ptr_equal> hash_type;
|
||||
hash_type h; ///< Heap of visited states.
|
||||
state_map<int> h; ///< Heap of visited states.
|
||||
|
||||
// * num: the number of visited nodes. Used to set the order of each
|
||||
// visited node,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue