ROSE 0.11.145.147
AstHasher.h
1#ifndef ROSE_BinaryAnalysis_AstHasher_H
2#define ROSE_BinaryAnalysis_AstHasher_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
5
6#include <Rose/BinaryAnalysis/Partitioner2/BasicTypes.h>
7#include <Combinatorics.h> // rose
8
9class SgNode;
10
11namespace Rose {
12namespace BinaryAnalysis {
13
19class AstHasher {
20 bool hashingConstants_ = false;
21 bool hashingAddresses_ = false;
22 std::shared_ptr<Combinatorics::Hasher> hasher_;
23
24public:
25 ~AstHasher();
26 AstHasher() = delete;
27 AstHasher& operator=(const AstHasher&) = delete;
28
30 explicit AstHasher(const std::shared_ptr<Combinatorics::Hasher>&);
31
35 bool hashingConstants() const;
36 void hashingConstants(bool);
42 bool hashingAddresses() const;
43 void hashingAddresses(bool);
47 std::shared_ptr<Combinatorics::Hasher> hasher() const;
48
52 void hash(SgNode*);
53
58};
59
60} // namespace
61} // namespace
62
63#endif
64#endif
Compute the hash for an AST.
Definition AstHasher.h:19
bool hashingConstants() const
Property: Whether to hash constants.
bool hashingAddresses() const
Property: Whether to hash addresses.
void hash(SgNode *)
Hash an AST.
void hash(const Partitioner2::BasicBlockPtr &bb)
Hash a basic block.
void hashingConstants(bool)
Property: Whether to hash constants.
std::shared_ptr< Combinatorics::Hasher > hasher() const
Property: The associated low-level hasher.
AstHasher(const std::shared_ptr< Combinatorics::Hasher > &)
Create a new AST hasher using the specified low-level hasher.
void hashingAddresses(bool)
Property: Whether to hash addresses.
This class represents the base class for all IR nodes within Sage III.
The ROSE library.