1 salcianu 1.1.2.5 // CallGraph.java, created Tue Mar 21 16:13:06 2000 by salcianu
 2 cananian 1.1.2.8 // Copyright (C) 2000 Alexandru SALCIANU <salcianu@retezat.lcs.mit.edu>
 3 cananian 1.1.2.1 // Licensed under the terms of the GNU GPL; see COPYING for details.
 4 cananian 1.1.2.1 package harpoon.Analysis.Quads;
 5 cananian 1.1.2.1 
 6 salcianu 1.1.2.6 import java.util.Set;
 7 cananian 1.1.2.1 import harpoon.ClassFile.HMethod;
 8 cananian 1.1.2.1 import harpoon.IR.Quads.CALL;
 9 salcianu 1.1.2.4 
10 cananian 1.1.2.1 /**
11 salcianu 1.1.2.5  * <code>CallGraph</code> is a general interface that should be
12 salcianu 1.1.2.5  implemented by a call graph.
13 cananian 1.1.2.1  * 
14 salcianu 1.3      * @author  Alexandru SALCIANU <salcianu@mit.edu>
15 salcianu 1.5      * @version $Id: CallGraph.java,v 1.5 2003/05/06 15:00:39 salcianu Exp $
16 cananian 1.1.2.1  */
17 salcianu 1.5     public abstract class CallGraph extends harpoon.Analysis.CallGraph {
18 cananian 1.1.2.7     // XXX: to talk about a CALL quad, you really need to have the HCode
19 cananian 1.1.2.7     //      for context.  An HCode should be a parameter in these methods;
20 cananian 1.1.2.7     //      the only reason implementations of this interface generally work
21 cananian 1.1.2.7     //      is that the HCode is generally coming from a CachedCodeFactory
22 cananian 1.1.2.7     //      so is consistent over the various CallGraph method calls. [CSA]
23 salcianu 1.1.2.5 
24 salcianu 1.1.2.5     /** Returns an array containing  all possible methods called by 
25 salcianu 1.1.2.5         method <code>m</code> at the call site <code>cs</code>.
26 cananian 1.1.2.9         If there is no known callee for the call site <code>cs</code>, or if 
27 salcianu 1.1.2.5         <code>cs</code> doesn't belong to the code of <code>hm</code>,
28 cananian 1.1.2.9         return an array of length <code>0</code>. */
29 salcianu 1.5         public abstract HMethod[] calls(final HMethod hm, final CALL cs);
30 salcianu 1.1.2.4 
31 salcianu 1.1.2.4     /** Returns a list of all the <code>CALL</code>s quads in the code 
32 salcianu 1.1.2.4         of <code>hm</code>. */
33 salcianu 1.5         public abstract CALL[] getCallSites(final HMethod hm);
34 cananian 1.2     }