c++11: replace Sgi::hash_* by Sgi::unordered_*.

* bench/scc-stats/stats.cc, bench/split-product/cutscc.cc,
iface/gspn/ssp.cc, src/bin/ltlcross.cc, src/bin/ltlfilt.cc,
src/bin/randltl.cc, src/dstarparse/nsa2tgba.cc, src/ltlast/formula.hh,
src/ltlast/nfa.hh, src/ltlvisit/contain.hh, src/ltlvisit/dotty.cc,
src/ltlvisit/mark.hh, src/ltlvisit/relabel.cc, src/ltlvisit/relabel.hh,
src/ltlvisit/simplify.cc, src/ltlvisit/snf.hh, src/misc/hash.hh,
src/misc/mspool.hh, src/priv/acccompl.hh, src/priv/accconv.hh,
src/saba/explicitstateconjunction.hh, src/saba/sabastate.hh,
src/sabaalgos/sabareachiter.hh, src/sanity/style.test,
src/ta/taexplicit.cc, src/ta/taexplicit.hh, src/taalgos/emptinessta.cc,
src/taalgos/minimize.cc, src/taalgos/reachiter.hh, src/tgba/state.hh,
src/tgba/taatgba.hh, src/tgba/tgbabddconcretefactory.hh,
src/tgba/tgbaexplicit.hh, src/tgba/tgbakvcomplement.cc,
src/tgba/tgbasafracomplement.cc, src/tgba/tgbatba.cc,
src/tgba/tgbatba.hh, src/tgbaalgos/cutscc.cc, src/tgbaalgos/cycles.hh,
src/tgbaalgos/degen.cc, src/tgbaalgos/dtbasat.cc,
src/tgbaalgos/dtgbasat.cc, src/tgbaalgos/eltl2tgba_lacim.cc,
src/tgbaalgos/emptiness.cc, src/tgbaalgos/gtec/explscc.hh,
src/tgbaalgos/gtec/nsheap.hh, src/tgbaalgos/gv04.cc,
src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/magic.cc,
src/tgbaalgos/minimize.cc, src/tgbaalgos/ndfs_result.hxx,
src/tgbaalgos/powerset.hh, src/tgbaalgos/randomgraph.cc,
src/tgbaalgos/reachiter.hh, src/tgbaalgos/replayrun.cc,
src/tgbaalgos/safety.cc, src/tgbaalgos/scc.hh, src/tgbaalgos/se05.cc,
src/tgbaalgos/simulation.cc, src/tgbaalgos/tau03.cc,
src/tgbaalgos/tau03opt.cc: Adjust code.
* src/sanity/style.test: Remove check.
This commit is contained in:
Alexandre Duret-Lutz 2013-12-15 23:26:25 +01:00
parent c568b4d337
commit 34e91b7656
61 changed files with 284 additions and 271 deletions

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2009, 2010, 2012 Laboratoire de Recherche et // Copyright (C) 2009, 2010, 2012, 2013 Laboratoire de Recherche et
// Développement de l'Epita (LRDE). // Développement de l'Epita (LRDE).
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
@ -28,7 +28,7 @@ namespace spot
{ {
unsigned tgba_size(const tgba* a) unsigned tgba_size(const tgba* a)
{ {
typedef Sgi::hash_set<const state*, typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> hash_type; state_ptr_hash, state_ptr_equal> hash_type;
hash_type seen; hash_type seen;
std::queue<state*> tovisit; std::queue<state*> tovisit;

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2009, 2010, 2012 Laboratoire de Recherche et // Copyright (C) 2009, 2010, 2012, 2013 Laboratoire de Recherche et
// Développement de l'Epita (LRDE). // Développement de l'Epita (LRDE).
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
@ -38,7 +38,7 @@ namespace spot
{ {
unsigned tgba_size(const tgba* a) unsigned tgba_size(const tgba* a)
{ {
typedef Sgi::hash_set<const state*, typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> hash_type; state_ptr_hash, state_ptr_equal> hash_type;
hash_type seen; hash_type seen;
std::queue<state*> tovisit; std::queue<state*> tovisit;

View file

@ -1,8 +1,9 @@
// Copyright (C) 2008, 2011 Laboratoire de Recherche et Developpement // -*- coding: utf-8 -*-
// de l'Epita (LRDE). // Copyright (C) 2008, 2011, 2013 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// Copyright (C) 2003, 2004, 2005, 2006, 2007 Laboratoire // Copyright (C) 2003, 2004, 2005, 2006, 2007 Laboratoire
// d'Informatique de Paris 6 (LIP6), département Systèmes Répartis // d'Informatique de Paris 6 (LIP6), département Systèmes Répartis
// Coopératifs (SRC), Université Pierre et Marie Curie. // Coopératifs (SRC), Université Pierre et Marie Curie.
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
// //
@ -610,7 +611,7 @@ namespace spot
} }
protected: protected:
typedef Sgi::hash_set<const state*, typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> set_type; state_ptr_hash, state_ptr_equal> set_type;
set_type states; set_type states;
}; };
@ -895,14 +896,14 @@ namespace spot
virtual numbered_state_heap_const_iterator* iterator() const; virtual numbered_state_heap_const_iterator* iterator() const;
protected: protected:
typedef Sgi::hash_map<const state*, int, typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> hash_type; state_ptr_hash, state_ptr_equal> hash_type;
hash_type h; ///< Map of visited states. hash_type h; ///< Map of visited states.
typedef std::list<const state*> state_list; typedef std::list<const state*> state_list;
typedef Sgi::hash_map<const state*, state_list, typedef std::unordered_map<const state*, state_list,
state_ptr_hash, state_ptr_equal> f_map; state_ptr_hash, state_ptr_equal> f_map;
typedef Sgi::hash_map<const void*, f_map, typedef std::unordered_map<const void*, f_map,
ptr_hash<void> > contained_map; ptr_hash<void> > contained_map;
contained_map contained; contained_map contained;

View file

@ -1190,7 +1190,7 @@ namespace
} }
typedef typedef
Sgi::hash_set<const spot::ltl::formula*, std::unordered_set<const spot::ltl::formula*,
const spot::ptr_hash<const spot::ltl::formula> > fset_t; const spot::ptr_hash<const spot::ltl::formula> > fset_t;

View file

@ -385,7 +385,8 @@ parse_opt(int key, char* arg, struct argp_state*)
return 0; return 0;
} }
typedef Sgi::hash_set<const spot::ltl::formula*, typedef
std::unordered_set<const spot::ltl::formula*,
const spot::ptr_hash<const spot::ltl::formula>> fset_t; const spot::ptr_hash<const spot::ltl::formula>> fset_t;
namespace namespace

View file

@ -344,7 +344,8 @@ main(int argc, char** argv)
error(2, 0, "No atomic proposition supplied? Run '%s --help' for usage.", error(2, 0, "No atomic proposition supplied? Run '%s --help' for usage.",
program_name); program_name);
typedef Sgi::hash_set<const spot::ltl::formula*, typedef
std::unordered_set<const spot::ltl::formula*,
const spot::ptr_hash<const spot::ltl::formula>> fset_t; const spot::ptr_hash<const spot::ltl::formula>> fset_t;
fset_t unique_set; fset_t unique_set;

View file

@ -90,7 +90,7 @@ namespace spot
}; };
// Associate the build state to its number. // Associate the build state to its number.
typedef Sgi::hash_map<build_state, int, typedef std::unordered_map<build_state, int,
build_state_hash, build_state_equal> bs2num_map; build_state_hash, build_state_equal> bs2num_map;
// Queue of state to be processed. // Queue of state to be processed.

View file

@ -497,13 +497,13 @@ namespace spot
/// \brief Hash Function for <code>const formula*</code>. /// \brief Hash Function for <code>const formula*</code>.
/// ///
/// This is meant to be used as a hash functor for /// This is meant to be used as a hash functor for
/// Sgi's \c hash_map whose key are of type <code>const formula*</code>. /// \c unordered_map whose key are of type <code>const formula*</code>.
/// ///
/// For instance here is how one could declare /// For instance here is how one could declare
/// a map of \c const::formula*. /// a map of \c const::formula*.
/// \code /// \code
/// // Remember how many times each formula has been seen. /// // Remember how many times each formula has been seen.
/// Sgi::hash_map<const spot::ltl::formula*, int, /// std::unordered_map<const spot::ltl::formula*, int,
/// const spot::ltl::formula_ptr_hash> seen; /// const spot::ltl::formula_ptr_hash> seen;
/// \endcode /// \endcode
struct formula_ptr_hash: struct formula_ptr_hash:

View file

@ -102,8 +102,8 @@ namespace spot
private: private:
state* add_state(int name); state* add_state(int name);
typedef Sgi::hash_map<int, state*, Sgi::hash<int> > is_map; typedef std::unordered_map<int, state*, std::hash<int>> is_map;
typedef Sgi::hash_map<const state*, int, ptr_hash<state> > si_map; typedef std::unordered_map<const state*, int, ptr_hash<state>> si_map;
is_map is_; is_map is_;
si_map si_; si_map si_;

View file

@ -41,7 +41,7 @@ namespace spot
typedef std::map<const record_*, bool> incomp_map; typedef std::map<const record_*, bool> incomp_map;
incomp_map incompatible; incomp_map incompatible;
}; };
typedef Sgi::hash_map<const formula*, typedef std::unordered_map<const formula*,
record_, formula_ptr_hash> trans_map; record_, formula_ptr_hash> trans_map;
public: public:
/// This class uses spot::ltl_to_tgba_fm to translate LTL /// This class uses spot::ltl_to_tgba_fm to translate LTL

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2009, 2010, 2011, 2012 Laboratoire de Recherche et // Copyright (C) 2009, 2010, 2011, 2012, 2013 Laboratoire de Recherche et
// Développement de l'Epita (LRDE). // Développement de l'Epita (LRDE).
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 // Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6
// (LIP6), département Systèmes Répartis Coopératifs (SRC), Université // (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
@ -36,7 +36,7 @@ namespace spot
class dotty_visitor: public visitor class dotty_visitor: public visitor
{ {
public: public:
typedef Sgi::hash_map<const formula*, int, ptr_hash<formula> > map; typedef std::unordered_map<const formula*, int, ptr_hash<formula>> map;
dotty_visitor(std::ostream& os, map& m) dotty_visitor(std::ostream& os, map& m)
: os_(os), father_(-1), node_(m), sinks_(new std::ostringstream) : os_(os), father_(-1), node_(m), sinks_(new std::ostringstream)
{ {

View file

@ -1,5 +1,6 @@
// Copyright (C) 2010, 2011, 2012 Laboratoire de Recherche et // -*- coding: utf-8 -*-
// Développement de l'Epita (LRDE). // Copyright (C) 2010, 2011, 2012, 2013 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
// //
@ -42,7 +43,7 @@ namespace spot
~mark_tools(); ~mark_tools();
private: private:
typedef Sgi::hash_map<const formula*, const formula*, typedef std::unordered_map<const formula*, const formula*,
ptr_hash<formula>> f2f_map; ptr_hash<formula>> f2f_map;
f2f_map simpmark_; f2f_map simpmark_;
f2f_map markops_; f2f_map markops_;

View file

@ -91,7 +91,7 @@ namespace spot
class relabeler: public clone_visitor class relabeler: public clone_visitor
{ {
public: public:
typedef Sgi::hash_map<const formula*, const formula*, typedef std::unordered_map<const formula*, const formula*,
ptr_hash<formula> > map; ptr_hash<formula> > map;
map newname; map newname;
ap_generator* gen; ap_generator* gen;
@ -363,7 +363,7 @@ namespace spot
unsigned num; // serial number, in pre-order unsigned num; // serial number, in pre-order
unsigned low; // lowest number accessible via unstacked descendants unsigned low; // lowest number accessible via unstacked descendants
}; };
typedef Sgi::hash_map<const formula*, data_entry, typedef std::unordered_map<const formula*, data_entry,
const formula_ptr_hash> fmap_t; const formula_ptr_hash> fmap_t;
struct stack_entry struct stack_entry
{ {

View file

@ -30,7 +30,7 @@ namespace spot
enum relabeling_style { Abc, Pnn }; enum relabeling_style { Abc, Pnn };
struct relabeling_map: public Sgi::hash_map<const formula*, struct relabeling_map: public std::unordered_map<const formula*,
const formula*, const formula*,
ptr_hash<formula>> ptr_hash<formula>>
{ {

View file

@ -44,9 +44,9 @@ namespace spot
// The name of this class is public, but not its contents. // The name of this class is public, but not its contents.
class ltl_simplifier_cache class ltl_simplifier_cache
{ {
typedef Sgi::hash_map<const formula*, const formula*, typedef std::unordered_map<const formula*, const formula*,
ptr_hash<formula>> f2f_map; ptr_hash<formula>> f2f_map;
typedef Sgi::hash_map<const formula*, bdd, typedef std::unordered_map<const formula*, bdd,
ptr_hash<formula>> f2b_map; ptr_hash<formula>> f2b_map;
typedef std::pair<const formula*, const formula*> pairf; typedef std::pair<const formula*, const formula*> pairf;
typedef std::map<pairf, bool> syntimpl_cache_t; typedef std::map<pairf, bool> syntimpl_cache_t;
@ -2857,9 +2857,9 @@ namespace spot
// a & (b | X(b M a)) = b M a // a & (b | X(b M a)) = b M a
if (!mo->is_X_free()) if (!mo->is_X_free())
{ {
typedef Sgi::hash_set<const formula*, typedef std::unordered_set<const formula*,
ptr_hash<formula>> fset_t; ptr_hash<formula>> fset_t;
typedef Sgi::hash_map<const formula*, typedef std::unordered_map<const formula*,
std::set<unsigned>, std::set<unsigned>,
ptr_hash<formula>> fmap_t; ptr_hash<formula>> fmap_t;
fset_t xgset; // XG(...) fset_t xgset; // XG(...)
@ -3131,7 +3131,7 @@ namespace spot
// F(a) & (a M b) = a M b // F(a) & (a M b) = a M b
// F(b) & (a W b) = a U b // F(b) & (a W b) = a U b
// F(b) & (a U b) = a U b // F(b) & (a U b) = a U b
typedef Sgi::hash_map<const formula*, typedef std::unordered_map<const formula*,
multop::vec::iterator, multop::vec::iterator,
ptr_hash<formula>> fmap_t; ptr_hash<formula>> fmap_t;
fmap_t uwmap; // associates "b" to "a U b" or "a W b" fmap_t uwmap; // associates "b" to "a U b" or "a W b"
@ -3606,9 +3606,9 @@ namespace spot
// a | (b & X(b U a)) = b U a // a | (b & X(b U a)) = b U a
if (!mo->is_X_free()) if (!mo->is_X_free())
{ {
typedef Sgi::hash_set<const formula*, typedef std::unordered_set<const formula*,
ptr_hash<formula>> fset_t; ptr_hash<formula>> fset_t;
typedef Sgi::hash_map<const formula*, typedef std::unordered_map<const formula*,
std::set<unsigned>, std::set<unsigned>,
ptr_hash<formula>> fmap_t; ptr_hash<formula>> fmap_t;
fset_t xfset; // XF(...) fset_t xfset; // XF(...)
@ -3922,7 +3922,7 @@ namespace spot
// G(a) | (a W b) = a W b // G(a) | (a W b) = a W b
// G(b) | (a R b) = a R b. // G(b) | (a R b) = a R b.
// G(b) | (a M b) = a R b. // G(b) | (a M b) = a R b.
typedef Sgi::hash_map<const formula*, typedef std::unordered_map<const formula*,
multop::vec::iterator, multop::vec::iterator,
ptr_hash<formula>> fmap_t; ptr_hash<formula>> fmap_t;
fmap_t uwmap; // associates "a" to "a U b" or "a W b" fmap_t uwmap; // associates "a" to "a U b" or "a W b"

View file

@ -28,7 +28,7 @@ namespace spot
namespace ltl namespace ltl
{ {
typedef Sgi::hash_map<const formula*, const formula*, typedef std::unordered_map<const formula*, const formula*,
ptr_hash<formula>> snf_cache; ptr_hash<formula>> snf_cache;
/// Helper to rewrite a sere in Star Normal Form. /// Helper to rewrite a sere in Star Normal Form.

View file

@ -30,10 +30,6 @@
# include <unordered_map> # include <unordered_map>
# include <unordered_set> # include <unordered_set>
namespace Sgi = std;
# define hash_map unordered_map
# define hash_multimap unordered_multimap
# define hash_set unordered_set
namespace spot namespace spot
{ {
@ -60,7 +56,7 @@ namespace spot
/// \ingroup hash_funcs /// \ingroup hash_funcs
/// \brief A hash function for strings. /// \brief A hash function for strings.
typedef Sgi::hash<std::string> string_hash; typedef std::hash<std::string> string_hash;
/// \ingroup hash_funcs /// \ingroup hash_funcs
/// \brief A hash function that returns identity /// \brief A hash function that returns identity

View file

@ -1,5 +1,6 @@
// Copyright (C) 2011 Laboratoire de Recherche et Developpement de // -*- coding: utf-8 -*-
// l'Epita (LRDE) // Copyright (C) 2011, 2013 Laboratoire de Recherche et Developpement
// de l'Epita (LRDE)
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
// //
@ -117,7 +118,7 @@ namespace spot
private: private:
struct block_ { block_* next; }; struct block_ { block_* next; };
Sgi::hash_map<size_t, block_*> freelist_; std::unordered_map<size_t, block_*> freelist_;
char* free_start_; char* free_start_;
char* free_end_; char* free_end_;
// chunk = several agglomerated blocks // chunk = several agglomerated blocks

View file

@ -48,7 +48,7 @@ namespace spot
protected: protected:
const bdd all_; const bdd all_;
const bdd neg_; const bdd neg_;
typedef Sgi::hash_map<bdd, bdd, bdd_hash> bdd_cache_t; typedef std::unordered_map<bdd, bdd, bdd_hash> bdd_cache_t;
bdd_cache_t cache_; bdd_cache_t cache_;
}; };
} // End namespace Spot } // End namespace Spot

View file

@ -41,7 +41,7 @@ namespace spot
protected: protected:
bdd allneg_; bdd allneg_;
typedef Sgi::hash_map<bdd, bdd, bdd_hash> bdd_cache_t; typedef std::unordered_map<bdd, bdd, bdd_hash> bdd_cache_t;
bdd_cache_t pos_prod_cache_; bdd_cache_t pos_prod_cache_;
bdd_cache_t full_prod_cache_; bdd_cache_t full_prod_cache_;
}; };

View file

@ -66,9 +66,9 @@ namespace spot
/// The class becomes owner of \a state. /// The class becomes owner of \a state.
void add(saba_state* state); void add(saba_state* state);
private: private:
typedef Sgi::hash_set<shared_saba_state, typedef std::unordered_set<shared_saba_state,
spot::saba_state_shared_ptr_hash, saba_state_shared_ptr_hash,
spot::saba_state_shared_ptr_equal> saba_state_set_t; saba_state_shared_ptr_equal> saba_state_set_t;
saba_state_set_t set_; saba_state_set_t set_;
saba_state_set_t::iterator it_; saba_state_set_t::iterator it_;
}; };

View file

@ -52,9 +52,10 @@ namespace spot
/// ///
/// Note that the hash value is guaranteed to be unique for all /// Note that the hash value is guaranteed to be unique for all
/// equal states (in compare()'s sense) for only has long has one /// equal states (in compare()'s sense) for only has long has one
/// of these states exists. So it's OK to use a spot::saba_state as a /// of these states exists. So it's OK to use a spot::saba_state
/// key in a \c hash_map because the mere use of the state as a /// as a key in an \c unordered_map because the mere use of the
/// key in the hash will ensure the state continues to exist. /// state as a key in the hash will ensure the state continues to
/// exist.
/// ///
/// However if you create the state, get its hash key, delete the /// However if you create the state, get its hash key, delete the
/// state, recreate the same state, and get its hash key, you may /// state, recreate the same state, and get its hash key, you may
@ -63,7 +64,7 @@ namespace spot
/// occur only when the state is BDD-encoded, because BDD numbers /// occur only when the state is BDD-encoded, because BDD numbers
/// (used to build the hash value) can be reused for other /// (used to build the hash value) can be reused for other
/// formulas. That probably doesn't matter, since the hash value /// formulas. That probably doesn't matter, since the hash value
/// is meant to be used in a \c hash_map, but it had to be noted. /// is meant to be used in an \c unordered_map, but it had to be noted.
virtual size_t hash() const = 0; virtual size_t hash() const = 0;
/// Duplicate a state. /// Duplicate a state.
@ -107,13 +108,13 @@ namespace spot
/// \brief An Equivalence Relation for \c saba_state*. /// \brief An Equivalence Relation for \c saba_state*.
/// ///
/// This is meant to be used as a comparison functor for /// This is meant to be used as a comparison functor for
/// Sgi \c hash_map whose key are of type \c saba_state*. /// \c unordered_map whose keys are of type \c saba_state*.
/// ///
/// For instance here is how one could declare /// For instance here is how one could declare
/// a map of \c saba_state*. /// a map of \c saba_state*.
/// \code /// \code
/// // Remember how many times each state has been visited. /// // Remember how many times each state has been visited.
/// Sgi::hash_map<spot::saba_state*, int, spot::saba_state_ptr_hash, /// std::unordered_map<spot::saba_state*, int, spot::saba_state_ptr_hash,
/// spot::saba_state_ptr_equal> seen; /// spot::saba_state_ptr_equal> seen;
/// \endcode /// \endcode
struct saba_state_ptr_equal: struct saba_state_ptr_equal:
@ -132,13 +133,13 @@ namespace spot
/// \brief Hash Function for \c saba_state*. /// \brief Hash Function for \c saba_state*.
/// ///
/// This is meant to be used as a hash functor for /// This is meant to be used as a hash functor for
/// Sgi's \c hash_map whose key are of type \c saba_state*. /// an \c unordered_map whose keys are of type \c saba_state*.
/// ///
/// For instance here is how one could declare /// For instance here is how one could declare
/// a map of \c saba_state*. /// a map of \c saba_state*.
/// \code /// \code
/// // Remember how many times each state has been visited. /// // Remember how many times each state has been visited.
/// Sgi::hash_map<spot::saba_state*, int, spot::saba_state_ptr_hash, /// std::unordered_map<spot::saba_state*, int, spot::saba_state_ptr_hash,
/// spot::saba_state_ptr_equal> seen; /// spot::saba_state_ptr_equal> seen;
/// \endcode /// \endcode
struct saba_state_ptr_hash: struct saba_state_ptr_hash:
@ -162,7 +163,7 @@ namespace spot
/// (shared_ptr<const saba_state*>). /// (shared_ptr<const saba_state*>).
/// ///
/// This is meant to be used as a comparison functor for /// This is meant to be used as a comparison functor for
/// STL \c map whose key are of type \c shared_saba_state. /// STL \c map whose keys are of type \c shared_saba_state.
/// ///
/// For instance here is how one could declare /// For instance here is how one could declare
/// a map of \c shared_saba_state. /// a map of \c shared_saba_state.
@ -189,15 +190,15 @@ namespace spot
/// (shared_ptr<const saba_state*>). /// (shared_ptr<const saba_state*>).
/// ///
/// This is meant to be used as a comparison functor for /// This is meant to be used as a comparison functor for
/// Sgi \c hash_map whose key are of type \c shared_saba_state. /// an \c unordred_map whose keys are of type \c shared_saba_state.
/// ///
/// For instance here is how one could declare /// For instance here is how one could declare
/// a map of \c shared_saba_state /// a map of \c shared_saba_state
/// \code /// \code
/// // Remember how many times each state has been visited. /// // Remember how many times each state has been visited.
/// Sgi::hash_map<shared_saba_state, int, /// std::unordered_map<shared_saba_state, int,
/// spot::saba_state_shared_ptr_hash, /// saba_state_shared_ptr_hash,
/// spot::saba_state_shared_ptr_equal> seen; /// saba_state_shared_ptr_equal> seen;
/// \endcode /// \endcode
struct saba_state_shared_ptr_equal: struct saba_state_shared_ptr_equal:
public std::binary_function<shared_saba_state, public std::binary_function<shared_saba_state,
@ -218,16 +219,16 @@ namespace spot
/// (shared_ptr<const saba_state*>). /// (shared_ptr<const saba_state*>).
/// ///
/// This is meant to be used as a hash functor for /// This is meant to be used as a hash functor for
/// Sgi's \c hash_map whose key are of type /// \c unordered_map whose key are of type
/// \c shared_saba_state. /// \c shared_saba_state.
/// ///
/// For instance here is how one could declare /// For instance here is how one could declare
/// a map of \c shared_saba_state. /// a map of \c shared_saba_state.
/// \code /// \code
/// // Remember how many times each state has been visited. /// // Remember how many times each state has been visited.
/// Sgi::hash_map<shared_saba_state, int, /// std::unordered_map<shared_saba_state, int,
/// spot::saba_state_shared_ptr_hash, /// saba_state_shared_ptr_hash,
/// spot::saba_state_shared_ptr_equal> seen; /// saba_state_shared_ptr_equal> seen;
/// \endcode /// \endcode
struct saba_state_shared_ptr_hash: struct saba_state_shared_ptr_hash:
public std::unary_function<shared_saba_state, size_t> public std::unary_function<shared_saba_state, size_t>

View file

@ -108,7 +108,8 @@ namespace spot
protected: protected:
const saba* automata_; ///< The spot::saba to explore. const saba* automata_; ///< The spot::saba to explore.
typedef Sgi::hash_map<const saba_state*, int, typedef
std::unordered_map<const saba_state*, int,
saba_state_ptr_hash, saba_state_ptr_equal> seen_map; saba_state_ptr_hash, saba_state_ptr_equal> seen_map;
seen_map seen; ///< States already seen. seen_map seen; ///< States already seen.
}; };

View file

@ -238,12 +238,6 @@ for dir in "${INCDIR-..}" "${INCDIR-..}"/../iface; do
grep '[^a-zA-Z0-9_](\*[a-zA-Z0-9_]*)\.' $tmp && grep '[^a-zA-Z0-9_](\*[a-zA-Z0-9_]*)\.' $tmp &&
diag 'Use "x->y", not "(*x).y"' diag 'Use "x->y", not "(*x).y"'
grep 'std::hash' $tmp &&
diag 'use Sgi:: for hash and hash_map'
grep 'Sgi::[^h]' $tmp &&
diag 'Sgi:: is for hash and hash_map only'
egrep 'bdd_(false|true)[ ]*\(' $tmp && egrep 'bdd_(false|true)[ ]*\(' $tmp &&
diag 'Use bddfalse and bddtrue instead of bdd_false() and bdd_true()' diag 'Use bddfalse and bddtrue instead of bdd_false() and bdd_true()'

View file

@ -116,7 +116,7 @@ namespace spot
state_ta_explicit::get_transitions(bdd condition) const state_ta_explicit::get_transitions(bdd condition) const
{ {
Sgi::hash_map<int, transitions*, Sgi::hash<int> >::const_iterator i = std::unordered_map<int, transitions*, std::hash<int> >::const_iterator i =
transitions_by_condition.find(condition.id()); transitions_by_condition.find(condition.id());
if (i == transitions_by_condition.end()) if (i == transitions_by_condition.end())
@ -334,7 +334,7 @@ namespace spot
} }
delete trans; delete trans;
Sgi::hash_map<int, transitions*, Sgi::hash<int> >::iterator i = std::unordered_map<int, transitions*, std::hash<int> >::iterator i =
transitions_by_condition.begin(); transitions_by_condition.begin();
while (i != transitions_by_condition.end()) while (i != transitions_by_condition.end())
{ {

View file

@ -236,7 +236,8 @@ namespace spot
bool is_accepting_state_; bool is_accepting_state_;
bool is_livelock_accepting_state_; bool is_livelock_accepting_state_;
transitions* transitions_; transitions* transitions_;
Sgi::hash_map<int, transitions*, Sgi::hash<int> > transitions_by_condition; std::unordered_map<int, transitions*, std::hash<int>>
transitions_by_condition;
#endif // !SWIG #endif // !SWIG
}; };

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2010, 2011, 2012 Laboratoire de Recherche et // Copyright (C) 2010, 2011, 2012, 2013 Laboratoire de Recherche et
// Développement de l'Epita (LRDE). // Développement de l'Epita (LRDE).
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
@ -72,13 +72,14 @@ namespace spot
// it is also used as a key in H. // it is also used as a key in H.
std::stack<pair_state_iter> todo; std::stack<pair_state_iter> todo;
Sgi::hash_map<const state*, std::string, state_ptr_hash, state_ptr_equal> std::unordered_map<const state*, std::string,
colour; state_ptr_hash, state_ptr_equal> colour;
trace trace
<< "PASS 1" << std::endl; << "PASS 1" << std::endl;
Sgi::hash_map<const state*, std::set<const state*, state_ptr_less_than>, std::unordered_map<const state*,
std::set<const state*, state_ptr_less_than>,
state_ptr_hash, state_ptr_equal> liveset; state_ptr_hash, state_ptr_equal> liveset;
std::stack<spot::state*> livelock_roots; std::stack<spot::state*> livelock_roots;

View file

@ -40,9 +40,10 @@
namespace spot namespace spot
{ {
typedef Sgi::hash_set<const state*, state_ptr_hash, state_ptr_equal> hash_set; typedef std::unordered_set<const state*,
typedef Sgi::hash_map<const state*, unsigned, state_ptr_hash, state_ptr_equal> state_ptr_hash, state_ptr_equal> hash_set;
hash_map; typedef std::unordered_map<const state*, unsigned,
state_ptr_hash, state_ptr_equal> hash_map;
typedef std::list<hash_set*> partition_t; typedef std::list<hash_set*> partition_t;
namespace namespace

View file

@ -89,8 +89,8 @@ namespace spot
const ta* t_automata_; ///< The spot::ta to explore. const ta* t_automata_; ///< The spot::ta to explore.
typedef Sgi::hash_map<const state*, int, state_ptr_hash, state_ptr_equal> typedef std::unordered_map<const state*, int,
seen_map; state_ptr_hash, state_ptr_equal> seen_map;
seen_map seen; ///< States already seen. seen_map seen; ///< States already seen.
}; };

View file

@ -127,13 +127,13 @@ namespace spot
/// \brief An Equivalence Relation for \c state*. /// \brief An Equivalence Relation for \c state*.
/// ///
/// This is meant to be used as a comparison functor for /// This is meant to be used as a comparison functor for
/// Sgi \c hash_map whose key are of type \c state*. /// an \c unordered_map whose key are of type \c state*.
/// ///
/// For instance here is how one could declare /// For instance here is how one could declare
/// a map of \c state*. /// a map of \c state*.
/// \code /// \code
/// // Remember how many times each state has been visited. /// // Remember how many times each state has been visited.
/// Sgi::hash_map<spot::state*, int, spot::state_ptr_hash, /// std::unordered_map<spot::state*, int, spot::state_ptr_hash,
/// spot::state_ptr_equal> seen; /// spot::state_ptr_equal> seen;
/// \endcode /// \endcode
struct state_ptr_equal: struct state_ptr_equal:
@ -152,13 +152,13 @@ namespace spot
/// \brief Hash Function for \c state*. /// \brief Hash Function for \c state*.
/// ///
/// This is meant to be used as a hash functor for /// This is meant to be used as a hash functor for
/// Sgi's \c hash_map whose key are of type \c state*. /// an \c unordered_map whose key are of type \c state*.
/// ///
/// For instance here is how one could declare /// For instance here is how one could declare
/// a map of \c state*. /// a map of \c state*.
/// \code /// \code
/// // Remember how many times each state has been visited. /// // Remember how many times each state has been visited.
/// Sgi::hash_map<spot::state*, int, spot::state_ptr_hash, /// std::unordered_map<spot::state*, int, spot::state_ptr_hash,
/// spot::state_ptr_equal> seen; /// spot::state_ptr_equal> seen;
/// \endcode /// \endcode
struct state_ptr_hash: struct state_ptr_hash:
@ -172,9 +172,8 @@ namespace spot
} }
}; };
typedef Sgi::hash_set<const state*, typedef std::unordered_set<const state*,
spot::state_ptr_hash, state_ptr_hash, state_ptr_equal> state_set;
spot::state_ptr_equal> state_set;
// Functions related to shared_ptr. // Functions related to shared_ptr.
@ -215,15 +214,15 @@ namespace spot
/// (shared_ptr<const state*>). /// (shared_ptr<const state*>).
/// ///
/// This is meant to be used as a comparison functor for /// This is meant to be used as a comparison functor for
/// Sgi \c hash_map whose key are of type \c shared_state. /// un \c unordered_map whose key are of type \c shared_state.
/// ///
/// For instance here is how one could declare /// For instance here is how one could declare
/// a map of \c shared_state /// a map of \c shared_state
/// \code /// \code
/// // Remember how many times each state has been visited. /// // Remember how many times each state has been visited.
/// Sgi::hash_map<shared_state, int, /// std::unordered_map<shared_state, int,
/// spot::state_shared_ptr_hash, /// state_shared_ptr_hash,
/// spot::state_shared_ptr_equal> seen; /// state_shared_ptr_equal> seen;
/// \endcode /// \endcode
struct state_shared_ptr_equal: struct state_shared_ptr_equal:
public std::binary_function<shared_state, public std::binary_function<shared_state,
@ -243,16 +242,16 @@ namespace spot
/// \brief Hash Function for \c shared_state (shared_ptr<const state*>). /// \brief Hash Function for \c shared_state (shared_ptr<const state*>).
/// ///
/// This is meant to be used as a hash functor for /// This is meant to be used as a hash functor for
/// Sgi's \c hash_map whose key are of type /// an \c unordered_map whose key are of type
/// \c shared_state. /// \c shared_state.
/// ///
/// For instance here is how one could declare /// For instance here is how one could declare
/// a map of \c shared_state. /// a map of \c shared_state.
/// \code /// \code
/// // Remember how many times each state has been visited. /// // Remember how many times each state has been visited.
/// Sgi::hash_map<shared_state, int, /// std::unordered_map<shared_state, int,
/// spot::state_shared_ptr_hash, /// state_shared_ptr_hash,
/// spot::state_shared_ptr_equal> seen; /// state_shared_ptr_equal> seen;
/// \endcode /// \endcode
struct state_shared_ptr_hash: struct state_shared_ptr_hash:
public std::unary_function<shared_state, size_t> public std::unary_function<shared_state, size_t>
@ -265,7 +264,7 @@ namespace spot
} }
}; };
typedef Sgi::hash_set<shared_state, typedef std::unordered_set<shared_state,
state_shared_ptr_hash, state_shared_ptr_hash,
state_shared_ptr_equal> shared_state_set; state_shared_ptr_equal> shared_state_set;

View file

@ -127,8 +127,8 @@ namespace spot
typedef taa_tgba::state::const_iterator iterator; typedef taa_tgba::state::const_iterator iterator;
typedef std::pair<iterator, iterator> iterator_pair; typedef std::pair<iterator, iterator> iterator_pair;
typedef std::vector<iterator_pair> bounds_t; typedef std::vector<iterator_pair> bounds_t;
typedef Sgi::hash_map< typedef std::unordered_map<const spot::set_state*,
const spot::set_state*, std::vector<taa_tgba::transition*>, std::vector<taa_tgba::transition*>,
state_ptr_hash, state_ptr_equal> seen_map; state_ptr_hash, state_ptr_equal> seen_map;
struct distance_sort : struct distance_sort :
@ -252,12 +252,10 @@ namespace spot
protected: protected:
typedef label label_t; typedef label label_t;
typedef Sgi::hash_map< typedef std::unordered_map<const label, taa_tgba::state*,
const label, taa_tgba::state*, label_hash label_hash> ns_map;
> ns_map; typedef std::unordered_map<const taa_tgba::state*, label,
typedef Sgi::hash_map< ptr_hash<taa_tgba::state>> sn_map;
const taa_tgba::state*, label, ptr_hash<taa_tgba::state>
> sn_map;
ns_map name_state_map_; ns_map name_state_map_;
sn_map state_name_map_; sn_map state_name_map_;

View file

@ -93,7 +93,7 @@ namespace spot
private: private:
tgba_bdd_core_data data_; ///< Core data for the new automata. tgba_bdd_core_data data_; ///< Core data for the new automata.
typedef Sgi::hash_map<const ltl::formula*, bdd, typedef std::unordered_map<const ltl::formula*, bdd,
ltl::formula_ptr_hash> acc_map_; ltl::formula_ptr_hash> acc_map_;
acc_map_ acc_; ///< BDD associated to each acceptance condition acc_map_ acc_; ///< BDD associated to each acceptance condition
}; };

