5 #ifndef ILANG_ILA_HASH_AST_H__
6 #define ILANG_ILA_HASH_AST_H__
10 #include <unordered_map>
47 std::unordered_map<std::string, ExprPtr> map_;
51 static std::string Hash(
const ExprPtr& node);
60 #endif // ILANG_ILA_HASH_AST_H__
ExprMngr()
Default constructor.
ExprPtr GetRep(const ExprPtr &node)
Return the AST node representative.
ExprMngr::ExprMngrPtr ExprMngrPtr
Pointer type for passing shared ast simplifier.
Definition: hash_ast.h:56
Expr::ExprPtr ExprPtr
Pointer type for normal use of Expr.
Definition: expr.h:138
~ExprMngr()
Default destructor.
void operator()(const ExprPtr &node)
Function object for sharing ast nodes.
static ExprMngrPtr New()
Create an object and return the pointer. Used for hiding implementation specific types.
void clear()
Reset the hash table.
Simplifier for AST trees by sharing nodes based on the hash value.
Definition: hash_ast.h:18
std::shared_ptr< ExprMngr > ExprMngrPtr
Pointer type for passing shared ast simplifier.
Definition: hash_ast.h:21