Skip to content

Commit 63daf8b

Browse files
committed
finalize edits
1 parent 8d83a7d commit 63daf8b

1 file changed

Lines changed: 5 additions & 28 deletions

File tree

code/jvm/src/main/scala/maf/cli/experiments/precision/AnalysisComparisonAlt.scala

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ abstract class AnalysisComparisonAlt[Num: IntLattice, Rea: RealLattice, Bln: Boo
2323
// - the number of runs for the concrete interpreter
2424
def analyses: List[(SchemeExp => Analysis, String)]
2525
def benchmarks: List[Benchmark]
26-
def runs = 1 // number of runs for the concrete interpreter
26+
def runs = 3 // number of runs for the concrete interpreter
2727

2828
// and can, optionally, be configured in its timeouts (default: 10min.) and the number of concrete runs
29-
def timeout() = Timeout.start(Duration(5, MINUTES)) // timeout for the analyses
29+
def timeout() = Timeout.start(Duration(10, MINUTES)) // timeout for the analyses
3030

3131
// keep the results of the benchmarks in a table
3232
enum Result:
@@ -152,18 +152,6 @@ abstract class SASBenchmarks
152152
//"triangl" <- times out in concrete interpreter
153153
).map(name => s"test/R5RS/gabriel/$name.scm")
154154

155-
def slowBenchmarks =
156-
List(
157-
"boyer",
158-
"browse",
159-
"destruc"
160-
).map(name => s"test/R5RS/gabriel/$name.scm")
161-
++
162-
List(
163-
"test/R5RS/gambit/matrix.scm",
164-
"test/R5RS/various/mceval.scm",
165-
)
166-
167155
def extraBenchmarks =
168156
List(
169157
"test/R5RS/various/grid.scm",
@@ -224,28 +212,17 @@ object CountIterationBenchmark extends SASBenchmarks:
224212
dssFS0, dssFS0NoGC
225213
)
226214

227-
var results: Table[Option[Long]] = Table.empty
215+
var results: Table[Int] = Table.empty
228216

229217
override protected def forBenchmark(path: Benchmark, program: SchemeExp): Unit =
230218
println(s"ANALYZING $path")
231219
analyses.foreach { case (analysis, name) =>
232220
val anl = analysis(program)
233221
anl.analyzeWithTimeout(Timeout.start(Duration(15, MINUTES)))
234-
val res = anl.asInstanceOf[SchemeModFLocalFS].computeOneCountsPercentage.map(_ * 100)
235-
results = results.add(path, name, res.map(_.round))
222+
results = results.add(path, name, anl.asInstanceOf[SchemeModFLocalFS].iterations)
236223
}
237224

238225
override def timeout() = Timeout.none
239226

240-
private def showResult(res: Option[Long]): String =
241-
res match
242-
case None => "N/A"
243-
case Some(value) => s"$value%"
244-
245227
override protected def showResults() =
246-
println(results.prettyString(format=showResult))
247-
248-
override protected def writeResultsToFile(outputFolder: Option[String]) =
249-
outputFolder.foreach { dir =>
250-
writeToFile(results, s"$dir/iteration-benchmarks.csv")
251-
}
228+
println(results.prettyString())

0 commit comments

Comments
 (0)