Commit 34e91b76 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

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.
parent c568b4d3
......@@ -212,9 +212,9 @@ namespace spot
std::map<path, int> pathid_ref;
std::map<path, int> pathid_cand;
int nvars;
typedef Sgi::hash_map<const state*, int,
state_ptr_hash, state_ptr_equal> state_map;
typedef Sgi::hash_map<int, const state*> int_map;
typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> state_map;
typedef std::unordered_map<int, const state*> int_map;
state_map state_to_int;
int_map int_to_state;
int cand_size;
......
......@@ -260,9 +260,9 @@ namespace spot
std::map<path, int> pathid;
int nvars;
typedef Sgi::hash_map<const state*, int,
state_ptr_hash, state_ptr_equal> state_map;
typedef Sgi::hash_map<int, const state*> int_map;
typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> state_map;
typedef std::unordered_map<int, const state*> int_map;
state_map state_to_int;
int_map int_to_state;
int cand_size;
......
// Copyright (C) 2008, 2009, 2010, 2012 Laboratoire de Recherche et
// Dveloppement de l'Epita (LRDE).
// -*- coding: utf-8 -*-
// 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.
//
......@@ -221,15 +222,16 @@ namespace spot
bool root_;
/// BDD associated to each automatop A representing finish(A).
typedef Sgi::hash_map<const ltl::formula*, bdd,
ltl::formula_ptr_hash> finish_map_;
typedef std::unordered_map<const ltl::formula*, bdd,
ltl::formula_ptr_hash> finish_map_;
finish_map_ finish_;
// Table containing the two now variables associated with each state.
// TODO: a little documentation about that.
typedef Sgi::hash_map<
const nfa::state*, std::pair<int, int>, ptr_hash<nfa::state> > nmap;
typedef std::unordered_map<const nfa::state*,
std::pair<int, int>,
ptr_hash<nfa::state>> nmap;
std::pair<int, int>&
recurse_state(const nfa::ptr& nfa, const nfa::state* s,
......
// Copyright (C) 2009, 2011, 2012 Laboratoire de Recherche et
// Dveloppement de l'Epita (LRDE).
// -*- coding: utf-8 -*-
// 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),
// dpartement Systmes Rpartis Coopratifs (SRC), Universit Pierre
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
//
// This file is part of Spot, a model checking library.
......@@ -305,8 +306,8 @@ namespace spot
const tgba_run::steps* l;
bdd seen_acc = bddfalse;
typedef Sgi::hash_map<const state*, state_explicit_string*,
state_ptr_hash, state_ptr_equal> state_map;
typedef std::unordered_map<const state*, state_explicit_string*,
state_ptr_hash, state_ptr_equal> state_map;
state_map seen;
if (run->prefix.empty())
......
......@@ -56,8 +56,8 @@ namespace spot
virtual const state* has_state(const state* s) const;
virtual void insert(const state* s);
protected:
typedef Sgi::hash_set<const state*,
state_ptr_hash, state_ptr_equal> set_type;
typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> set_type;
set_type states;
};
......
......@@ -121,8 +121,8 @@ namespace spot
virtual numbered_state_heap_const_iterator* iterator() const;
typedef Sgi::hash_map<const state*, int,
state_ptr_hash, state_ptr_equal> hash_type;
typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> hash_type;
protected:
hash_type h; ///< Map of visited states.
};
......
// Copyright (C) 2008, 2010, 2011 Laboratoire de recherche et
// dveloppement de l'Epita (LRDE).
// -*- coding: utf-8 -*-
// 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
// (LIP6), dpartement Systmes Rpartis Coopratifs (SRC), Universit
// (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.
......@@ -58,8 +59,8 @@ namespace spot
bdd accepting;
// Map of visited states.
typedef Sgi::hash_map<const state*, size_t,
state_ptr_hash, state_ptr_equal> hash_type;
typedef std::unordered_map<const state*, size_t,
state_ptr_hash, state_ptr_equal> hash_type;
hash_type h;
// Stack of visited states on the path.
......
......@@ -120,8 +120,8 @@ namespace spot
private:
translate_dict& dict_;
std::vector<tgba_explicit_formula*> automata_;
typedef Sgi::hash_map<const formula*, tgba_explicit_formula*,
formula_ptr_hash> f2a_t;
typedef std::unordered_map<const formula*, tgba_explicit_formula*,
formula_ptr_hash> f2a_t;
f2a_t f2a_;
};
......@@ -218,8 +218,9 @@ namespace spot
bool has_marked:1;
};
typedef Sgi::hash_map<flagged_formula, translated, flagged_formula_hash>
flagged_formula_to_bdd_map;
typedef
std::unordered_map<flagged_formula, translated,
flagged_formula_hash> flagged_formula_to_bdd_map;
private:
flagged_formula_to_bdd_map ltl_bdd_;
......@@ -1893,7 +1894,8 @@ namespace spot
}
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_;
};
......@@ -2039,13 +2041,14 @@ namespace spot
// We do this because many formulae (such as `aR(bRc)' and
// `aR(bRc).(bRc)') are equivalent, and are trivially identified
// 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_;
// Map each formula to its associated bdd. This speed things up when
// the same formula is translated several times, which especially
// occurs when canonize() is called repeatedly inside exprop.
typedef Sgi::hash_map<const formula*, translate_dict::translated,
ptr_hash<formula> > formula_to_bdd_map;
typedef std::unordered_map<const formula*, translate_dict::translated,
ptr_hash<formula> > formula_to_bdd_map;
formula_to_bdd_map f2b_;
possible_fair_loop_checker pflc_;
......@@ -2057,7 +2060,8 @@ namespace spot
}
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
fill_dests(translate_dict& d, dest_map& dests, bdd label, const formula* dest)
......
// 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).
// 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.
//
// This file is part of Spot, a model checking library.
......@@ -504,8 +505,8 @@ namespace spot
private:
typedef Sgi::hash_map<const state*, color,
state_ptr_hash, state_ptr_equal> hash_type;
typedef std::unordered_map<const state*, color,
state_ptr_hash, state_ptr_equal> hash_type;
hash_type h;
};
......
......@@ -52,10 +52,10 @@
namespace spot
{
typedef Sgi::hash_set<const state*,
state_ptr_hash, state_ptr_equal> hash_set;
typedef Sgi::hash_map<const state*, unsigned,
state_ptr_hash, state_ptr_equal> hash_map;
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;
namespace
{
......
// 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).
// 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.
//
// This file is part of Spot, a model checking library.
......@@ -226,8 +227,8 @@ namespace spot
};
typedef std::list<transition> accepting_transitions_list;
typedef Sgi::hash_set<const state*,
state_ptr_hash, state_ptr_equal> state_set;
typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> state_set;
void clean(stack_type& st1, state_set& seen, state_set& dead)
{
......@@ -457,8 +458,9 @@ namespace spot
}
}
typedef Sgi::hash_multimap<const state*, transition,
state_ptr_hash, state_ptr_equal> m_source_trans;
typedef std::unordered_multimap<const state*, transition,
state_ptr_hash,
state_ptr_equal> m_source_trans;
template<bool cycle>
class min_path: public bfs_steps
......
......@@ -34,8 +34,8 @@ namespace spot
{
typedef std::set<const state*, state_ptr_less_than> power_state;
typedef std::map<int, power_state> power_map_data;
typedef Sgi::hash_set<const state*, state_ptr_hash,
state_ptr_equal> state_set;
typedef std::unordered_set<const state*, state_ptr_hash,
state_ptr_equal> state_set;
~power_map()
{
......
// -*- 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).
// Copyright (C) 2004, 2005, 2007 Laboratoire d'Informatique de
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
......@@ -126,7 +126,7 @@ namespace spot
*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
// (the index into states[]), not the tgba_explicit::state*
// directly, because the later would yield different graphs
......
......@@ -91,8 +91,8 @@ namespace spot
protected:
const tgba* aut_; ///< The spot::tgba to explore.
typedef Sgi::hash_map<const state*, int,
state_ptr_hash, state_ptr_equal> seen_map;
typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> seen_map;
seen_map seen; ///< States already seen.
};
......@@ -161,8 +161,8 @@ namespace spot
protected:
const tgba* aut_; ///< The spot::tgba to explore.
typedef Sgi::hash_map<const state*, int,
state_ptr_hash, state_ptr_equal> seen_map;
typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> seen_map;
seen_map seen; ///< States already seen.
struct stack_item
{
......@@ -197,7 +197,7 @@ namespace spot
virtual void push(const state* s, int sn);
virtual void pop();
Sgi::hash_set<int> stack_;
std::unordered_set<int> stack_;
};
}
......
// 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).
// 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.
//
// This file is part of Spot, a model checking library.
......@@ -52,8 +53,8 @@ namespace spot
bdd all_acc = bddfalse;
bdd expected_all_acc = a->all_acceptance_conditions();
bool all_acc_seen = false;
typedef Sgi::hash_map<const state*, std::set<int>,
state_ptr_hash, state_ptr_equal> state_map;
typedef std::unordered_map<const state*, std::set<int>,
state_ptr_hash, state_ptr_equal> state_map;
state_map seen;
if (run->prefix.empty())
......
// Copyright (C) 2010, 2011 Laboratoire de Recherche et Développement de
// l'Epita (LRDE)
// -*- coding: utf-8 -*-
// 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.
//
......@@ -71,8 +72,8 @@ namespace spot
bool is_safety_mwdba(const tgba* aut)
{
typedef Sgi::hash_set<const state*,
state_ptr_hash, state_ptr_equal> seen_map;
typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> seen_map;
seen_map seen; // States already seen.
std::deque<const state*> todo; // A queue of states yet to explore.
......
......@@ -223,8 +223,8 @@ namespace spot
// between each of these SCC.
std::stack<bdd> arc_cond_; // A stack of conditions
// between each of these SCC.
typedef Sgi::hash_map<const state*, int,
state_ptr_hash, state_ptr_equal> hash_type;
typedef std::unordered_map<const state*, int,
state_ptr_hash, state_ptr_equal> hash_type;
hash_type h_; // Map of visited states. Values >= 0
// designate maximal SCC. Values < 0
// number states that are part of
......
// 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).
// 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.
//
// This file is part of Spot, a model checking library.
......@@ -436,10 +437,10 @@ namespace spot
class explicit_se05_search_heap
{
typedef Sgi::hash_set<const state*,
state_ptr_hash, state_ptr_equal> hcyan_type;
typedef Sgi::hash_map<const state*, color,
state_ptr_hash, state_ptr_equal> hash_type;
typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> hcyan_type;
typedef std::unordered_map<const state*, color,
state_ptr_hash, state_ptr_equal> hash_type;
public:
enum { Safe = 1 };
......@@ -572,8 +573,8 @@ namespace spot
class bsh_se05_search_heap
{
private:
typedef Sgi::hash_set<const state*,
state_ptr_hash, state_ptr_equal> hcyan_type;
typedef std::unordered_set<const state*,
state_ptr_hash, state_ptr_equal> hcyan_type;
public:
enum { Safe = 0 };
......
......@@ -101,13 +101,13 @@ namespace spot
// Some useful typedef:
// Used to get the signature of the state.
typedef Sgi::hash_map<const state*, bdd,
state_ptr_hash,
state_ptr_equal> map_state_bdd;
typedef std::unordered_map<const state*, bdd,
state_ptr_hash,
state_ptr_equal> map_state_bdd;
typedef Sgi::hash_map<const state*, unsigned,
state_ptr_hash,
state_ptr_equal> map_state_unsigned;
typedef std::unordered_map<const state*, unsigned,
state_ptr_hash,
state_ptr_equal> map_state_unsigned;
typedef std::map<const state*, const state*,
state_ptr_less_than> map_state_state;
......
// 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).
// 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.
//
// This file is part of Spot, a model checking library.
......@@ -368,8 +369,8 @@ namespace spot
}
private:
typedef Sgi::hash_map<const state*, std::pair<color, bdd>,
state_ptr_hash, state_ptr_equal> hash_type;
typedef std::unordered_map<const state*, std::pair<color, bdd>,
state_ptr_hash, state_ptr_equal> hash_type;
hash_type h;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment