|
SandMark version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sandmark.watermark.ct.trace.callforest.Decorate
Field Summary | |
(package private) static int |
ADD_PARAM_STEALTHY_WEIGHT
|
(package private) static int |
ADD_RETURN_STEALTHY_WEIGHT
|
(package private) java.lang.String |
annotatorClass
|
(package private) ClassHierarchy |
classHierarchy
|
(package private) static int |
EDGE_CALL_WEIGHT
|
(package private) static int |
EDGE_WEIGHT
|
(package private) java.util.Vector |
forest
|
(package private) static int |
NODE_CANTMODIFY_WEIGHT
|
(package private) static int |
NODE_JAVA_WEIGHT
|
(package private) static int |
NODE_MARK_WEIGHT
|
(package private) static int |
NODE_STEALTHY_WEIGHT
|
(package private) static int |
NODE_UNSTEALTHY_WEIGHT
|
(package private) java.util.Properties |
props
|
(package private) Stats |
statistics
|
(package private) StorageClass[] |
storageClasses
|
(package private) static double |
TREE_ORDER_WEIGHT
|
Constructor Summary | |
Decorate(java.util.Vector forest,
ClassHierarchy classHierarchy,
Stats stats,
java.util.Properties props)
|
Method Summary | |
(package private) double |
addStats(java.lang.String[] ops,
int numberOfBytecodes,
double wm_percent,
java.util.Hashtable usage)
Compute the similarity of a set of bytecodes in a method to the type of code we insert. |
(package private) void |
decorate()
Add node and edge weights to the information flow graph. |
(package private) void |
decorateEdge(Graph graph,
Edge edge)
Construct the weight of this edge. |
(package private) void |
decorateEdges()
Add weights to all the edges in all the call graphs. |
(package private) void |
decorateNode(Graph graph,
Node node,
long minID,
long maxID)
Construct the weight of this node. |
(package private) void |
decorateNodes()
Add weights to all the nodes in all the call graphs. |
(package private) boolean |
okToAddStorageArgument(MethodID method)
Return true if it OK to add a storage argument to this method. |
(package private) double |
stealthyToAddReturnValue(MethodID method)
Return 1.0 if it would be stealthy to add a return value to this method. |
(package private) double |
stealthyToAddStorageArgument(MethodID method)
Return true if it would be stealthy to add a storage argument to this method. |
(package private) double |
stealtyToHoldWatermark(MethodID method)
Return a number that is a measure of how stealthy it would be to insert watermarking code in this method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
ClassHierarchy classHierarchy
Stats statistics
java.util.Properties props
java.lang.String annotatorClass
StorageClass[] storageClasses
java.util.Vector forest
static final int EDGE_WEIGHT
static final int EDGE_CALL_WEIGHT
static final int ADD_PARAM_STEALTHY_WEIGHT
static final int ADD_RETURN_STEALTHY_WEIGHT
static final int NODE_MARK_WEIGHT
static final int NODE_STEALTHY_WEIGHT
static final int NODE_UNSTEALTHY_WEIGHT
static final int NODE_JAVA_WEIGHT
static final int NODE_CANTMODIFY_WEIGHT
static final double TREE_ORDER_WEIGHT
Constructor Detail |
public Decorate(java.util.Vector forest, ClassHierarchy classHierarchy, Stats stats, java.util.Properties props)
Method Detail |
void decorate()
void decorateNodes()
void decorateNode(Graph graph, Node node, long minID, long maxID)
graph
- the call graphnode
- the nodedouble stealtyToHoldWatermark(MethodID method)
method
- the method
The bytecodes we insert have approximately this distribution:
bytecode percent -------------------- aload* 29 putfield 10 astore* 8 new 7 invokespecial 7 dup 7 getstatic 6 invokevirtual 6 iconst*|ldc 5 ifnull 3 pop 2 return 2 getfield 2 checkcast 1 goto 1
double addStats(java.lang.String[] ops, int numberOfBytecodes, double wm_percent, java.util.Hashtable usage)
ops
- a set of bytecodesnumberOfBytecodes
- total number of bytecodes in this methodwm_percent
- frequency of these bytecodes in the
code we insertusage
- bytecode counts for this method.
boolean okToAddStorageArgument(MethodID method)
method
- the methoddouble stealthyToAddStorageArgument(MethodID method)
method
- the method
double stealthyToAddReturnValue(MethodID method)
method
- the method
void decorateEdges()
void decorateEdge(Graph graph, Edge edge)
graph
- the call graphedge
- the edge
|
SandMark version 3.0 Wed Jan 29 10:30:05 MST 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |