SootToPlumeUtil

object SootToPlumeUtil: Any

A utility class of methods to convert Soot objects to NewNodeBuilder items and construct pieces of the CPG.

Methods

projectMethodParameterIn

fun projectMethodParameterIn(local: soot.Local, currentLine: Int, currentCol: Int, childIdx: Int): NewMethodParameterInBuilder

Given an soot.Local, will construct method parameter information in the graph.

Parameters

Name Description
local: soot.Local

The soot.Local from which a NewMethodParameterInBuilder will be constructed.

currentLine: Int
currentCol: Int
childIdx: Int

ReturnValue

Name Description
NewMethodParameterInBuilder

the constructed vertex.

projectLocalVariable

fun projectLocalVariable(local: soot.Local, currentLine: Int, currentCol: Int, childIdx: Int): NewLocalBuilder

Given an soot.Local, will construct local variable information in the graph.

Parameters

Name Description
local: soot.Local

The soot.Local from which a NewLocal will be constructed.

currentLine: Int
currentCol: Int
childIdx: Int

ReturnValue

Name Description
NewLocalBuilder

the constructed vertex.

methodToStrings

fun methodToStrings(mtd: SootMethod): Triple<String, String, String>

Parameters

Name Description
mtd: SootMethod

ReturnValue

Name Description
Triple<String, String, String>

createNewExpr

fun createNewExpr(expr: NewExpr, currentLine: Int, currentCol: Int, childIdx: Int): NewUnknownBuilder

New expressions are specific to OOP languages and are thus Unknown nodes.

Parameters

Name Description
expr: NewExpr
currentLine: Int
currentCol: Int
childIdx: Int

ReturnValue

Name Description
NewUnknownBuilder

sootClassToFileName

fun sootClassToFileName(cls: SootClass): String

Derive a file name from an object of type SootClass

Parameters

Name Description
cls: SootClass

the soot class

ReturnValue

Name Description
String

the filename in string form

createLiteralVertex

fun createLiteralVertex(constant: Constant, currentLine: Int, currentCol: Int, childIdx: Int): NewLiteralBuilder

Creates a NewLiteral from a Constant.

Parameters

Name Description
constant: Constant
currentLine: Int
currentCol: Int
childIdx: Int

ReturnValue

Name Description
NewLiteralBuilder

createIdentifierVertex

fun createIdentifierVertex(local: Value, currentLine: Int, currentCol: Int, childIdx: Int): NewIdentifierBuilder

Creates a NewIdentifier from a Value.

Parameters

Name Description
local: Value
currentLine: Int
currentCol: Int
childIdx: Int

ReturnValue

Name Description
NewIdentifierBuilder

createArrayRefIdentifier

fun createArrayRefIdentifier(arrRef: ArrayRef, currentLine: Int, currentCol: Int, childIdx: Int): NewIdentifierBuilder

Creates a NewIdentifier from an ArrayRef.

Parameters

Name Description
arrRef: ArrayRef
currentLine: Int
currentCol: Int
childIdx: Int

ReturnValue

Name Description
NewIdentifierBuilder

createFieldIdentifierVertex

fun createFieldIdentifierVertex(field: FieldRef, currentLine: Int, currentCol: Int, childIdx: Int): NewFieldIdentifierBuilder

Creates a NewFieldIdentifier from a FieldRef.

Parameters

Name Description
field: FieldRef
currentLine: Int
currentCol: Int
childIdx: Int

ReturnValue

Name Description
NewFieldIdentifierBuilder

createScalaList

fun <T> createScalaList(vararg item: T): scala.collection.immutable.List<T>

Parameters

Name Description
vararg item: T

ReturnValue

Name Description
scala.collection.immutable.List<T>

parseBinopExpr

fun parseBinopExpr(op: BinopExpr): String

Parameters

Name Description
op: BinopExpr

ReturnValue

Name Description
String

parseBinopExpr

fun parseBinopExpr(sym: String): String

Parameters

Name Description
sym: String

ReturnValue

Name Description
String