* 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.
This commit is contained in:
Alexandre Duret-Lutz 2003-09-30 16:02:34 +00:00
parent 7f3c113130
commit 2e97e6447b
5 changed files with 37 additions and 18 deletions

View file

@ -1,16 +1,21 @@
2003-09-25 Rachid REBIHA <rebiha@nyx>
2003-09-30 Alexandre Duret-Lutz <aduret@src.lip6.fr>
* 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 <rebiha@src.lip6.fr>
* 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 <aduret@src.lip6.fr>

View file

@ -2,11 +2,13 @@
# define SPOT_MISC_BDDLT_HH
# include <bdd.h>
# include <functional>
namespace spot
{
/// Comparison functor for BDDs.
struct bdd_less_than
struct bdd_less_than :
public std::binary_function<const bdd&, const bdd&, bool>
{
bool
operator()(const bdd& left, const bdd& right) const

View file

@ -2,6 +2,7 @@
# define SPOT_MISC_HASH_HH
# include <string>
# include <functional>
// See the G++ FAQ for details about the following.
# ifdef __GNUC__
@ -34,7 +35,8 @@ namespace spot
/// A hash function for pointers.
template <class T>
struct ptr_hash
struct ptr_hash :
public std::unary_function<const T*, size_t>
{
size_t operator()(const T* p) const
{
@ -43,7 +45,9 @@ namespace spot
};
/// A hash function for strings.
struct string_hash : Sgi::hash<const char*>
struct string_hash :
public Sgi::hash<const char*>,
public std::unary_function<const std::string&, size_t>
{
size_t operator()(const std::string& s) const
{

View file

@ -4,6 +4,7 @@
#include <cstddef>
#include <bdd.h>
#include <cassert>
#include <functional>
namespace spot
{
@ -64,7 +65,8 @@ namespace spot
/// // Remember how many times each state has been visited.
/// std::map<spot::state*, int, spot::state_ptr_less_than> seen;
/// \endcode
struct state_ptr_less_than
struct state_ptr_less_than :
public std::binary_function<const state*, const state*, bool>
{
bool
operator()(const state* left, const state* right) const
@ -86,7 +88,8 @@ namespace spot
/// Sgi::hash_map<spot::state*, int, spot::state_ptr_less_than,
/// spot::state_ptr_equal> seen;
/// \endcode
struct state_ptr_equal
struct state_ptr_equal :
public std::binary_function<const state*, const state*, bool>
{
bool
operator()(const state* left, const state* right) const
@ -108,7 +111,8 @@ namespace spot
/// Sgi::hash_map<spot::state*, int, spot::state_ptr_less_than,
/// spot::state_ptr_equal> seen;
/// \endcode
struct state_ptr_hash
struct state_ptr_hash :
public std::unary_function<const state*, size_t>
{
size_t
operator()(const state* that) const

View file

@ -3,6 +3,7 @@
#include <set>
#include <string>
#include <sstream>
#include <functional>
#include "tgba/tgba.hh"
#include "save.hh"
#include "tgba/bddprint.hh"
@ -87,7 +88,9 @@ namespace spot
typedef std::pair<state*, bdd> state_acc_pair;
struct state_acc_pair_equal
struct state_acc_pair_equal :
public std::binary_function<const state_acc_pair&,
const state_acc_pair&, bool>
{
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<const state_acc_pair&, size_t>
{
bool
operator()(const state_acc_pair& that) const