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

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

View file

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

View file

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

View file

@ -261,9 +261,9 @@ namespace spot
typedef typename State::transition transition;
typedef State state;
protected:
typedef Sgi::hash_map<label_t, State, label_hash_t> ls_map;
typedef Sgi::hash_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<label_t, State, label_hash_t> ls_map;
typedef std::unordered_map<label_t, State*, label_hash_t> alias_map;
typedef std::unordered_map<const State*, label_t, ptr_hash<State> > sl_map;
public:
@ -397,8 +397,8 @@ namespace spot
{
typedef typename transitions_t::iterator trans_t;
typedef std::map<int, trans_t> acc_map;
typedef Sgi::hash_map<const spot::state*, acc_map,
ptr_hash<spot::state> > dest_map;
typedef std::unordered_map<const spot::state*, acc_map,
ptr_hash<spot::state> > dest_map;
typename ls_map::iterator i;
for (i = ls_.begin(); i != ls_.end(); ++i)

View file

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

View file

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

View file

@ -44,7 +44,7 @@ namespace spot
}
// 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
// are all destroyed in the tgba_tba_proxy destructor.
@ -127,9 +127,9 @@ namespace spot
}
};
typedef Sgi::hash_set<state_tba_proxy,
state_tba_proxy_hash,
state_tba_proxy_equal> uniq_map_t;
typedef std::unordered_set<state_tba_proxy,
state_tba_proxy_hash,
state_tba_proxy_equal> uniq_map_t;
typedef std::pair<const state_tba_proxy*, bool> state_ptr_bool_t;
@ -382,9 +382,9 @@ namespace spot
protected:
const bdd the_acceptance_cond_;
typedef Sgi::hash_map<state_ptr_bool_t, bdd,
state_ptr_bool_hash,
state_ptr_bool_equal> transmap_t;
typedef std::unordered_map<state_ptr_bool_t, bdd,
state_ptr_bool_hash,
state_ptr_bool_equal> transmap_t;
transmap_t transmap_;
typedef transmap_t::const_iterator mapit_t;
typedef std::list<mapit_t> translist_t;

View file

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