View file

@ -261,9 +261,9 @@ namespace spot
typedef typename State::transition transition; typedef typename State::transition transition;
typedef State state; typedef State state;
protected: protected:
typedef Sgi::hash_map<label_t, State, label_hash_t> ls_map; typedef std::unordered_map<label_t, State, label_hash_t> ls_map;
typedef Sgi::hash_map<label_t, State*, label_hash_t> alias_map; typedef std::unordered_map<label_t, State*, label_hash_t> alias_map;
typedef Sgi::hash_map<const State*, label_t, ptr_hash<State> > sl_map; typedef std::unordered_map<const State*, label_t, ptr_hash<State> > sl_map;
public: public:
@ -397,7 +397,7 @@ namespace spot
{ {
typedef typename transitions_t::iterator trans_t; typedef typename transitions_t::iterator trans_t;
typedef std::map<int, trans_t> acc_map; typedef std::map<int, trans_t> acc_map;
typedef Sgi::hash_map<const spot::state*, acc_map, typedef std::unordered_map<const spot::state*, acc_map,
ptr_hash<spot::state> > dest_map; ptr_hash<spot::state> > dest_map;
typename ls_map::iterator i; typename ls_map::iterator i;

View file

@ -88,7 +88,7 @@ namespace spot
}; };
// typedefs. // typedefs.
typedef Sgi::hash_map<shared_state, rank_t, typedef std::unordered_map<shared_state, rank_t,
state_shared_ptr_hash, state_shared_ptr_hash,
state_shared_ptr_equal> state_rank_map; state_shared_ptr_equal> state_rank_map;

View file

@ -763,7 +763,7 @@ namespace spot
////////////////////////////// //////////////////////////////
namespace test namespace test
{ {
typedef Sgi::hash_map<const state*, int, typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> stnum_t; state_ptr_hash, state_ptr_equal> stnum_t;
void print_safra_tree(const safra_tree* this_node, void print_safra_tree(const safra_tree* this_node,

View file

@ -44,7 +44,7 @@ namespace spot
} }
// Note: There is a default copy constructor, needed by // Note: There is a default copy constructor, needed by
// Sgi::hash_set. It does not clone the state "s", because the // std::unordered_set. It does not clone the state "s", because the
// destructor will not destroy it either. Actually, the states // destructor will not destroy it either. Actually, the states
// are all destroyed in the tgba_tba_proxy destructor. // are all destroyed in the tgba_tba_proxy destructor.
@ -127,7 +127,7 @@ namespace spot
} }
}; };
typedef Sgi::hash_set<state_tba_proxy, typedef std::unordered_set<state_tba_proxy,
state_tba_proxy_hash, state_tba_proxy_hash,
state_tba_proxy_equal> uniq_map_t; state_tba_proxy_equal> uniq_map_t;
@ -382,7 +382,7 @@ namespace spot
protected: protected:
const bdd the_acceptance_cond_; const bdd the_acceptance_cond_;
typedef Sgi::hash_map<state_ptr_bool_t, bdd, typedef std::unordered_map<state_ptr_bool_t, bdd,
state_ptr_bool_hash, state_ptr_bool_hash,
state_ptr_bool_equal> transmap_t; state_ptr_bool_equal> transmap_t;
transmap_t transmap_; transmap_t transmap_;

View file

@ -111,7 +111,7 @@ namespace spot
private: private:
bdd the_acceptance_cond_; bdd the_acceptance_cond_;
typedef Sgi::hash_map<const state*, bdd, typedef std::unordered_map<const state*, bdd,
state_ptr_hash, state_ptr_equal> accmap_t; state_ptr_hash, state_ptr_equal> accmap_t;
mutable accmap_t accmap_; mutable accmap_t accmap_;
mutable accmap_t accmapu_; mutable accmap_t accmapu_;

View file

@ -35,7 +35,7 @@ namespace spot
tgba_explicit_string* sub_a = new tgba_explicit_string(a->get_dict()); tgba_explicit_string* sub_a = new tgba_explicit_string(a->get_dict());
state* cur = a->get_init_state(); state* cur = a->get_init_state();
std::queue<state*> tovisit; std::queue<state*> tovisit;
typedef Sgi::hash_set<const state*, typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> hash_type; state_ptr_hash, state_ptr_equal> hash_type;
// Setup // Setup
hash_type seen; hash_type seen;

View file

@ -79,7 +79,7 @@ namespace spot
class SPOT_API enumerate_cycles class SPOT_API enumerate_cycles
{ {
protected: protected:
typedef Sgi::hash_set<const state*, typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> set_type; state_ptr_hash, state_ptr_equal> set_type;
// Extra information required for the algorithm for each state. // Extra information required for the algorithm for each state.
@ -105,7 +105,7 @@ namespace spot
}; };
// Store the state_info for all visited states. // Store the state_info for all visited states.
typedef Sgi::hash_map<const state*, state_info, typedef std::unordered_map<const state*, state_info,
state_ptr_hash, state_ptr_equal> hash_type; state_ptr_hash, state_ptr_equal> hash_type;
hash_type tags_; hash_type tags_;

View file

@ -60,7 +60,7 @@ namespace spot
}; };
// Associate the degeneralized state to its number. // Associate the degeneralized state to its number.
typedef Sgi::hash_map<degen_state, int, typedef std::unordered_map<degen_state, int,
degen_state_hash, degen_state_equal> ds2num_map; degen_state_hash, degen_state_equal> ds2num_map;
// Queue of state to be processed. // Queue of state to be processed.
@ -69,7 +69,7 @@ namespace spot
// Memory management for the input states. // Memory management for the input states.
class unicity_table class unicity_table
{ {
typedef Sgi::hash_set<const state*, typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> uniq_set; state_ptr_hash, state_ptr_equal> uniq_set;
uniq_set m; uniq_set m;
public: public:
@ -112,7 +112,7 @@ namespace spot
{ {
const tgba* a_; const tgba* a_;
typedef std::pair<bdd, bdd> cache_entry; typedef std::pair<bdd, bdd> cache_entry;
typedef Sgi::hash_map<const state*, cache_entry, typedef std::unordered_map<const state*, cache_entry,
state_ptr_hash, state_ptr_equal> cache_t; state_ptr_hash, state_ptr_equal> cache_t;
cache_t cache_; cache_t cache_;
const scc_map* sm_; const scc_map* sm_;
@ -170,7 +170,7 @@ namespace spot
class has_acc_loop class has_acc_loop
{ {
const tgba* a_; const tgba* a_;
typedef Sgi::hash_map<const state*, bool, typedef std::unordered_map<const state*, bool,
state_ptr_hash, state_ptr_equal> cache_t; state_ptr_hash, state_ptr_equal> cache_t;
cache_t cache_; cache_t cache_;
unicity_table& uniq_; unicity_table& uniq_;

View file

@ -212,9 +212,9 @@ namespace spot
std::map<path, int> pathid_ref; std::map<path, int> pathid_ref;
std::map<path, int> pathid_cand; std::map<path, int> pathid_cand;
int nvars; int nvars;
typedef Sgi::hash_map<const state*, int, typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> state_map; state_ptr_hash, state_ptr_equal> state_map;
typedef Sgi::hash_map<int, const state*> int_map; typedef std::unordered_map<int, const state*> int_map;
state_map state_to_int; state_map state_to_int;
int_map int_to_state; int_map int_to_state;
int cand_size; int cand_size;

View file

@ -260,9 +260,9 @@ namespace spot
std::map<path, int> pathid; std::map<path, int> pathid;
int nvars; int nvars;
typedef Sgi::hash_map<const state*, int, typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> state_map; state_ptr_hash, state_ptr_equal> state_map;
typedef Sgi::hash_map<int, const state*> int_map; typedef std::unordered_map<int, const state*> int_map;
state_map state_to_int; state_map state_to_int;
int_map int_to_state; int_map int_to_state;
int cand_size; int cand_size;

View file

@ -1,5 +1,6 @@
// Copyright (C) 2008, 2009, 2010, 2012 Laboratoire de Recherche et // -*- coding: utf-8 -*-
// Développement de l'Epita (LRDE). // Copyright (C) 2008, 2009, 2010, 2012, 2013 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
// //
@ -221,15 +222,16 @@ namespace spot
bool root_; bool root_;
/// BDD associated to each automatop A representing finish(A). /// BDD associated to each automatop A representing finish(A).
typedef Sgi::hash_map<const ltl::formula*, bdd, typedef std::unordered_map<const ltl::formula*, bdd,
ltl::formula_ptr_hash> finish_map_; ltl::formula_ptr_hash> finish_map_;
finish_map_ finish_; finish_map_ finish_;
// Table containing the two now variables associated with each state. // Table containing the two now variables associated with each state.
// TODO: a little documentation about that. // TODO: a little documentation about that.
typedef Sgi::hash_map< typedef std::unordered_map<const nfa::state*,
const nfa::state*, std::pair<int, int>, ptr_hash<nfa::state> > nmap; std::pair<int, int>,
ptr_hash<nfa::state>> nmap;
std::pair<int, int>& std::pair<int, int>&
recurse_state(const nfa::ptr& nfa, const nfa::state* s, recurse_state(const nfa::ptr& nfa, const nfa::state* s,

View file

@ -1,7 +1,8 @@
// Copyright (C) 2009, 2011, 2012 Laboratoire de Recherche et // -*- coding: utf-8 -*-
// Développement de l'Epita (LRDE). // Copyright (C) 2009, 2011, 2012, 2013 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6), // Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre // département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie. // et Marie Curie.
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
@ -305,7 +306,7 @@ namespace spot
const tgba_run::steps* l; const tgba_run::steps* l;
bdd seen_acc = bddfalse; bdd seen_acc = bddfalse;
typedef Sgi::hash_map<const state*, state_explicit_string*, typedef std::unordered_map<const state*, state_explicit_string*,
state_ptr_hash, state_ptr_equal> state_map; state_ptr_hash, state_ptr_equal> state_map;
state_map seen; state_map seen;

View file

@ -56,7 +56,7 @@ namespace spot
virtual const state* has_state(const state* s) const; virtual const state* has_state(const state* s) const;
virtual void insert(const state* s); virtual void insert(const state* s);
protected: protected:
typedef Sgi::hash_set<const state*, typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> set_type; state_ptr_hash, state_ptr_equal> set_type;
set_type states; set_type states;
}; };

View file

@ -121,7 +121,7 @@ namespace spot
virtual numbered_state_heap_const_iterator* iterator() const; virtual numbered_state_heap_const_iterator* iterator() const;
typedef Sgi::hash_map<const state*, int, typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> hash_type; state_ptr_hash, state_ptr_equal> hash_type;
protected: protected:
hash_type h; ///< Map of visited states. hash_type h; ///< Map of visited states.

View file

@ -1,7 +1,8 @@
// Copyright (C) 2008, 2010, 2011 Laboratoire de recherche et // -*- coding: utf-8 -*-
// développement de l'Epita (LRDE). // Copyright (C) 2008, 2010, 2011, 2013 Laboratoire de recherche et
// développement de l'Epita (LRDE).
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 // Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6
// (LIP6), département Systèmes Répartis Coopératifs (SRC), Université // (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
// Pierre et Marie Curie. // Pierre et Marie Curie.
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
@ -58,7 +59,7 @@ namespace spot
bdd accepting; bdd accepting;
// Map of visited states. // Map of visited states.
typedef Sgi::hash_map<const state*, size_t, typedef std::unordered_map<const state*, size_t,
state_ptr_hash, state_ptr_equal> hash_type; state_ptr_hash, state_ptr_equal> hash_type;
hash_type h; hash_type h;

View file

@ -120,7 +120,7 @@ namespace spot
private: private:
translate_dict& dict_; translate_dict& dict_;
std::vector<tgba_explicit_formula*> automata_; std::vector<tgba_explicit_formula*> automata_;
typedef Sgi::hash_map<const formula*, tgba_explicit_formula*, typedef std::unordered_map<const formula*, tgba_explicit_formula*,
formula_ptr_hash> f2a_t; formula_ptr_hash> f2a_t;
f2a_t f2a_; f2a_t f2a_;
}; };
@ -218,8 +218,9 @@ namespace spot
bool has_marked:1; bool has_marked:1;
}; };
typedef Sgi::hash_map<flagged_formula, translated, flagged_formula_hash> typedef
flagged_formula_to_bdd_map; std::unordered_map<flagged_formula, translated,
flagged_formula_hash> flagged_formula_to_bdd_map;
private: private:
flagged_formula_to_bdd_map ltl_bdd_; flagged_formula_to_bdd_map ltl_bdd_;
@ -1893,7 +1894,8 @@ namespace spot
} }
private: private:
typedef Sgi::hash_map<const formula*, bool, formula_ptr_hash> pfl_map; typedef std::unordered_map<const formula*, bool,
formula_ptr_hash> pfl_map;
pfl_map pfl_; pfl_map pfl_;
}; };
@ -2039,12 +2041,13 @@ namespace spot
// We do this because many formulae (such as `aR(bRc)' and // We do this because many formulae (such as `aR(bRc)' and
// `aR(bRc).(bRc)') are equivalent, and are trivially identified // `aR(bRc).(bRc)') are equivalent, and are trivially identified
// by looking at the set of successors. // by looking at the set of successors.
typedef Sgi::hash_map<bdd, const formula*, bdd_hash> bdd_to_formula_map; typedef std::unordered_map<bdd, const formula*,
bdd_hash> bdd_to_formula_map;
bdd_to_formula_map b2f_; bdd_to_formula_map b2f_;
// Map each formula to its associated bdd. This speed things up when // Map each formula to its associated bdd. This speed things up when
// the same formula is translated several times, which especially // the same formula is translated several times, which especially
// occurs when canonize() is called repeatedly inside exprop. // occurs when canonize() is called repeatedly inside exprop.
typedef Sgi::hash_map<const formula*, translate_dict::translated, typedef std::unordered_map<const formula*, translate_dict::translated,
ptr_hash<formula> > formula_to_bdd_map; ptr_hash<formula> > formula_to_bdd_map;
formula_to_bdd_map f2b_; formula_to_bdd_map f2b_;
@ -2057,7 +2060,8 @@ namespace spot
} }
typedef std::map<bdd, bdd, bdd_less_than> prom_map; typedef std::map<bdd, bdd, bdd_less_than> prom_map;
typedef Sgi::hash_map<const formula*, prom_map, formula_ptr_hash> dest_map; typedef std::unordered_map<const formula*, prom_map,
formula_ptr_hash> dest_map;
static void static void
fill_dests(translate_dict& d, dest_map& dests, bdd label, const formula* dest) fill_dests(translate_dict& d, dest_map& dests, bdd label, const formula* dest)

View file

@ -1,7 +1,8 @@
// Copyright (C) 2011 Laboratoire de recherche et développement de // -*- coding: utf-8 -*-
// Copyright (C) 2011, 2013 Laboratoire de recherche et développement de
// l'Epita (LRDE). // l'Epita (LRDE).
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6), // Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre // département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie. // et Marie Curie.
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
@ -504,7 +505,7 @@ namespace spot
private: private:
typedef Sgi::hash_map<const state*, color, typedef std::unordered_map<const state*, color,
state_ptr_hash, state_ptr_equal> hash_type; state_ptr_hash, state_ptr_equal> hash_type;
hash_type h; hash_type h;
}; };

View file

@ -52,9 +52,9 @@
namespace spot namespace spot
{ {
typedef Sgi::hash_set<const state*, typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> hash_set; state_ptr_hash, state_ptr_equal> hash_set;
typedef Sgi::hash_map<const state*, unsigned, typedef std::unordered_map<const state*, unsigned,
state_ptr_hash, state_ptr_equal> hash_map; state_ptr_hash, state_ptr_equal> hash_map;
namespace namespace

View file

@ -1,7 +1,8 @@
// Copyright (C) 2011 Laboratoire de recherche et développement de // -*- coding: utf-8 -*-
// Copyright (C) 2011, 2013 Laboratoire de recherche et développement de
// l'Epita (LRDE). // l'Epita (LRDE).
// Copyright (C) 2004, 2005, 2006 Laboratoire d'Informatique de Paris 6 (LIP6), // Copyright (C) 2004, 2005, 2006 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre // département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie. // et Marie Curie.
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
@ -226,7 +227,7 @@ namespace spot
}; };
typedef std::list<transition> accepting_transitions_list; typedef std::list<transition> accepting_transitions_list;
typedef Sgi::hash_set<const state*, typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> state_set; state_ptr_hash, state_ptr_equal> state_set;
void clean(stack_type& st1, state_set& seen, state_set& dead) void clean(stack_type& st1, state_set& seen, state_set& dead)
@ -457,8 +458,9 @@ namespace spot
} }
} }
typedef Sgi::hash_multimap<const state*, transition, typedef std::unordered_multimap<const state*, transition,
state_ptr_hash, state_ptr_equal> m_source_trans; state_ptr_hash,
state_ptr_equal> m_source_trans;
template<bool cycle> template<bool cycle>
class min_path: public bfs_steps class min_path: public bfs_steps

View file

