From 752d4afc3174c80daba29fed35796452b1e85564 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 15 Dec 2004 16:23:07 +0000 Subject: [PATCH] * src/tgba/bdddict.hh (bdd_dict) : Redeclare as std::map, instead of Sgi::hash_map. It proved to be faster. * src/tgbaalgos/ltl2tgba_fm.cc (translate_dict) : Use the same definition as in bdd_dict. * tgbaalgos/reachiter.hh, tgbaalgos/replayrun.cc: Explicitly include misc/hash.hh. --- ChangeLog | 8 ++++++++ src/tgba/bdddict.hh | 14 ++++++-------- src/tgbaalgos/ltl2tgba_fm.cc | 7 ++----- src/tgbaalgos/reachiter.hh | 2 +- src/tgbaalgos/replayrun.cc | 1 + 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index ebebbec8e..22866408a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2004-12-15 Alexandre Duret-Lutz + * src/tgba/bdddict.hh (bdd_dict) : Redeclare as std::map, + instead of Sgi::hash_map. It proved to be faster. + * src/tgbaalgos/ltl2tgba_fm.cc (translate_dict) : + Use the same definition as in bdd_dict. + * tgbaalgos/reachiter.hh, tgbaalgos/replayrun.cc: Explicitly + include misc/hash.hh. + Adjust Swig rules for Swig 1.3.24 (and probably 1.3.23 too). Compiling the runtime in a separate modules is no longer required, and actually it does not work anymore... diff --git a/src/tgba/bdddict.hh b/src/tgba/bdddict.hh index 01ca7b891..1d79c31fa 100644 --- a/src/tgba/bdddict.hh +++ b/src/tgba/bdddict.hh @@ -22,9 +22,9 @@ #ifndef SPOT_TGBA_BDDDICT_HH # define SPOT_TGBA_BDDDICT_HH -#include "misc/hash.hh" #include #include +#include #include #include #include "ltlast/formula.hh" @@ -43,10 +43,9 @@ namespace spot ~bdd_dict(); /// Formula-to-BDD-variable maps. - typedef Sgi::hash_map > fv_map; + typedef std::map fv_map; /// BDD-variable-to-formula maps. - typedef Sgi::hash_map vf_map; + typedef std::map vf_map; fv_map now_map; ///< Maps formulae to "Now" BDD variables vf_map now_formula_map; ///< Maps "Now" BDD variables to formulae @@ -164,8 +163,8 @@ namespace spot protected: /// BDD-variable reference counts. - typedef Sgi::hash_set > ref_set; - typedef Sgi::hash_map vr_map; + typedef std::set ref_set; + typedef std::map vr_map; vr_map var_refs; void unregister_variable(vr_map::iterator& cur, const void* me); @@ -187,8 +186,7 @@ namespace spot #endif /// List of unused anonymous variable number for each automaton. - typedef Sgi::hash_map > free_annonymous_list_of_type; + typedef std::map free_annonymous_list_of_type; free_annonymous_list_of_type free_annonymous_list_of; private: diff --git a/src/tgbaalgos/ltl2tgba_fm.cc b/src/tgbaalgos/ltl2tgba_fm.cc index a5fcf95f3..5da00c6cf 100644 --- a/src/tgbaalgos/ltl2tgba_fm.cc +++ b/src/tgbaalgos/ltl2tgba_fm.cc @@ -72,11 +72,8 @@ namespace spot bdd_dict* dict; - /// Formula-to-BDD-variable maps. - typedef Sgi::hash_map > fv_map; - /// BDD-variable-to-formula maps. - typedef Sgi::hash_map vf_map; + typedef bdd_dict::fv_map fv_map; + typedef bdd_dict::vf_map vf_map; fv_map next_map; ///< Maps "Next" variables to BDD variables vf_map next_formula_map; ///< Maps BDD variables to "Next" variables diff --git a/src/tgbaalgos/reachiter.hh b/src/tgbaalgos/reachiter.hh index 1bfdd0823..e86eee090 100644 --- a/src/tgbaalgos/reachiter.hh +++ b/src/tgbaalgos/reachiter.hh @@ -22,7 +22,7 @@ #ifndef SPOT_TGBAALGOS_REACHITER_HH # define SPOT_TGBAALGOS_REACHITER_HH -#include +#include "misc/hash.hh" #include "tgba/tgba.hh" #include #include diff --git a/src/tgbaalgos/replayrun.cc b/src/tgbaalgos/replayrun.cc index f86dcc607..819c28224 100644 --- a/src/tgbaalgos/replayrun.cc +++ b/src/tgbaalgos/replayrun.cc @@ -19,6 +19,7 @@ // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. +#include "misc/hash.hh" #include "replayrun.hh" #include "tgba/tgba.hh" #include "emptiness.hh"