This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Analysis results: | |
//Tool name: SpotBugs Results: [89] | |
//Tool name: CodeQL Results: [] | |
//Tool name: SonarQube Results: [89] | |
//Tool name: Usvm Results: [89] | |
//Tool name: Semgrep Results: [] | |
//Original file name: BenchmarkTest01379 | |
//Original file CWE's: [89] | |
//Mutation info: Insert template from templates/primitive/simple.tmt with index 0 | |
//Program: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Analysis results: | |
//Tool name: SpotBugs Results: [89, 0] | |
//Tool name: CodeQL Results: [89] | |
//Tool name: SonarQube Results: [89] | |
//Tool name: Usvm Results: [] | |
//Tool name: Semgrep Results: [89] | |
//Original file name: BenchmarkTest01973 | |
//Original file CWE's: [89] | |
//Mutation info: Insert template from templates/constructors/constructorWithInitializer.tmt with index 1 | |
//Program: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ../usvm/usvm/run_usvm.sh . ./results/ | |
12:27:43.022 |I| ProjectResolver - Detect maven project at /data/projects/project | |
12:27:43.025 |I| ProjectResolver - Start project resolution for: /data/projects/project | |
12:27:43.025 |I| ProjectResolver - Maven build start for: /data/projects/project | |
12:27:43.029 |D| ProcessExecutor - Executing [/usr/bin/mvn, clean, package, -f, pom.xml, -B, -V, -e, -Dfindbugs.skip, -Dcheckstyle.skip, -Dpmd.skip=true, -Dspotbugs.skip, -Denforcer.skip, -Dmaven.javadoc.skip, -DskipTests, -Dmaven.test.skip.exec, -Dlicense.skip=true, -Drat.skip=true, -Dspotless.check.skip=true] in /data/projects/project with environment {JAVA_HOME=/usr/lib/jvm/java-8-openjdk}. | |
12:27:43.030 |D| ProcessExecutor - Started Process[pid=42, exitValue="not exited"] | |
12:27:43.165 |D| ProjectResolver - Apache Maven 3.8.7 (b89d5959fcde851dcb1c8946a785a163f14e1e29) | |
12:27:43.166 |D| ProjectResolver - Maven home: /opt/maven | |
12:27:43.166 |D| ProjectResolver - Java version: 1.8.0_402, vendor: Oracle Corporation, runti |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.itmo; | |
import org.junit.jupiter.api.Test; | |
import java.util.Random; | |
public class ConcurrentHashMapBenchmark { | |
@Test | |
public void test1() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val p = Project.createFromCode(""" | |
// TARGET_BACKEND: JVM | |
// FILE: A.java | |
public class A { | |
public int foo(int x, String ... args) { | |
return x + args.length; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Общая формулировка | |
Разработать программу с графическим интерфейсом, реализующую указанную в задании функциональность, на языках Java и/или Kotlin. При проектировании использовать объектно-ориентированный подход. Разработать автоматические тесты для отдельных частей программы. Написанный код держать в отдельном проекте или модуле в репозитории на GitHub. | |
Вариант 1 -- Реверси | |
Реализовать игру Реверси для двух игроков за одним компьютером, с графическим интерфейсом. Реализовать все правила игры и проверить их работоспособность тестами. Правила здесь: https://ru.wikipedia.org/wiki/Реверси. | |
Вариант 2 -- Русские шашки | |
Реализовать игру Русские шашки для двух игроков за одним компьютером, с графическим интерфейсом. Реализовать все правила игры и проверить их работоспособность тестами. Правила здесь: https://ru.wikipedia.org/wiki/Русские_шашки |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val f = File("test.kt") | |
// Класс для создания AST | |
val creator = PSICreator("") | |
// Инстанс компилятора | |
val compiler = JVMCompiler() | |
// Функция для получения AST по тексту | |
val psi = creator.getPSIForText(f.readText()) | |
// Функция для проверки компилируемости напрямую | |
compiler.checkCompilingText(psi.text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val file = File("test.kt") | |
val creator = PSICreator("") | |
val compiler = JVMCompiler() | |
val psi = creator.getPSIForText(file.readText()) | |
val checker = MutationChecker(compiler) | |
VariableValuesTracer(psi, creator.ctx!!, checker).trace() | |
val res = RuntimeVariableValuesCollector(psi, compiler).collect() | |
println(res) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Now begin to trace mutated file | |
val tracer = Tracer(resultingMutant, psiCreator.ctx!!, checker) | |
val traced = tracer.trace() | |
log.debug("Traced = ${traced.text}") | |
if (!compilers.checkCompilingForAllBackends(traced)) { | |
log.debug("Could not compile after tracing $dir") | |
log.debug(traced.text) | |
} | |
val res = TracesChecker(compilers).checkTest(traced.text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before | Transformation | After | |
---|---|---|---|
val a = 12345 | const simplifying | val a = 1 | |
if (a) {...} | if simplifying | a | |
fun f(): Int { return 1 } | return value to void | fun f(): Unit {} | |
val a = b + c + d | text simplifying | val a = b | |
fun f(): T { ... } | function simplifying | fun f() = TODO() |
NewerOlder