From 8b1ea085dc1fc599feecab5bb5361eb450b72ebe Mon Sep 17 00:00:00 2001 From: Azat Abdullin Date: Tue, 9 Jan 2024 11:58:47 +0100 Subject: [PATCH] refactoring after merge --- .../research/kex/jacoco/CoverageInfo.kt | 171 ++++++++++++++++ .../research/kex/jacoco/CoverageReporter.kt | 187 ------------------ .../minimization/GreedyTestReductionImpl.kt | 20 +- .../kex/jacoco/minimization/Minimizer.kt | 15 +- ...overage.kt => TestwiseCoverageReporter.kt} | 144 +++----------- .../kotlin/org/vorpal/research/kex/main.kt | 12 +- 6 files changed, 224 insertions(+), 325 deletions(-) create mode 100644 kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/CoverageInfo.kt rename kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/{TestwiseCoverage.kt => TestwiseCoverageReporter.kt} (70%) diff --git a/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/CoverageInfo.kt b/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/CoverageInfo.kt new file mode 100644 index 000000000..66cb62c85 --- /dev/null +++ b/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/CoverageInfo.kt @@ -0,0 +1,171 @@ +package org.vorpal.research.kex.jacoco + +import org.vorpal.research.kthelper.assert.unreachable +import org.vorpal.research.kthelper.logging.log + + +interface CoverageInfo { + val covered: Int + val total: Int + val ratio: Double +} + +enum class CoverageUnit(unit: String) { + INSTRUCTION("instructions"), + BRANCH("branches"), + LINE("lines"), + COMPLEXITY("complexity"); + + companion object { + fun parse(unit: String) = when (unit) { + INSTRUCTION.unitName -> INSTRUCTION + BRANCH.unitName -> BRANCH + LINE.unitName -> LINE + COMPLEXITY.unitName -> COMPLEXITY + else -> unreachable { log.error("Unknown coverage unit $unit") } + } + } + + val unitName: String = unit + + override fun toString(): String { + return unitName + } +} + +enum class AnalysisUnit(unit: String) { + METHOD("method"), + CLASS("class"), + PACKAGE("package"); + + companion object { + fun parse(unit: String) = when (unit) { + METHOD.unitName -> METHOD + CLASS.unitName -> CLASS + PACKAGE.unitName -> PACKAGE + else -> unreachable { log.error("Unknown analysis unit $unit") } + } + } + + val unitName: String = unit + + override fun toString(): String { + return unitName + } +} + +data class GenericCoverageInfo( + override val covered: Int, + override val total: Int, + val unit: CoverageUnit +) : CoverageInfo { + override val ratio: Double get() = when (total) { + 0 -> 0.0 + else -> covered.toDouble() / total + } + override fun toString(): String = buildString { + append(String.format("%s of %s %s covered", covered, total, unit)) + if (total > 0) { + append(String.format(" = %.2f", ratio * 100)) + append("%") + } + } +} + +abstract class CommonCoverageInfo( + val name: String, + val level: AnalysisUnit, + val instructionCoverage: CoverageInfo, + val branchCoverage: CoverageInfo, + val linesCoverage: CoverageInfo, + val complexityCoverage: CoverageInfo +) { + open fun print(detailed: Boolean = false) = toString() + + override fun toString(): String = buildString { + appendLine(String.format("Coverage of `%s` %s:", name, level)) + appendLine(" $instructionCoverage") + appendLine(" $branchCoverage") + appendLine(" $linesCoverage") + append(" $complexityCoverage") + } + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is CommonCoverageInfo) return false + + return name == other.name + } + + override fun hashCode(): Int { + return name.hashCode() + } +} + +class MethodCoverageInfo( + name: String, + instructionCoverage: CoverageInfo, + branchCoverage: CoverageInfo, + linesCoverage: CoverageInfo, + complexityCoverage: CoverageInfo +) : CommonCoverageInfo( + name, + AnalysisUnit.METHOD, + instructionCoverage, + branchCoverage, + linesCoverage, + complexityCoverage +) + +class ClassCoverageInfo( + name: String, + instructionCoverage: CoverageInfo, + branchCoverage: CoverageInfo, + linesCoverage: CoverageInfo, + complexityCoverage: CoverageInfo, +) : CommonCoverageInfo( + name, + AnalysisUnit.CLASS, + instructionCoverage, + branchCoverage, + linesCoverage, + complexityCoverage +) { + val methods = mutableSetOf() + + override fun print(detailed: Boolean) = buildString { + appendLine(this@ClassCoverageInfo.toString()) + if (detailed) { + methods.forEach { + appendLine() + appendLine(it.print(true)) + } + } + } +} + +class PackageCoverageInfo( + name: String, + instructionCoverage: CoverageInfo, + branchCoverage: CoverageInfo, + linesCoverage: CoverageInfo, + complexityCoverage: CoverageInfo +) : CommonCoverageInfo( + name, + AnalysisUnit.PACKAGE, + instructionCoverage, + branchCoverage, + linesCoverage, + complexityCoverage +) { + val classes = mutableSetOf() + + override fun print(detailed: Boolean) = buildString { + if (detailed) { + classes.forEach { + appendLine(it.print(true)) + } + } + appendLine(this@PackageCoverageInfo.toString()) + } +} diff --git a/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/CoverageReporter.kt b/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/CoverageReporter.kt index daefaa177..bac36f868 100644 --- a/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/CoverageReporter.kt +++ b/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/CoverageReporter.kt @@ -50,172 +50,6 @@ import kotlin.time.Duration import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds -interface CoverageInfo { - val covered: Int - val total: Int - val ratio: Double -} - -enum class CoverageUnit(unit: String) { - INSTRUCTION("instructions"), - BRANCH("branches"), - LINE("lines"), - COMPLEXITY("complexity"); - - companion object { - fun parse(unit: String) = when (unit) { - INSTRUCTION.unitName -> INSTRUCTION - BRANCH.unitName -> BRANCH - LINE.unitName -> LINE - COMPLEXITY.unitName -> COMPLEXITY - else -> unreachable { log.error("Unknown coverage unit $unit") } - } - } - - val unitName: String = unit - - override fun toString(): String { - return unitName - } -} - -enum class AnalysisUnit(unit: String) { - METHOD("method"), - CLASS("class"), - PACKAGE("package"); - - companion object { - fun parse(unit: String) = when (unit) { - METHOD.unitName -> METHOD - CLASS.unitName -> CLASS - PACKAGE.unitName -> PACKAGE - else -> unreachable { log.error("Unknown analysis unit $unit") } - } - } - - val unitName: String = unit - - override fun toString(): String { - return unitName - } -} - -data class GenericCoverageInfo( - override val covered: Int, - override val total: Int, - val unit: CoverageUnit -) : CoverageInfo { - override val ratio: Double get() = when (total) { - 0 -> 0.0 - else -> covered.toDouble() / total - } - override fun toString(): String = buildString { - append(String.format("%s of %s %s covered", covered, total, unit)) - if (total > 0) { - append(String.format(" = %.2f", ratio * 100)) - append("%") - } - } -} - -abstract class CommonCoverageInfo( - val name: String, - val level: AnalysisUnit, - val instructionCoverage: CoverageInfo, - val branchCoverage: CoverageInfo, - val linesCoverage: CoverageInfo, - val complexityCoverage: CoverageInfo -) { - open fun print(detailed: Boolean = false) = toString() - - override fun toString(): String = buildString { - appendLine(String.format("Coverage of `%s` %s:", name, level)) - appendLine(" $instructionCoverage") - appendLine(" $branchCoverage") - appendLine(" $linesCoverage") - append(" $complexityCoverage") - } - - override fun equals(other: Any?): Boolean { - if (this === other) return true - if (other !is CommonCoverageInfo) return false - - return name == other.name - } - - override fun hashCode(): Int { - return name.hashCode() - } -} - -class MethodCoverageInfo( - name: String, - instructionCoverage: CoverageInfo, - branchCoverage: CoverageInfo, - linesCoverage: CoverageInfo, - complexityCoverage: CoverageInfo -) : CommonCoverageInfo( - name, - AnalysisUnit.METHOD, - instructionCoverage, - branchCoverage, - linesCoverage, - complexityCoverage -) - -class ClassCoverageInfo( - name: String, - instructionCoverage: CoverageInfo, - branchCoverage: CoverageInfo, - linesCoverage: CoverageInfo, - complexityCoverage: CoverageInfo, -) : CommonCoverageInfo( - name, - AnalysisUnit.CLASS, - instructionCoverage, - branchCoverage, - linesCoverage, - complexityCoverage -) { - val methods = mutableSetOf() - - override fun print(detailed: Boolean) = buildString { - appendLine(this@ClassCoverageInfo.toString()) - if (detailed) { - methods.forEach { - appendLine() - appendLine(it.print(true)) - } - } - } -} - -class PackageCoverageInfo( - name: String, - instructionCoverage: CoverageInfo, - branchCoverage: CoverageInfo, - linesCoverage: CoverageInfo, - complexityCoverage: CoverageInfo -) : CommonCoverageInfo( - name, - AnalysisUnit.PACKAGE, - instructionCoverage, - branchCoverage, - linesCoverage, - complexityCoverage -) { - val classes = mutableSetOf() - - override fun print(detailed: Boolean) = buildString { - if (detailed) { - classes.forEach { - appendLine(it.print(true)) - } - } - appendLine(this@PackageCoverageInfo.toString()) - } -} - class CoverageReporter( containers: List = listOf() ) { @@ -487,27 +321,6 @@ class CoverageReporter( else -> unreachable { log.error("Unknown common coverage info class ${T::class.java}") } } as T } - -// class PathClassLoader(val paths: List) : ClassLoader() { -// private val cache = hashMapOf>() -// override fun loadClass(name: String): Class<*> { -// synchronized(this.getClassLoadingLock(name)) { -// if (name in cache) return cache[name]!! -// -// val fileName = name.replace(Package.CANONICAL_SEPARATOR, File.separatorChar) + ".class" -// for (path in paths) { -// val resolved = path.resolve(fileName) -// if (resolved.exists()) { -// val bytes = resolved.readBytes() -// val klass = defineClass(name, bytes, 0, bytes.size) -// cache[name] = klass -// return klass -// } -// } -// } -// return parent?.loadClass(name) ?: throw ClassNotFoundException() -// } -// } } fun reportCoverage( diff --git a/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/GreedyTestReductionImpl.kt b/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/GreedyTestReductionImpl.kt index d0c6bdaac..c889b3c97 100644 --- a/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/GreedyTestReductionImpl.kt +++ b/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/GreedyTestReductionImpl.kt @@ -11,7 +11,7 @@ private class Test( } private class Requirement { - private val satisfyTests: MutableList =mutableListOf() + private val satisfyTests = mutableListOf() private var visited = false fun addTest(testName: Path) { @@ -20,22 +20,22 @@ private class Requirement { fun visit(tests: MutableMap) { if (visited) return - satisfyTests.forEach{ tests[it]!!.power-- } + satisfyTests.forEach { tests[it]!!.power-- } visited = true } } -class GreedyTestReductionImpl ( +class GreedyTestReductionImpl( testCoverage: TestwiseCoverageInfo -) :TestReduction{ - private var tests: MutableMap = mutableMapOf() - private var requirements: MutableMap = mutableMapOf() +) : TestReduction { + private var tests = mutableMapOf() + private var requirements = mutableMapOf() init { - testCoverage.req.forEach{ requirements[it] = Requirement() } + testCoverage.req.forEach { requirements[it] = Requirement() } for (test in testCoverage.tests) { - tests[test.testName] = Test(test.satisfize) - for (requirement in test.satisfize) + tests[test.testName] = Test(test.satisfies) + for (requirement in test.satisfies) requirements[requirement]!!.addTest(test.testName) } } @@ -61,4 +61,4 @@ class GreedyTestReductionImpl ( val allTests = tests.keys.toList() return allTests.subtract(importantTests.toSet()).toList() } -} \ No newline at end of file +} diff --git a/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/Minimizer.kt b/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/Minimizer.kt index 52b99915f..5bb9192fe 100644 --- a/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/Minimizer.kt +++ b/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/Minimizer.kt @@ -3,11 +3,12 @@ package org.vorpal.research.kex.jacoco.minimization import org.vorpal.research.kex.launcher.AnalysisLevel import org.vorpal.research.kfg.ClassManager import org.vorpal.research.kfg.container.Container +import org.vorpal.research.kthelper.logging.log import java.nio.file.Path class TestCoverageInfo( val testName: Path, - val satisfize: List + val satisfies: List ) { } @@ -22,8 +23,8 @@ class Minimizer( private val analysisLevel: AnalysisLevel ) { fun execute(report: Boolean = false, mode: String = "symbolic") { - val testWiseCoverage = TestwiseCoverage(jar) - val testCoverage = testWiseCoverage.execute(analysisLevel) + val testWiseCoverageReporter = TestwiseCoverageReporter(jar) + val testCoverage = testWiseCoverageReporter.execute(analysisLevel) val excessTests = GreedyTestReductionImpl(testCoverage).minimized() for (classPath in excessTests) { @@ -31,10 +32,12 @@ class Minimizer( if (classFile.exists()) { classFile.delete() } else { - org.vorpal.research.kthelper.logging.log.error("nonexistent class in Minimizer: $classFile") + log.error("nonexistent class in Minimizer: $classFile") } } - if (report) { testWiseCoverage.reportCoverage(cm, analysisLevel, mode) } + if (report) { + testWiseCoverageReporter.reportCoverage(cm, analysisLevel, mode) + } } -} \ No newline at end of file +} diff --git a/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/TestwiseCoverage.kt b/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/TestwiseCoverageReporter.kt similarity index 70% rename from kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/TestwiseCoverage.kt rename to kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/TestwiseCoverageReporter.kt index 69e89ee2d..8939115ac 100644 --- a/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/TestwiseCoverage.kt +++ b/kex-runner/src/main/kotlin/org/vorpal/research/kex/jacoco/minimization/TestwiseCoverageReporter.kt @@ -15,30 +15,43 @@ import org.jacoco.core.runtime.RuntimeData import org.junit.runner.Result import org.junit.runner.notification.RunListener import org.vorpal.research.kex.config.kexConfig -import org.vorpal.research.kex.jacoco.* +import org.vorpal.research.kex.jacoco.ClassCoverageInfo +import org.vorpal.research.kex.jacoco.CommonCoverageInfo +import org.vorpal.research.kex.jacoco.CoverageInfo +import org.vorpal.research.kex.jacoco.CoverageUnit +import org.vorpal.research.kex.jacoco.GenericCoverageInfo +import org.vorpal.research.kex.jacoco.MethodCoverageInfo +import org.vorpal.research.kex.jacoco.PackageCoverageInfo import org.vorpal.research.kex.launcher.AnalysisLevel import org.vorpal.research.kex.launcher.ClassLevel import org.vorpal.research.kex.launcher.MethodLevel import org.vorpal.research.kex.launcher.PackageLevel -import org.vorpal.research.kex.util.* +import org.vorpal.research.kex.util.PermanentCoverageInfo +import org.vorpal.research.kex.util.asArray +import org.vorpal.research.kex.util.asmString +import org.vorpal.research.kex.util.compiledCodeDirectory +import org.vorpal.research.kex.util.deleteOnExit +import org.vorpal.research.kex.util.javaString +import org.vorpal.research.kex.util.outputDirectory import org.vorpal.research.kfg.ClassManager import org.vorpal.research.kfg.Package import org.vorpal.research.kfg.container.Container import org.vorpal.research.kfg.ir.Method import org.vorpal.research.kthelper.assert.unreachable +import org.vorpal.research.kthelper.logging.log import org.vorpal.research.kthelper.tryOrNull import java.io.File import java.nio.file.Files import java.nio.file.Path -import java.nio.file.attribute.BasicFileAttributes -import java.util.* import java.util.stream.Collectors -import kotlin.io.path.* -import kotlin.time.Duration -import kotlin.time.Duration.Companion.milliseconds -import kotlin.time.Duration.Companion.seconds - -class TestwiseCoverage( +import kotlin.io.path.exists +import kotlin.io.path.inputStream +import kotlin.io.path.name +import kotlin.io.path.readBytes +import kotlin.io.path.relativeTo +import kotlin.io.path.writeBytes + +class TestwiseCoverageReporter( containers: List = listOf() ) { private val jacocoInstrumentedDir = kexConfig.outputDirectory.resolve( @@ -92,35 +105,10 @@ class TestwiseCoverage( return result } - private fun List.batchByTime(step: Duration = 1.seconds): SortedMap> { - if (this.isEmpty()) return sortedMapOf() - val ordered = this.map { - val attr = Files.readAttributes(it, BasicFileAttributes::class.java) - it to attr.creationTime().toMillis().milliseconds - }.sortedBy { it.second } - val startTime = ordered.first().second - val endTime = ordered.last().second + 1.seconds - val batches = mutableMapOf( - 0.seconds to emptyList() - ) - var nextTime = startTime + step - for ((index, file) in ordered.withIndex()) { - if (file.second > nextTime) { - batches[nextTime - startTime] = ordered.subList(0, index).map { it.first } - nextTime += step - } - } - while (nextTime <= endTime) { - batches[nextTime - startTime] = ordered.map { it.first } - nextTime += step - } - return batches.toSortedMap() - } - @Suppress("unused") class TestLogger : RunListener() { override fun testRunFinished(result: Result) { - org.vorpal.research.kthelper.logging.log.info(buildString { + log.info(buildString { appendLine("Result:") appendLine("run count ${result.runCount}") appendLine("ignore count ${result.ignoreCount}") @@ -143,7 +131,7 @@ class TestwiseCoverage( for (testPath in testClasses) { if (testPath.toString().endsWith("ReflectionUtils.class", ignoreCase = true)) continue val runtime = LoggerRuntime() - originalClasses = mutableMapOf() + originalClasses = mutableMapOf() for (classPath in classes) { originalClasses[classPath] = classPath.readBytes() val instrumented = classPath.inputStream().use { @@ -157,25 +145,18 @@ class TestwiseCoverage( val data = RuntimeData() runtime.startup(data) - if (logProgress) org.vorpal.research.kthelper.logging.log.debug("Running tests...") + if (logProgress) log.debug("Running tests...") val classLoader = PathClassLoader(listOf(jacocoInstrumentedDir, compileDir)) val testClassName = testPath.fullyQualifiedName(compileDir) val testClass = classLoader.loadClass(testClassName) - if (logProgress) org.vorpal.research.kthelper.logging.log.debug("Running test $testClassName") + if (logProgress) log.debug("Running test $testClassName") val jcClass = classLoader.loadClass("org.junit.runner.JUnitCore") val jc = jcClass.newInstance() -// if (kexConfig.getBooleanValue("testGen", "logJUnit", false)) { -// jcClass.getMethod("addListener", classLoader.loadClass("org.junit.runner.notification.RunListener")) -// .invoke(jc, classLoader.loadClass("org.vorpal.research.kex.")) -// -// jc.addListener(TestLogger()) -// } val computerClass = classLoader.loadClass("org.junit.runner.Computer") jcClass.getMethod("run", computerClass, Class::class.java.asArray()) .invoke(jc, computerClass.newInstance(), arrayOf(testClass)) -// jc.run(Computer(), testClass) - if (logProgress) org.vorpal.research.kthelper.logging.log.debug("Analyzing Coverage...") + if (logProgress) log.debug("Analyzing Coverage...") val executionData = ExecutionDataStore() val sessionInfos = SessionInfoStore() data.collect(executionData, sessionInfos, false) @@ -241,7 +222,7 @@ class TestwiseCoverage( MethodCoverageInfo::class.java -> MethodCoverageInfo(name, insts, brs, lines, complexities) ClassCoverageInfo::class.java -> ClassCoverageInfo(name, insts, brs, lines, complexities) PackageCoverageInfo::class.java -> PackageCoverageInfo(name, insts, brs, lines, complexities) - else -> unreachable { org.vorpal.research.kthelper.logging.log.error("Unknown common coverage info class ${T::class.java}") } + else -> unreachable { log.error("Unknown common coverage info class ${T::class.java}") } } as T } @@ -299,56 +280,6 @@ class TestwiseCoverage( } } - private fun computeSaturationCoverage( - cm: ClassManager, - analysisLevel: AnalysisLevel, - ): SortedMap { - val testClasses = Files.walk(compileDir).filter { it.isClass }.collect(Collectors.toList()) - val batchedTestClasses = testClasses.batchByTime() - val maxTime = batchedTestClasses.lastKey() - return when (analysisLevel) { - is PackageLevel -> { - val classes = Files.walk(jacocoInstrumentedDir) - .filter { it.isClass } - .filter { - analysisLevel.pkg.isParent( - it.fullyQualifiedName(jacocoInstrumentedDir) - .asmString - ) - } - .collect(Collectors.toList()) - batchedTestClasses.mapValues { (duration, _) -> - org.vorpal.research.kthelper.logging.log.debug("Running tests for batch {} / {}", duration.inWholeSeconds, maxTime.inWholeSeconds) - val coverageBuilder = getCoverageBuilder(classes) - getPackageCoverage(analysisLevel.pkg, cm, coverageBuilder) - } - } - - is ClassLevel -> { - val klass = analysisLevel.klass.fullName.replace(Package.SEPARATOR, File.separatorChar) - batchedTestClasses.mapValues { (duration, _) -> - org.vorpal.research.kthelper.logging.log.debug("Running tests for batch {} / {}", duration.inWholeSeconds, maxTime.inWholeSeconds) - val coverageBuilder = getCoverageBuilder( - listOf(jacocoInstrumentedDir.resolve("$klass.class")) - ) - getClassCoverage(cm, coverageBuilder).first() - } - } - - is MethodLevel -> { - val method = analysisLevel.method - val klass = method.klass.fullName.replace(Package.SEPARATOR, File.separatorChar) - batchedTestClasses.mapValues { (duration, _) -> - org.vorpal.research.kthelper.logging.log.debug("Running tests for batch {} / {}", duration.inWholeSeconds, maxTime.inWholeSeconds) - val coverageBuilder = getCoverageBuilder( - listOf(jacocoInstrumentedDir.resolve("$klass.class")) - ) - getMethodCoverage(coverageBuilder, method)!! - } - } - }.toSortedMap() - } - private val String.fullyQualifiedName: String get() = removeSuffix(".class").javaString @@ -429,22 +360,9 @@ class TestwiseCoverage( mode: String ) { if (kexConfig.getBooleanValue("kex", "computeCoverage", true)) { - val coverageInfo = when { - kexConfig.getBooleanValue("kex", "computeSaturationCoverage", true) -> { - val saturationCoverage = computeSaturationCoverage(cm, analysisLevel) - PermanentSaturationCoverageInfo.putNewInfo( - "concolic", - analysisLevel.toString(), - saturationCoverage.toList() - ) - PermanentSaturationCoverageInfo.emit() - saturationCoverage[saturationCoverage.lastKey()]!! - } - - else -> getCommonCoverage(cm, analysisLevel) - } + val coverageInfo = getCommonCoverage(cm, analysisLevel) - org.vorpal.research.kthelper.logging.log.info( + log.info( coverageInfo.print(kexConfig.getBooleanValue("kex", "printDetailedCoverage", false)) ) diff --git a/kex-runner/src/main/kotlin/org/vorpal/research/kex/main.kt b/kex-runner/src/main/kotlin/org/vorpal/research/kex/main.kt index ea8b63af2..9ef4dc9d8 100644 --- a/kex-runner/src/main/kotlin/org/vorpal/research/kex/main.kt +++ b/kex-runner/src/main/kotlin/org/vorpal/research/kex/main.kt @@ -79,15 +79,9 @@ fun main(args: Array) { LibraryCheckLauncher(classPaths, targetName, libraryTarget) } - LaunchMode.Symbolic -> { - SymbolicLauncher(classPaths, targetName) - } - LaunchMode.Concolic -> { - ConcolicLauncher(classPaths, targetName) - } - LaunchMode.DefectChecker -> { - DefectCheckerLauncher(classPaths, targetName) - } + LaunchMode.Symbolic -> SymbolicLauncher(classPaths, targetName) + LaunchMode.Concolic -> ConcolicLauncher(classPaths, targetName) + LaunchMode.DefectChecker -> DefectCheckerLauncher(classPaths, targetName) else -> unreachable("") } }