2006-11-22 17:38:46 +00:00
|
|
|
/*******************************************************************************
|
|
|
|
* Copyright (c) 2002 - 2006 IBM Corporation.
|
|
|
|
* All rights reserved. This program and the accompanying materials
|
|
|
|
* are made available under the terms of the Eclipse Public License v1.0
|
|
|
|
* which accompanies this distribution, and is available at
|
|
|
|
* http://www.eclipse.org/legal/epl-v10.html
|
|
|
|
*
|
|
|
|
* Contributors:
|
|
|
|
* IBM Corporation - initial API and implementation
|
|
|
|
*******************************************************************************/
|
|
|
|
package com.ibm.wala.ipa.callgraph.propagation;
|
|
|
|
|
2007-07-05 03:04:34 +00:00
|
|
|
import com.ibm.wala.cfg.ControlFlowGraph;
|
2006-11-22 17:38:46 +00:00
|
|
|
import com.ibm.wala.ipa.callgraph.CGNode;
|
|
|
|
import com.ibm.wala.ipa.callgraph.propagation.rta.RTAContextInterpreter;
|
|
|
|
import com.ibm.wala.ssa.DefUse;
|
|
|
|
import com.ibm.wala.ssa.IR;
|
2007-09-02 14:45:41 +00:00
|
|
|
import com.ibm.wala.ssa.ISSABasicBlock;
|
2009-02-19 15:58:31 +00:00
|
|
|
import com.ibm.wala.ssa.SSAInstruction;
|
2006-11-22 17:38:46 +00:00
|
|
|
|
|
|
|
/**
|
2009-06-12 15:22:26 +00:00
|
|
|
* An object that provides an interface to local method information needed for CFA.
|
2006-11-22 17:38:46 +00:00
|
|
|
*/
|
2007-07-05 03:04:34 +00:00
|
|
|
public interface SSAContextInterpreter extends RTAContextInterpreter {
|
2006-11-22 17:38:46 +00:00
|
|
|
|
|
|
|
/**
|
2009-06-12 15:22:26 +00:00
|
|
|
* @return the IR that models the method context, or null if it's an unmodelled native method
|
2006-11-22 17:38:46 +00:00
|
|
|
*/
|
2007-07-06 22:08:13 +00:00
|
|
|
public IR getIR(CGNode node);
|
2006-11-22 17:38:46 +00:00
|
|
|
|
2007-07-05 03:04:34 +00:00
|
|
|
/**
|
2009-06-12 15:22:26 +00:00
|
|
|
* @return DefUse for the IR that models the method context, or null if it's an unmodelled native method
|
2007-07-05 03:04:34 +00:00
|
|
|
*/
|
2007-07-06 22:08:13 +00:00
|
|
|
public DefUse getDU(CGNode node);
|
2007-07-05 03:04:34 +00:00
|
|
|
|
2006-11-22 17:38:46 +00:00
|
|
|
/**
|
2009-06-12 15:22:26 +00:00
|
|
|
* @return the number of the statements in the IR, or -1 if it's an unmodelled native method.
|
2006-11-22 17:38:46 +00:00
|
|
|
*/
|
2007-07-06 22:08:13 +00:00
|
|
|
public int getNumberOfStatements(CGNode node);
|
2006-11-22 17:38:46 +00:00
|
|
|
|
2009-02-19 15:58:31 +00:00
|
|
|
public ControlFlowGraph<SSAInstruction, ISSABasicBlock> getCFG(CGNode n);
|
2007-07-05 03:04:34 +00:00
|
|
|
|
2006-11-22 17:38:46 +00:00
|
|
|
}
|