ExprHashMap.h

Go to the documentation of this file.
00001 //===-- ExprHashMap.h -------------------------------------------*- C++ -*-===//
00002 //
00003 //                     The KLEE Symbolic Virtual Machine
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #ifndef KLEE_EXPRHASHMAP_H
00011 #define KLEE_EXPRHASHMAP_H
00012 
00013 #include "klee/Expr.h"
00014 #include <tr1/unordered_map>
00015 #include <tr1/unordered_set>
00016 
00017 namespace klee {
00018 
00019   namespace util {
00020     struct ExprHash  {
00021       unsigned operator()(const ref<Expr> e) const {
00022         return e->hash();
00023       }
00024     };
00025     
00026     struct ExprCmp {
00027       bool operator()(const ref<Expr> &a, const ref<Expr> &b) const {
00028         return a==b;
00029       }
00030     };
00031   }
00032   
00033   template<class T> 
00034   class ExprHashMap : 
00035 
00036     public std::tr1::unordered_map<ref<Expr>,
00037                                    T,
00038                                    klee::util::ExprHash,
00039                                    klee::util::ExprCmp> {
00040   };
00041   
00042   typedef std::tr1::unordered_set<ref<Expr>,
00043                                   klee::util::ExprHash,
00044                                   klee::util::ExprCmp> ExprHashSet;
00045 
00046 }
00047 
00048 #endif

Generated on Fri Jun 5 03:31:31 2009 for klee by  doxygen 1.5.8