mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 03:15:50 +00:00
removing address dependencies
This commit is contained in:
parent
eee2d7af94
commit
ebc8a43fe3
10 changed files with 100 additions and 7 deletions
|
@ -1008,6 +1008,29 @@ private:
|
|||
};
|
||||
}
|
||||
|
||||
|
||||
// Allow to hash on nodes and edges in deterministic way
|
||||
|
||||
namespace stl_ext {
|
||||
template <>
|
||||
class hash<Duality::RPFP::Node *> {
|
||||
public:
|
||||
size_t operator()(const Duality::RPFP::Node *p) const {
|
||||
return p->number;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
namespace stl_ext {
|
||||
template <>
|
||||
class hash<Duality::RPFP::Edge *> {
|
||||
public:
|
||||
size_t operator()(const Duality::RPFP::Edge *p) const {
|
||||
return p->number;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// allow to walk sets of nodes without address dependency
|
||||
|
||||
namespace std {
|
||||
|
|
|
@ -1419,7 +1419,8 @@ namespace std {
|
|||
class less<Duality::func_decl> {
|
||||
public:
|
||||
bool operator()(const Duality::func_decl &s, const Duality::func_decl &t) const {
|
||||
return s.raw() < t.raw(); // s.raw()->get_id() < t.raw()->get_id();
|
||||
// return s.raw() < t.raw();
|
||||
return s.raw()->get_id() < t.raw()->get_id();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue