Alias/Interface.hpp

Go to the documentation of this file.
00001 
00015 #ifndef AliasInterface_H
00016 #define AliasInterface_H
00017 
00018 #include <OpenAnalysis/Utils/OA_ptr.hpp>
00019 #include <OpenAnalysis/Location/Locations.hpp>
00020 
00021 namespace OA {
00022   namespace Alias {
00023 
00024 /* Mapping of Location to following enum sets
00025  * LocSubSet                        => 1
00026  * InvisibleLoc(MRE: not SubSetRef) => 2
00027  * InvisibleLoc(MRE: SubSetRef)     => 1 
00028  * NamedLoc                         => 2
00029  * UnnamedLoc                       => 1
00030  * Multiple Locations mapped 
00031    to the same set                  => 1
00032 */
00033       
00034 typedef enum {
00035     NOALIAS,     
00036     MAYALIAS,  
00037     MUSTALIAS   
00038 } AliasResultType;
00039 
00040 typedef MemRefHandleIterator MemRefIterator;
00041 
00042 
00043 class Interface {
00044   public:
00045     Interface() {}
00046     virtual ~Interface() {};
00047 
00049     virtual AliasResultType alias(MemRefHandle ref1, 
00050                                   MemRefHandle ref2) = 0;
00051        
00053     virtual OA_ptr<LocIterator> getMayLocs(MemRefHandle ref) = 0;
00054 
00057     virtual OA_ptr<LocIterator> getMustLocs(MemRefHandle ref) = 0;
00058 
00061     virtual OA_ptr<LocIterator> getMayLocs(MemRefExpr &ref, ProcHandle proc) = 0;
00062 
00064     virtual OA_ptr<LocIterator> getMustLocs(MemRefExpr &ref, ProcHandle proc) = 0;
00065 
00067     //FIXME: Deprecate
00068     //virtual OA_ptr<MemRefIterator> getMustAliases(MemRefHandle ref) = 0;
00069 
00071     //FIXME: Deprecate
00072     //virtual OA_ptr<MemRefIterator> getMayAliases(MemRefHandle ref) = 0;
00073     
00075     //FIXME: Deprecate
00076     //virtual OA_ptr<MemRefIterator> 
00077     //    getMustAliases(OA_ptr<Location> loc) = 0;
00078 
00080     //FIXME: Deprecate
00081     //virtual OA_ptr<MemRefIterator> 
00082     //    getMayAliases(OA_ptr<Location> loc) = 0;
00083     
00086     virtual OA_ptr<MemRefIterator> getMemRefIter() = 0;
00087 
00088 };
00089 
00090   } // end of Alias namespace
00091 } // end of OA namespace
00092 
00093 #endif
00094 

Generated on Sat Oct 31 05:21:22 2009 for OpenAnalysis by  doxygen 1.6.1