Skip to content

Commit f02b390

Browse files
feat: rename getter for partial results on timeout and update README
1 parent f336022 commit f02b390

7 files changed

Lines changed: 4 additions & 20 deletions

File tree

Binary file not shown.

src/main/arguments/ArgsParser.groovy

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class ArgsParser {
3939
this.cli.e(longOpt: 'extension', args: 1, argName: 'file extenson', 'Specify the file extension that should be used in the analysis (e.g. .rb, .ts, .java, .cpp. Default: .java)')
4040
this.cli.l(longOpt: 'language-separators', args: 1, argName: 'language syntactic separators', 'Specify the language separators that should be used in the analysis. Required for (and only considered when) running studies with the CSDiff tool. Default: \"{ } ( ) ; ,\"')
4141
this.cli.log(longOpt: 'log-level', args: 1, argName: 'log level', 'Specify the minimum log level: (OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL). Default: \"INFO\"')
42-
this.cli.prt(longOpt: 'partial-results-on-timeout', 'When a soot analysis times out, capture and record the partial results found up to that point instead of discarding them')
4342
}
4443

4544
Arguments parse(args) {
@@ -143,10 +142,6 @@ class ArgsParser {
143142
if(this.options.log) {
144143
args.setLogLevel(Level.toLevel(this.options.log))
145144
}
146-
147-
if (this.options.prt) {
148-
args.setPartialResultsOnTimeout(true)
149-
}
150145
}
151146

152147
private boolean repositoryExists(String repositoryURL) {

src/main/arguments/Arguments.groovy

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class Arguments {
2121
private String syntacticSeparators
2222
private String fileExtension
2323
private Level logLevel
24-
private boolean partialResultsOnTimeout
2524

2625
Arguments() { // set the default values for all parameters
2726
randomSeed = 1
@@ -38,7 +37,6 @@ class Arguments {
3837
syntacticSeparators = '{ } ( ) ; ,'
3938
fileExtension = '.java'
4039
logLevel = Level.INFO
41-
partialResultsOnTimeout = false
4240
}
4341

4442
void setRandomSeed(int randomSeed) {
@@ -169,12 +167,4 @@ class Arguments {
169167
this.logLevel = logLevel
170168
Configurator.setRootLevel(logLevel)
171169
}
172-
173-
boolean isPartialResultsOnTimeout() {
174-
return partialResultsOnTimeout
175-
}
176-
177-
void setPartialResultsOnTimeout(boolean partialResultsOnTimeout) {
178-
this.partialResultsOnTimeout = partialResultsOnTimeout
179-
}
180170
}

src/main/services/outputProcessors/soot/Main.groovy

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ class Main {
4040
sootRunner.setDetectionAlgorithms(configureDetectionAlgorithms(appArguments, sootWrapper))
4141
}
4242

43-
if (appArguments.getPartialResultsOnTimeout()) {
43+
if (appArguments.isPartialResultsOnTimeout()) {
44+
println "Setting partial results on timeout"
4445
sootRunner.configurePartialResultsOnTimeout(true)
4546
}
4647

src/main/services/outputProcessors/soot/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Options:
6161
-depthLimit Sets the depth limit on accessing methods when performing Overriding Assignment Interprocedural, Direct Flow Interprocedural and Confluence Interprocedural analyses. Default = 5
6262
-printDepthSVFA Print depth in SVFA analysis
6363
-cg,--callgraph <algorithm> Select call graph algorithm [CHA, RTA, VTA, SPARK]
64+
-prt,--partial-results-on-timeout When a soot analysis times out, capture and record the partial results
6465
```
6566

6667
For example:

src/main/services/outputProcessors/soot/RunSootAnalysisOutputProcessor.groovy

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ class RunSootAnalysisOutputProcessor implements OutputProcessor {
7575
void processOutput() {
7676
// check if file generated by FetchBuildsOutputProcessor exists
7777
println "Executing RunSootAnalysisOutputProcessor"
78-
if (arguments.isPartialResultsOnTimeout()) {
79-
configurePartialResultsOnTimeout(true)
80-
}
8178
executeAnalyses(arguments.getOutputPath())
8279
}
8380

src/main/services/outputProcessors/soot/arguments/Arguments.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class Arguments {
237237
this.callgraph = callgraph
238238
}
239239

240-
boolean getPartialResultsOnTimeout() {
240+
boolean isPartialResultsOnTimeout() {
241241
return partialResultsOnTimeout
242242
}
243243

0 commit comments

Comments
 (0)