Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/* Soot - a J*va Optimization Framework
* Copyright (C) 2005 Antoine Mine
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
/**
* Implementation of the paper "A Combined Pointer and Purity Analysis for
* Java Programs" by Alexandru Salcianu and Martin Rinard, within the
* Soot Optimization Framework.
*
* by Antoine Mine, 2005/01/24
*/
package soot.jimple.toolkits.annotation.purity;
import java.util.*;
import java.io.*;
import soot.*;
import soot.util.dot.*;
import soot.jimple.*;
import soot.jimple.toolkits.callgraph.*;
import soot.toolkits.graph.*;
/**
* Inter-procedural iterator skeleton for summary-based analysis
*
* A "summary" is an abstract element associated to each method that
* fully models the effect of calling the method. In a summary-based
* analysis, the summary of a method can be computed using solely
* the summary of all methods it calls: the summary does not depend
* upon the context in which a method is called.
* The inter-procedural analysis interacts with a intra-procedural analysis
* that is able to compute the summary of one method, given the summary
* of all the method it calls. The inter-procedural analysis calls the
* intra-procedural analysis in a reverse topological order of method
* dependencies to resolve unknown summaries. It iterates over recursively
* dependant methods.
*
* Generally, the intra-procedural works by maintaining an abstract
* value that represent the effect of the method from its entry point
* and up to the current point. At the entry point, this value is empty.
* The summary of the method is then the merge of the abstract values
* at all its return points.
*
* You can provide off-the-shelf summaries for methods you do not
* which to analyse. Any method using these "filtered-out" methods will
* use the off-the-shelf summary instead of performing an intra-procedural
* analysis. This is useful for native methods, incremental analysis,
* or when you hand-made summary. Methods that are called solely by
* filtered-out ones will never be analysed, effectively triming the
* call-graph dependencies.
*
* This class tries to use the same abstract methods and data managnment
* policy as regular FlowAnalysis classes.
*/
public abstract class AbstractInterproceduralAnalysis {
public static final boolean doCheck = false;
protected CallGraph cg; // analysed call-graph
protected DirectedGraph dg; // filtered trimed call-graph
protected Map data; // SootMethod -> summary
protected Map