diff --git a/ChangeLog b/ChangeLog index 1e0f416dc..16985d9f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,16 +1,21 @@ -2003-09-25 Rachid REBIHA +2003-09-30 Alexandre Duret-Lutz - * src/tgbatest/emptinesscheckexplicit.test (acc): New file. + * src/tgba/state.hh (state_ptr_less_than, state_ptr_equal): + Declare as std::binary_function. + (state_ptr_hash): Declare as std::unary_function. + * src/tgbaalgos/lbtt.cc (state_acc_pair_equal, + state_acc_pair_hash): Likewise. + * src/misc/bddlt.hh (bdd_less_than): Likewise. + * src/misc/hash.hh (ptr_hash, string_hash): Likewise. - * src/tgbatest/emptinesscheckexplicit.cc (main): New file. +2003-09-25 Rachid REBIHA - * src/tgbatest/emptinesscheck.test: New file. - - * src/tgbatest/emptinesscheck.cc (main): New file. - - * src/tgbaalgos/emptinesscheck.cc (spot): New method. - - * src/tgbaalgos/emptinesscheck.hh: New interface. + * src/tgbatest/emptinesscheckexplicit.test, + src/tgbatest/emptinesscheckexplicit.cc + src/tgbatest/emptinesscheck.test, + src/tgbatest/emptinesscheck.cc, + src/tgbaalgos/emptinesscheck.cc, + src/tgbaalgos/emptinesscheck.hh: New files. 2003-09-22 Alexandre Duret-Lutz diff --git a/src/misc/bddlt.hh b/src/misc/bddlt.hh index 2ca90a9c6..cdbbc4077 100644 --- a/src/misc/bddlt.hh +++ b/src/misc/bddlt.hh @@ -2,11 +2,13 @@ # define SPOT_MISC_BDDLT_HH # include +# include namespace spot { /// Comparison functor for BDDs. - struct bdd_less_than + struct bdd_less_than : + public std::binary_function { bool operator()(const bdd& left, const bdd& right) const diff --git a/src/misc/hash.hh b/src/misc/hash.hh index 379707b21..2bf60acbb 100644 --- a/src/misc/hash.hh +++ b/src/misc/hash.hh @@ -2,6 +2,7 @@ # define SPOT_MISC_HASH_HH # include +# include // See the G++ FAQ for details about the following. # ifdef __GNUC__ @@ -34,7 +35,8 @@ namespace spot /// A hash function for pointers. template - struct ptr_hash + struct ptr_hash : + public std::unary_function { size_t operator()(const T* p) const { @@ -43,7 +45,9 @@ namespace spot }; /// A hash function for strings. - struct string_hash : Sgi::hash + struct string_hash : + public Sgi::hash, + public std::unary_function { size_t operator()(const std::string& s) const { diff --git a/src/tgba/state.hh b/src/tgba/state.hh index 3a3d91f92..df98641f1 100644 --- a/src/tgba/state.hh +++ b/src/tgba/state.hh @@ -4,6 +4,7 @@ #include #include #include +#include namespace spot { @@ -64,7 +65,8 @@ namespace spot /// // Remember how many times each state has been visited. /// std::map seen; /// \endcode - struct state_ptr_less_than + struct state_ptr_less_than : + public std::binary_function { bool operator()(const state* left, const state* right) const @@ -86,7 +88,8 @@ namespace spot /// Sgi::hash_map seen; /// \endcode - struct state_ptr_equal + struct state_ptr_equal : + public std::binary_function { bool operator()(const state* left, const state* right) const @@ -108,7 +111,8 @@ namespace spot /// Sgi::hash_map seen; /// \endcode - struct state_ptr_hash + struct state_ptr_hash : + public std::unary_function { size_t operator()(const state* that) const diff --git a/src/tgbaalgos/lbtt.cc b/src/tgbaalgos/lbtt.cc index b060d5d73..5032f543c 100644 --- a/src/tgbaalgos/lbtt.cc +++ b/src/tgbaalgos/lbtt.cc @@ -3,6 +3,7 @@ #include #include #include +#include #include "tgba/tgba.hh" #include "save.hh" #include "tgba/bddprint.hh" @@ -87,7 +88,9 @@ namespace spot typedef std::pair state_acc_pair; - struct state_acc_pair_equal + struct state_acc_pair_equal : + public std::binary_function { bool operator()(const state_acc_pair& left, const state_acc_pair& right) const @@ -98,7 +101,8 @@ namespace spot } }; - struct state_acc_pair_hash + struct state_acc_pair_hash : + public std::unary_function { bool operator()(const state_acc_pair& that) const