|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
Instruction for intermediate representation
| Field Summary | |
static int |
ADD
res = op1 + op2 |
static int |
ASG
res = op1 |
static int |
ASSUME
Special pseudo-tuple meaning that condition specified as the operand is assumed to be true<\code>. |
static int |
BAND
res = op1 & op2 |
static int |
BOR
res = op1 | op2 |
static int |
BXOR
res = op1 ^ op2 |
static int |
CALL
res = op1(op2, ..., opN) |
static int |
CAST
res = (op1)op2 |
static int |
COM
res = ~op1 |
static int |
DEC
res = --op1 |
static int |
DIV
res = op1 / op2 |
static int |
EQ
res = op1 == op2 |
static int |
GE
res = op1 >= op2 |
static int |
GOTO
unconditional transfer of control goto [lab1] |
static int |
GT
res = op1 > op2 |
static int |
IDX
res = op1[op2] |
static int |
IF
conditional control transfer if op1 then goto target[0] else goto target[1] |
static int |
INC
res = ++op1 |
static int |
INIT
Pseudo tuple, initializing variable (used to init method parameters, and exceptions in handlers) res = |
static int |
IOF
res = op1 instanceof op2 |
static int |
LABEL
target for control transfer |
static int |
LE
res = op1 <= op2 |
static int |
LENGTH
op1.length (op1 is assumed to be array type) |
static int |
LT
res = op1 < op2 |
static int |
MBR
res = op1.op2 |
static int |
MOD
res = op1 % op2 |
static int |
MUL
res = op0 * op2 |
static int |
NE
res = op1 != op2 |
static int |
NEG
res = -op1 |
static int |
NEW
res = new (op1, .... |
static int |
NEWARR
res = new [op1]...[opN] (operands are optional) |
static int |
NOP
The NO operation tuple |
static int |
NOT
res = !op1 |
static int |
PGOTO
Possible goto (used in representation of dataflow for
exception handling) |
static int |
PHI
Phi function (used in SSA ad SSI) |
static int |
REQUIRE
Special pseudo-tuple meaning that condition specified as the operand is required to be true<\code>. |
static int |
RETURN
return from method return or return op1; |
static int |
RHO
Rho function (used in SSI) |
static int |
SL
res = op1 << op2 |
static int |
SR
res = op1 >> op2 |
static int |
SUB
res = op1 - op2 |
static int |
SWITCH
switch statement |
static int |
SYNC
Synchronization primitive |
static int |
THROW
throw op1 |
static int |
UPL
res = +op1 |
static int |
USR
res = op1 >>> op2 |
| Method Summary | |
IBasicBlock |
basicBlock()
returns the basic block, this tuple belongs to |
AstObject |
getAstObject()
Obtain an associated AstObject, for which the tuple was generated returns null if no AstObject is associated. |
int |
getCode()
Get instruction type |
ITuple |
getNext()
Get next tuple in the list of all items |
ITuple |
getPrev()
Get previous tuple in the list of all items |
int |
getTupleId()
Get unique tuple id |
AstTypeReference |
getTypeReference()
Get front end type reference for result value. |
boolean |
hasSideEffect()
does the tuple may produce any side effect. |
void |
insertAfter(ITuple prevTuple)
insert tuple after prevTuple tuple |
boolean |
isAssertGenerated()
is the tuple generated from assertion-like code |
boolean |
isConstant()
Returns true if this tuple represents a compile-time
constant expression, false otherwise. |
boolean |
isTarget()
tells if the current instruction can be target of control flow transfer |
boolean |
isUsed()
is the result of this tuple used. |
java.lang.String |
mnemo()
Returns string with mnemonic name for this tuple |
int |
nOperands()
Get number of operands of this tuple |
IVal |
operand(int operandNumber)
Get argument with number i. |
IVal[] |
operands()
Get array of argument value nodes for the tuple For tuples, that take no argument, returns null |
IVar[][] |
operandsSymbolicValues()
get access to all information on operands symbolic values returns null if no such information is available |
IVar |
operandSymbolicValue(int operandNumber,
int valueNumber)
get access to specific symbolic value for a specific operand returns null if no such information is available |
IVar[] |
operandSymbolicValues(int operandNumber)
get access to all information on symbolic values for a specific operand returns null if no such information is available |
com.togethersoft.sca.dataflow.values.IValueDomain |
operandValue(int operandNumber)
Get calculated value domain for tuple operand. |
com.togethersoft.sca.dataflow.values.IValueDomain[] |
operandValues()
Get array of all calculated value domains for a tuple. |
void |
print(java.io.PrintStream out)
Print information about current tuple (for debugging purpose) |
void |
removeFromList()
Remove this tuple from list |
IVar |
result()
Get variable holding result of tuple For tuples, that produce no value, returns null |
com.togethersoft.sca.dataflow.values.IValueDomain |
resultValue()
Get calculated value domain for tuple result. |
ITuple |
target(int targetNumber)
Return target with specified number For tuples, that do no branching, returns null |
ITuple[] |
targets()
Return array of branch targets For tuples, that do no branching, returns null |
boolean |
transfersControl()
tells if the current tuple can transfer control to instruction other than next instruction |
| Methods inherited from interface com.togethersoft.sca.ast.AstSourcePosition |
getEndColumn, getEndLine, getFileName, getOffset, getStartColumn, getStartLine |
| Field Detail |
public static final int ADD
public static final int ASG
public static final int ASSUME
true<\code>. For example as result of design by
contract @ pre<\code> statement.
ASSUME op0<\code>public static final int BAND
public static final int BOR
public static final int BXOR
public static final int CALL
public static final int CAST
public static final int COM
public static final int DEC
public static final int DIV
public static final int EQ
public static final int GE
public static final int GOTO
goto [lab1]public static final int GT
public static final int IDX
public static final int IF
public static final int INC
public static final int INIT
public static final int IOF
public static final int LABEL
public static final int LE
public static final int LENGTH
public static final int LT
public static final int MBR
public static final int MOD
public static final int MUL
public static final int NE
public static final int NEG
public static final int NEW
public static final int NEWARR
public static final int NOP
public static final int NOT
public static final int PGOTO
goto (used in representation of dataflow for
exception handling)public static final int PHI
public static final int REQUIRE
true<\code>. For example as result of design by
contract @ post<\code> statement.
REQUIRE op0<\code>public static final int RETURN
public static final int RHO
public static final int SL
public static final int SR
public static final int SUB
public static final int SWITCH
public static final int SYNC
public static final int THROW
public static final int UPL
public static final int USR
| Method Detail |
public IBasicBlock basicBlock()
public AstObject getAstObject()
null if no AstObject is associated. (This may
happen only for methods which are generated from bytecode)public int getCode()
public ITuple getNext()
public ITuple getPrev()
public int getTupleId()
public AstTypeReference getTypeReference()
null<\code> for tuples which produce no value
and for tuples which are associated with ill-formed ASTs,
and for tuples generated from bytecode
public boolean hasSideEffect()
public void insertAfter(ITuple prevTuple)
prevTuple tuplepublic boolean isAssertGenerated()
public boolean isConstant()
true if this tuple represents a compile-time
constant expression, false otherwise.
For definition of compile-time constant expressions see JLS Section 5.28.public boolean isTarget()
public boolean isUsed()
doDeadAssignmentDetection method of Data Flow Graph.
if the result of this method is false, then the local variable changed
by the tuple is not used after this tuple was executedpublic java.lang.String mnemo()
public int nOperands()
public IVal operand(int operandNumber)
i.public IVal[] operands()
public IVar[][] operandsSymbolicValues()
null if no such information is available
public IVar operandSymbolicValue(int operandNumber,
int valueNumber)
null if no such information is availablepublic IVar[] operandSymbolicValues(int operandNumber)
null if no such information is availablepublic com.togethersoft.sca.dataflow.values.IValueDomain operandValue(int operandNumber)
null
if dataflow analysis was not performed for this tuplepublic com.togethersoft.sca.dataflow.values.IValueDomain[] operandValues()
null if tuple has no arguments,
(like LABEL and GOTO) or if values where not computed yet.
The values are normally computed not at the tuple creation time,
but during dataflow analysis phase.
public void print(java.io.PrintStream out)
out - -- stream on which to print the informationpublic void removeFromList()
public IVar result()
null
public com.togethersoft.sca.dataflow.values.IValueDomain resultValue()
null for Tuples which do not produce any values or
if dataflow analysis was not performed for this tuplepublic ITuple target(int targetNumber)
public ITuple[] targets()
public boolean transfersControl()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||