harpoon.Analysis
Class IOEffectAnalysis

java.lang.Object
  extended by harpoon.Analysis.IOEffectAnalysis

public class IOEffectAnalysis
extends Object

IOEffectAnalysis is a simple analysis that detects whether a method may (transitively) execute an input/output operation. This analysis detects I/O operations executed directly by a method, or by one of its transitive callees.

Version:
$Id: IOEffectAnalysis.java,v 1.3 2005/09/16 19:08:45 salcianu Exp $
Author:
Alexandru Salcianu <salcianu@alum.mit.edu>

Constructor Summary
IOEffectAnalysis(CallGraph cg)
          Creates a IOEffectAnalysis object.
 
Method Summary
 boolean doesIO(HMethod hm)
          Checks whether the method hm (transitively) executes any input/output operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IOEffectAnalysis

public IOEffectAnalysis(CallGraph cg)
Creates a IOEffectAnalysis object.

Parameters:
cg - Callgraph used to find the transitive callees of each method this analysis is queried about.
Method Detail

doesIO

public boolean doesIO(HMethod hm)
Checks whether the method hm (transitively) executes any input/output operation. The implementation uses caching such that a series of quesries about the I/O status of all program methods (in any order) has time complexity linear in the number of queries + the size of the callgraph (the number of both nodes and arcs).