main.java.soot.toolkits.scalar.ForwardBranchedFlowAnalysis Maven / Gradle / Ivy
/* Soot - a J*va Optimization Framework
* Copyright (C) 1997-2000 Raja Vallee-Rai
*
* 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.
*/
/*
* Modified by the Sable Research Group and others 1997-2000.
* See the 'credits' file distributed with Soot for the complete list of
* contributors. (Soot is distributed at http://www.sable.mcgill.ca/soot)
*/
/*
2000, March 20 - Updated code provided by Patrick Lam
from 1.beta.4.dev.60
to 1.beta.6.dev.34
Plus some bug fixes.
-- Janus
KNOWN LIMITATION: the analysis doesn't handle traps since traps
handler statements have predecessors, but they
don't have the trap handler as successor. This
might be a limitation of the CompleteUnitGraph
tho.
*/
package soot.toolkits.scalar;
import soot.*;
import soot.toolkits.graph.*;
import soot.util.*;
import java.util.*;
import soot.toolkits.graph.interaction.*;
import soot.options.*;
/** Abstract class providing an engine for branched forward flow analysis.
* WARNING: This does not handle exceptional flow as branches!
* */
public abstract class ForwardBranchedFlowAnalysis extends BranchedFlowAnalysis
{
public ForwardBranchedFlowAnalysis(UnitGraph graph)
{
super(graph);
}
protected boolean isForward()
{
return true;
}
// Accumulate the previous afterFlow sets.
private void accumulateAfterFlowSets(Unit s, A[] flowRepositories, List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy