|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectscale.alias.AliasAnalysis
scale.alias.steensgaard.Steensgaard
public class Steensgaard
A class which implements Bjarne Steensgaard's alias analysis algorithm.
$Id: Steensgaard.java,v 1.41 2005-05-09 17:10:34 burrill Exp $
Copyright 2008 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
The algorithm performs interprocedural flow-insensitive points-to analysis. The important features of the algorithm are:
| Field Summary |
|---|
| Fields inherited from class scale.alias.AliasAnalysis |
|---|
classTrace, trace |
| Constructor Summary | |
|---|---|
Steensgaard()
Create an instance of the Steensgaard alias analysis algorithm. |
|
Steensgaard(boolean ip)
Create an instance of the Steensgaard alias analysis algorithm and indicate if it operates on the whole program. |
|
| Method Summary | |
|---|---|
void |
addrAssign(AliasVar lhs,
AliasVar addr)
Inference rule for the assignment of an address (x = &y). |
AliasVar |
addVariable(Declaration decl)
Add a variable that needs to be processed by the algorithm. |
AliasVar |
addVariable(Declaration decl,
AliasVar v)
Add a variable into the analyzer and indicate the variable is in the same alias group as another variable. |
void |
assignPtr(AliasVar ptr,
AliasVar rhs)
Inference rule for assigning to a pointer (*x = y). |
void |
functionCall(AliasVar lhs,
AliasVar func,
Vector<AliasVar> args)
Inference rule for a function call assignment. |
void |
functionDef(AliasVar func,
Vector<AliasVar> params,
AliasVar retval)
Inference rule for a function definition. |
void |
heapAssign(AliasVar lhs)
Inference rule for assigning dynamically allocated memory. |
boolean |
isContextSensitive()
Return false because Steensgaard's algorithm is not context sensitive. |
boolean |
isFlowSensitive()
Return false because Steensgaard's algorithm is not flow sensitive. |
boolean |
isInterProcedural()
Return true if the analysis is interprocedural. |
void |
opAssign(AliasVar lhs,
Vector<AliasVar> opnds)
Inference rule for an operation (x = op(y1,…,yN)). |
void |
ptrAssign(AliasVar lhs,
AliasVar ptr)
Inference rule for a pointer assignment (x = *y |
void |
simpleAssign(AliasVar lhs,
AliasVar rhs)
Inference rules for simple assignment (x = y). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Steensgaard()
public Steensgaard(boolean ip)
ip - set to true if the analysis should be interprocedural| Method Detail |
|---|
public boolean isFlowSensitive()
isFlowSensitive in class AliasAnalysispublic boolean isContextSensitive()
isContextSensitive in class AliasAnalysispublic boolean isInterProcedural()
isInterProcedural in class AliasAnalysispublic AliasVar addVariable(Declaration decl)
addVariable in class AliasAnalysisdecl - is the name of the variable.
public AliasVar addVariable(Declaration decl,
AliasVar v)
addVariable in class AliasAnalysis
public void simpleAssign(AliasVar lhs,
AliasVar rhs)
simpleAssign in class AliasAnalysislhs - the left hand side of the assignment.rhs - the right hand side of the assignment.
public void addrAssign(AliasVar lhs,
AliasVar addr)
addrAssign in class AliasAnalysislhs - the left hand side of the assignment.addr - the right hand side of the assignment (the address).
public void ptrAssign(AliasVar lhs,
AliasVar ptr)
ptrAssign in class AliasAnalysislhs - the left hand side of the assignment.ptr - the right hand side of the assignment (the pointer).
public void opAssign(AliasVar lhs,
Vector<AliasVar> opnds)
(x = op(y1,…,yN)).
opAssign in class AliasAnalysislhs - the left hand side of the assignment.opnds - the list of arguments of the operation.public void heapAssign(AliasVar lhs)
heapAssign in class AliasAnalysislhs - the left hand side of the assignment.
public void assignPtr(AliasVar ptr,
AliasVar rhs)
assignPtr in class AliasAnalysisptr - the pointer representing the left hand side of the assignment.rhs - the right hand side of the assignment.
public void functionDef(AliasVar func,
Vector<AliasVar> params,
AliasVar retval)
functionDef in class AliasAnalysisfunc - the alias variable representing the function.params - the alias variables representing the list of parameters.retval - the alias variables representing the return value.
public void functionCall(AliasVar lhs,
AliasVar func,
Vector<AliasVar> args)
functionCall in class AliasAnalysislhs - the alias variables representing the value returned
by the function call (is null if there function returns nothing)func - the alias variables representing the function.args - alias variables representing the arguments.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||