File tree Expand file tree Collapse file tree 4 files changed +20
-4
lines changed
main/scala/br/unb/cic/soot/svfa/jimple
test/scala/br/unb/cic/soot Expand file tree Collapse file tree 4 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ scalaVersion := "2.12.8"
22
33name := " svfa-scala"
44organization := " br.unb.cic"
5- version := " 0.0.7 -SNAPSHOT"
5+ version := " 0.0.8 -SNAPSHOT"
66
77githubOwner := " rbonifacio"
88githubRepository := " svfa-scala"
Original file line number Diff line number Diff line change 1+ package br .unb .cic .soot .svfa .jimple
2+
3+ trait Analysis {
4+ def interproceduralAnalysis () : Boolean
5+ def intraproceduralAnalysis () : Boolean = ! interproceduralAnalysis()
6+ }
7+
8+ trait InterproceduralAnalysis extends Analysis {
9+ override def interproceduralAnalysis (): Boolean = true
10+ }
11+
12+ trait IntraproceduralAnalysis extends Analysis {
13+ override def interproceduralAnalysis (): Boolean = false
14+ }
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ import scala.collection.mutable.ListBuffer
2121 * A Jimple based implementation of
2222 * SVFA.
2323 */
24- abstract class JSVFA extends SVFA with FieldSensitiveness with SourceSinkDef with LazyLogging {
24+ abstract class JSVFA extends SVFA with Analysis with FieldSensitiveness with SourceSinkDef with LazyLogging {
2525
2626 var methods = 0
2727 val traversedMethods = scala.collection.mutable.Set .empty[SootMethod ]
@@ -196,6 +196,8 @@ abstract class JSVFA extends SVFA with FieldSensitiveness with SourceSinkDef wit
196196 return
197197 }
198198
199+ if (intraproceduralAnalysis()) return
200+
199201 var pmtCount = 0
200202 val body = callee.retrieveActiveBody()
201203 val g = new ExceptionalUnitGraph (body)
Original file line number Diff line number Diff line change 11package br .unb .cic .soot
22
3- import br .unb .cic .soot .svfa .jimple .{FieldSenstive , JSVFA }
3+ import br .unb .cic .soot .svfa .jimple .{FieldSenstive , InterproceduralAnalysis , JSVFA }
44import soot .{Scene , SootMethod }
55
6- abstract class JSVFATest extends JSVFA with FieldSenstive {
6+ abstract class JSVFATest extends JSVFA with InterproceduralAnalysis with FieldSenstive {
77 def getClassName (): String
88 def getMainMethod (): String
99
You can’t perform that action at this time.
0 commit comments