@ -34,7 +34,7 @@ namespace spot
{ {
typedef std::set<const state*, state_ptr_less_than> power_state; typedef std::set<const state*, state_ptr_less_than> power_state;
typedef std::map<int, power_state> power_map_data; typedef std::map<int, power_state> power_map_data;
typedef Sgi::hash_set<const state*, state_ptr_hash, typedef std::unordered_set<const state*, state_ptr_hash,
state_ptr_equal> state_set; state_ptr_equal> state_set;
~power_map() ~power_map()

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*- // -*- coding: utf-8 -*-
// Copyright (C) 2008, 2009, 2010, 2012 Laboratoire de Recherche et // Copyright (C) 2008, 2009, 2010, 2012, 2013 Laboratoire de Recherche et
// Développement de l'Epita (LRDE). // Développement de l'Epita (LRDE).
// Copyright (C) 2004, 2005, 2007 Laboratoire d'Informatique de // Copyright (C) 2004, 2005, 2007 Laboratoire d'Informatique de
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC), // Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
@ -126,7 +126,7 @@ namespace spot
*i &= bdd_exist(allneg, *i); *i &= bdd_exist(allneg, *i);
// Using Sgi::hash_set instead of std::set for these sets is 3 // Using std::unordered_set instead of std::set for these sets is 3
// times slower (tested on a 50000 nodes example). Use an int // times slower (tested on a 50000 nodes example). Use an int
// (the index into states[]), not the tgba_explicit::state* // (the index into states[]), not the tgba_explicit::state*
// directly, because the later would yield different graphs // directly, because the later would yield different graphs

View file

@ -91,7 +91,7 @@ namespace spot
protected: protected:
const tgba* aut_; ///< The spot::tgba to explore. const tgba* aut_; ///< The spot::tgba to explore.
typedef Sgi::hash_map<const state*, int, typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> seen_map; state_ptr_hash, state_ptr_equal> seen_map;
seen_map seen; ///< States already seen. seen_map seen; ///< States already seen.
}; };
@ -161,7 +161,7 @@ namespace spot
protected: protected:
const tgba* aut_; ///< The spot::tgba to explore. const tgba* aut_; ///< The spot::tgba to explore.
typedef Sgi::hash_map<const state*, int, typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> seen_map; state_ptr_hash, state_ptr_equal> seen_map;
seen_map seen; ///< States already seen. seen_map seen; ///< States already seen.
struct stack_item struct stack_item
@ -197,7 +197,7 @@ namespace spot
virtual void push(const state* s, int sn); virtual void push(const state* s, int sn);
virtual void pop(); virtual void pop();
Sgi::hash_set<int> stack_; std::unordered_set<int> stack_;
}; };
} }

View file

@ -1,7 +1,8 @@
// Copyright (C) 2011 Laboratoire de Recherche et Développement // -*- coding: utf-8 -*-
// Copyright (C) 2011, 2013 Laboratoire de Recherche et Développement
// de l'Epita (LRDE). // de l'Epita (LRDE).
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6), // Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre // département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie. // et Marie Curie.
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
@ -52,7 +53,7 @@ namespace spot
bdd all_acc = bddfalse; bdd all_acc = bddfalse;
bdd expected_all_acc = a->all_acceptance_conditions(); bdd expected_all_acc = a->all_acceptance_conditions();
bool all_acc_seen = false; bool all_acc_seen = false;
typedef Sgi::hash_map<const state*, std::set<int>, typedef std::unordered_map<const state*, std::set<int>,
state_ptr_hash, state_ptr_equal> state_map; state_ptr_hash, state_ptr_equal> state_map;
state_map seen; state_map seen;

View file

@ -1,5 +1,6 @@
// Copyright (C) 2010, 2011 Laboratoire de Recherche et Développement de // -*- coding: utf-8 -*-
// l'Epita (LRDE) // Copyright (C) 2010, 2011, 2013 Laboratoire de Recherche et
// Développement de l'Epita (LRDE)
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
// //
@ -71,7 +72,7 @@ namespace spot
bool is_safety_mwdba(const tgba* aut) bool is_safety_mwdba(const tgba* aut)
{ {
typedef Sgi::hash_set<const state*, typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> seen_map; state_ptr_hash, state_ptr_equal> seen_map;
seen_map seen; // States already seen. seen_map seen; // States already seen.
std::deque<const state*> todo; // A queue of states yet to explore. std::deque<const state*> todo; // A queue of states yet to explore.

View file

@ -223,7 +223,7 @@ namespace spot
// between each of these SCC. // between each of these SCC.
std::stack<bdd> arc_cond_; // A stack of conditions std::stack<bdd> arc_cond_; // A stack of conditions
// between each of these SCC. // between each of these SCC.
typedef Sgi::hash_map<const state*, int, typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> hash_type; state_ptr_hash, state_ptr_equal> hash_type;
hash_type h_; // Map of visited states. Values >= 0 hash_type h_; // Map of visited states. Values >= 0
// designate maximal SCC. Values < 0 // designate maximal SCC. Values < 0

View file

@ -1,7 +1,8 @@
// Copyright (C) 2011 Laboratoire de Recherche et Developpement de // -*- coding: utf-8 -*-
// Copyright (C) 2011, 2013 Laboratoire de Recherche et Developpement de
// l'Epita (LRDE). // l'Epita (LRDE).
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6), // Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre // département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie. // et Marie Curie.
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
@ -436,9 +437,9 @@ namespace spot
class explicit_se05_search_heap class explicit_se05_search_heap
{ {
typedef Sgi::hash_set<const state*, typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> hcyan_type; state_ptr_hash, state_ptr_equal> hcyan_type;
typedef Sgi::hash_map<const state*, color, typedef std::unordered_map<const state*, color,
state_ptr_hash, state_ptr_equal> hash_type; state_ptr_hash, state_ptr_equal> hash_type;
public: public:
enum { Safe = 1 }; enum { Safe = 1 };
@ -572,7 +573,7 @@ namespace spot
class bsh_se05_search_heap class bsh_se05_search_heap
{ {
private: private:
typedef Sgi::hash_set<const state*, typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> hcyan_type; state_ptr_hash, state_ptr_equal> hcyan_type;
public: public:
enum { Safe = 0 }; enum { Safe = 0 };

View file

@ -101,11 +101,11 @@ namespace spot
// Some useful typedef: // Some useful typedef:
// Used to get the signature of the state. // Used to get the signature of the state.
typedef Sgi::hash_map<const state*, bdd, typedef std::unordered_map<const state*, bdd,
state_ptr_hash, state_ptr_hash,
state_ptr_equal> map_state_bdd; state_ptr_equal> map_state_bdd;
typedef Sgi::hash_map<const state*, unsigned, typedef std::unordered_map<const state*, unsigned,
state_ptr_hash, state_ptr_hash,
state_ptr_equal> map_state_unsigned; state_ptr_equal> map_state_unsigned;

View file

@ -1,7 +1,8 @@
// Copyright (C) 2011 Laboratoire de Recherche et Developpement de // -*- coding: utf-8 -*-
// Copyright (C) 2011, 2013 Laboratoire de Recherche et Developpement de
// l'Epita (LRDE). // l'Epita (LRDE).
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6), // Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre // département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie. // et Marie Curie.
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
@ -368,7 +369,7 @@ namespace spot
} }
private: private:
typedef Sgi::hash_map<const state*, std::pair<color, bdd>, typedef std::unordered_map<const state*, std::pair<color, bdd>,
state_ptr_hash, state_ptr_equal> hash_type; state_ptr_hash, state_ptr_equal> hash_type;
hash_type h; hash_type h;
}; };

View file

@ -1,7 +1,8 @@
// Copyright (C) 2011 Laboratoire de Recherche et Developpement de // -*- coding: utf-8 -*-
// Copyright (C) 2011, 2013 Laboratoire de Recherche et Developpement de
// l'Epita (LRDE). // l'Epita (LRDE).
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6), // Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre // département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie. // et Marie Curie.
// //
// This file is part of Spot, a model checking library. // This file is part of Spot, a model checking library.
@ -409,9 +410,9 @@ namespace spot
class explicit_tau03_opt_search_heap class explicit_tau03_opt_search_heap
{ {
typedef Sgi::hash_map<const state*, std::pair<weight, bdd>, typedef std::unordered_map<const state*, std::pair<weight, bdd>,
state_ptr_hash, state_ptr_equal> hcyan_type; state_ptr_hash, state_ptr_equal> hcyan_type;
typedef Sgi::hash_map<const state*, std::pair<color, bdd>, typedef std::unordered_map<const state*, std::pair<color, bdd>,
state_ptr_hash, state_ptr_equal> hash_type; state_ptr_hash, state_ptr_equal> hash_type;
public: public:
class color_ref class color_ref