diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index ebd4a2a9f..287115102 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -57,13 +57,14 @@ jobs: - name: Set up ArkAnalyzer run: | - REPO_URL="https://gitee.com/openharmony-sig/arkanalyzer.git" + REPO_URL="https://gitee.com/Lipenx/arkanalyzer.git" DEST_DIR="arkanalyzer" MAX_RETRIES=10 RETRY_DELAY=3 # Delay between retries in seconds + BRANCH="neo/2024-08-06" for ((i=1; i<=MAX_RETRIES; i++)); do - git clone --depth=1 $REPO_URL $DEST_DIR && break + git clone --depth=1 --branch $BRANCH $REPO_URL $DEST_DIR && break echo "Clone failed, retrying in $RETRY_DELAY seconds..." sleep "$RETRY_DELAY" done @@ -78,17 +79,6 @@ jobs: echo "ARKANALYZER_DIR=$(realpath $DEST_DIR)" >> $GITHUB_ENV cd $DEST_DIR - # checkout master on 2024-07-17 - rev=a9d9fd6070fce5896d8e760ed7fd175b62b16605 - - for ((i=1; i<=MAX_RETRIES; i++)); do - git fetch --depth=1 origin $rev && break - echo "Fetch failed, retrying in $RETRY_DELAY seconds..." - sleep "$RETRY_DELAY" - done - - git switch --detach $rev - npm install npm run build diff --git a/buildSrc/src/main/kotlin/Tests.kt b/buildSrc/src/main/kotlin/Tests.kt index 109b15574..0c913b952 100644 --- a/buildSrc/src/main/kotlin/Tests.kt +++ b/buildSrc/src/main/kotlin/Tests.kt @@ -1,5 +1,6 @@ import org.gradle.api.tasks.TaskProvider import org.gradle.api.tasks.testing.Test +import org.gradle.api.tasks.testing.logging.TestExceptionFormat import java.util.* object Tests { @@ -10,6 +11,7 @@ object Tests { fun Test.setup(jacocoTestReport: TaskProvider<*>) { testLogging { events("passed", "skipped", "failed") + exceptionFormat = TestExceptionFormat.FULL } finalizedBy(jacocoTestReport) // report is always generated after tests run val majorJavaVersion = diff --git a/jacodb-ets/build.gradle.kts b/jacodb-ets/build.gradle.kts index 951e7dd33..7d63f4162 100644 --- a/jacodb-ets/build.gradle.kts +++ b/jacodb-ets/build.gradle.kts @@ -13,6 +13,7 @@ dependencies { implementation(Libs.kotlinx_serialization_json) implementation(Libs.jdot) + testImplementation(kotlin("test")) testImplementation(project(":jacodb-analysis")) testImplementation(testFixtures(project(":jacodb-core"))) testImplementation(Libs.mockk) diff --git a/jacodb-ets/src/main/kotlin/org/jacodb/ets/base/EtsRef.kt b/jacodb-ets/src/main/kotlin/org/jacodb/ets/base/EtsRef.kt index bba2641be..72a98493a 100644 --- a/jacodb-ets/src/main/kotlin/org/jacodb/ets/base/EtsRef.kt +++ b/jacodb-ets/src/main/kotlin/org/jacodb/ets/base/EtsRef.kt @@ -67,7 +67,7 @@ interface EtsFieldRef : EtsRef, EtsLValue { } data class EtsInstanceFieldRef( - val instance: EtsEntity, // Local + val instance: EtsLocal, override val field: EtsFieldSignature, ) : EtsFieldRef { override fun toString(): String { diff --git a/jacodb-ets/src/main/kotlin/org/jacodb/ets/dto/Convert.kt b/jacodb-ets/src/main/kotlin/org/jacodb/ets/dto/Convert.kt index e4b701aef..ca469a61d 100644 --- a/jacodb-ets/src/main/kotlin/org/jacodb/ets/dto/Convert.kt +++ b/jacodb-ets/src/main/kotlin/org/jacodb/ets/dto/Convert.kt @@ -339,6 +339,11 @@ class EtsMethodBuilder( // so we just *unsafely* extract the type name from the "pseudo-local" here: "instanceof" -> EtsInstanceOfExpr(left, (right as EtsLocal).name) + // TODO: Currently, ArkIR treats "in" operation just as BinopExpr. + // Ideally, it would be represented as a separate `ArkInExpr`, + // or at least as `ArkConditionExpr`, since it inherently has a boolean type. + Ops.IN -> EtsInExpr(left, right) // Note: `type` is ignored here! + else -> error("Unknown binop: ${value.op}") } } @@ -356,7 +361,10 @@ class EtsMethodBuilder( Ops.LT_EQ -> EtsLtEqExpr(left, right) Ops.GT -> EtsGtExpr(left, right) Ops.GT_EQ -> EtsGtEqExpr(left, right) - Ops.IN -> EtsInExpr(left, right) + + // TODO: see above + // Ops.IN -> EtsInExpr(left, right) + else -> error("Unknown relop: ${value.op}") } } @@ -401,7 +409,7 @@ class EtsMethodBuilder( val field = convertToEtsFieldSignature(fieldRef.field) return when (fieldRef) { is InstanceFieldRefDto -> EtsInstanceFieldRef( - instance = convertToEtsEntity(fieldRef.instance), // as Local + instance = convertToEtsEntity(fieldRef.instance) as EtsLocal, // safe cast field = field, ) @@ -470,7 +478,7 @@ fun convertToEtsClass(classDto: ClassDto): EtsClass { successors = emptyList(), predecessors = emptyList(), stmts = listOf( - ReturnStmtDto(arg = ThisRefDto(type = ClassTypeDto(classSignatureDto))) + ReturnVoidStmtDto ) ) val cfg = CfgDto(blocks = listOf(zeroBlock)) @@ -489,69 +497,34 @@ fun convertToEtsClass(classDto: ClassDto): EtsClass { ) } - fun isStaticField(field: FieldDto): Boolean { - val modifiers = field.modifiers ?: return false - return modifiers.contains(ModifierDto.StringItem("StaticKeyword")) - } - val signature = EtsClassSignature( name = classDto.signature.name, namespace = null, // TODO file = null, // TODO ) - - val superclassSignature = classDto.superClassName?.takeIf { it != "" }?.let { spName -> + val superClassSignature = classDto.superClassName?.takeIf { it != "" }?.let { name -> EtsClassSignature( - name = spName, + name = name, namespace = null, // TODO file = null, // TODO ) } + val fields = classDto.fields.map { convertToEtsField(it) } + val (methodDtos, ctorDtos) = classDto.methods.partition { it.signature.name != "constructor" } check(ctorDtos.size <= 1) { "Class should not have multiple constructors" } - val ctorDto = ctorDtos.singleOrNull() ?: defaultConstructorDto(classDto.signature) + val ctorDto = ctorDtos.firstOrNull() ?: defaultConstructorDto(classDto.signature) - val fields = classDto.fields.map { convertToEtsField(it) } val methods = methodDtos.map { convertToEtsMethod(it) } - - val initializers = classDto.fields.mapNotNull { - if (it.initializer != null && !isStaticField(it)) { - AssignStmtDto( - left = InstanceFieldRefDto( - instance = ThisRefDto(ClassTypeDto(classDto.signature)), - field = it.signature, - ), - right = it.initializer, - ) - } else null - } - - val ctorBlocks = ctorDto.body.cfg.blocks - val ctorStartingBlock = ctorBlocks.single { it.id == 0 } - - check(ctorStartingBlock.predecessors.isEmpty()) { - "Starting block should not have predecessors, or else the (prepended) initializers will be evaluated multiple times" - } - - val newStartingBlock = ctorStartingBlock.copy( - stmts = initializers + ctorStartingBlock.stmts - ) - val ctorWithInitializersDto = ctorDto.copy( - body = ctorDto.body.copy( - cfg = CfgDto( - blocks = ctorBlocks - ctorStartingBlock + newStartingBlock - ) - ) - ) - val ctor = convertToEtsMethod(ctorWithInitializersDto) + val ctor = convertToEtsMethod(ctorDto) return EtsClassImpl( signature = signature, fields = fields, methods = methods, ctor = ctor, - superClass = superclassSignature + superClass = superClassSignature, ) } @@ -691,17 +664,20 @@ fun convertToEtsMethodSignature(method: MethodSignatureDto): EtsMethodSignature fun convertToEtsMethod(method: MethodDto): EtsMethod { val signature = convertToEtsMethodSignature(method.signature) - // Note: locals are not used in the current implementation - // val locals = method.body.locals.map { - // convertToEtsEntity(it) as EtsLocal // safe cast - // } - val localsCount = method.body.locals.size val modifiers = method.modifiers .filterIsInstance() .map { it.modifier } - val builder = EtsMethodBuilder(signature, localsCount, modifiers) - val etsMethod = builder.build(method.body.cfg) - return etsMethod + if (method.body != null) { + // Note: locals are not used in the current implementation + // val locals = method.body.locals.map { + // convertToEtsEntity(it) as EtsLocal // safe cast + // } + val localsCount = method.body.locals.size + val builder = EtsMethodBuilder(signature, localsCount, modifiers) + return builder.build(method.body.cfg) + } else { + return EtsMethodImpl(signature, modifiers = modifiers) + } } fun convertToEtsField(field: FieldDto): EtsField { diff --git a/jacodb-ets/src/main/kotlin/org/jacodb/ets/dto/Model.kt b/jacodb-ets/src/main/kotlin/org/jacodb/ets/dto/Model.kt index a8a7eebf4..f3de099be 100644 --- a/jacodb-ets/src/main/kotlin/org/jacodb/ets/dto/Model.kt +++ b/jacodb-ets/src/main/kotlin/org/jacodb/ets/dto/Model.kt @@ -72,7 +72,6 @@ data class FieldDto( val modifiers: List? = null, @SerialName("questionToken") val isOptional: Boolean = false, // '?' @SerialName("exclamationToken") val isDefinitelyAssigned: Boolean = false, // '!' - val initializer: ValueDto? = null, ) @Serializable(with = ModifierSerializer::class) @@ -93,7 +92,7 @@ data class MethodDto( val signature: MethodSignatureDto, val modifiers: List, val typeParameters: List, - val body: BodyDto, + val body: BodyDto? = null, ) @Serializable diff --git a/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/EtsFileDtoToDot.kt b/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/EtsFileDtoToDot.kt index d692b9867..841fdbb41 100644 --- a/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/EtsFileDtoToDot.kt +++ b/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/EtsFileDtoToDot.kt @@ -105,72 +105,74 @@ fun EtsFileDto.toDot(useLR: Boolean = false): String { // Link class to method: lines += """ "$c" -> "$m" [dir=none];""" - // Link method to its first basic block: - if (method.body.cfg.blocks.isNotEmpty()) { - val b = blockId(clazz, method, method.body.cfg.blocks.first().id) - lines += """ "$m" -> "${b}.0" [lhead="$b"];""" - } - - // Basic blocks with instructions: - method.body.cfg.blocks.forEach { bb -> - // BLOCK - val b = blockId(clazz, method, bb.id) - val blabel = blockLabel(bb) - lines += "" - lines += """ subgraph "$b" {""" - lines += """ cluster=true;""" - lines += """ label="$blabel";""" - - // Empty block: - if (bb.stmts.isEmpty()) { - lines += """ "${b}.0" [shape=box, label="NOP"];""" - } - - // Instructions inside basic block: - bb.stmts.forEachIndexed { i, inst -> - val label = statementLabel(inst) - lines += """ "${b}.${i}" [shape=box, label="$label"];""" + if (method.body != null) { + // Link method to its first basic block: + if (method.body.cfg.blocks.isNotEmpty()) { + val b = blockId(clazz, method, method.body.cfg.blocks.first().id) + lines += """ "$m" -> "${b}.0" [lhead="$b"];""" } - // Instructions chain: - if (bb.stmts.isNotEmpty()) { - val ids = List(bb.stmts.size) { i -> - "${b}.${i}" + // Basic blocks with instructions: + method.body.cfg.blocks.forEach { bb -> + // BLOCK + val b = blockId(clazz, method, bb.id) + val blabel = blockLabel(bb) + lines += "" + lines += """ subgraph "$b" {""" + lines += """ cluster=true;""" + lines += """ label="$blabel";""" + + // Empty block: + if (bb.stmts.isEmpty()) { + lines += """ "${b}.0" [shape=box, label="NOP"];""" } - lines += " ${ids.joinToString(" -> ") { "\"$it\"" }};" - } - lines += " }" - } + // Instructions inside basic block: + bb.stmts.forEachIndexed { i, inst -> + val label = statementLabel(inst) + lines += """ "${b}.${i}" [shape=box, label="$label"];""" + } - // Links to successor blocks: - method.body.cfg.blocks.forEach { bb -> - val last = bb.stmts.lastOrNull() - val i = if (bb.stmts.isNotEmpty()) bb.stmts.lastIndex else 0 - when (last ?: NopStmtDto) { - is IfStmtDto -> { - for ((j, succ) in bb.successors.withIndex()) { - val b = blockId(clazz, method, bb.id) - val bs = blockId(clazz, method, succ) - val label = if (j == 0) "true" else "false" - lines += """ "${b}.${i}" -> "${bs}.0" [lhead="$bs", label="$label"];""" + // Instructions chain: + if (bb.stmts.isNotEmpty()) { + val ids = List(bb.stmts.size) { i -> + "${b}.${i}" } + lines += " ${ids.joinToString(" -> ") { "\"$it\"" }};" } - is SwitchStmtDto -> { - for ((j, succ) in bb.successors.withIndex()) { - val b = blockId(clazz, method, bb.id) - val bs = blockId(clazz, method, succ) - val label = if (j == 0) "default" else "case ${j - 1}" - lines += """ "${b}.${i}" -> "${bs}.0" [lhead="$b", label="$label"];""" + lines += " }" + } + + // Links to successor blocks: + method.body.cfg.blocks.forEach { bb -> + val last = bb.stmts.lastOrNull() + val i = if (bb.stmts.isNotEmpty()) bb.stmts.lastIndex else 0 + when (last ?: NopStmtDto) { + is IfStmtDto -> { + for ((j, succ) in bb.successors.withIndex()) { + val b = blockId(clazz, method, bb.id) + val bs = blockId(clazz, method, succ) + val label = if (j == 0) "true" else "false" + lines += """ "${b}.${i}" -> "${bs}.0" [lhead="$bs", label="$label"];""" + } + } + + is SwitchStmtDto -> { + for ((j, succ) in bb.successors.withIndex()) { + val b = blockId(clazz, method, bb.id) + val bs = blockId(clazz, method, succ) + val label = if (j == 0) "default" else "case ${j - 1}" + lines += """ "${b}.${i}" -> "${bs}.0" [lhead="$b", label="$label"];""" + } } - } - else -> { - for (succ in bb.successors) { - val b = blockId(clazz, method, bb.id) - val bs = blockId(clazz, method, succ) - lines += """ "${b}.${i}" -> "${bs}.0" [lhead="$bs"];""" + else -> { + for (succ in bb.successors) { + val b = blockId(clazz, method, bb.id) + val bs = blockId(clazz, method, succ) + lines += """ "${b}.${i}" -> "${bs}.0" [lhead="$bs"];""" + } } } } diff --git a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsFileTest.kt b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsFileTest.kt index 5e7d26c21..7b48910db 100644 --- a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsFileTest.kt +++ b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsFileTest.kt @@ -18,11 +18,15 @@ package org.jacodb.ets.test import org.jacodb.ets.base.EtsAssignStmt import org.jacodb.ets.base.EtsInstanceFieldRef +import org.jacodb.ets.base.EtsLocal +import org.jacodb.ets.base.EtsNumberConstant +import org.jacodb.ets.base.EtsReturnStmt import org.jacodb.ets.base.EtsThis import org.jacodb.ets.model.EtsFile import org.jacodb.ets.test.utils.loadEtsFileFromResource -import org.junit.jupiter.api.Assertions -import org.junit.jupiter.api.Test +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertIs private val logger = mu.KotlinLogging.logger {} @@ -50,17 +54,17 @@ class EtsFileTest { } @Test - fun `test etsFile on TypeMismatch`() { + fun `test sample TypeMismatch`() { val etsFile = load("etsir/samples/TypeMismatch") etsFile.classes.forEach { cls -> cls.methods.forEach { method -> when (method.name) { "add" -> { - Assertions.assertEquals(11, method.cfg.instructions.size) + assertEquals(11, method.cfg.instructions.size) } "main" -> { - Assertions.assertEquals(5, method.cfg.instructions.size) + assertEquals(5, method.cfg.instructions.size) } } } @@ -68,31 +72,103 @@ class EtsFileTest { } @Test - fun `test initializers prepended to class constructor`() { - val etsFile = load("etsir/samples/PrependInitializer") - val cls = etsFile.classes.single { it.name == "Foo" } - val ctorBegin = cls.ctor.cfg.instructions.first() as EtsAssignStmt - val fieldRef = ctorBegin.lhv as EtsInstanceFieldRef - Assertions.assertTrue(fieldRef.instance is EtsThis) - Assertions.assertEquals("x", fieldRef.field.name) - } + fun `test sample initializers`() { + val etsFile = load("etsir/samples/initializers") - @Test - fun `test static field should not be initialized in constructor`() { - val etsFile = load("etsir/samples/StaticField") val cls = etsFile.classes.single { it.name == "Foo" } - Assertions.assertFalse(cls.ctor.cfg.stmts.any { - it is EtsAssignStmt && it.lhv is EtsInstanceFieldRef - }) - } - @Test - fun `test default constructor should be synthesized`() { - val etsFile = load("etsir/samples/DefaultConstructor") - val cls = etsFile.classes.single { it.name == "Foo" } - val fieldInit = cls.ctor.cfg.instructions.first() as EtsAssignStmt - val fieldRef = fieldInit.lhv as EtsInstanceFieldRef - Assertions.assertTrue(fieldRef.instance is EtsThis) - Assertions.assertEquals("x", fieldRef.field.name) + // instance initializer + run { + val method = cls.methods.single { it.name == "@instance_init" } + assertEquals(3, method.cfg.instructions.size) + + // Local("this") := ThisRef + run { + val stmt = method.cfg.instructions[0] + assertIs(stmt) + + val lhv = stmt.lhv + assertIs(lhv) + assertEquals("this", lhv.name) + + val rhv = stmt.rhv + assertIs(rhv) + assertEquals("Foo", rhv.type.typeName) + } + + // Local("this").x := 99 + run { + val stmt = method.cfg.instructions[1] + assertIs(stmt) + + val lhv = stmt.lhv + assertIs(lhv) + + val instance = lhv.instance + assertIs(instance) + assertEquals("this", instance.name) + + val field = lhv.field + assertEquals("x", field.name) + + val rhv = stmt.rhv + assertIs(rhv) + assertEquals(99.0, rhv.value) + } + + // return + run { + val stmt = method.cfg.instructions[2] + assertIs(stmt) + assertEquals(null, stmt.returnValue) + } + } + + // static initializer + run { + val method = cls.methods.single { it.name == "@static_init" } + assertEquals(3, method.cfg.instructions.size) + + // Local("this") := ThisRef + run { + val stmt = method.cfg.instructions[0] + assertIs(stmt) + + val lhv = stmt.lhv + assertIs(lhv) + assertEquals("this", lhv.name) + + val rhv = stmt.rhv + assertIs(rhv) + assertEquals("Foo", rhv.type.typeName) + } + + // Local("this").y := 111 + run { + val stmt = method.cfg.instructions[1] + assertIs(stmt) + + val lhv = stmt.lhv + assertIs(lhv) + + val instance = lhv.instance + assertIs(instance) + assertEquals("this", instance.name) + + val field = lhv.field + assertEquals("y", field.name) + + val rhv = stmt.rhv + assertIs(rhv) + assertEquals(111.0, rhv.value) + } + + // return + run { + val stmt = method.cfg.instructions[2] + assertIs(stmt) + assertEquals(null, stmt.returnValue) + } + } } } diff --git a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsFromJsonTest.kt b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsFromJsonTest.kt index 9cf77e3e7..2cfe495e3 100644 --- a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsFromJsonTest.kt +++ b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsFromJsonTest.kt @@ -26,7 +26,6 @@ import org.jacodb.ets.base.EtsReturnStmt import org.jacodb.ets.base.EtsUnknownType import org.jacodb.ets.dto.AnyTypeDto import org.jacodb.ets.dto.ClassSignatureDto -import org.jacodb.ets.dto.ConstantDto import org.jacodb.ets.dto.EtsMethodBuilder import org.jacodb.ets.dto.FieldDto import org.jacodb.ets.dto.FieldSignatureDto @@ -46,10 +45,6 @@ import org.junit.jupiter.api.Test class EtsFromJsonTest { - companion object { - private const val BASE_PATH = "etsir/samples" - } - private val json = Json { // classDiscriminator = "_" prettyPrint = true @@ -64,7 +59,8 @@ class EtsFromJsonTest { @Test fun testLoadEtsFileFromJson() { - val etsDto = loadEtsFileDtoFromResource("/$BASE_PATH/basic.ts.json") + val path = "etsir/samples/save/basic.ts.json" + val etsDto = loadEtsFileDtoFromResource("/$path") println("etsDto = $etsDto") val ets = convertToEtsFile(etsDto) println("ets = $ets") @@ -112,7 +108,6 @@ class EtsFromJsonTest { typeParameters = emptyList(), isOptional = true, isDefinitelyAssigned = false, - initializer = ConstantDto("0", NumberTypeDto), ) println("field = $field") diff --git a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Dot.kt b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Dot.kt index cf6d764e6..d310f5593 100644 --- a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Dot.kt +++ b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Dot.kt @@ -50,13 +50,15 @@ object DumpEtsFileDtoToDot { println(" methods: ${clazz.methods.size}") clazz.methods.forEach { method -> println(" - METHOD '${method.signature}':") - println(" locals = ${method.body.locals}") + println(" locals = ${method.body?.locals}") println(" typeParameters = ${method.typeParameters}") - println(" blocks: ${method.body.cfg.blocks.size}") - method.body.cfg.blocks.forEach { block -> - println(" - BLOCK ${block.id} with ${block.stmts.size} statements:") - block.stmts.forEachIndexed { i, inst -> - println(" ${i + 1}. $inst") + method.body?.let { body -> + println(" blocks: ${body.cfg.blocks.size}") + body.cfg.blocks.forEach { block -> + println(" - BLOCK ${block.id} with ${block.stmts.size} statements:") + block.stmts.forEachIndexed { i, inst -> + println(" ${i + 1}. $inst") + } } } } diff --git a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/LoadEts.kt b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/LoadEts.kt index c0226b457..da0991fcd 100644 --- a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/LoadEts.kt +++ b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/LoadEts.kt @@ -21,9 +21,9 @@ import org.jacodb.ets.dto.convertToEtsFile import org.jacodb.ets.model.EtsFile fun loadEtsFileDtoFromResource(jsonPath: String): EtsFileDto { - val sampleFilePath = object {}::class.java.getResourceAsStream(jsonPath) + val stream = object {}::class.java.getResourceAsStream(jsonPath) ?: error("Resource not found: $jsonPath") - return EtsFileDto.loadFromJson(sampleFilePath) + return EtsFileDto.loadFromJson(stream) } fun loadEtsFileFromResource(jsonPath: String): EtsFile { diff --git a/jacodb-ets/src/test/resources/etsir/samples/DataFlowSecurity.ts.json b/jacodb-ets/src/test/resources/etsir/samples/DataFlowSecurity.ts.json index 7c34410f7..6f793165a 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/DataFlowSecurity.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/DataFlowSecurity.ts.json @@ -354,7 +354,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -458,7 +458,8 @@ { "id": 0, "successors": [ - 1 + 1, + 2 ], "predecessors": [], "stmts": [ @@ -521,7 +522,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -530,6 +531,21 @@ { "id": 1, "successors": [], + "predecessors": [ + 0, + 2 + ], + "stmts": [ + { + "_": "ReturnVoidStmt" + } + ] + }, + { + "id": 2, + "successors": [ + 1 + ], "predecessors": [ 0 ], @@ -603,9 +619,6 @@ } } } - }, - { - "_": "ReturnVoidStmt" } ] } diff --git a/jacodb-ets/src/test/resources/etsir/samples/DefaultConstructor.ts.json b/jacodb-ets/src/test/resources/etsir/samples/DefaultConstructor.ts.json deleted file mode 100644 index eeb72b5bd..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/DefaultConstructor.ts.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "name": "DefaultConstructor.ts", - "namespaces": [], - "classes": [ - { - "signature": { - "name": "_DEFAULT_ARK_CLASS" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "_DEFAULT_ARK_METHOD", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Foo" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Foo" - }, - "name": "x", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "99", - "type": { - "_": "NumberType" - } - } - } - ], - "methods": [] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file diff --git a/jacodb-ets/src/test/resources/etsir/samples/MethodCollision.ts.json b/jacodb-ets/src/test/resources/etsir/samples/MethodCollision.ts.json index 746f7430c..0f26ca797 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/MethodCollision.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/MethodCollision.ts.json @@ -234,7 +234,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -717,7 +717,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } }, @@ -1000,11 +1000,110 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Foo" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Foo" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Foo" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Foo" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, { "signature": { "enclosingClass": { @@ -1052,7 +1151,7 @@ { "name": "$temp1", "type": { - "_": "UnknownType" + "_": "BooleanType" } } ], @@ -1140,7 +1239,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, "right": { @@ -1167,10 +1266,60 @@ "arg": { "_": "Local", "name": "$temp1", + "type": { + "_": "BooleanType" + } + } + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Foo" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", "type": { "_": "UnknownType" } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Foo" + } + } } + }, + { + "_": "ReturnVoidStmt" } ] } @@ -1202,11 +1351,110 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Bar" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Bar" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Bar" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Bar" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, { "signature": { "enclosingClass": { @@ -1254,7 +1502,7 @@ { "name": "$temp1", "type": { - "_": "UnknownType" + "_": "BooleanType" } } ], @@ -1342,7 +1590,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, "right": { @@ -1369,10 +1617,60 @@ "arg": { "_": "Local", "name": "$temp1", + "type": { + "_": "BooleanType" + } + } + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Bar" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", "type": { "_": "UnknownType" } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Bar" + } + } } + }, + { + "_": "ReturnVoidStmt" } ] } diff --git a/jacodb-ets/src/test/resources/etsir/samples/StaticField.ts.json b/jacodb-ets/src/test/resources/etsir/samples/StaticField.ts.json deleted file mode 100644 index 03cb7938f..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/StaticField.ts.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "name": "StaticField.ts", - "namespaces": [], - "classes": [ - { - "signature": { - "name": "_DEFAULT_ARK_CLASS" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "_DEFAULT_ARK_METHOD", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Foo" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Foo" - }, - "name": "y", - "type": { - "_": "NumberType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "109", - "type": { - "_": "NumberType" - } - } - } - ], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "Foo" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file diff --git a/jacodb-ets/src/test/resources/etsir/samples/TypeMismatch.ts.json b/jacodb-ets/src/test/resources/etsir/samples/TypeMismatch.ts.json index b6faff907..88e994a76 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/TypeMismatch.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/TypeMismatch.ts.json @@ -234,7 +234,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } diff --git a/jacodb-ets/src/test/resources/etsir/samples/binary/Bitwise.ts.json b/jacodb-ets/src/test/resources/etsir/samples/binary/Bitwise.ts.json index dfea01dd0..36a88238e 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/binary/Bitwise.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/binary/Bitwise.ts.json @@ -10,184 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "a", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "b", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "andResult", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "orResult", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "xorResult", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "notResult", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "leftShiftResult", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "rightShiftResult", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "unsignedRightShiftResult", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "c", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "unsignedRightShiftNegativeResult", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { diff --git a/jacodb-ets/src/test/resources/etsir/samples/binary/Division.ts.json b/jacodb-ets/src/test/resources/etsir/samples/binary/Division.ts.json index 5b927ad80..c99f4881f 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/binary/Division.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/binary/Division.ts.json @@ -116,7 +116,7 @@ { "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -172,7 +172,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -200,7 +200,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -251,7 +251,7 @@ { "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -307,7 +307,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -335,7 +335,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -399,7 +399,7 @@ { "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -472,7 +472,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -500,7 +500,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -564,7 +564,7 @@ { "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -637,7 +637,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -665,7 +665,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -716,7 +716,7 @@ { "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -772,7 +772,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -800,7 +800,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -851,7 +851,7 @@ { "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -907,7 +907,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -935,7 +935,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -1011,7 +1011,7 @@ { "name": "$temp2", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -1126,7 +1126,7 @@ "_": "Local", "name": "$temp2", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -1154,7 +1154,7 @@ "_": "Local", "name": "$temp2", "type": { - "_": "UnknownType" + "_": "NumberType" } } } diff --git a/jacodb-ets/src/test/resources/etsir/samples/binary/Subtraction.ts.json b/jacodb-ets/src/test/resources/etsir/samples/binary/Subtraction.ts.json index 67fc9b7f4..9ed3373c5 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/binary/Subtraction.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/binary/Subtraction.ts.json @@ -116,7 +116,7 @@ { "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -172,7 +172,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -200,7 +200,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -251,7 +251,7 @@ { "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -307,7 +307,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -335,7 +335,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -399,7 +399,7 @@ { "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -472,7 +472,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -500,7 +500,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -564,7 +564,7 @@ { "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -637,7 +637,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -665,7 +665,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -716,7 +716,7 @@ { "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -772,7 +772,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -800,7 +800,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -851,7 +851,7 @@ { "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -907,7 +907,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -935,7 +935,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -1005,7 +1005,7 @@ { "name": "$temp1", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -1099,7 +1099,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -1127,7 +1127,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "UnknownType" + "_": "NumberType" } } } diff --git a/jacodb-ets/src/test/resources/etsir/samples/cases/case1.ts.json b/jacodb-ets/src/test/resources/etsir/samples/cases/case1.ts.json index 79bfb760f..2c367be89 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/cases/case1.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/cases/case1.ts.json @@ -10,24 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "RESULT", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -373,20 +356,7 @@ } ] } - } - ] - }, - { - "id": 1, - "successors": [ - 2, - 3 - ], - "predecessors": [ - 0, - 3 - ], - "stmts": [ + }, { "_": "AssignStmt", "left": { @@ -403,7 +373,20 @@ "_": "NumberType" } } - }, + } + ] + }, + { + "id": 1, + "successors": [ + 2, + 3 + ], + "predecessors": [ + 0, + 3 + ], + "stmts": [ { "_": "IfStmt", "condition": { @@ -424,35 +407,7 @@ } }, "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } + "_": "BooleanType" } } } @@ -517,6 +472,34 @@ } ] } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "i", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "i", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } } ] } diff --git a/jacodb-ets/src/test/resources/etsir/samples/cases/case2.ts.json b/jacodb-ets/src/test/resources/etsir/samples/cases/case2.ts.json index ea7afb1cb..8c219b189 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/cases/case2.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/cases/case2.ts.json @@ -301,18 +301,50 @@ }, "modifiers": [], "typeParameters": [], + "body": null + }, + { + "signature": { + "enclosingClass": { + "name": "Message" + }, + "name": "readBoolean", + "parameters": [], + "returnType": { + "_": "BooleanType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": null + } + ] + }, + { + "signature": { + "name": "PixelMap" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "PixelMap" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Message" - } - } - } - ], + "locals": [], "cfg": { "blocks": [ { @@ -326,10 +358,7 @@ "_": "Local", "name": "this", "type": { - "_": "ClassType", - "signature": { - "name": "Message" - } + "_": "UnknownType" } }, "right": { @@ -337,7 +366,7 @@ "type": { "_": "ClassType", "signature": { - "name": "Message" + "name": "PixelMap" } } } @@ -354,28 +383,18 @@ { "signature": { "enclosingClass": { - "name": "Message" + "name": "PixelMap" }, - "name": "readBoolean", + "name": "@static_init", "parameters": [], "returnType": { - "_": "BooleanType" + "_": "UnknownType" } }, "modifiers": [], "typeParameters": [], "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Message" - } - } - } - ], + "locals": [], "cfg": { "blocks": [ { @@ -388,19 +407,66 @@ "left": { "_": "Local", "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", "type": { "_": "ClassType", "signature": { - "name": "Message" + "name": "PixelMap" } } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "PixelMap" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } }, "right": { "_": "ThisRef", "type": { "_": "ClassType", "signature": { - "name": "Message" + "name": "PixelMap" } } } @@ -416,17 +482,6 @@ } ] }, - { - "signature": { - "name": "PixelMap" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [], - "methods": [] - }, { "signature": { "name": "Size" @@ -449,8 +504,7 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false }, { "signature": { @@ -465,146 +519,39 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], - "methods": [] - }, - { - "signature": { - "name": "Request" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [], "methods": [ { "signature": { "enclosingClass": { - "name": "Request" + "name": "Size" }, - "name": "onRemoteMessageRequest", - "parameters": [ - { - "name": "data", - "type": { - "_": "UnclearReferenceType", - "name": "Message" - }, - "isOptional": false - } - ], + "name": "@instance_init", + "parameters": [], "returnType": { - "_": "BooleanType" + "_": "UnknownType" } }, "modifiers": [], "typeParameters": [], "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Request" - } - } - }, - { - "name": "data", - "type": { - "_": "UnclearReferenceType", - "name": "Message" - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - { - "name": "height", - "type": { - "_": "UnknownType" - } - }, - { - "name": "width", - "type": { - "_": "UnknownType" - } - }, - { - "name": "bytesNumber", - "type": { - "_": "UnknownType" - } - }, - { - "name": "pixelMap", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "ArrayBuffer" - } - } - }, - { - "name": "createPixelMap", - "type": { - "_": "UnknownType" - } - } - ], + "locals": [], "cfg": { "blocks": [ { "id": 0, - "successors": [ - 1 - ], + "successors": [], "predecessors": [], "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "data", - "type": { - "_": "UnclearReferenceType", - "name": "Message" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnclearReferenceType", - "name": "Message" - } - } - }, { "_": "AssignStmt", "left": { "_": "Local", "name": "this", "type": { - "_": "ClassType", - "signature": { - "name": "Request" - } + "_": "UnknownType" } }, "right": { @@ -612,29 +559,794 @@ "type": { "_": "ClassType", "signature": { - "name": "Request" + "name": "Size" } } } + }, + { + "_": "ReturnVoidStmt" } ] - }, - { - "id": 1, - "successors": [], - "predecessors": [ - 0 - ], - "stmts": [ - { + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Size" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Size" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Size" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Size" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "Request" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Request" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Request" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Request" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Request" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Request" + }, + "name": "onRemoteMessageRequest", + "parameters": [ + { + "name": "data", + "type": { + "_": "UnclearReferenceType", + "name": "Message" + }, + "isOptional": false + } + ], + "returnType": { + "_": "BooleanType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Request" + } + } + }, + { + "name": "data", + "type": { + "_": "UnclearReferenceType", + "name": "Message" + } + }, + { + "name": "$temp0", + "type": { + "_": "UnknownType" + } + }, + { + "name": "height", + "type": { + "_": "UnknownType" + } + }, + { + "name": "width", + "type": { + "_": "UnknownType" + } + }, + { + "name": "bytesNumber", + "type": { + "_": "UnknownType" + } + }, + { + "name": "pixelMap", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "ArrayBuffer" + } + } + }, + { + "name": "$temp2", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" + } + } + }, + { + "name": "createPixelMap", + "type": { + "_": "UnknownType" + } + }, + { + "name": "e", + "type": { + "_": "UnknownType" + } + }, + { + "name": "console", + "type": { + "_": "UnknownType" + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [ + 1, + 3 + ], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "data", + "type": { + "_": "UnclearReferenceType", + "name": "Message" + } + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": { + "_": "UnclearReferenceType", + "name": "Message" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Request" + } + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Request" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "data", + "type": { + "_": "UnclearReferenceType", + "name": "Message" + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "readBoolean", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": "==", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + }, + "type": { + "_": "BooleanType" + } + } + } + ] + }, + { + "id": 1, + "successors": [ + 2 + ], + "predecessors": [ + 0, + 3 + ], + "stmts": [ + { + "_": "ReturnStmt", + "arg": { + "_": "Constant", + "value": "true", + "type": { + "_": "BooleanType" + } + } + } + ] + }, + { + "id": 2, + "successors": [], + "predecessors": [ + 1 + ], + "stmts": [ + { "_": "ReturnStmt", "arg": { "_": "Constant", "value": "false", "type": { - "_": "BooleanType" + "_": "BooleanType" + } + } + } + ] + }, + { + "id": 3, + "successors": [ + 1 + ], + "predecessors": [ + 0 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "height", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "data", + "type": { + "_": "UnclearReferenceType", + "name": "Message" + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "readInt", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "width", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "data", + "type": { + "_": "UnclearReferenceType", + "name": "Message" + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "readInt", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "bytesNumber", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "data", + "type": { + "_": "UnclearReferenceType", + "name": "Message" + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "readInt", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "ArrayBuffer" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "ArrayBuffer" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "ArrayBuffer" + } + } + }, + "method": { + "enclosingClass": { + "name": "ArrayBuffer" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Local", + "name": "bytesNumber", + "type": { + "_": "UnknownType" + } + } + ] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp2", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp2", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "pixelMap", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "StaticCallExpr", + "method": { + "enclosingClass": { + "name": "" + }, + "name": "createPixelMap", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "ArrayBuffer" + } + } + }, + { + "_": "Local", + "name": "$temp2", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" + } + } + } + ] + } + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Request" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Request" + } } } + }, + { + "_": "ReturnVoidStmt" } ] } @@ -646,7 +1358,7 @@ }, { "signature": { - "name": "AnonymousClass-onRemoteMessageRequest-0" + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" }, "modifiers": [], "typeParameters": [], @@ -656,7 +1368,7 @@ { "signature": { "enclosingClass": { - "name": "AnonymousClass-onRemoteMessageRequest-0" + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" }, "name": "height", "type": { @@ -666,19 +1378,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Local", - "name": "height", - "type": { - "_": "UnknownType" - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-onRemoteMessageRequest-0" + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" }, "name": "width", "type": { @@ -688,17 +1393,125 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Local", - "name": "width", - "type": { + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { "_": "UnknownType" } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" + }, + "name": "height", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "height", + "type": { + "_": "UnknownType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-Request-onRemoteMessageRequest-0" + }, + "name": "width", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "width", + "type": { + "_": "UnknownType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } } } - ], - "methods": [] + ] } ], "importInfos": [], diff --git a/jacodb-ets/src/test/resources/etsir/samples/cases/case3.ts.json b/jacodb-ets/src/test/resources/etsir/samples/cases/case3.ts.json index 3bab770f8..d0c7fd4c5 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/cases/case3.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/cases/case3.ts.json @@ -97,81 +97,7 @@ }, "modifiers": [], "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "err", - "type": { - "_": "UnclearReferenceType", - "name": "MyError" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "err", - "type": { - "_": "UnclearReferenceType", - "name": "MyError" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnclearReferenceType", - "name": "MyError" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } + "body": null }, { "signature": { @@ -432,8 +358,7 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false }, { "signature": { @@ -448,8 +373,7 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false }, { "signature": { @@ -464,8 +388,7 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false }, { "signature": { @@ -480,8 +403,7 @@ "modifiers": [], "typeParameters": [], "questionToken": true, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [] @@ -511,17 +433,143 @@ ], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "\"\"", - "type": { - "_": "StringType" - } - } + "exclamationToken": false } ], "methods": [ + { + "signature": { + "enclosingClass": { + "name": "CommonSecurity" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "CommonSecurity" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "CommonSecurity" + } + } + }, + "field": { + "enclosingClass": { + "name": "CommonSecurity" + }, + "name": "publish", + "type": { + "_": "UnclearReferenceType", + "name": "String" + } + } + }, + "right": { + "_": "Constant", + "value": "", + "type": { + "_": "StringType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "CommonSecurity" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "CommonSecurity" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, { "signature": { "enclosingClass": { @@ -839,13 +887,13 @@ { "name": "$temp2", "type": { - "_": "UnknownType" + "_": "StringType" } }, { "name": "$temp3", "type": { - "_": "UnknownType" + "_": "StringType" } }, { @@ -857,13 +905,13 @@ { "name": "$temp5", "type": { - "_": "UnknownType" + "_": "StringType" } }, { "name": "$temp6", "type": { - "_": "UnknownType" + "_": "StringType" } }, { @@ -875,13 +923,13 @@ { "name": "$temp8", "type": { - "_": "UnknownType" + "_": "StringType" } }, { "name": "$temp9", "type": { - "_": "UnknownType" + "_": "StringType" } }, { @@ -893,7 +941,7 @@ { "name": "$temp11", "type": { - "_": "UnknownType" + "_": "StringType" } } ], @@ -903,7 +951,7 @@ "id": 0, "successors": [ 1, - 2 + 3 ], "predecessors": [], "stmts": [ @@ -995,7 +1043,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -1003,7 +1051,9 @@ }, { "id": 1, - "successors": [], + "successors": [ + 2 + ], "predecessors": [ 0 ], @@ -1045,6 +1095,21 @@ { "id": 2, "successors": [], + "predecessors": [ + 1, + 3 + ], + "stmts": [ + { + "_": "ReturnVoidStmt" + } + ] + }, + { + "id": 3, + "successors": [ + 2 + ], "predecessors": [ 0 ], @@ -1084,7 +1149,7 @@ "_": "Local", "name": "$temp2", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1112,7 +1177,7 @@ "_": "Local", "name": "$temp3", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1122,7 +1187,7 @@ "_": "Local", "name": "$temp2", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1169,7 +1234,7 @@ "_": "Local", "name": "$temp5", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1179,7 +1244,7 @@ "_": "Local", "name": "$temp3", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1197,7 +1262,7 @@ "_": "Local", "name": "$temp6", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1207,7 +1272,7 @@ "_": "Local", "name": "$temp5", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1254,7 +1319,7 @@ "_": "Local", "name": "$temp8", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1264,7 +1329,7 @@ "_": "Local", "name": "$temp6", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1282,7 +1347,7 @@ "_": "Local", "name": "$temp9", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1292,7 +1357,7 @@ "_": "Local", "name": "$temp8", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1339,7 +1404,7 @@ "_": "Local", "name": "$temp11", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1349,7 +1414,7 @@ "_": "Local", "name": "$temp9", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1388,9 +1453,56 @@ "right": { "_": "Local", "name": "$temp11", + "type": { + "_": "StringType" + } + } + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "CommonSecurity" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", "type": { "_": "UnknownType" } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "CommonSecurity" + } + } } }, { diff --git a/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatch.ts.json b/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatch.ts.json index 2e82605a8..58ee94026 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatch.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatch.ts.json @@ -10,56 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "result", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "message", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -111,6 +62,18 @@ "type": { "_": "UnknownType" } + }, + { + "name": "error", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp1", + "type": { + "_": "UnknownType" + } } ], "cfg": { @@ -160,6 +123,93 @@ "_": "StringType" } } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "message", + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": "An error occurred!", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + }, + "method": { + "enclosingClass": { + "name": "Error" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Local", + "name": "message", + "type": { + "_": "StringType" + } + } + ] + } + }, + { + "_": "ThrowStmt", + "arg": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + } } ] }, diff --git a/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchFinally.ts.json b/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchFinally.ts.json index 082dacc1f..4a5545afa 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchFinally.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchFinally.ts.json @@ -10,56 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "result", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "message", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -106,6 +57,18 @@ } } }, + { + "name": "error", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp1", + "type": { + "_": "UnknownType" + } + }, { "name": "console", "type": { @@ -160,15 +123,151 @@ "_": "StringType" } } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "message", + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": "An error occurred!", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + }, + "method": { + "enclosingClass": { + "name": "Error" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Local", + "name": "message", + "type": { + "_": "StringType" + } + } + ] + } + }, + { + "_": "ThrowStmt", + "arg": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + } } ] }, { "id": 1, - "successors": [], + "successors": [ + 2 + ], "predecessors": [ 0 ], + "stmts": [] + }, + { + "id": 2, + "successors": [ + 3 + ], + "predecessors": [ + 1 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "result", + "type": { + "_": "StringType" + } + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "result", + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": " Finally block executed.", + "type": { + "_": "StringType" + } + } + } + } + ] + }, + { + "id": 3, + "successors": [], + "predecessors": [ + 2 + ], "stmts": [ { "_": "CallStmt", diff --git a/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchMultiple.ts.json b/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchMultiple.ts.json index c30fa1ed7..217c2bdea 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchMultiple.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchMultiple.ts.json @@ -10,88 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "result1", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "result2", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "message1", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "message2", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -164,6 +83,24 @@ "type": { "_": "UnknownType" } + }, + { + "name": "error", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp2", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp3", + "type": { + "_": "UnknownType" + } } ], "cfg": { @@ -230,6 +167,93 @@ "_": "StringType" } } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "message1", + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": "An error occurred in try block 1!", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + }, + "method": { + "enclosingClass": { + "name": "Error" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Local", + "name": "message1", + "type": { + "_": "StringType" + } + } + ] + } + }, + { + "_": "ThrowStmt", + "arg": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + } } ] }, @@ -241,7 +265,95 @@ "predecessors": [ 0 ], - "stmts": [] + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "message2", + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": "An error occurred in try block 2!", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + }, + "method": { + "enclosingClass": { + "name": "Error" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Local", + "name": "message2", + "type": { + "_": "StringType" + } + } + ] + } + }, + { + "_": "ThrowStmt", + "arg": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + } + } + ] }, { "id": 2, diff --git a/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchNested.ts.json b/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchNested.ts.json index 679eeb5d1..5833b1e64 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchNested.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchNested.ts.json @@ -10,72 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "outerResult", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "innerResult", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "innerMessage", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -133,6 +68,30 @@ "type": { "_": "UnknownType" } + }, + { + "name": "innerError", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp1", + "type": { + "_": "UnknownType" + } + }, + { + "name": "outerError", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp2", + "type": { + "_": "UnknownType" + } } ], "cfg": { @@ -199,6 +158,93 @@ "_": "StringType" } } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "innerMessage", + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": "An error occurred in inner try block!", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + }, + "method": { + "enclosingClass": { + "name": "Error" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Local", + "name": "innerMessage", + "type": { + "_": "StringType" + } + } + ] + } + }, + { + "_": "ThrowStmt", + "arg": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + } } ] }, diff --git a/jacodb-ets/src/test/resources/etsir/samples/catch/TryFinally.ts.json b/jacodb-ets/src/test/resources/etsir/samples/catch/TryFinally.ts.json index 17b2cec3f..7f1c8f180 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/catch/TryFinally.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/catch/TryFinally.ts.json @@ -10,56 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "result", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "message", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -160,15 +111,140 @@ "_": "StringType" } } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "message", + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": "An error occurred!", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + }, + "method": { + "enclosingClass": { + "name": "Error" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Local", + "name": "message", + "type": { + "_": "StringType" + } + } + ] + } + }, + { + "_": "ThrowStmt", + "arg": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Error" + } + } + } } ] }, { "id": 1, - "successors": [], + "successors": [ + 2 + ], "predecessors": [ 0 ], + "stmts": [] + }, + { + "id": 2, + "successors": [ + 3 + ], + "predecessors": [ + 1 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "result", + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": "Finally block executed.", + "type": { + "_": "StringType" + } + } + } + ] + }, + { + "id": 3, + "successors": [], + "predecessors": [ + 2 + ], "stmts": [ { "_": "CallStmt", diff --git a/jacodb-ets/src/test/resources/etsir/samples/classes/AbstractClass.ts.json b/jacodb-ets/src/test/resources/etsir/samples/classes/AbstractClass.ts.json index c74eb153d..6359013d9 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/AbstractClass.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/classes/AbstractClass.ts.json @@ -10,43 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "rectangle", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -93,7 +57,7 @@ { "name": "$temp1", "type": { - "_": "NumberType" + "_": "UnknownType" } }, { @@ -175,10 +139,7 @@ "name": "constructor", "parameters": [], "returnType": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } + "_": "UnknownType" } }, "args": [ @@ -228,7 +189,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "NumberType" + "_": "UnknownType" } }, "right": { @@ -245,12 +206,12 @@ }, "method": { "enclosingClass": { - "name": "Rectangle" + "name": "" }, "name": "getArea", "parameters": [], "returnType": { - "_": "NumberType" + "_": "UnknownType" } }, "args": [] @@ -282,7 +243,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "NumberType" + "_": "UnknownType" } } ] @@ -316,28 +277,66 @@ "enclosingClass": { "name": "Shape" }, - "name": "getArea", + "name": "@instance_init", "parameters": [], "returnType": { - "_": "NumberType" + "_": "UnknownType" } }, - "modifiers": [ - "AbstractKeyword" - ], + "modifiers": [], "typeParameters": [], "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Shape" - } + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Shape" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] } - } - ], + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Shape" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], "cfg": { "blocks": [ { @@ -350,12 +349,76 @@ "left": { "_": "Local", "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", "type": { "_": "ClassType", "signature": { "name": "Shape" } } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Shape" + }, + "name": "getArea", + "parameters": [], + "returnType": { + "_": "NumberType" + } + }, + "modifiers": [ + "AbstractKeyword" + ], + "typeParameters": [], + "body": null + }, + { + "signature": { + "enclosingClass": { + "name": "Shape" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } }, "right": { "_": "ThisRef", @@ -400,8 +463,7 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false }, { "signature": { @@ -416,11 +478,110 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Rectangle" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Rectangle" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Rectangle" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Rectangle" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, { "signature": { "enclosingClass": { @@ -480,6 +641,30 @@ "successors": [], "predecessors": [], "stmts": [ + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "Rectangle" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "AssignStmt", "left": { diff --git a/jacodb-ets/src/test/resources/etsir/samples/classes/AccessModifiers.ts.json b/jacodb-ets/src/test/resources/etsir/samples/classes/AccessModifiers.ts.json index 2eae18fd8..cd3631785 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/AccessModifiers.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/classes/AccessModifiers.ts.json @@ -10,43 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "user", - "type": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -93,7 +57,7 @@ { "name": "$temp1", "type": { - "_": "StringType" + "_": "UnknownType" } }, { @@ -175,10 +139,7 @@ "name": "constructor", "parameters": [], "returnType": { - "_": "ClassType", - "signature": { - "name": "User" - } + "_": "UnknownType" } }, "args": [ @@ -235,7 +196,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "StringType" + "_": "UnknownType" } }, "right": { @@ -252,11 +213,11 @@ }, "field": { "enclosingClass": { - "name": "User" + "name": "" }, "name": "name", "type": { - "_": "StringType" + "_": "UnknownType" } } } @@ -287,7 +248,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "StringType" + "_": "UnknownType" } } ] @@ -328,8 +289,7 @@ ], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false }, { "signature": { @@ -346,8 +306,7 @@ ], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false }, { "signature": { @@ -364,11 +323,110 @@ ], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [ + { + "signature": { + "enclosingClass": { + "name": "User" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "User" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "User" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "User" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, { "signature": { "enclosingClass": { @@ -441,6 +499,30 @@ "successors": [], "predecessors": [], "stmts": [ + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "User" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "AssignStmt", "left": { diff --git a/jacodb-ets/src/test/resources/etsir/samples/classes/ConstructorClass.ts.json b/jacodb-ets/src/test/resources/etsir/samples/classes/ConstructorClass.ts.json index 4f976cd95..6a086583d 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/ConstructorClass.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/classes/ConstructorClass.ts.json @@ -10,43 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "constructorObj", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -93,7 +57,7 @@ { "name": "$temp1", "type": { - "_": "StringType" + "_": "UnknownType" } }, { @@ -175,10 +139,7 @@ "name": "constructor", "parameters": [], "returnType": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } + "_": "UnknownType" } }, "args": [ @@ -221,7 +182,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "StringType" + "_": "UnknownType" } }, "right": { @@ -238,12 +199,12 @@ }, "method": { "enclosingClass": { - "name": "ConstructorClass" + "name": "" }, "name": "getName", "parameters": [], "returnType": { - "_": "StringType" + "_": "UnknownType" } }, "args": [] @@ -275,7 +236,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "StringType" + "_": "UnknownType" } } ] @@ -317,11 +278,110 @@ ], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [ + { + "signature": { + "enclosingClass": { + "name": "ConstructorClass" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "ConstructorClass" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "ConstructorClass" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "ConstructorClass" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, { "signature": { "enclosingClass": { @@ -368,6 +428,30 @@ "successors": [], "predecessors": [], "stmts": [ + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "ConstructorClass" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "AssignStmt", "left": { diff --git a/jacodb-ets/src/test/resources/etsir/samples/classes/GenericClass.ts.json b/jacodb-ets/src/test/resources/etsir/samples/classes/GenericClass.ts.json index c8465bd41..dba309813 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/GenericClass.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/classes/GenericClass.ts.json @@ -10,62 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "stringObj", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "numberObj", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -218,10 +163,7 @@ "name": "constructor", "parameters": [], "returnType": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } + "_": "UnknownType" } }, "args": [ @@ -281,13 +223,12 @@ }, "method": { "enclosingClass": { - "name": "GenericClass" + "name": "" }, "name": "getData", "parameters": [], "returnType": { - "_": "UnclearReferenceType", - "name": "T" + "_": "UnknownType" } }, "args": [] @@ -368,10 +309,7 @@ "name": "constructor", "parameters": [], "returnType": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } + "_": "UnknownType" } }, "args": [ @@ -431,13 +369,12 @@ }, "method": { "enclosingClass": { - "name": "GenericClass" + "name": "" }, "name": "getData", "parameters": [], "returnType": { - "_": "UnclearReferenceType", - "name": "T" + "_": "UnknownType" } }, "args": [] @@ -517,11 +454,110 @@ ], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [ + { + "signature": { + "enclosingClass": { + "name": "GenericClass" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "GenericClass" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "GenericClass" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "GenericClass" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, { "signature": { "enclosingClass": { @@ -570,6 +606,30 @@ "successors": [], "predecessors": [], "stmts": [ + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "GenericClass" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "AssignStmt", "left": { diff --git a/jacodb-ets/src/test/resources/etsir/samples/classes/InheritanceClass.ts.json b/jacodb-ets/src/test/resources/etsir/samples/classes/InheritanceClass.ts.json index 92e46df40..f97f61133 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/InheritanceClass.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/classes/InheritanceClass.ts.json @@ -10,43 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "childObj", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -105,7 +69,7 @@ { "name": "$temp2", "type": { - "_": "NumberType" + "_": "UnknownType" } } ], @@ -181,10 +145,7 @@ "name": "constructor", "parameters": [], "returnType": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } + "_": "UnknownType" } }, "args": [ @@ -300,7 +261,7 @@ "_": "Local", "name": "$temp2", "type": { - "_": "NumberType" + "_": "UnknownType" } }, "right": { @@ -317,12 +278,12 @@ }, "method": { "enclosingClass": { - "name": "ChildClass" + "name": "" }, "name": "getAge", "parameters": [], "returnType": { - "_": "NumberType" + "_": "UnknownType" } }, "args": [] @@ -354,7 +315,7 @@ "_": "Local", "name": "$temp2", "type": { - "_": "NumberType" + "_": "UnknownType" } } ] @@ -395,11 +356,110 @@ ], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [ + { + "signature": { + "enclosingClass": { + "name": "ParentClass" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "ParentClass" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "ParentClass" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "ParentClass" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, { "signature": { "enclosingClass": { @@ -446,6 +506,30 @@ "successors": [], "predecessors": [], "stmts": [ + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "ParentClass" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "AssignStmt", "left": { @@ -661,11 +745,110 @@ ], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [ + { + "signature": { + "enclosingClass": { + "name": "ChildClass" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "ChildClass" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "ChildClass" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "ChildClass" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, { "signature": { "enclosingClass": { @@ -725,6 +908,30 @@ "successors": [], "predecessors": [], "stmts": [ + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "ChildClass" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "AssignStmt", "left": { diff --git a/jacodb-ets/src/test/resources/etsir/samples/classes/InterfaceImplementation.ts.json b/jacodb-ets/src/test/resources/etsir/samples/classes/InterfaceImplementation.ts.json index 6b4081054..3cd0fc1d2 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/InterfaceImplementation.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/classes/InterfaceImplementation.ts.json @@ -10,43 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "circle", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -93,7 +57,7 @@ { "name": "$temp1", "type": { - "_": "NumberType" + "_": "UnknownType" } }, { @@ -175,10 +139,7 @@ "name": "constructor", "parameters": [], "returnType": { - "_": "ClassType", - "signature": { - "name": "Circle" - } + "_": "UnknownType" } }, "args": [ @@ -221,7 +182,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "NumberType" + "_": "UnknownType" } }, "right": { @@ -238,12 +199,12 @@ }, "method": { "enclosingClass": { - "name": "Circle" + "name": "" }, "name": "getArea", "parameters": [], "returnType": { - "_": "NumberType" + "_": "UnknownType" } }, "args": [] @@ -282,7 +243,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "NumberType" + "_": "UnknownType" } } ] @@ -322,18 +283,56 @@ }, "modifiers": [], "typeParameters": [], + "body": null + } + ] + }, + { + "signature": { + "name": "Circle" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [ + "Shape" + ], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "Circle" + }, + "name": "radius", + "type": { + "_": "NumberType" + } + }, + "modifiers": [ + "PrivateKeyword", + "ReadonlyKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Circle" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Shape" - } - } - } - ], + "locals": [], "cfg": { "blocks": [ { @@ -347,10 +346,7 @@ "_": "Local", "name": "this", "type": { - "_": "ClassType", - "signature": { - "name": "Shape" - } + "_": "UnknownType" } }, "right": { @@ -358,7 +354,7 @@ "type": { "_": "ClassType", "signature": { - "name": "Shape" + "name": "Circle" } } } @@ -371,41 +367,57 @@ ] } } - } - ] - }, - { - "signature": { - "name": "Circle" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [ - "Shape" - ], - "fields": [ + }, { "signature": { "enclosingClass": { "name": "Circle" }, - "name": "radius", - "type": { - "_": "NumberType" + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" } }, - "modifiers": [ - "PrivateKeyword", - "ReadonlyKeyword" - ], + "modifiers": [], "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [ + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Circle" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, { "signature": { "enclosingClass": { @@ -452,6 +464,30 @@ "successors": [], "predecessors": [], "stmts": [ + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "Circle" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "AssignStmt", "left": { diff --git a/jacodb-ets/src/test/resources/etsir/samples/classes/SimpleClass.ts.json b/jacodb-ets/src/test/resources/etsir/samples/classes/SimpleClass.ts.json index 9cf15f262..3a5c99558 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/SimpleClass.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/classes/SimpleClass.ts.json @@ -10,43 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "simpleObj", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -93,7 +57,7 @@ { "name": "$temp1", "type": { - "_": "StringType" + "_": "UnknownType" } }, { @@ -175,10 +139,7 @@ "name": "constructor", "parameters": [], "returnType": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } + "_": "UnknownType" } }, "args": [] @@ -223,20 +184,12 @@ }, "method": { "enclosingClass": { - "name": "SimpleClass" + "name": "" }, "name": "setName", - "parameters": [ - { - "name": "name", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], + "parameters": [], "returnType": { - "_": "VoidType" + "_": "UnknownType" } }, "args": [ @@ -256,7 +209,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "StringType" + "_": "UnknownType" } }, "right": { @@ -273,12 +226,12 @@ }, "method": { "enclosingClass": { - "name": "SimpleClass" + "name": "" }, "name": "getName", "parameters": [], "returnType": { - "_": "StringType" + "_": "UnknownType" } }, "args": [] @@ -310,7 +263,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "StringType" + "_": "UnknownType" } } ] @@ -351,11 +304,110 @@ ], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [ + { + "signature": { + "enclosingClass": { + "name": "SimpleClass" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "SimpleClass" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "SimpleClass" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "SimpleClass" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, { "signature": { "enclosingClass": { @@ -589,6 +641,56 @@ ] } } + }, + { + "signature": { + "enclosingClass": { + "name": "SimpleClass" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "SimpleClass" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } } ] } diff --git a/jacodb-ets/src/test/resources/etsir/samples/classes/SingletonClass.ts.json b/jacodb-ets/src/test/resources/etsir/samples/classes/SingletonClass.ts.json index b7257e240..09105ef04 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/SingletonClass.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/classes/SingletonClass.ts.json @@ -10,46 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "logger", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "Logger", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -78,19 +39,13 @@ { "name": "logger", "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } + "_": "UnknownType" } }, { "name": "Logger", "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } + "_": "UnknownType" } } ], @@ -129,25 +84,26 @@ "_": "Local", "name": "logger", "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } + "_": "UnknownType" } }, "right": { - "_": "StaticCallExpr", + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "Logger", + "type": { + "_": "UnknownType" + } + }, "method": { "enclosingClass": { - "name": "Logger" + "name": "" }, "name": "getInstance", "parameters": [], "returnType": { - "_": "ClassType", - "signature": { - "name": "Logger" - } + "_": "UnknownType" } }, "args": [] @@ -161,28 +117,17 @@ "_": "Local", "name": "logger", "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } + "_": "UnknownType" } }, "method": { "enclosingClass": { - "name": "Logger" + "name": "" }, "name": "log", - "parameters": [ - { - "name": "message", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], + "parameters": [], "returnType": { - "_": "VoidType" + "_": "UnknownType" } }, "args": [ @@ -233,11 +178,110 @@ ], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Logger" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Logger" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Logger" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Logger" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, { "signature": { "enclosingClass": { @@ -294,6 +338,30 @@ } } }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "Logger" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "ReturnVoidStmt" } @@ -445,10 +513,8 @@ "name": "getInstance", "parameters": [], "returnType": { - "_": "ClassType", - "signature": { - "name": "Logger" - } + "_": "UnclearReferenceType", + "name": "Logger" } }, "modifiers": [ @@ -603,7 +669,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } diff --git a/jacodb-ets/src/test/resources/etsir/samples/classes/StaticClass.ts.json b/jacodb-ets/src/test/resources/etsir/samples/classes/StaticClass.ts.json index d0e912a92..9cd9d2c90 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/StaticClass.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/classes/StaticClass.ts.json @@ -10,43 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "StaticClass", - "type": { - "_": "ClassType", - "signature": { - "name": "StaticClass" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -75,16 +39,13 @@ { "name": "StaticClass", "type": { - "_": "ClassType", - "signature": { - "name": "StaticClass" - } + "_": "UnknownType" } }, { "name": "$temp0", "type": { - "_": "NumberType" + "_": "UnknownType" } }, { @@ -126,15 +87,22 @@ { "_": "CallStmt", "expr": { - "_": "StaticCallExpr", + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "StaticClass", + "type": { + "_": "UnknownType" + } + }, "method": { "enclosingClass": { - "name": "StaticClass" + "name": "" }, "name": "incrementCount", "parameters": [], "returnType": { - "_": "VoidType" + "_": "UnknownType" } }, "args": [] @@ -146,19 +114,26 @@ "_": "Local", "name": "$temp0", "type": { - "_": "NumberType" + "_": "UnknownType" } }, "right": { - "_": "StaticCallExpr", + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "StaticClass", + "type": { + "_": "UnknownType" + } + }, "method": { "enclosingClass": { - "name": "StaticClass" + "name": "" }, "name": "getCount", "parameters": [], "returnType": { - "_": "NumberType" + "_": "UnknownType" } }, "args": [] @@ -190,7 +165,7 @@ "_": "Local", "name": "$temp0", "type": { - "_": "NumberType" + "_": "UnknownType" } } ] @@ -231,17 +206,192 @@ ], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } + "exclamationToken": false } ], "methods": [ + { + "signature": { + "enclosingClass": { + "name": "StaticClass" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "StaticClass" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "StaticClass" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "StaticClass" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "StaticClass" + } + } + }, + "field": { + "enclosingClass": { + "name": "StaticClass" + }, + "name": "count", + "type": { + "_": "NumberType" + } + } + }, + "right": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "StaticClass" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "StaticClass" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, { "signature": { "enclosingClass": { diff --git a/jacodb-ets/src/test/resources/etsir/samples/enums.ts.json b/jacodb-ets/src/test/resources/etsir/samples/enums.ts.json deleted file mode 100644 index b40cb20b9..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/enums.ts.json +++ /dev/null @@ -1,2026 +0,0 @@ -{ - "name": "enums.ts", - "namespaces": [], - "classes": [ - { - "signature": { - "name": "_DEFAULT_ARK_CLASS" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "c", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "a2", - "type": { - "_": "AnyType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "nameOfA", - "type": { - "_": "AnyType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "directions", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnknownType" - }, - "dimensions": 1 - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "Response1", - "type": { - "_": "ClassType", - "signature": { - "name": "Response1" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "respond", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "E", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "f", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "Enum", - "type": { - "_": "ClassType", - "signature": { - "name": "Enum" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "Directions", - "type": { - "_": "ClassType", - "signature": { - "name": "Directions" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "_DEFAULT_ARK_METHOD", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - { - "name": "c", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - { - "name": "a2", - "type": { - "_": "AnyType" - } - }, - { - "name": "nameOfA", - "type": { - "_": "AnyType" - } - }, - { - "name": "directions", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnknownType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp1", - "type": { - "_": "AnyType" - } - }, - { - "name": "$temp2", - "type": { - "_": "AnyType" - } - }, - { - "name": "$temp3", - "type": { - "_": "AnyType" - } - }, - { - "name": "$temp4", - "type": { - "_": "AnyType" - } - }, - { - "name": "$temp5", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnknownType" - }, - "dimensions": 1 - } - }, - { - "name": "Response1", - "type": { - "_": "ClassType", - "signature": { - "name": "Response1" - } - } - }, - { - "name": "respond", - "type": { - "_": "UnknownType" - } - }, - { - "name": "", - "type": { - "_": "UnknownType" - } - }, - { - "name": "E", - "type": { - "_": "UnknownType" - } - }, - { - "name": "f", - "type": { - "_": "UnknownType" - } - }, - { - "name": "Enum", - "type": { - "_": "ClassType", - "signature": { - "name": "Enum" - } - } - }, - { - "name": "Directions", - "type": { - "_": "ClassType", - "signature": { - "name": "Directions" - } - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "c", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "a2", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "nameOfA", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "directions", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnknownType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnknownType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "StaticFieldRef", - "field": { - "enclosingClass": { - "name": "Response1" - }, - "name": "Yes", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "respond", - "parameters": [ - { - "name": "recipient", - "type": { - "_": "StringType" - }, - "isOptional": false - }, - { - "name": "message", - "type": { - "_": "UnclearReferenceType", - "name": "Response1" - }, - "isOptional": false - } - ], - "returnType": { - "_": "VoidType" - } - }, - "args": [ - { - "_": "Constant", - "value": "Princess Caroline", - "type": { - "_": "StringType" - } - }, - { - "_": "Local", - "name": "$temp0", - "type": { - "_": "AnyType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "c", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - "right": { - "_": "Local", - "name": "", - "type": { - "_": "UnknownType" - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "f", - "parameters": [ - { - "name": "obj", - "type": { - "_": "AnyType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "E", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "a2", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "StaticFieldRef", - "field": { - "enclosingClass": { - "name": "Enum" - }, - "name": "A", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "nameOfA", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "Enum", - "type": { - "_": "ClassType", - "signature": { - "name": "Enum" - } - } - }, - "field": { - "enclosingClass": { - "name": "Enum" - }, - "name": "a2", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "StaticFieldRef", - "field": { - "enclosingClass": { - "name": "Directions" - }, - "name": "Up", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "StaticFieldRef", - "field": { - "enclosingClass": { - "name": "Directions" - }, - "name": "Down", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "StaticFieldRef", - "field": { - "enclosingClass": { - "name": "Directions" - }, - "name": "Left", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "StaticFieldRef", - "field": { - "enclosingClass": { - "name": "Directions" - }, - "name": "Right", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "AnyType" - }, - "size": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnknownType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "directions", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnknownType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnknownType" - }, - "dimensions": 1 - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "respond", - "parameters": [ - { - "name": "recipient", - "type": { - "_": "StringType" - }, - "isOptional": false - }, - { - "name": "message", - "type": { - "_": "UnclearReferenceType", - "name": "Response1" - }, - "isOptional": false - } - ], - "returnType": { - "_": "VoidType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "recipient", - "type": { - "_": "StringType" - } - }, - { - "name": "message", - "type": { - "_": "UnclearReferenceType", - "name": "Response1" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "recipient", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "message", - "type": { - "_": "UnclearReferenceType", - "name": "Response1" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "UnclearReferenceType", - "name": "Response1" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "f", - "parameters": [ - { - "name": "obj", - "type": { - "_": "AnyType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "obj", - "type": { - "_": "AnyType" - } - }, - { - "name": "$temp0", - "type": { - "_": "AnyType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "obj", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "AnyType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "AnyType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "obj", - "type": { - "_": "AnyType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "X", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "AnyType" - } - } - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Direction1" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Direction1" - }, - "name": "Up", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "Direction1" - }, - "name": "Down", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "Direction1" - }, - "name": "Left", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "Direction1" - }, - "name": "Right", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [] - }, - { - "signature": { - "name": "Direction2" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Direction2" - }, - "name": "Up", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "Direction2" - }, - "name": "Down", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "Direction2" - }, - "name": "Left", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "Direction2" - }, - "name": "Right", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [] - }, - { - "signature": { - "name": "BooleanLikeHeterogeneousEnum" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "BooleanLikeHeterogeneousEnum" - }, - "name": "No", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "BooleanLikeHeterogeneousEnum" - }, - "name": "Yes", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [] - }, - { - "signature": { - "name": "E1" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "E1" - }, - "name": "X", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "E1" - }, - "name": "Y", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "E1" - }, - "name": "Z", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [] - }, - { - "signature": { - "name": "E2" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "E2" - }, - "name": "A", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "E2" - }, - "name": "B", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "E2" - }, - "name": "C", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [] - }, - { - "signature": { - "name": "FileAccess" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "FileAccess" - }, - "name": "None", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "FileAccess" - }, - "name": "Read", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "FileAccess" - }, - "name": "Write", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "FileAccess" - }, - "name": "ReadWrite", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "FileAccess" - }, - "name": "G", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [] - }, - { - "signature": { - "name": "Response1" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Response1" - }, - "name": "No", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "Response1" - }, - "name": "Yes", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [] - }, - { - "signature": { - "name": "ShapeKind" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "ShapeKind" - }, - "name": "Circle", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "ShapeKind" - }, - "name": "Square", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [] - }, - { - "signature": { - "name": "Circle" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Circle" - }, - "name": "kind", - "type": { - "_": "UnclearReferenceType", - "name": "ShapeKind.Circle" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "Circle" - }, - "name": "radius", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [] - }, - { - "signature": { - "name": "Square" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Square" - }, - "name": "kind", - "type": { - "_": "UnclearReferenceType", - "name": "ShapeKind.Square" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "Square" - }, - "name": "sideLength", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [] - }, - { - "signature": { - "name": "E" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "E" - }, - "name": "X", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "E" - }, - "name": "Y", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "E" - }, - "name": "Z", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [] - }, - { - "signature": { - "name": "Enum" - }, - "modifiers": [ - "DeclareKeyword" - ], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Enum" - }, - "name": "A", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [] - }, - { - "signature": { - "name": "Directions" - }, - "modifiers": [ - "ConstKeyword" - ], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Directions" - }, - "name": "Up", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "Directions" - }, - "name": "Down", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "Directions" - }, - "name": "Left", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "Directions" - }, - "name": "Right", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file diff --git a/jacodb-ets/src/test/resources/etsir/samples/PrependInitializer.ts.json b/jacodb-ets/src/test/resources/etsir/samples/initializers.ts.json similarity index 69% rename from jacodb-ets/src/test/resources/etsir/samples/PrependInitializer.ts.json rename to jacodb-ets/src/test/resources/etsir/samples/initializers.ts.json index ecc1dbb7b..15e105a20 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/PrependInitializer.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/initializers.ts.json @@ -1,5 +1,5 @@ { - "name": "PrependInitializer.ts", + "name": "initializers.ts", "namespaces": [], "classes": [ { @@ -99,14 +99,7 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "99", - "type": { - "_": "NumberType" - } - } + "exclamationToken": false }, { "signature": { @@ -123,17 +116,174 @@ ], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "109", - "type": { - "_": "NumberType" - } - } + "exclamationToken": false } ], "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Foo" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Foo" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Foo" + } + } + }, + "field": { + "enclosingClass": { + "name": "Foo" + }, + "name": "x", + "type": { + "_": "NumberType" + } + } + }, + "right": { + "_": "Constant", + "value": "99", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Foo" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Foo" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Foo" + } + } + }, + "field": { + "enclosingClass": { + "name": "Foo" + }, + "name": "y", + "type": { + "_": "NumberType" + } + } + }, + "right": { + "_": "Constant", + "value": "111", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, { "signature": { "enclosingClass": { @@ -194,6 +344,30 @@ } } }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "Foo" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "CallStmt", "expr": { @@ -218,7 +392,7 @@ "args": [ { "_": "Constant", - "value": "new Foo", + "value": "inside Foo::constructor", "type": { "_": "StringType" } @@ -324,7 +498,7 @@ }, "right": { "_": "Constant", - "value": "112", + "value": "222", "type": { "_": "NumberType" } @@ -354,7 +528,7 @@ "args": [ { "_": "Constant", - "value": "print-foo", + "value": "inside Foo::foo", "type": { "_": "StringType" } @@ -459,7 +633,7 @@ }, "right": { "_": "Constant", - "value": "111", + "value": "333", "type": { "_": "NumberType" } @@ -489,7 +663,7 @@ "args": [ { "_": "Constant", - "value": "print-bar", + "value": "inside Foo::bar", "type": { "_": "StringType" } diff --git a/jacodb-ets/src/test/resources/etsir/samples/loop/BreadthFirstSearch.ts.json b/jacodb-ets/src/test/resources/etsir/samples/loop/BreadthFirstSearch.ts.json index 9b964cf5c..e065e7a56 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/BreadthFirstSearch.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/loop/BreadthFirstSearch.ts.json @@ -10,75 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "graph", - "type": { - "_": "ClassType", - "signature": { - "name": "Graph" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "visitOrder", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "bfs", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -106,10 +38,17 @@ }, { "name": "graph", + "type": { + "_": "UnclearReferenceType", + "name": "Graph" + } + }, + { + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "Graph" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" } } }, @@ -165,23 +104,68 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "graph", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "Graph" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" } } }, "right": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "graph", + "type": { + "_": "UnclearReferenceType", + "name": "Graph" + } + }, + "right": { + "_": "Local", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" } } } @@ -199,29 +183,12 @@ "_": "StaticCallExpr", "method": { "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" + "name": "" }, "name": "bfs", - "parameters": [ - { - "name": "graph", - "type": { - "_": "UnclearReferenceType", - "name": "Graph" - }, - "isOptional": false - }, - { - "name": "startNode", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], + "parameters": [], "returnType": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "UnknownType" } }, "args": [ @@ -229,10 +196,8 @@ "_": "Local", "name": "graph", "type": { - "_": "ClassType", - "signature": { - "name": "Graph" - } + "_": "UnclearReferenceType", + "name": "Graph" } }, { @@ -317,8 +282,11 @@ } ], "returnType": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 } }, "modifiers": [], @@ -418,31 +386,49 @@ } }, { - "name": "neighbour", + "name": "$temp5", "type": { - "_": "UnknownType" + "_": "ClassType", + "signature": { + "name": "Iterator" + } } }, { - "name": "$temp5", + "name": "$temp6", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } } }, { - "name": "$temp6", + "name": "$temp7", "type": { - "_": "NumberType" + "_": "BooleanType" } }, { - "name": "$temp7", + "name": "$temp8", "type": { "_": "UnknownType" } }, { - "name": "$temp8", + "name": "neighbour", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp9", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp10", "type": { "_": "UnknownType" } @@ -658,13 +644,23 @@ { "id": 1, "successors": [ - 2, - 3 + 2 ], "predecessors": [ - 0, + 0 + ], + "stmts": [] + }, + { + "id": 2, + "successors": [ 3, - 5 + 4 + ], + "predecessors": [ + 1, + 4, + 6 ], "stmts": [ { @@ -720,17 +716,17 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } ] }, { - "id": 2, + "id": 3, "successors": [], "predecessors": [ - 1 + 2 ], "stmts": [ { @@ -750,13 +746,13 @@ ] }, { - "id": 3, + "id": 4, "successors": [ - 1, - 4 + 2, + 5 ], "predecessors": [ - 1 + 2 ], "stmts": [ { @@ -878,19 +874,19 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } ] }, { - "id": 4, + "id": 5, "successors": [ - 5 + 6 ], "predecessors": [ - 3 + 4 ], "stmts": [ { @@ -958,126 +954,195 @@ } } } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp5", + "type": { + "_": "ClassType", + "signature": { + "name": "Iterator" + } + } + }, + "right": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "neighbours", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "iterator", + "parameters": [], + "returnType": { + "_": "ClassType", + "signature": { + "name": "Iterator" + } + } + }, + "args": [] + } } ] }, { - "id": 5, + "id": 6, "successors": [ - 1, - 6 + 2, + 7 ], "predecessors": [ - 4, - 6, - 7 + 5, + 7, + 8 ], "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "neighbour", + "name": "$temp6", "type": { - "_": "UnknownType" + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } } }, "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp5", + "type": { + "_": "ClassType", + "signature": { + "name": "Iterator" + } + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "next", + "parameters": [], + "returnType": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } + } + }, + "args": [] } }, { "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp5", + "name": "$temp7", "type": { - "_": "NumberType" + "_": "BooleanType" } }, "right": { - "_": "LengthExpr", - "arg": { + "_": "InstanceFieldRef", + "instance": { "_": "Local", - "name": "neighbours", + "name": "$temp6", + "type": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } + } + }, + "field": { + "enclosingClass": { + "name": "IteratorResult" + }, + "name": "done", "type": { "_": "UnknownType" } } } }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - }, { "_": "IfStmt", "condition": { "_": "ConditionExpr", - "op": ">=", + "op": "==", "left": { "_": "Local", - "name": "$temp6", + "name": "$temp7", "type": { - "_": "NumberType" + "_": "BooleanType" } }, "right": { - "_": "Local", - "name": "$temp5", + "_": "Constant", + "value": "true", "type": { - "_": "NumberType" + "_": "BooleanType" } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } - }, + } + ] + }, + { + "id": 7, + "successors": [ + 6, + 8 + ], + "predecessors": [ + 6 + ], + "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "neighbour", + "name": "$temp8", "type": { "_": "UnknownType" } }, "right": { - "_": "ArrayRef", - "array": { + "_": "InstanceFieldRef", + "instance": { "_": "Local", - "name": "neighbours", + "name": "$temp6", "type": { - "_": "UnknownType" + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } } }, - "index": { - "_": "Local", - "name": "$temp6", + "field": { + "enclosingClass": { + "name": "IteratorResult" + }, + "name": "value", "type": { - "_": "NumberType" + "_": "UnknownType" } - }, - "type": { - "_": "UnknownType" } } }, @@ -1085,47 +1150,30 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp6", + "name": "neighbour", "type": { - "_": "NumberType" + "_": "UnknownType" } }, "right": { - "_": "BinopExpr", - "op": "+", - "left": { + "_": "CastExpr", + "arg": { "_": "Local", - "name": "$temp6", + "name": "$temp8", "type": { - "_": "NumberType" + "_": "UnknownType" } }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } + "type": { + "_": "UnknownType" } } - } - ] - }, - { - "id": 6, - "successors": [ - 5, - 7 - ], - "predecessors": [ - 5 - ], - "stmts": [ + }, { "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp7", + "name": "$temp9", "type": { "_": "UnknownType" } @@ -1168,7 +1216,7 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp8", + "name": "$temp10", "type": { "_": "UnknownType" } @@ -1178,7 +1226,7 @@ "op": "!", "arg": { "_": "Local", - "name": "$temp7", + "name": "$temp9", "type": { "_": "UnknownType" } @@ -1192,7 +1240,7 @@ "op": "==", "left": { "_": "Local", - "name": "$temp8", + "name": "$temp10", "type": { "_": "UnknownType" } @@ -1205,19 +1253,19 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } ] }, { - "id": 7, + "id": 8, "successors": [ - 5 + 6 ], "predecessors": [ - 6 + 7 ], "stmts": [ { @@ -1280,22 +1328,24 @@ }, "name": "IndexSignature-Graph-0", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 } }, "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [] }, { "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" }, "modifiers": [], "typeParameters": [], @@ -1305,7 +1355,7 @@ { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" }, "name": "a", "type": { @@ -1315,42 +1365,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ArrayLiteralExpr", - "elements": [ - { - "_": "Constant", - "value": "'b'", - "type": { - "_": "StringType" - } - }, - { - "_": "Constant", - "value": "'c'", - "type": { - "_": "StringType" - } - } - ], - "type": { - "_": "UnionType", - "types": [ - { - "_": "StringType" - }, - { - "_": "StringType" - } - ] - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" }, "name": "b", "type": { @@ -1360,32 +1380,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ArrayLiteralExpr", - "elements": [ - { - "_": "Constant", - "value": "'d'", - "type": { - "_": "StringType" - } - } - ], - "type": { - "_": "UnionType", - "types": [ - { - "_": "StringType" - } - ] - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" }, "name": "c", "type": { @@ -1395,32 +1395,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ArrayLiteralExpr", - "elements": [ - { - "_": "Constant", - "value": "'e'", - "type": { - "_": "StringType" - } - } - ], - "type": { - "_": "UnionType", - "types": [ - { - "_": "StringType" - } - ] - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" }, "name": "d", "type": { @@ -1430,32 +1410,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ArrayLiteralExpr", - "elements": [ - { - "_": "Constant", - "value": "'f'", - "type": { - "_": "StringType" - } - } - ], - "type": { - "_": "UnionType", - "types": [ - { - "_": "StringType" - } - ] - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" }, "name": "e", "type": { @@ -1465,20 +1425,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ArrayLiteralExpr", - "elements": [], - "type": { - "_": "UnionType", - "types": [] - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" }, "name": "f", "type": { @@ -1488,18 +1440,670 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ArrayLiteralExpr", - "elements": [], - "type": { - "_": "UnionType", - "types": [] - } - } + "exclamationToken": false } ], - "methods": [] + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "$temp0", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + { + "name": "$temp1", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + { + "name": "$temp2", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + { + "name": "$temp3", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + { + "name": "$temp4", + "type": { + "_": "ArrayType", + "elementType": { + "_": "AnyType" + }, + "dimensions": 1 + } + }, + { + "name": "$temp5", + "type": { + "_": "ArrayType", + "elementType": { + "_": "AnyType" + }, + "dimensions": 1 + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + "right": { + "_": "NewArrayExpr", + "elementType": { + "_": "StringType" + }, + "size": { + "_": "Constant", + "value": "2", + "type": { + "_": "NumberType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + "index": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + }, + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": "b", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + "index": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + }, + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": "c", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "a", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + "right": { + "_": "NewArrayExpr", + "elementType": { + "_": "StringType" + }, + "size": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + "index": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + }, + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": "d", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "b", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp2", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + "right": { + "_": "NewArrayExpr", + "elementType": { + "_": "StringType" + }, + "size": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp2", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + "index": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + }, + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": "e", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "c", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp2", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp3", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + "right": { + "_": "NewArrayExpr", + "elementType": { + "_": "StringType" + }, + "size": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp3", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + "index": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + }, + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": "f", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "d", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp3", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp4", + "type": { + "_": "ArrayType", + "elementType": { + "_": "AnyType" + }, + "dimensions": 1 + } + }, + "right": { + "_": "NewArrayExpr", + "elementType": { + "_": "AnyType" + }, + "size": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "e", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp4", + "type": { + "_": "ArrayType", + "elementType": { + "_": "AnyType" + }, + "dimensions": 1 + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp5", + "type": { + "_": "ArrayType", + "elementType": { + "_": "AnyType" + }, + "dimensions": 1 + } + }, + "right": { + "_": "NewArrayExpr", + "elementType": { + "_": "AnyType" + }, + "size": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "f", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp5", + "type": { + "_": "ArrayType", + "elementType": { + "_": "AnyType" + }, + "dimensions": 1 + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] } ], "importInfos": [], diff --git a/jacodb-ets/src/test/resources/etsir/samples/loop/DepthFirstSearch.ts.json b/jacodb-ets/src/test/resources/etsir/samples/loop/DepthFirstSearch.ts.json index a00ff49d2..f81a941b6 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/DepthFirstSearch.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/loop/DepthFirstSearch.ts.json @@ -10,75 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "tree", - "type": { - "_": "ClassType", - "signature": { - "name": "TreeNode" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "traversalResult", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "iterativeDFS", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -106,10 +38,17 @@ }, { "name": "tree", + "type": { + "_": "UnclearReferenceType", + "name": "TreeNode" + } + }, + { + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "TreeNode" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" } } }, @@ -165,23 +104,68 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "tree", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "TreeNode" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" } } }, "right": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "tree", + "type": { + "_": "UnclearReferenceType", + "name": "TreeNode" + } + }, + "right": { + "_": "Local", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" } } } @@ -199,30 +183,12 @@ "_": "StaticCallExpr", "method": { "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" + "name": "" }, "name": "iterativeDFS", - "parameters": [ - { - "name": "root", - "type": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - }, - "isOptional": false - } - ], + "parameters": [], "returnType": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "UnknownType" } }, "args": [ @@ -230,10 +196,8 @@ "_": "Local", "name": "tree", "type": { - "_": "ClassType", - "signature": { - "name": "TreeNode" - } + "_": "UnclearReferenceType", + "name": "TreeNode" } } ] @@ -312,8 +276,11 @@ } ], "returnType": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, "modifiers": [], @@ -597,7 +564,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -875,7 +842,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -970,7 +937,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -1100,7 +1067,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -1166,7 +1133,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -1406,8 +1373,7 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false }, { "signature": { @@ -1423,8 +1389,7 @@ "modifiers": [], "typeParameters": [], "questionToken": true, - "exclamationToken": false, - "initializer": null + "exclamationToken": false }, { "signature": { @@ -1440,15 +1405,14 @@ "modifiers": [], "typeParameters": [], "questionToken": true, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [] }, { "signature": { - "name": "AnonymousClass-2" + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" }, "modifiers": [], "typeParameters": [], @@ -1458,7 +1422,7 @@ { "signature": { "enclosingClass": { - "name": "AnonymousClass-2" + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" }, "name": "value", "type": { @@ -1468,55 +1432,97 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "4", - "type": { - "_": "NumberType" - } - } + "exclamationToken": false } ], - "methods": [] - }, - { - "signature": { - "name": "AnonymousClass-3" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ + "methods": [ { "signature": { "enclosingClass": { - "name": "AnonymousClass-3" + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" }, - "name": "value", - "type": { + "name": "@instance_init", + "parameters": [], + "returnType": { "_": "UnknownType" } }, "modifiers": [], "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" + }, + "name": "value", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "4", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] } } } - ], - "methods": [] + ] }, { "signature": { - "name": "AnonymousClass-1" + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" }, "modifiers": [], "typeParameters": [], @@ -1526,7 +1532,7 @@ { "signature": { "enclosingClass": { - "name": "AnonymousClass-1" + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" }, "name": "value", "type": { @@ -1536,143 +1542,97 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-1" - }, - "name": "left", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-2" - }, - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-2" - } - } - } - }, + "exclamationToken": false + } + ], + "methods": [ { "signature": { "enclosingClass": { - "name": "AnonymousClass-1" + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" }, - "name": "right", - "type": { + "name": "@instance_init", + "parameters": [], + "returnType": { "_": "UnknownType" } }, "modifiers": [], "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-3" - }, - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-3" - } - } - } - } - ], - "methods": [] - }, - { - "signature": { - "name": "AnonymousClass-5" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-5" - }, - "name": "value", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "6", - "type": { - "_": "NumberType" - } - } - } - ], - "methods": [] - }, - { - "signature": { - "name": "AnonymousClass-6" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-6" - }, - "name": "value", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "7", - "type": { - "_": "NumberType" + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" + }, + "name": "value", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "5", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] } } } - ], - "methods": [] + ] }, { "signature": { - "name": "AnonymousClass-4" + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" }, "modifiers": [], "typeParameters": [], @@ -1682,7 +1642,7 @@ { "signature": { "enclosingClass": { - "name": "AnonymousClass-4" + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" }, "name": "value", "type": { @@ -1692,19 +1652,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "3", - "type": { - "_": "NumberType" - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-4" + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" }, "name": "left", "type": { @@ -1714,24 +1667,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-5" - }, - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-5" - } - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-4" + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" }, "name": "right", "type": { @@ -1741,110 +1682,1154 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-6" - }, - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-6" - } - } - } + "exclamationToken": false } ], - "methods": [] - }, - { - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" - }, - "name": "value", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" - }, - "name": "left", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-1" - }, - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-1" - } - } - } - }, + "methods": [ { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" }, - "name": "right", - "type": { + "name": "@instance_init", + "parameters": [], + "returnType": { "_": "UnknownType" } }, "modifiers": [], "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-4" - }, - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-4" + "body": { + "locals": [ + { + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" + } + } + }, + { + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" + } + } } - } - } - } - ], - "methods": [] + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" + }, + "name": "value", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "2", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" + }, + "name": "left", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" + }, + "name": "right", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" + }, + "name": "value", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" + }, + "name": "value", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "6", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" + }, + "name": "value", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" + }, + "name": "value", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "7", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + }, + "name": "value", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + }, + "name": "left", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + }, + "name": "right", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" + } + } + }, + { + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" + } + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + }, + "name": "value", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "3", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + }, + "name": "left", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + }, + "name": "right", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "value", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "left", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "right", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" + } + } + }, + { + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + } + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "value", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "left", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "right", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] } ], "importInfos": [], diff --git a/jacodb-ets/src/test/resources/etsir/samples/loop/DijkstrasAlgorithm.ts.json b/jacodb-ets/src/test/resources/etsir/samples/loop/DijkstrasAlgorithm.ts.json index 012de868f..4cbc8214e 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/DijkstrasAlgorithm.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/loop/DijkstrasAlgorithm.ts.json @@ -10,90 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "graph", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "dijkstra", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -985,7 +902,37 @@ "right": { "_": "NewArrayExpr", "elementType": { - "_": "AnyType" + "_": "UnionType", + "types": [ + { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + } + ] }, "size": { "_": "Constant", @@ -1486,29 +1433,12 @@ "_": "StaticCallExpr", "method": { "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" + "name": "" }, "name": "dijkstra", - "parameters": [ - { - "name": "graph", - "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" - }, - "isOptional": false - }, - { - "name": "startVertex", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], + "parameters": [], "returnType": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "UnknownType" } }, "args": [ @@ -1621,8 +1551,15 @@ { "name": "graph", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 }, "isOptional": false }, @@ -1635,8 +1572,11 @@ } ], "returnType": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, "modifiers": [], @@ -1655,8 +1595,15 @@ { "name": "graph", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, { @@ -1774,13 +1721,13 @@ { "name": "$temp8", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, { "name": "$temp9", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, { @@ -1804,25 +1751,29 @@ { "name": "$temp13", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, { "name": "$temp14", "type": { - "_": "UnknownType" + "_": "NumberType" } }, { "name": "$temp15", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, { "name": "$temp16", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, { @@ -1834,19 +1785,23 @@ { "name": "$temp18", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, { "name": "$temp19", "type": { - "_": "UnknownType" + "_": "NumberType" } }, { "name": "$temp20", "type": { - "_": "UnknownType" + "_": "NumberType" } }, { @@ -1858,13 +1813,13 @@ { "name": "$temp22", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, { "name": "$temp23", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, { @@ -1876,19 +1831,23 @@ { "name": "$temp25", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, { "name": "$temp26", "type": { - "_": "UnknownType" + "_": "NumberType" } }, { "name": "$temp27", "type": { - "_": "UnknownType" + "_": "NumberType" } } ], @@ -1907,16 +1866,30 @@ "_": "Local", "name": "graph", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, "right": { "_": "ParameterRef", "index": 0, "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } } }, @@ -1983,8 +1956,15 @@ "_": "Local", "name": "graph", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, "field": { @@ -2104,8 +2084,15 @@ "_": "Local", "name": "graph", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, "field": { @@ -2172,12 +2159,10 @@ { "id": 1, "successors": [ - 2, - 3 + 2 ], "predecessors": [ - 0, - 6 + 0 ], "stmts": [ { @@ -2196,7 +2181,20 @@ "_": "NumberType" } } - }, + } + ] + }, + { + "id": 2, + "successors": [ + 3, + 4 + ], + "predecessors": [ + 1, + 7 + ], + "stmts": [ { "_": "AssignStmt", "left": { @@ -2212,8 +2210,15 @@ "_": "Local", "name": "graph", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, "field": { @@ -2275,70 +2280,42 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } - }, + } + ] + }, + { + "id": 3, + "successors": [], + "predecessors": [ + 2 + ], + "stmts": [ { - "_": "AssignStmt", - "left": { + "_": "ReturnStmt", + "arg": { "_": "Local", - "name": "i", + "name": "distances", "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } } } ] }, { - "id": 2, - "successors": [], - "predecessors": [ - 1 - ], - "stmts": [ - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "distances", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - } - ] - }, - { - "id": 3, + "id": 4, "successors": [ - 4 + 5 ], "predecessors": [ - 1 + 2 ], "stmts": [ { @@ -2378,21 +2355,7 @@ } } } - } - ] - }, - { - "id": 4, - "successors": [ - 5, - 9 - ], - "predecessors": [ - 3, - 9, - 10 - ], - "stmts": [ + }, { "_": "AssignStmt", "left": { @@ -2409,7 +2372,20 @@ "_": "NumberType" } } - }, + } + ] + }, + { + "id": 5, + "successors": [ + 6, + 11 + ], + "predecessors": [ + 4, + 12 + ], + "stmts": [ { "_": "AssignStmt", "left": { @@ -2425,8 +2401,15 @@ "_": "Local", "name": "graph", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, "field": { @@ -2460,47 +2443,19 @@ } }, "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } + "_": "BooleanType" } } } ] }, { - "id": 5, + "id": 6, "successors": [ - 6 + 7 ], "predecessors": [ - 4 + 5 ], "stmts": [ { @@ -2536,21 +2491,7 @@ "_": "BooleanType" } } - } - ] - }, - { - "id": 6, - "successors": [ - 1, - 7 - ], - "predecessors": [ - 5, - 7, - 8 - ], - "stmts": [ + }, { "_": "AssignStmt", "left": { @@ -2567,7 +2508,20 @@ "_": "NumberType" } } - }, + } + ] + }, + { + "id": 7, + "successors": [ + 2, + 8 + ], + "predecessors": [ + 6, + 9 + ], + "stmts": [ { "_": "AssignStmt", "left": { @@ -2583,8 +2537,15 @@ "_": "Local", "name": "graph", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, "field": { @@ -2618,48 +2579,20 @@ } }, "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } + "_": "BooleanType" } } } ] }, { - "id": 7, + "id": 8, "successors": [ - 6, - 8 + 9, + 10 ], "predecessors": [ - 6 + 7 ], "stmts": [ { @@ -2723,27 +2656,43 @@ "_": "Local", "name": "$temp13", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, "right": { - "_": "InstanceFieldRef", - "instance": { + "_": "ArrayRef", + "array": { "_": "Local", "name": "graph", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, - "field": { - "enclosingClass": { - "name": "" - }, + "index": { + "_": "Local", "name": "minIndex", "type": { - "_": "UnknownType" + "_": "NumberType" } + }, + "type": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } } }, @@ -2753,26 +2702,31 @@ "_": "Local", "name": "$temp14", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { - "_": "InstanceFieldRef", - "instance": { + "_": "ArrayRef", + "array": { "_": "Local", "name": "$temp13", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, - "field": { - "enclosingClass": { - "name": "" - }, + "index": { + "_": "Local", "name": "v", "type": { - "_": "UnknownType" + "_": "NumberType" } + }, + "type": { + "_": "NumberType" } } }, @@ -2782,7 +2736,7 @@ "_": "Local", "name": "$temp15", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, "right": { @@ -2792,7 +2746,7 @@ "_": "Local", "name": "$temp14", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -2810,7 +2764,7 @@ "_": "Local", "name": "$temp16", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, "right": { @@ -2827,7 +2781,7 @@ "_": "Local", "name": "$temp15", "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -2872,27 +2826,43 @@ "_": "Local", "name": "$temp18", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, - "right": { - "_": "InstanceFieldRef", - "instance": { + "right": { + "_": "ArrayRef", + "array": { "_": "Local", "name": "graph", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, - "field": { - "enclosingClass": { - "name": "" - }, + "index": { + "_": "Local", "name": "minIndex", "type": { - "_": "UnknownType" + "_": "NumberType" } + }, + "type": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } } }, @@ -2902,26 +2872,31 @@ "_": "Local", "name": "$temp19", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { - "_": "InstanceFieldRef", - "instance": { + "_": "ArrayRef", + "array": { "_": "Local", "name": "$temp18", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, - "field": { - "enclosingClass": { - "name": "" - }, + "index": { + "_": "Local", "name": "v", "type": { - "_": "UnknownType" + "_": "NumberType" } + }, + "type": { + "_": "NumberType" } } }, @@ -2931,7 +2906,7 @@ "_": "Local", "name": "$temp20", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -2948,7 +2923,7 @@ "_": "Local", "name": "$temp19", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -2993,7 +2968,7 @@ "_": "Local", "name": "$temp22", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, "right": { @@ -3003,7 +2978,7 @@ "_": "Local", "name": "$temp20", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -3021,7 +2996,7 @@ "_": "Local", "name": "$temp23", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, "right": { @@ -3031,14 +3006,14 @@ "_": "Local", "name": "$temp16", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, "right": { "_": "Local", "name": "$temp22", "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -3052,7 +3027,7 @@ "_": "Local", "name": "$temp23", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, "right": { @@ -3063,19 +3038,87 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } ] }, { - "id": 8, + "id": 9, "successors": [ - 6 + 7 ], "predecessors": [ - 7 + 8, + 10 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "v", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "v", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "i", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "i", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } + } + ] + }, + { + "id": 10, + "successors": [ + 9 + ], + "predecessors": [ + 8 ], "stmts": [ { @@ -3118,27 +3161,43 @@ "_": "Local", "name": "$temp25", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, "right": { - "_": "InstanceFieldRef", - "instance": { + "_": "ArrayRef", + "array": { "_": "Local", "name": "graph", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, - "field": { - "enclosingClass": { - "name": "" - }, + "index": { + "_": "Local", "name": "minIndex", "type": { - "_": "UnknownType" + "_": "NumberType" } + }, + "type": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } } }, @@ -3148,26 +3207,31 @@ "_": "Local", "name": "$temp26", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { - "_": "InstanceFieldRef", - "instance": { + "_": "ArrayRef", + "array": { "_": "Local", "name": "$temp25", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, - "field": { - "enclosingClass": { - "name": "" - }, + "index": { + "_": "Local", "name": "v", "type": { - "_": "UnknownType" + "_": "NumberType" } + }, + "type": { + "_": "NumberType" } } }, @@ -3177,7 +3241,7 @@ "_": "Local", "name": "$temp27", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -3194,7 +3258,7 @@ "_": "Local", "name": "$temp26", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -3229,20 +3293,20 @@ "_": "Local", "name": "$temp27", "type": { - "_": "UnknownType" + "_": "NumberType" } } } ] }, { - "id": 9, + "id": 11, "successors": [ - 4, - 10 + 12, + 13 ], "predecessors": [ - 4 + 5 ], "stmts": [ { @@ -3340,7 +3404,7 @@ "_": "Local", "name": "$temp8", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, "right": { @@ -3368,7 +3432,7 @@ "_": "Local", "name": "$temp9", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, "right": { @@ -3385,7 +3449,7 @@ "_": "Local", "name": "$temp8", "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -3399,7 +3463,7 @@ "_": "Local", "name": "$temp9", "type": { - "_": "UnknownType" + "_": "BooleanType" } }, "right": { @@ -3410,19 +3474,59 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } ] }, { - "id": 10, + "id": 12, "successors": [ - 4 + 5 ], "predecessors": [ - 9 + 11, + 13 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "v", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "v", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } + } + ] + }, + { + "id": 13, + "successors": [ + 12 + ], + "predecessors": [ + 11 ], "stmts": [ { diff --git a/jacodb-ets/src/test/resources/etsir/samples/loop/DoWhileLoop.ts.json b/jacodb-ets/src/test/resources/etsir/samples/loop/DoWhileLoop.ts.json index ff4df00a8..fe2522f5b 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/DoWhileLoop.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/loop/DoWhileLoop.ts.json @@ -10,40 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "count", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -147,11 +114,12 @@ { "id": 1, "successors": [ + 1, 2 ], "predecessors": [ 0, - 2 + 1 ], "stmts": [ { @@ -269,19 +237,7 @@ } } } - } - ] - }, - { - "id": 2, - "successors": [ - 1, - 3 - ], - "predecessors": [ - 1 - ], - "stmts": [ + }, { "_": "IfStmt", "condition": { @@ -309,10 +265,10 @@ ] }, { - "id": 3, + "id": 2, "successors": [], "predecessors": [ - 2 + 1 ], "stmts": [ { diff --git a/jacodb-ets/src/test/resources/etsir/samples/loop/ForInLoop.ts.json b/jacodb-ets/src/test/resources/etsir/samples/loop/ForInLoop.ts.json index 7bbbd89d5..d787bd1fa 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/ForInLoop.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/loop/ForInLoop.ts.json @@ -10,59 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "person", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "key", - "type": { - "_": "UndefinedType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -93,48 +41,75 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" } } }, { - "name": "key", + "name": "$temp0", "type": { - "_": "UndefinedType" + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } } }, { - "name": "$temp0", + "name": "$temp1", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "Iterator" + } } }, { - "name": "$temp1", + "name": "$temp2", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } } }, { - "name": "$temp2", + "name": "$temp3", + "type": { + "_": "BooleanType" + } + }, + { + "name": "$temp4", + "type": { + "_": "UnknownType" + } + }, + { + "name": "key", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp5", "type": { "_": "StringType" } }, { - "name": "$temp3", + "name": "$temp6", "type": { "_": "StringType" } }, { - "name": "$temp4", + "name": "$temp7", "type": { "_": "StringType" } }, { - "name": "$temp5", + "name": "$temp8", "type": { "_": "StringType" } @@ -181,54 +156,71 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "person", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" } } }, "right": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" - }, - "type": { + "_": "NewExpr", + "classType": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" } } } - } - ] - }, - { - "id": 1, - "successors": [ - 2, - 3 - ], - "predecessors": [ - 0, - 3 - ], - "stmts": [ + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "AssignStmt", "left": { "_": "Local", - "name": "key", + "name": "person", "type": { - "_": "UndefinedType" + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } } }, "right": { - "_": "Constant", - "value": "undefined", + "_": "Local", + "name": "$temp0", "type": { - "_": "UndefinedType" + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } } } }, @@ -236,124 +228,148 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp0", + "name": "$temp1", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "Iterator" + } } }, "right": { - "_": "LengthExpr", - "arg": { + "_": "InstanceCallExpr", + "instance": { "_": "Local", "name": "person", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" } } - } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "iterator", + "parameters": [], + "returnType": { + "_": "ClassType", + "signature": { + "name": "Iterator" + } + } + }, + "args": [] } - }, + } + ] + }, + { + "id": 1, + "successors": [ + 2, + 3 + ], + "predecessors": [ + 0, + 3 + ], + "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp1", + "name": "$temp2", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } } }, "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": ">=", - "left": { + "_": "InstanceCallExpr", + "instance": { "_": "Local", "name": "$temp1", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "Iterator" + } } }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" + "method": { + "enclosingClass": { + "name": "" + }, + "name": "next", + "parameters": [], + "returnType": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } } }, - "type": { - "_": "BooleanType" - } + "args": [] } }, { "_": "AssignStmt", "left": { "_": "Local", - "name": "key", + "name": "$temp3", "type": { - "_": "UndefinedType" + "_": "BooleanType" } }, "right": { - "_": "ArrayRef", - "array": { + "_": "InstanceFieldRef", + "instance": { "_": "Local", - "name": "person", + "name": "$temp2", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "IteratorResult" } } }, - "index": { - "_": "Local", - "name": "$temp1", + "field": { + "enclosingClass": { + "name": "IteratorResult" + }, + "name": "done", "type": { - "_": "NumberType" + "_": "UnknownType" } - }, - "type": { - "_": "UnknownType" } } }, { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": "==", "left": { "_": "Local", - "name": "$temp1", + "name": "$temp3", "type": { - "_": "NumberType" + "_": "BooleanType" } }, "right": { "_": "Constant", - "value": "1", + "value": "true", "type": { - "_": "NumberType" + "_": "BooleanType" } + }, + "type": { + "_": "BooleanType" } } } @@ -384,7 +400,62 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp2", + "name": "$temp4", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "$temp2", + "type": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } + } + }, + "field": { + "enclosingClass": { + "name": "IteratorResult" + }, + "name": "value", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "key", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "CastExpr", + "arg": { + "_": "Local", + "name": "$temp4", + "type": { + "_": "UnknownType" + } + }, + "type": { + "_": "UnknownType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp5", "type": { "_": "StringType" } @@ -403,7 +474,7 @@ "_": "Local", "name": "key", "type": { - "_": "UndefinedType" + "_": "UnknownType" } } } @@ -412,7 +483,7 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp3", + "name": "$temp6", "type": { "_": "StringType" } @@ -422,7 +493,7 @@ "op": "+", "left": { "_": "Local", - "name": "$temp2", + "name": "$temp5", "type": { "_": "StringType" } @@ -440,7 +511,7 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp4", + "name": "$temp7", "type": { "_": "StringType" } @@ -450,7 +521,7 @@ "op": "+", "left": { "_": "Local", - "name": "$temp3", + "name": "$temp6", "type": { "_": "StringType" } @@ -463,13 +534,13 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" } } }, "field": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "" }, "name": "key", "type": { @@ -483,7 +554,7 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp5", + "name": "$temp8", "type": { "_": "StringType" } @@ -493,7 +564,7 @@ "op": "+", "left": { "_": "Local", - "name": "$temp4", + "name": "$temp7", "type": { "_": "StringType" } @@ -531,7 +602,7 @@ "args": [ { "_": "Local", - "name": "$temp5", + "name": "$temp8", "type": { "_": "StringType" } @@ -549,7 +620,7 @@ }, { "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" }, "modifiers": [], "typeParameters": [], @@ -559,7 +630,7 @@ { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" }, "name": "firstName", "type": { @@ -569,19 +640,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "\"John\"", - "type": { - "_": "StringType" - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" }, "name": "lastName", "type": { @@ -591,19 +655,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "\"Doe\"", - "type": { - "_": "StringType" - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" }, "name": "age", "type": { @@ -613,17 +670,157 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "30", - "type": { - "_": "NumberType" + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "firstName", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "John", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "lastName", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "Doe", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "age", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "30", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] } } } - ], - "methods": [] + ] } ], "importInfos": [], diff --git a/jacodb-ets/src/test/resources/etsir/samples/loop/MatrixMultiplication.ts.json b/jacodb-ets/src/test/resources/etsir/samples/loop/MatrixMultiplication.ts.json index 713beda96..4cde657df 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/MatrixMultiplication.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/loop/MatrixMultiplication.ts.json @@ -10,128 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "A", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "B", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "product", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "multiplyMatrices", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -571,7 +450,23 @@ "right": { "_": "NewArrayExpr", "elementType": { - "_": "AnyType" + "_": "UnionType", + "types": [ + { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + } + ] }, "size": { "_": "Constant", @@ -1001,7 +896,23 @@ "right": { "_": "NewArrayExpr", "elementType": { - "_": "AnyType" + "_": "UnionType", + "types": [ + { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + } + ] }, "size": { "_": "Constant", @@ -1222,30 +1133,12 @@ "_": "StaticCallExpr", "method": { "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" + "name": "" }, "name": "multiplyMatrices", - "parameters": [ - { - "name": "A", - "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" - }, - "isOptional": false - }, - { - "name": "B", - "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" - }, - "isOptional": false - } - ], + "parameters": [], "returnType": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "UnknownType" } }, "args": [ @@ -1364,23 +1257,44 @@ { "name": "A", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 }, "isOptional": false }, { "name": "B", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 }, "isOptional": false } ], "returnType": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, "modifiers": [], @@ -1399,15 +1313,29 @@ { "name": "A", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, { "name": "B", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, { @@ -1425,7 +1353,11 @@ { "name": "$temp0", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, { @@ -1443,7 +1375,11 @@ { "name": "$temp1", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, { @@ -1452,6 +1388,15 @@ "_": "UnknownType" } }, + { + "name": "$temp2", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" + } + } + }, { "name": "AnonymousMethod-multiplyMatrices-0", "type": { @@ -1475,7 +1420,7 @@ } }, { - "name": "$temp2", + "name": "$temp3", "type": { "_": "ClassType", "signature": { @@ -1501,12 +1446,6 @@ "_": "NumberType" } }, - { - "name": "$temp3", - "type": { - "_": "UnknownType" - } - }, { "name": "$temp4", "type": { @@ -1516,25 +1455,39 @@ { "name": "$temp5", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, { "name": "$temp6", "type": { - "_": "UnknownType" + "_": "NumberType" } }, { "name": "$temp7", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, { "name": "$temp8", "type": { - "_": "UnknownType" + "_": "NumberType" + } + }, + { + "name": "$temp9", + "type": { + "_": "NumberType" } } ], @@ -1544,7 +1497,7 @@ "id": 0, "successors": [ 1, - 6 + 9 ], "predecessors": [], "stmts": [ @@ -1554,16 +1507,30 @@ "_": "Local", "name": "A", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, "right": { "_": "ParameterRef", "index": 0, "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } } }, @@ -1573,16 +1540,30 @@ "_": "Local", "name": "B", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" - } - }, - "right": { - "_": "ParameterRef", + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 + } + }, + "right": { + "_": "ParameterRef", "index": 1, "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } } }, @@ -1623,8 +1604,15 @@ "_": "Local", "name": "A", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, "field": { @@ -1644,27 +1632,43 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, "right": { - "_": "InstanceFieldRef", - "instance": { + "_": "ArrayRef", + "array": { "_": "Local", "name": "A", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "0", + "index": { + "_": "Constant", + "value": "0", "type": { - "_": "UnknownType" + "_": "NumberType" } + }, + "type": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } } }, @@ -1683,7 +1687,11 @@ "_": "Local", "name": "$temp0", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, "field": { @@ -1712,8 +1720,15 @@ "_": "Local", "name": "B", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, "field": { @@ -1733,27 +1748,43 @@ "_": "Local", "name": "$temp1", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, "right": { - "_": "InstanceFieldRef", - "instance": { + "_": "ArrayRef", + "array": { "_": "Local", "name": "B", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "0", + "index": { + "_": "Constant", + "value": "0", "type": { - "_": "UnknownType" + "_": "NumberType" } + }, + "type": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } } }, @@ -1772,7 +1803,11 @@ "_": "Local", "name": "$temp1", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, "field": { @@ -1786,6 +1821,55 @@ } } }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp2", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp2", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "AssignStmt", "left": { @@ -1816,14 +1900,12 @@ }, "args": [ { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-multiplyMatrices-0" - }, + "_": "Local", + "name": "$temp2", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-multiplyMatrices-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" } } }, @@ -1867,7 +1949,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -1876,13 +1958,11 @@ { "id": 1, "successors": [ - 2, - 3 + 2 ], "predecessors": [ 0, - 3, - 6 + 9 ], "stmts": [ { @@ -1901,7 +1981,20 @@ "_": "NumberType" } } - }, + } + ] + }, + { + "id": 2, + "successors": [ + 3, + 4 + ], + "predecessors": [ + 1, + 5 + ], + "stmts": [ { "_": "IfStmt", "condition": { @@ -1922,45 +2015,17 @@ } }, "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } + "_": "BooleanType" } } } ] }, { - "id": 2, + "id": 3, "successors": [], "predecessors": [ - 1 + 2 ], "stmts": [ { @@ -1976,14 +2041,12 @@ ] }, { - "id": 3, + "id": 4, "successors": [ - 1, - 4 + 5 ], "predecessors": [ - 1, - 4 + 2 ], "stmts": [ { @@ -2002,7 +2065,20 @@ "_": "NumberType" } } - }, + } + ] + }, + { + "id": 5, + "successors": [ + 2, + 6 + ], + "predecessors": [ + 4, + 7 + ], + "stmts": [ { "_": "IfStmt", "condition": { @@ -2023,68 +2099,51 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } - }, + } + ] + }, + { + "id": 6, + "successors": [ + 7 + ], + "predecessors": [ + 5 + ], + "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "j", + "name": "k", "type": { "_": "NumberType" } }, "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "j", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" } } } ] }, { - "id": 4, + "id": 7, "successors": [ - 3, - 5 + 5, + 8 ], "predecessors": [ - 3, - 5 + 6, + 8 ], "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - }, { "_": "IfStmt", "condition": { @@ -2105,54 +2164,26 @@ } }, "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } + "_": "BooleanType" } } } ] }, { - "id": 5, + "id": 8, "successors": [ - 4 + 7 ], "predecessors": [ - 4 + 7 ], "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp3", + "name": "$temp4", "type": { "_": "UnknownType" } @@ -2181,29 +2212,45 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp4", + "name": "$temp5", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, "right": { - "_": "InstanceFieldRef", - "instance": { + "_": "ArrayRef", + "array": { "_": "Local", "name": "A", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, - "field": { - "enclosingClass": { - "name": "" - }, + "index": { + "_": "Local", "name": "i", "type": { - "_": "UnknownType" + "_": "NumberType" } + }, + "type": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } } }, @@ -2211,28 +2258,33 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp5", + "name": "$temp6", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { - "_": "InstanceFieldRef", - "instance": { + "_": "ArrayRef", + "array": { "_": "Local", - "name": "$temp4", + "name": "$temp5", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, - "field": { - "enclosingClass": { - "name": "" - }, + "index": { + "_": "Local", "name": "k", "type": { - "_": "UnknownType" + "_": "NumberType" } + }, + "type": { + "_": "NumberType" } } }, @@ -2240,29 +2292,45 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp6", + "name": "$temp7", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, "right": { - "_": "InstanceFieldRef", - "instance": { + "_": "ArrayRef", + "array": { "_": "Local", "name": "B", "type": { - "_": "UnclearReferenceType", - "name": "ArrayType" + "_": "ArrayType", + "elementType": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + }, + "dimensions": 1 } }, - "field": { - "enclosingClass": { - "name": "" - }, + "index": { + "_": "Local", "name": "k", "type": { - "_": "UnknownType" + "_": "NumberType" } + }, + "type": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } } }, @@ -2270,28 +2338,33 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp7", + "name": "$temp8", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { - "_": "InstanceFieldRef", - "instance": { + "_": "ArrayRef", + "array": { "_": "Local", - "name": "$temp6", + "name": "$temp7", "type": { - "_": "UnknownType" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, - "field": { - "enclosingClass": { - "name": "" - }, + "index": { + "_": "Local", "name": "j", "type": { - "_": "UnknownType" + "_": "NumberType" } + }, + "type": { + "_": "NumberType" } } }, @@ -2299,9 +2372,9 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp8", + "name": "$temp9", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -2309,16 +2382,16 @@ "op": "*", "left": { "_": "Local", - "name": "$temp5", + "name": "$temp6", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { "_": "Local", - "name": "$temp7", + "name": "$temp8", "type": { - "_": "UnknownType" + "_": "NumberType" } } } @@ -2329,7 +2402,7 @@ "_": "InstanceFieldRef", "instance": { "_": "Local", - "name": "$temp3", + "name": "$temp4", "type": { "_": "UnknownType" } @@ -2351,7 +2424,7 @@ "_": "InstanceFieldRef", "instance": { "_": "Local", - "name": "$temp3", + "name": "$temp4", "type": { "_": "UnknownType" } @@ -2368,9 +2441,93 @@ }, "right": { "_": "Local", - "name": "$temp8", + "name": "$temp9", "type": { - "_": "UnknownType" + "_": "NumberType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "k", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "k", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "j", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "j", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "i", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "i", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" } } } @@ -2378,7 +2535,7 @@ ] }, { - "id": 6, + "id": 9, "successors": [ 1 ], @@ -2390,7 +2547,7 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp2", + "name": "$temp3", "type": { "_": "ClassType", "signature": { @@ -2414,7 +2571,7 @@ "_": "InstanceCallExpr", "instance": { "_": "Local", - "name": "$temp2", + "name": "$temp3", "type": { "_": "ClassType", "signature": { @@ -2447,7 +2604,7 @@ "_": "ThrowStmt", "arg": { "_": "Local", - "name": "$temp2", + "name": "$temp3", "type": { "_": "ClassType", "signature": { @@ -2529,7 +2686,7 @@ }, { "signature": { - "name": "AnonymousClass-multiplyMatrices-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" }, "modifiers": [], "typeParameters": [], @@ -2539,7 +2696,7 @@ { "signature": { "enclosingClass": { - "name": "AnonymousClass-multiplyMatrices-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" }, "name": "length", "type": { @@ -2549,17 +2706,93 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Local", - "name": "rowsA", - "type": { + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { "_": "UnknownType" } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" + }, + "name": "length", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "rowsA", + "type": { + "_": "UnknownType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } } } - ], - "methods": [] + ] } ], "importInfos": [], diff --git a/jacodb-ets/src/test/resources/etsir/samples/loop/NestedLoops.ts.json b/jacodb-ets/src/test/resources/etsir/samples/loop/NestedLoops.ts.json index 2929b6235..91fe63049 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/NestedLoops.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/loop/NestedLoops.ts.json @@ -10,116 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "colors", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "sizes", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "combinations", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "color", - "type": { - "_": "UndefinedType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "size", - "type": { - "_": "UndefinedType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -205,40 +96,85 @@ "dimensions": 1 } }, + { + "name": "$temp3", + "type": { + "_": "ClassType", + "signature": { + "name": "Iterator" + } + } + }, + { + "name": "$temp4", + "type": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } + } + }, + { + "name": "$temp5", + "type": { + "_": "BooleanType" + } + }, + { + "name": "$temp6", + "type": { + "_": "UnknownType" + } + }, { "name": "color", "type": { - "_": "UndefinedType" + "_": "UnknownType" } }, { - "name": "$temp3", + "name": "$temp7", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "Iterator" + } } }, { - "name": "$temp4", + "name": "$temp8", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } } }, { - "name": "size", + "name": "$temp9", "type": { - "_": "UndefinedType" + "_": "BooleanType" } }, { - "name": "$temp5", + "name": "$temp10", "type": { - "_": "NumberType" + "_": "UnknownType" } }, { - "name": "$temp6", + "name": "size", "type": { - "_": "NumberType" + "_": "UnknownType" + } + }, + { + "name": "$temp11", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } } }, { @@ -644,43 +580,27 @@ { "id": 1, "successors": [ - 2, - 3 + 2 ], "predecessors": [ - 0, - 3 + 0 ], "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "color", - "type": { - "_": "UndefinedType" - } - }, - "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } - } - }, { "_": "AssignStmt", "left": { "_": "Local", "name": "$temp3", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "Iterator" + } } }, "right": { - "_": "LengthExpr", - "arg": { + "_": "InstanceCallExpr", + "instance": { "_": "Local", "name": "colors", "type": { @@ -690,119 +610,139 @@ }, "dimensions": 1 } - } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "iterator", + "parameters": [], + "returnType": { + "_": "ClassType", + "signature": { + "name": "Iterator" + } + } + }, + "args": [] } - }, + } + ] + }, + { + "id": 2, + "successors": [ + 3, + 4 + ], + "predecessors": [ + 1, + 5 + ], + "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", "name": "$temp4", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } } }, "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": ">=", - "left": { + "_": "InstanceCallExpr", + "instance": { "_": "Local", - "name": "$temp4", + "name": "$temp3", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "Iterator" + } } }, - "right": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "NumberType" + "method": { + "enclosingClass": { + "name": "" + }, + "name": "next", + "parameters": [], + "returnType": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } } }, - "type": { - "_": "BooleanType" - } + "args": [] } }, { "_": "AssignStmt", "left": { "_": "Local", - "name": "color", + "name": "$temp5", "type": { - "_": "UndefinedType" + "_": "BooleanType" } }, "right": { - "_": "ArrayRef", - "array": { + "_": "InstanceFieldRef", + "instance": { "_": "Local", - "name": "colors", + "name": "$temp4", "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } } }, - "index": { - "_": "Local", - "name": "$temp4", + "field": { + "enclosingClass": { + "name": "IteratorResult" + }, + "name": "done", "type": { - "_": "NumberType" + "_": "UnknownType" } - }, - "type": { - "_": "StringType" } } }, { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": "==", "left": { "_": "Local", - "name": "$temp4", + "name": "$temp5", "type": { - "_": "NumberType" + "_": "BooleanType" } }, "right": { "_": "Constant", - "value": "1", + "value": "true", "type": { - "_": "NumberType" + "_": "BooleanType" } + }, + "type": { + "_": "BooleanType" } } } ] }, { - "id": 2, + "id": 3, "successors": [], "predecessors": [ - 1 + 2 ], "stmts": [ { @@ -854,30 +794,43 @@ ] }, { - "id": 3, + "id": 4, "successors": [ - 1, - 4 + 5 ], "predecessors": [ - 1, - 4 + 2 ], "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "size", + "name": "$temp6", "type": { - "_": "UndefinedType" + "_": "UnknownType" } }, "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "$temp4", + "type": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } + } + }, + "field": { + "enclosingClass": { + "name": "IteratorResult" + }, + "name": "value", + "type": { + "_": "UnknownType" + } } } }, @@ -885,14 +838,40 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp5", + "name": "color", "type": { - "_": "NumberType" + "_": "UnknownType" } }, "right": { - "_": "LengthExpr", + "_": "CastExpr", "arg": { + "_": "Local", + "name": "$temp6", + "type": { + "_": "UnknownType" + } + }, + "type": { + "_": "UnknownType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp7", + "type": { + "_": "ClassType", + "signature": { + "name": "Iterator" + } + } + }, + "right": { + "_": "InstanceCallExpr", + "instance": { "_": "Local", "name": "sizes", "type": { @@ -902,23 +881,105 @@ }, "dimensions": 1 } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "iterator", + "parameters": [], + "returnType": { + "_": "ClassType", + "signature": { + "name": "Iterator" + } + } + }, + "args": [] + } + } + ] + }, + { + "id": 5, + "successors": [ + 2, + 6 + ], + "predecessors": [ + 4, + 6 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp8", + "type": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } } + }, + "right": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp7", + "type": { + "_": "ClassType", + "signature": { + "name": "Iterator" + } + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "next", + "parameters": [], + "returnType": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } + } + }, + "args": [] } }, { "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp6", + "name": "$temp9", "type": { - "_": "NumberType" + "_": "BooleanType" } }, "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "$temp8", + "type": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } + } + }, + "field": { + "enclosingClass": { + "name": "IteratorResult" + }, + "name": "done", + "type": { + "_": "UnknownType" + } } } }, @@ -926,57 +987,89 @@ "_": "IfStmt", "condition": { "_": "ConditionExpr", - "op": ">=", + "op": "==", "left": { "_": "Local", - "name": "$temp6", + "name": "$temp9", "type": { - "_": "NumberType" + "_": "BooleanType" } }, "right": { - "_": "Local", - "name": "$temp5", + "_": "Constant", + "value": "true", "type": { - "_": "NumberType" + "_": "BooleanType" } }, "type": { "_": "BooleanType" } } - }, + } + ] + }, + { + "id": 6, + "successors": [ + 5 + ], + "predecessors": [ + 5 + ], + "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "size", + "name": "$temp10", "type": { - "_": "UndefinedType" + "_": "UnknownType" } }, "right": { - "_": "ArrayRef", - "array": { + "_": "InstanceFieldRef", + "instance": { "_": "Local", - "name": "sizes", + "name": "$temp8", "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } } }, - "index": { + "field": { + "enclosingClass": { + "name": "IteratorResult" + }, + "name": "value", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "size", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "CastExpr", + "arg": { "_": "Local", - "name": "$temp6", + "name": "$temp10", "type": { - "_": "NumberType" + "_": "UnknownType" } }, "type": { - "_": "StringType" + "_": "UnknownType" } } }, @@ -984,41 +1077,51 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp6", + "name": "$temp11", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } } }, "right": { - "_": "BinopExpr", - "op": "+", - "left": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { "_": "Local", - "name": "$temp6", + "name": "$temp11", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } } }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" + "method": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" } - } + }, + "args": [] } - } - ] - }, - { - "id": 4, - "successors": [ - 3 - ], - "predecessors": [ - 3 - ], - "stmts": [ + }, { "_": "CallStmt", "expr": { @@ -1046,14 +1149,12 @@ }, "args": [ { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" - }, + "_": "Local", + "name": "$temp11", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" } } } @@ -1070,7 +1171,7 @@ }, { "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" }, "modifiers": [], "typeParameters": [], @@ -1080,7 +1181,7 @@ { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" }, "name": "color", "type": { @@ -1090,13 +1191,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" }, "name": "size", "type": { @@ -1106,11 +1206,61 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], - "methods": [] + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] } ], "importInfos": [], diff --git a/jacodb-ets/src/test/resources/etsir/samples/loop/WhileLoop.ts.json b/jacodb-ets/src/test/resources/etsir/samples/loop/WhileLoop.ts.json index af9b429a5..1c5be7dc2 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/WhileLoop.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/loop/WhileLoop.ts.json @@ -10,40 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "counter", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { diff --git a/jacodb-ets/src/test/resources/etsir/samples/object.ts.json b/jacodb-ets/src/test/resources/etsir/samples/object.ts.json index e1d1812a5..d67fbe2aa 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/object.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/object.ts.json @@ -10,24 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "main", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -95,7 +78,7 @@ "_": "StaticCallExpr", "method": { "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" + "name": "" }, "name": "main", "parameters": [], @@ -150,7 +133,16 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" + } + } + }, + { + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" } } }, @@ -159,7 +151,16 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" + } + } + }, + { + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } }, @@ -170,13 +171,13 @@ } }, { - "name": "$temp0", + "name": "$temp2", "type": { "_": "UnknownType" } }, { - "name": "$temp1", + "name": "$temp3", "type": { "_": "UnknownType" } @@ -232,23 +233,70 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "c", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" } } }, "right": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-main-0" + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "c", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" + } + } + }, + "right": { + "_": "Local", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" } } } @@ -257,23 +305,70 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "obj", + "name": "$temp1", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } }, "right": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-main-1" + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "obj", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" + } + } + }, + "right": { + "_": "Local", + "name": "$temp1", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } } @@ -306,7 +401,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } } @@ -323,7 +418,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } }, @@ -344,7 +439,7 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp0", + "name": "$temp2", "type": { "_": "UnknownType" } @@ -357,7 +452,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } }, @@ -396,7 +491,7 @@ "args": [ { "_": "Local", - "name": "$temp0", + "name": "$temp2", "type": { "_": "UnknownType" } @@ -414,7 +509,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } }, @@ -440,7 +535,7 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp1", + "name": "$temp3", "type": { "_": "UnknownType" } @@ -453,7 +548,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } }, @@ -492,7 +587,7 @@ "args": [ { "_": "Local", - "name": "$temp1", + "name": "$temp3", "type": { "_": "UnknownType" } @@ -513,7 +608,7 @@ }, { "signature": { - "name": "AnonymousClass-main-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" }, "modifiers": [], "typeParameters": [], @@ -523,7 +618,7 @@ { "signature": { "enclosingClass": { - "name": "AnonymousClass-main-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" }, "name": "c1", "type": { @@ -533,19 +628,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "3", - "type": { - "_": "NumberType" - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-main-0" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" }, "name": "c2", "type": { @@ -555,21 +643,129 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "4", - "type": { - "_": "NumberType" + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" + }, + "name": "c1", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "3", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" + }, + "name": "c2", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "4", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] } } } - ], - "methods": [] + ] }, { "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" }, "modifiers": [], "typeParameters": [], @@ -579,7 +775,7 @@ { "signature": { "enclosingClass": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" }, "name": "a", "type": { @@ -589,19 +785,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" }, "name": "b", "type": { @@ -611,13 +800,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" }, "name": "", "type": { @@ -627,19 +815,12 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Local", - "name": "c", - "type": { - "_": "UnknownType" - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" }, "name": "_value", "type": { @@ -649,21 +830,128 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } + "exclamationToken": false } ], "methods": [ { "signature": { "enclosingClass": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" + }, + "name": "a", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" + }, + "name": "_value", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" }, "name": "method", "parameters": [], @@ -680,7 +968,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } }, @@ -706,7 +994,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } }, @@ -715,7 +1003,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } } @@ -764,7 +1052,7 @@ { "signature": { "enclosingClass": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" }, "name": "Get-accessor", "parameters": [], @@ -781,7 +1069,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } } @@ -801,7 +1089,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } }, @@ -810,7 +1098,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } } @@ -834,7 +1122,7 @@ { "signature": { "enclosingClass": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" }, "name": "Set-accessor", "parameters": [ @@ -859,7 +1147,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } }, @@ -868,6 +1156,12 @@ "type": { "_": "UnknownType" } + }, + { + "name": "console", + "type": { + "_": "UnknownType" + } } ], "cfg": { @@ -902,7 +1196,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } }, @@ -911,11 +1205,50 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-main-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" } } } }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "console", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "log", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Constant", + "value": "setter", + "type": { + "_": "StringType" + } + }, + { + "_": "Local", + "name": "value", + "type": { + "_": "UnknownType" + } + } + ] + } + }, { "_": "ReturnVoidStmt" } diff --git a/jacodb-ets/src/test/resources/etsir/samples/basic.ts.json b/jacodb-ets/src/test/resources/etsir/samples/save/basic.ts.json similarity index 66% rename from jacodb-ets/src/test/resources/etsir/samples/basic.ts.json rename to jacodb-ets/src/test/resources/etsir/samples/save/basic.ts.json index e025c1465..44035fdbf 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/basic.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/save/basic.ts.json @@ -1,5 +1,5 @@ { - "name": "basic.ts", + "name": "save/basic.ts", "namespaces": [], "classes": [ { @@ -10,161 +10,7 @@ "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "someClass", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "m", - "type": { - "_": "ClassType", - "signature": { - "name": "someClass" - } - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "x", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "soo", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "forLoopTest", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "controlTest", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "deleteTest", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - } - ], + "fields": [], "methods": [ { "signature": { @@ -190,6 +36,15 @@ } } }, + { + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" + } + } + }, { "name": "configure", "type": { @@ -213,16 +68,16 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" } } }, { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7", + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" } } }, @@ -236,7 +91,7 @@ } }, { - "name": "$temp0", + "name": "$temp1", "type": { "_": "ClassType", "signature": { @@ -304,6 +159,55 @@ } } }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "CallStmt", "expr": { @@ -320,14 +224,12 @@ }, "args": [ { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-1" - }, + "_": "Local", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" } } } @@ -366,17 +268,17 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" } } }, "right": { "_": "Local", - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7", + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" } } } @@ -385,7 +287,7 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp0", + "name": "$temp1", "type": { "_": "ClassType", "signature": { @@ -409,7 +311,7 @@ "_": "InstanceCallExpr", "instance": { "_": "Local", - "name": "$temp0", + "name": "$temp1", "type": { "_": "ClassType", "signature": { @@ -424,10 +326,7 @@ "name": "constructor", "parameters": [], "returnType": { - "_": "ClassType", - "signature": { - "name": "someClass" - } + "_": "UnknownType" } }, "args": [ @@ -455,7 +354,7 @@ }, "right": { "_": "Local", - "name": "$temp0", + "name": "$temp1", "type": { "_": "ClassType", "signature": { @@ -504,7 +403,7 @@ "_": "StaticCallExpr", "method": { "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" + "name": "" }, "name": "forLoopTest", "parameters": [], @@ -521,7 +420,7 @@ "_": "StaticCallExpr", "method": { "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" + "name": "" }, "name": "controlTest", "parameters": [], @@ -538,7 +437,7 @@ "_": "StaticCallExpr", "method": { "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" + "name": "" }, "name": "deleteTest", "parameters": [], @@ -735,20 +634,7 @@ } } } - } - ] - }, - { - "id": 1, - "successors": [ - 2, - 3 - ], - "predecessors": [ - 0, - 3 - ], - "stmts": [ + }, { "_": "AssignStmt", "left": { @@ -765,7 +651,20 @@ "_": "NumberType" } } - }, + } + ] + }, + { + "id": 1, + "successors": [ + 2, + 3 + ], + "predecessors": [ + 0, + 3 + ], + "stmts": [ { "_": "IfStmt", "condition": { @@ -786,47 +685,19 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - } - ] - }, - { - "id": 2, - "successors": [], - "predecessors": [ - 1 - ], - "stmts": [ + } + ] + }, + { + "id": 2, + "successors": [], + "predecessors": [ + 1 + ], + "stmts": [ { "_": "ReturnVoidStmt" } @@ -932,6 +803,34 @@ } ] } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "i", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "i", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } } ] } @@ -1004,19 +903,19 @@ { "name": "$temp3", "type": { - "_": "UnknownType" + "_": "NumberType" } }, { "name": "$temp4", "type": { - "_": "UnknownType" + "_": "StringType" } }, { "name": "$temp5", "type": { - "_": "UnknownType" + "_": "StringType" } }, { @@ -1028,13 +927,13 @@ { "name": "$temp6", "type": { - "_": "NumberType" + "_": "StringType" } }, { "name": "$temp7", "type": { - "_": "UnknownType" + "_": "StringType" } }, { @@ -1046,7 +945,7 @@ { "name": "$temp9", "type": { - "_": "UnknownType" + "_": "NumberType" } }, { @@ -1058,7 +957,7 @@ { "name": "$temp11", "type": { - "_": "UnknownType" + "_": "NumberType" } }, { @@ -1069,12 +968,6 @@ }, { "name": "$temp13", - "type": { - "_": "UnknownType" - } - }, - { - "name": "count", "type": { "_": "NumberType" } @@ -1088,103 +981,109 @@ { "name": "$temp15", "type": { - "_": "UnknownType" + "_": "NumberType" } }, { "name": "$temp16", "type": { - "_": "UnknownType" - } - }, - { - "name": "j", - "type": { - "_": "NumberType" + "_": "StringType" } }, { "name": "$temp17", "type": { - "_": "UnknownType" + "_": "StringType" } }, { "name": "$temp18", "type": { - "_": "UnknownType" + "_": "StringType" } }, { - "name": "k", + "name": "$temp19", "type": { - "_": "NumberType" + "_": "StringType" } }, { - "name": "$temp19", + "name": "$temp20", "type": { - "_": "UnknownType" + "_": "StringType" } }, { - "name": "$temp20", + "name": "$temp21", "type": { - "_": "UnknownType" + "_": "StringType" } }, { - "name": "$temp21", + "name": "count", "type": { - "_": "UnknownType" + "_": "NumberType" } }, { "name": "$temp22", "type": { - "_": "UnknownType" + "_": "NumberType" } }, { "name": "$temp23", "type": { - "_": "UnknownType" + "_": "StringType" } }, { "name": "$temp24", "type": { - "_": "UnknownType" + "_": "StringType" + } + }, + { + "name": "j", + "type": { + "_": "NumberType" } }, { "name": "$temp25", "type": { - "_": "UnknownType" + "_": "StringType" } }, { "name": "$temp26", "type": { - "_": "UnknownType" + "_": "StringType" + } + }, + { + "name": "k", + "type": { + "_": "NumberType" } }, { "name": "$temp27", "type": { - "_": "UnknownType" + "_": "StringType" } }, { "name": "$temp28", "type": { - "_": "UnknownType" + "_": "StringType" } }, { "name": "$temp29", "type": { - "_": "UnknownType" + "_": "StringType" } } ], @@ -1446,12 +1345,10 @@ { "id": 1, "successors": [ - 2, - 3 + 2 ], "predecessors": [ - 0, - 10 + 0 ], "stmts": [ { @@ -1470,7 +1367,20 @@ "_": "NumberType" } } - }, + } + ] + }, + { + "id": 2, + "successors": [ + 3, + 4 + ], + "predecessors": [ + 1, + 14 + ], + "stmts": [ { "_": "AssignStmt", "left": { @@ -1524,45 +1434,17 @@ } }, "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } + "_": "BooleanType" } } } ] }, { - "id": 2, + "id": 3, "successors": [], "predecessors": [ - 1 + 2 ], "stmts": [ { @@ -1571,13 +1453,13 @@ ] }, { - "id": 3, + "id": 4, "successors": [ - 4, - 20 + 5, + 23 ], "predecessors": [ - 1 + 2 ], "stmts": [ { @@ -1620,7 +1502,7 @@ "_": "Local", "name": "$temp3", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -1651,7 +1533,7 @@ "_": "Local", "name": "$temp3", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -1662,28 +1544,28 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } ] }, { - "id": 4, + "id": 5, "successors": [ - 5 + 6 ], "predecessors": [ - 3 + 4 ], "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp28", + "name": "$temp6", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1726,9 +1608,9 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp29", + "name": "$temp7", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1736,9 +1618,9 @@ "op": "+", "left": { "_": "Local", - "name": "$temp28", + "name": "$temp6", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -1774,9 +1656,9 @@ "args": [ { "_": "Local", - "name": "$temp29", + "name": "$temp7", "type": { - "_": "UnknownType" + "_": "StringType" } } ] @@ -1785,23 +1667,23 @@ ] }, { - "id": 5, + "id": 6, "successors": [ - 6, - 17, - 18, - 19 + 7, + 20, + 21, + 22 ], "predecessors": [ - 4, - 20 + 5, + 23 ], "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp6", + "name": "$temp8", "type": { "_": "NumberType" } @@ -1835,9 +1717,9 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp7", + "name": "$temp9", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { @@ -1845,7 +1727,7 @@ "op": "%", "left": { "_": "Local", - "name": "$temp6", + "name": "$temp8", "type": { "_": "NumberType" } @@ -1863,7 +1745,7 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp8", + "name": "$temp10", "type": { "_": "NumberType" } @@ -1897,16 +1779,16 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp9", + "name": "$temp11", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { "_": "Local", - "name": "$temp7", + "name": "$temp9", "type": { - "_": "UnknownType" + "_": "NumberType" } } }, @@ -1914,7 +1796,7 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp10", + "name": "$temp12", "type": { "_": "NumberType" } @@ -1948,16 +1830,16 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp11", + "name": "$temp13", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { "_": "Local", - "name": "$temp7", + "name": "$temp9", "type": { - "_": "UnknownType" + "_": "NumberType" } } }, @@ -1965,7 +1847,7 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp12", + "name": "$temp14", "type": { "_": "NumberType" } @@ -1999,28 +1881,28 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp13", + "name": "$temp15", "type": { - "_": "UnknownType" + "_": "NumberType" } }, "right": { "_": "Local", - "name": "$temp7", + "name": "$temp9", "type": { - "_": "UnknownType" + "_": "NumberType" } } } ] }, { - "id": 6, + "id": 7, "successors": [ - 7 + 8 ], "predecessors": [ - 5 + 6 ], "stmts": [ { @@ -2058,12 +1940,15 @@ ] }, { - "id": 7, + "id": 8, "successors": [ - 8 + 9 ], "predecessors": [ - 6 + 7, + 20, + 21, + 22 ], "stmts": [ { @@ -2086,21 +1971,21 @@ ] }, { - "id": 8, + "id": 9, "successors": [ - 9, - 16 + 10, + 19 ], "predecessors": [ - 7, - 16 + 8, + 19 ], "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp14", + "name": "$temp22", "type": { "_": "NumberType" } @@ -2144,28 +2029,25 @@ }, "right": { "_": "Local", - "name": "$temp14", + "name": "$temp22", "type": { "_": "NumberType" } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } ] }, { - "id": 9, + "id": 10, "successors": [ - 10, - 13 + 11 ], "predecessors": [ - 8, - 14, - 15 + 9 ], "stmts": [ { @@ -2184,7 +2066,20 @@ "_": "NumberType" } } - }, + } + ] + }, + { + "id": 11, + "successors": [ + 12, + 16 + ], + "predecessors": [ + 10, + 18 + ], + "stmts": [ { "_": "IfStmt", "condition": { @@ -2205,48 +2100,18 @@ } }, "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "j", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "j", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } + "_": "BooleanType" } } } ] }, { - "id": 10, + "id": 12, "successors": [ - 1, - 11 + 13 ], "predecessors": [ - 9, 11 ], "stmts": [ @@ -2266,7 +2131,20 @@ "_": "NumberType" } } - }, + } + ] + }, + { + "id": 13, + "successors": [ + 14, + 15 + ], + "predecessors": [ + 12, + 15 + ], + "stmts": [ { "_": "IfStmt", "condition": { @@ -2287,15 +2165,27 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } - }, + } + ] + }, + { + "id": 14, + "successors": [ + 2 + ], + "predecessors": [ + 13, + 15 + ], + "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "k", + "name": "i", "type": { "_": "NumberType" } @@ -2305,7 +2195,7 @@ "op": "+", "left": { "_": "Local", - "name": "k", + "name": "i", "type": { "_": "NumberType" } @@ -2322,22 +2212,22 @@ ] }, { - "id": 11, + "id": 15, "successors": [ - 10, - 12 + 13, + 14 ], "predecessors": [ - 10 + 13 ], "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp19", + "name": "$temp27", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2363,9 +2253,9 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp20", + "name": "$temp28", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2373,9 +2263,9 @@ "op": "+", "left": { "_": "Local", - "name": "$temp19", + "name": "$temp27", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2411,9 +2301,9 @@ "args": [ { "_": "Local", - "name": "$temp20", + "name": "$temp28", "type": { - "_": "UnknownType" + "_": "StringType" } } ] @@ -2423,9 +2313,9 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp21", + "name": "$temp29", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2471,9 +2361,9 @@ "args": [ { "_": "Local", - "name": "$temp21", + "name": "$temp29", "type": { - "_": "UnknownType" + "_": "StringType" } } ] @@ -2499,32 +2389,48 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } - } - ] - }, - { - "id": 12, - "successors": [], - "predecessors": [ - 11 - ], - "stmts": [ + }, { - "_": "GotoStmt" + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "k", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "k", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } } ] }, { - "id": 13, + "id": 16, "successors": [ - 14, - 15 + 17, + 18 ], "predecessors": [ - 9 + 11 ], "stmts": [ { @@ -2547,28 +2453,28 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } ] }, { - "id": 14, + "id": 17, "successors": [ - 9 + 18 ], "predecessors": [ - 13 + 16 ], "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp17", + "name": "$temp25", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2594,9 +2500,9 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp18", + "name": "$temp26", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2604,9 +2510,9 @@ "op": "+", "left": { "_": "Local", - "name": "$temp17", + "name": "$temp25", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2642,9 +2548,9 @@ "args": [ { "_": "Local", - "name": "$temp18", + "name": "$temp26", "type": { - "_": "UnknownType" + "_": "StringType" } } ] @@ -2653,35 +2559,61 @@ ] }, { - "id": 15, + "id": 18, "successors": [ - 9 + 11 ], "predecessors": [ - 13 + 16, + 17 ], "stmts": [ { - "_": "GotoStmt" + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "j", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "j", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } } ] }, { - "id": 16, + "id": 19, "successors": [ - 8 + 9 ], "predecessors": [ - 8 + 9 ], "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp15", + "name": "$temp23", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2707,9 +2639,9 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp16", + "name": "$temp24", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2717,9 +2649,9 @@ "op": "+", "left": { "_": "Local", - "name": "$temp15", + "name": "$temp23", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2755,9 +2687,9 @@ "args": [ { "_": "Local", - "name": "$temp16", + "name": "$temp24", "type": { - "_": "UnknownType" + "_": "StringType" } } ] @@ -2794,19 +2726,21 @@ ] }, { - "id": 17, - "successors": [], + "id": 20, + "successors": [ + 8 + ], "predecessors": [ - 5 + 6 ], "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp22", + "name": "$temp16", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2849,9 +2783,9 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp23", + "name": "$temp17", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2859,9 +2793,9 @@ "op": "+", "left": { "_": "Local", - "name": "$temp22", + "name": "$temp16", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2897,33 +2831,32 @@ "args": [ { "_": "Local", - "name": "$temp23", + "name": "$temp17", "type": { - "_": "UnknownType" + "_": "StringType" } } ] } - }, - { - "_": "GotoStmt" } ] }, { - "id": 18, - "successors": [], + "id": 21, + "successors": [ + 8 + ], "predecessors": [ - 5 + 6 ], "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp24", + "name": "$temp18", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2966,9 +2899,9 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp25", + "name": "$temp19", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -2976,9 +2909,9 @@ "op": "+", "left": { "_": "Local", - "name": "$temp24", + "name": "$temp18", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -3014,33 +2947,32 @@ "args": [ { "_": "Local", - "name": "$temp25", + "name": "$temp19", "type": { - "_": "UnknownType" + "_": "StringType" } } ] } - }, - { - "_": "GotoStmt" } ] }, { - "id": 19, - "successors": [], + "id": 22, + "successors": [ + 8 + ], "predecessors": [ - 5 + 6 ], "stmts": [ { "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp26", + "name": "$temp20", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -3083,9 +3015,9 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp27", + "name": "$temp21", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -3093,9 +3025,9 @@ "op": "+", "left": { "_": "Local", - "name": "$temp26", + "name": "$temp20", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -3131,26 +3063,23 @@ "args": [ { "_": "Local", - "name": "$temp27", + "name": "$temp21", "type": { - "_": "UnknownType" + "_": "StringType" } } ] } - }, - { - "_": "GotoStmt" } ] }, { - "id": 20, + "id": 23, "successors": [ - 5 + 6 ], "predecessors": [ - 3 + 4 ], "stmts": [ { @@ -3159,7 +3088,7 @@ "_": "Local", "name": "$temp4", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -3204,7 +3133,7 @@ "_": "Local", "name": "$temp5", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -3214,7 +3143,7 @@ "_": "Local", "name": "$temp4", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -3252,7 +3181,7 @@ "_": "Local", "name": "$temp5", "type": { - "_": "UnknownType" + "_": "StringType" } } ] @@ -3855,20 +3784,7 @@ "_": "NumberType" } } - } - ] - }, - { - "id": 1, - "successors": [ - 2, - 3 - ], - "predecessors": [ - 0, - 3 - ], - "stmts": [ + }, { "_": "AssignStmt", "left": { @@ -3885,7 +3801,20 @@ "_": "NumberType" } } - }, + } + ] + }, + { + "id": 1, + "successors": [ + 2, + 3 + ], + "predecessors": [ + 0, + 3 + ], + "stmts": [ { "_": "IfStmt", "condition": { @@ -3906,35 +3835,7 @@ } }, "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } + "_": "BooleanType" } } } @@ -3995,6 +3896,34 @@ } } } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "k", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "k", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } } ] } @@ -4070,6 +3999,15 @@ "type": { "_": "StringType" } + }, + { + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" + } + } } ], "cfg": { @@ -4152,17 +4090,64 @@ } } }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "ReturnStmt", "arg": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-listParameters-8" - }, + "_": "Local", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-listParameters-8" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" } } } @@ -4202,7 +4187,16 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-deleteTest-9" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" + } + } + }, + { + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" } } }, @@ -4217,13 +4211,13 @@ } }, { - "name": "$temp0", + "name": "$temp1", "type": { "_": "BooleanType" } }, { - "name": "$temp1", + "name": "$temp2", "type": { "_": "BooleanType" } @@ -4235,7 +4229,7 @@ } }, { - "name": "$temp2", + "name": "$temp3", "type": { "_": "BooleanType" } @@ -4274,68 +4268,115 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "x", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-deleteTest-9" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" } } }, "right": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-deleteTest-9" - }, - "type": { + "_": "NewExpr", + "classType": { "_": "ClassType", "signature": { - "name": "AnonymousClass-deleteTest-9" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" } } } }, { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "bbb", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "InstanceFieldRef", + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", "instance": { "_": "Local", - "name": "x", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-deleteTest-9" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" } } }, - "field": { + "method": { "enclosingClass": { - "name": "" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" }, - "name": "b", - "type": { + "name": "constructor", + "parameters": [], + "returnType": { "_": "UnknownType" } - } + }, + "args": [] } }, { "_": "AssignStmt", "left": { + "_": "Local", + "name": "x", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" + } + } + }, + "right": { "_": "Local", "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "bbb", + "type": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + } + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "x", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" + } + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "b", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", "type": { "_": "BooleanType" } @@ -4350,7 +4391,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-deleteTest-9" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" } } }, @@ -4370,7 +4411,7 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp1", + "name": "$temp2", "type": { "_": "BooleanType" } @@ -4431,7 +4472,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-deleteTest-9" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" } } } @@ -4442,7 +4483,7 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "$temp2", + "name": "$temp3", "type": { "_": "BooleanType" } @@ -4455,7 +4496,7 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-deleteTest-9" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" } } } @@ -4494,14 +4535,7 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } + "exclamationToken": false }, { "signature": { @@ -4516,21 +4550,7 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "Person" - }, - "name": "AnonymousMethod-0", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } + "exclamationToken": false } ], "methods": [ @@ -4539,16 +4559,8 @@ "enclosingClass": { "name": "Person" }, - "name": "constructor", - "parameters": [ - { - "name": "age", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], + "name": "@instance_init", + "parameters": [], "returnType": { "_": "UnknownType" } @@ -4556,23 +4568,7 @@ "modifiers": [], "typeParameters": [], "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - { - "name": "age", - "type": { - "_": "NumberType" - } - } - ], + "locals": [], "cfg": { "blocks": [ { @@ -4584,37 +4580,91 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "age", + "name": "this", "type": { - "_": "NumberType" + "_": "UnknownType" } }, "right": { - "_": "ParameterRef", - "index": 0, + "_": "ThisRef", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "Person" + } } } }, { "_": "AssignStmt", "left": { - "_": "Local", - "name": "this", + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Person" + } + } + }, + "field": { + "enclosingClass": { + "name": "Person" + }, + "name": "x", + "type": { + "_": "NumberType" + } + } + }, + "right": { + "_": "Constant", + "value": "0", "type": { - "_": "ClassType", - "signature": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Person" + } + } + }, + "field": { + "enclosingClass": { "name": "Person" + }, + "name": "growOld", + "type": { + "_": "UnknownType" } } }, "right": { - "_": "ThisRef", + "_": "Local", + "name": "AnonymousMethod-@instance_init-0", "type": { - "_": "ClassType", + "_": "CallableType", "signature": { - "name": "Person" + "enclosingClass": { + "name": "Person" + }, + "name": "AnonymousMethod-@instance_init-0", + "parameters": [], + "returnType": { + "_": "UnknownType" + } } } } @@ -4633,7 +4683,7 @@ "enclosingClass": { "name": "Person" }, - "name": "AnonymousMethod-0", + "name": "@static_init", "parameters": [], "returnType": { "_": "UnknownType" @@ -4642,23 +4692,7 @@ "modifiers": [], "typeParameters": [], "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - ], + "locals": [], "cfg": { "blocks": [ { @@ -4672,10 +4706,7 @@ "_": "Local", "name": "this", "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } + "_": "UnknownType" } }, "right": { @@ -4688,66 +4719,6 @@ } } }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "age", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - }, { "_": "ReturnVoidStmt" } @@ -4762,9 +4733,256 @@ "enclosingClass": { "name": "Person" }, - "name": "getAge", - "parameters": [], - "returnType": { + "name": "constructor", + "parameters": [ + { + "name": "age", + "type": { + "_": "NumberType" + }, + "isOptional": false + } + ], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Person" + } + } + }, + { + "name": "age", + "type": { + "_": "NumberType" + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "Person" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "age", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Person" + } + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Person" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Person" + }, + "name": "AnonymousMethod-@instance_init-0", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Person" + } + } + }, + { + "name": "$temp0", + "type": { + "_": "UnknownType" + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Person" + } + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Person" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Person" + } + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "age", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "BinopExpr", + "op": "+", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Person" + }, + "name": "getAge", + "parameters": [], + "returnType": { "_": "UnknownType" } }, @@ -4995,18 +5213,62 @@ }, "modifiers": [], "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Alarm" - } - } - } - ], + "body": null + } + ] + }, + { + "signature": { + "name": "Alarm2" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Alarm2" + }, + "name": "alert2", + "parameters": [], + "returnType": { + "_": "VoidType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": null + } + ] + }, + { + "signature": { + "name": "Door" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Door" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], "cfg": { "blocks": [ { @@ -5020,10 +5282,7 @@ "_": "Local", "name": "this", "type": { - "_": "ClassType", - "signature": { - "name": "Alarm" - } + "_": "UnknownType" } }, "right": { @@ -5031,7 +5290,7 @@ "type": { "_": "ClassType", "signature": { - "name": "Alarm" + "name": "Door" } } } @@ -5044,44 +5303,22 @@ ] } } - } - ] - }, - { - "signature": { - "name": "Alarm2" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [], - "methods": [ + }, { "signature": { "enclosingClass": { - "name": "Alarm2" + "name": "Door" }, - "name": "alert2", + "name": "@static_init", "parameters": [], "returnType": { - "_": "VoidType" + "_": "UnknownType" } }, "modifiers": [], "typeParameters": [], "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Alarm2" - } - } - } - ], + "locals": [], "cfg": { "blocks": [ { @@ -5094,19 +5331,66 @@ "left": { "_": "Local", "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", "type": { "_": "ClassType", "signature": { - "name": "Alarm2" + "name": "Door" } } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Door" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } }, "right": { "_": "ThisRef", "type": { "_": "ClassType", "signature": { - "name": "Alarm2" + "name": "Door" } } } @@ -5122,17 +5406,6 @@ } ] }, - { - "signature": { - "name": "Door" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [], - "methods": [] - }, { "signature": { "name": "Adder" @@ -5155,37 +5428,7 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "Adder" - }, - "name": "AnonymousMethod-0", - "parameters": [ - { - "name": "b", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "StringType" - } - }, - "args": [ - { - "_": "Local", - "name": "b", - "type": { - "_": "UnknownType" - } - } - ] - } + "exclamationToken": false } ], "methods": [ @@ -5194,16 +5437,8 @@ "enclosingClass": { "name": "Adder" }, - "name": "constructor", - "parameters": [ - { - "name": "a", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], + "name": "@instance_init", + "parameters": [], "returnType": { "_": "UnknownType" } @@ -5211,23 +5446,7 @@ "modifiers": [], "typeParameters": [], "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Adder" - } - } - }, - { - "name": "a", - "type": { - "_": "NumberType" - } - } - ], + "locals": [], "cfg": { "blocks": [ { @@ -5239,37 +5458,67 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "a", + "name": "this", "type": { - "_": "NumberType" + "_": "UnknownType" } }, "right": { - "_": "ParameterRef", - "index": 0, + "_": "ThisRef", "type": { - "_": "NumberType" + "_": "ClassType", + "signature": { + "name": "Adder" + } } } }, { "_": "AssignStmt", "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Adder" + } + } + }, + "field": { + "enclosingClass": { "name": "Adder" + }, + "name": "add", + "type": { + "_": "UnknownType" } } }, "right": { - "_": "ThisRef", + "_": "Local", + "name": "AnonymousMethod-@instance_init-0", "type": { - "_": "ClassType", + "_": "CallableType", "signature": { - "name": "Adder" + "enclosingClass": { + "name": "Adder" + }, + "name": "AnonymousMethod-@instance_init-0", + "parameters": [ + { + "name": "b", + "type": { + "_": "StringType" + }, + "isOptional": false + } + ], + "returnType": { + "_": "StringType" + } } } } @@ -5288,40 +5537,208 @@ "enclosingClass": { "name": "Adder" }, - "name": "AnonymousMethod-0", - "parameters": [ - { - "name": "b", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], + "name": "@static_init", + "parameters": [], "returnType": { - "_": "StringType" + "_": "UnknownType" } }, "modifiers": [], "typeParameters": [], "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Adder" - } - } - }, - { - "name": "b", - "type": { - "_": "StringType" - } - }, - { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Adder" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Adder" + }, + "name": "constructor", + "parameters": [ + { + "name": "a", + "type": { + "_": "NumberType" + }, + "isOptional": false + } + ], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Adder" + } + } + }, + { + "name": "a", + "type": { + "_": "NumberType" + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "Adder" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "a", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Adder" + } + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Adder" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Adder" + }, + "name": "AnonymousMethod-@instance_init-0", + "parameters": [ + { + "name": "b", + "type": { + "_": "StringType" + }, + "isOptional": false + } + ], + "returnType": { + "_": "StringType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Adder" + } + } + }, + { + "name": "b", + "type": { + "_": "StringType" + } + }, + { "name": "$temp0", "type": { "_": "UnknownType" @@ -5330,7 +5747,7 @@ { "name": "$temp1", "type": { - "_": "UnknownType" + "_": "StringType" } } ], @@ -5418,7 +5835,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "UnknownType" + "_": "StringType" } }, "right": { @@ -5446,7 +5863,7 @@ "_": "Local", "name": "$temp1", "type": { - "_": "UnknownType" + "_": "StringType" } } } @@ -5482,28 +5899,7 @@ ], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "InstanceFieldRef", - "instance": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "ExtendedAdder" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "add", - "type": { - "_": "UnknownType" - } - } - } + "exclamationToken": false }, { "signature": { @@ -5518,37 +5914,7 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "ExtendedAdder" - }, - "name": "AnonymousMethod-0", - "parameters": [ - { - "name": "b", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "StringType" - } - }, - "args": [ - { - "_": "Local", - "name": "b", - "type": { - "_": "UnknownType" - } - } - ] - } + "exclamationToken": false } ], "methods": [ @@ -5557,46 +5923,16 @@ "enclosingClass": { "name": "ExtendedAdder" }, - "name": "AnonymousMethod-0", - "parameters": [ - { - "name": "b", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], + "name": "@instance_init", + "parameters": [], "returnType": { - "_": "StringType" + "_": "UnknownType" } }, "modifiers": [], "typeParameters": [], "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ExtendedAdder" - } - } - }, - { - "name": "b", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - ], + "locals": [], "cfg": { "blocks": [ { @@ -5608,9 +5944,236 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "b", + "name": "this", "type": { - "_": "StringType" + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "ExtendedAdder" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "ExtendedAdder" + } + } + }, + "field": { + "enclosingClass": { + "name": "ExtendedAdder" + }, + "name": "superAdd", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "ExtendedAdder" + } + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "add", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "ExtendedAdder" + } + } + }, + "field": { + "enclosingClass": { + "name": "ExtendedAdder" + }, + "name": "add", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "AnonymousMethod-@instance_init-0", + "type": { + "_": "CallableType", + "signature": { + "enclosingClass": { + "name": "ExtendedAdder" + }, + "name": "AnonymousMethod-@instance_init-0", + "parameters": [ + { + "name": "b", + "type": { + "_": "StringType" + }, + "isOptional": false + } + ], + "returnType": { + "_": "StringType" + } + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "ExtendedAdder" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "ExtendedAdder" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "ExtendedAdder" + }, + "name": "AnonymousMethod-@instance_init-0", + "parameters": [ + { + "name": "b", + "type": { + "_": "StringType" + }, + "isOptional": false + } + ], + "returnType": { + "_": "StringType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "ExtendedAdder" + } + } + }, + { + "name": "b", + "type": { + "_": "StringType" + } + }, + { + "name": "$temp0", + "type": { + "_": "UnknownType" + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "b", + "type": { + "_": "StringType" } }, "right": { @@ -5700,87 +6263,120 @@ ] } } - } - ] - }, - { - "signature": { - "name": "AnonymousClass-0" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-0" - }, - "name": "x", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-0" + "name": "ExtendedAdder" }, - "name": "y", - "type": { - "_": "NumberType" + "name": "constructor", + "parameters": [ + { + "name": "a", + "type": { + "_": "NumberType" + }, + "isOptional": false + } + ], + "returnType": { + "_": "UnknownType" } }, "modifiers": [], "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-0" - }, - "name": "z", - "type": { - "_": "StringType" + "body": { + "locals": [ + { + "name": "a", + "type": { + "_": "NumberType" + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "ExtendedAdder" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "StaticCallExpr", + "method": { + "enclosingClass": { + "name": "ExtendedAdder" + }, + "name": "super", + "parameters": [ + { + "name": "a", + "type": { + "_": "NumberType" + }, + "isOptional": false + } + ], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Local", + "name": "a", + "type": { + "_": "NumberType" + } + } + ] + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null + } } - ], - "methods": [] + ] }, { "signature": { - "name": "SecurityDoor" + "name": "AnonymousClass-0" }, - "modifiers": [ - "ExportKeyword" - ], + "modifiers": [], "typeParameters": [], - "superClassName": "Door", - "implementedInterfaceNames": [ - "Alarm", - "Alarm2" - ], + "superClassName": "", + "implementedInterfaceNames": [], "fields": [ { "signature": { "enclosingClass": { - "name": "SecurityDoor" + "name": "AnonymousClass-0" }, "name": "x", "type": { @@ -5790,94 +6386,66 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "SecurityDoor" + "name": "AnonymousClass-0" }, "name": "y", "type": { - "_": "StringType" + "_": "NumberType" } }, "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "''", - "type": { - "_": "StringType" - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "SecurityDoor" + "name": "AnonymousClass-0" }, - "name": "Members", + "name": "z", "type": { - "_": "UnknownType" + "_": "StringType" } }, - "modifiers": [ - "PublicKeyword" - ], + "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "", - "type": { - "_": "UnknownType" - } - } + "exclamationToken": false } ], + "methods": [] + }, + { + "signature": { + "name": "AnonymousClass-SecurityDoor-@instance_init-1" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [], "methods": [ { "signature": { "enclosingClass": { - "name": "SecurityDoor" + "name": "AnonymousClass-SecurityDoor-@instance_init-1" }, - "name": "alert", + "name": "@instance_init", "parameters": [], "returnType": { - "_": "VoidType" + "_": "UnknownType" } }, "modifiers": [], "typeParameters": [], "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "SecurityDoor" - } - } - }, - { - "name": "logger", - "type": { - "_": "UnknownType" - } - } - ], + "locals": [], "cfg": { "blocks": [ { @@ -5891,10 +6459,7 @@ "_": "Local", "name": "this", "type": { - "_": "ClassType", - "signature": { - "name": "SecurityDoor" - } + "_": "UnknownType" } }, "right": { @@ -5902,43 +6467,11 @@ "type": { "_": "ClassType", "signature": { - "name": "SecurityDoor" + "name": "AnonymousClass-SecurityDoor-@instance_init-1" } } } }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "SecurityDoor alert", - "type": { - "_": "StringType" - } - } - ] - } - }, { "_": "ReturnVoidStmt" } @@ -5951,34 +6484,18 @@ { "signature": { "enclosingClass": { - "name": "SecurityDoor" + "name": "AnonymousClass-SecurityDoor-@instance_init-1" }, - "name": "alert2", + "name": "@static_init", "parameters": [], "returnType": { - "_": "VoidType" + "_": "UnknownType" } }, "modifiers": [], "typeParameters": [], "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "SecurityDoor" - } - } - }, - { - "name": "logger", - "type": { - "_": "UnknownType" - } - } - ], + "locals": [], "cfg": { "blocks": [ { @@ -5992,10 +6509,7 @@ "_": "Local", "name": "this", "type": { - "_": "ClassType", - "signature": { - "name": "SecurityDoor" - } + "_": "UnknownType" } }, "right": { @@ -6003,43 +6517,11 @@ "type": { "_": "ClassType", "signature": { - "name": "SecurityDoor" + "name": "AnonymousClass-SecurityDoor-@instance_init-1" } } } }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "SecurityDoor alert2", - "type": { - "_": "StringType" - } - } - ] - } - }, { "_": "ReturnVoidStmt" } @@ -6052,34 +6534,157 @@ { "signature": { "enclosingClass": { - "name": "SecurityDoor" + "name": "AnonymousClass-SecurityDoor-@instance_init-1" }, - "name": "fooo", + "name": "constructor", "parameters": [], "returnType": { "_": "UnknownType" } }, - "modifiers": [ - "PublicKeyword" + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-SecurityDoor-@instance_init-1" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "SecurityDoor" + }, + "modifiers": [ + "ExportKeyword" + ], + "typeParameters": [], + "superClassName": "Door", + "implementedInterfaceNames": [ + "Alarm", + "Alarm2" + ], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "x", + "type": { + "_": "NumberType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "y", + "type": { + "_": "StringType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "z", + "type": { + "_": "UnclearReferenceType", + "name": "Person" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "Members", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "PublicKeyword" ], "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], "body": { "locals": [ { - "name": "this", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "SecurityDoor" + "name": "Person" } } - }, - { - "name": "logger", - "type": { - "_": "UnknownType" - } } ], "cfg": { @@ -6094,53 +6699,2030 @@ "left": { "_": "Local", "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", "type": { "_": "ClassType", "signature": { "name": "SecurityDoor" } } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + }, + "field": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "x", + "type": { + "_": "NumberType" + } + } + }, + "right": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + }, + "field": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "y", + "type": { + "_": "StringType" + } + } + }, + "right": { + "_": "Constant", + "value": "", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Person" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "Person" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Person" + } + } + }, + "method": { + "enclosingClass": { + "name": "Person" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Constant", + "value": "10", + "type": { + "_": "NumberType" + } + } + ] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + }, + "field": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "z", + "type": { + "_": "UnclearReferenceType", + "name": "Person" + } + } + }, + "right": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "Person" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + }, + "field": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "Members", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "AnonymousClass-SecurityDoor-@instance_init-1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-SecurityDoor-@instance_init-1" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "alert", + "parameters": [], + "returnType": { + "_": "VoidType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + }, + { + "name": "logger", + "type": { + "_": "UnknownType" + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Constant", + "value": "SecurityDoor alert", + "type": { + "_": "StringType" + } + } + ] + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "alert2", + "parameters": [], + "returnType": { + "_": "VoidType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + }, + { + "name": "logger", + "type": { + "_": "UnknownType" + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Constant", + "value": "SecurityDoor alert2", + "type": { + "_": "StringType" + } + } + ] + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "fooo", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [ + "PublicKeyword" + ], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + }, + { + "name": "logger", + "type": { + "_": "UnknownType" + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Constant", + "value": "This is fooo!", + "type": { + "_": "StringType" + } + } + ] + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "constructor", + "parameters": [ + { + "name": "x", + "type": { + "_": "NumberType" + }, + "isOptional": false + }, + { + "name": "y", + "type": { + "_": "StringType" + }, + "isOptional": false + } + ], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + }, + { + "name": "x", + "type": { + "_": "NumberType" + } + }, + { + "name": "y", + "type": { + "_": "StringType" + } + }, + { + "name": "logger", + "type": { + "_": "UnknownType" + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "SecurityDoor" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "x", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "y", + "type": { + "_": "StringType" + } + }, + "right": { + "_": "ParameterRef", + "index": 1, + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "StaticCallExpr", + "method": { + "enclosingClass": { + "name": "" + }, + "name": "super", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "x", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "x", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SecurityDoor" + } + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "y", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "y", + "type": { + "_": "StringType" + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "logger", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "info", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Constant", + "value": "This is a constrctor!", + "type": { + "_": "StringType" + } + } + ] + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "Animal" + }, + "modifiers": [ + "AbstractKeyword" + ], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "Animal" + }, + "name": "name", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "PublicKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "Animal" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Animal" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Animal" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Animal" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Animal" + }, + "name": "constructor", + "parameters": [ + { + "name": "name", + "type": { + "_": "StringType" + }, + "isOptional": false + } + ], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [ + "PublicKeyword" + ], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Animal" + } + } + }, + { + "name": "name", + "type": { + "_": "StringType" + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "Animal" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "name", + "type": { + "_": "StringType" + } + }, + "right": { + "_": "ParameterRef", + "index": 0, + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Animal" + } + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "Animal" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "Animal" + } + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "name", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "name", + "type": { + "_": "StringType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + }, + { + "signature": { + "enclosingClass": { + "name": "Animal" + }, + "name": "sayHi", + "parameters": [], + "returnType": { + "_": "VoidType" + } + }, + "modifiers": [ + "PublicKeyword", + "AbstractKeyword" + ], + "typeParameters": [], + "body": null + } + ] + }, + { + "signature": { + "name": "StringValidator" + }, + "modifiers": [ + "ExportKeyword" + ], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "StringValidator" + }, + "name": "color", + "type": { + "_": "StringType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": true, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "StringValidator" + }, + "name": "width", + "type": { + "_": "NumberType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": true, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "StringValidator" + }, + "name": "isAcceptable", + "parameters": [ + { + "name": "s", + "type": { + "_": "StringType" + }, + "isOptional": true + } + ], + "returnType": { + "_": "BooleanType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": null + } + ] + }, + { + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + }, + "name": "type", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + }, + "name": "pattern", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + }, + "name": "type", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "pattern", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + }, + "name": "pattern", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "[%d] [%p] [%z] [ArkAnalyzer] - %m", + "type": { + "_": "StringType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + }, + "name": "type", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + }, + "name": "layout", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + } + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + }, + "name": "type", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "console", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + }, + "name": "layout", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4-@instance_init-5" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" + }, + "name": "console", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + } + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" + }, + "name": "console", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" + }, + "name": "appenders", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" + }, + "name": "level", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" + }, + "name": "enableCallStack", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "$temp0", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + "right": { + "_": "NewArrayExpr", + "elementType": { + "_": "StringType" + }, + "size": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + }, + "index": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + }, + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": "console", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" + }, + "name": "appenders", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ArrayType", + "elementType": { + "_": "StringType" + }, + "dimensions": 1 + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" + }, + "name": "level", + "type": { + "_": "UnknownType" + } + } }, "right": { - "_": "ThisRef", + "_": "Constant", + "value": "info", "type": { - "_": "ClassType", - "signature": { - "name": "SecurityDoor" - } + "_": "StringType" } } }, { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", "instance": { "_": "Local", - "name": "logger", + "name": "this", "type": { - "_": "UnknownType" + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" + } } }, - "method": { + "field": { "enclosingClass": { - "name": "" + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" }, - "name": "info", - "parameters": [], - "returnType": { + "name": "enableCallStack", + "type": { "_": "UnknownType" } - }, - "args": [ - { - "_": "Constant", - "value": "This is fooo!", - "type": { - "_": "StringType" - } - } - ] + } + }, + "right": { + "_": "Constant", + "value": "false", + "type": { + "_": "BooleanType" + } } }, { @@ -6151,29 +8733,42 @@ ] } } - }, + } + ] + }, + { + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ { "signature": { "enclosingClass": { - "name": "SecurityDoor" + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" }, - "name": "constructor", - "parameters": [ - { - "name": "x", - "type": { - "_": "NumberType" - }, - "isOptional": false - }, - { - "name": "y", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], + "name": "default", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" + }, + "name": "@instance_init", + "parameters": [], "returnType": { "_": "UnknownType" } @@ -6183,31 +8778,13 @@ "body": { "locals": [ { - "name": "this", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "SecurityDoor" + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" } } - }, - { - "name": "x", - "type": { - "_": "NumberType" - } - }, - { - "name": "y", - "type": { - "_": "StringType" - } - }, - { - "name": "logger", - "type": { - "_": "UnknownType" - } } ], "cfg": { @@ -6221,33 +8798,18 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "x", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "y", + "name": "this", "type": { - "_": "StringType" + "_": "UnknownType" } }, "right": { - "_": "ParameterRef", - "index": 1, + "_": "ThisRef", "type": { - "_": "StringType" + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" + } } } }, @@ -6255,20 +8817,20 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "this", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "SecurityDoor" + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" } } }, "right": { - "_": "ThisRef", - "type": { + "_": "NewExpr", + "classType": { "_": "ClassType", "signature": { - "name": "SecurityDoor" + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" } } } @@ -6276,50 +8838,28 @@ { "_": "CallStmt", "expr": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "super", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", + "_": "InstanceCallExpr", "instance": { "_": "Local", - "name": "this", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "SecurityDoor" + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" } } }, - "field": { + "method": { "enclosingClass": { - "name": "" + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" }, - "name": "x", - "type": { + "name": "constructor", + "parameters": [], + "returnType": { "_": "UnknownType" } - } - }, - "right": { - "_": "Local", - "name": "x", - "type": { - "_": "NumberType" - } + }, + "args": [] } }, { @@ -6332,15 +8872,15 @@ "type": { "_": "ClassType", "signature": { - "name": "SecurityDoor" + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" } } }, "field": { "enclosingClass": { - "name": "" + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" }, - "name": "y", + "name": "default", "type": { "_": "UnknownType" } @@ -6348,42 +8888,13 @@ }, "right": { "_": "Local", - "name": "y", + "name": "$temp0", "type": { - "_": "StringType" - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "This is a constrctor!", - "type": { - "_": "StringType" - } + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" } - ] + } } }, { @@ -6399,11 +8910,9 @@ }, { "signature": { - "name": "Animal" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" }, - "modifiers": [ - "AbstractKeyword" - ], + "modifiers": [], "typeParameters": [], "superClassName": "", "implementedInterfaceNames": [], @@ -6411,61 +8920,66 @@ { "signature": { "enclosingClass": { - "name": "Animal" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" }, - "name": "name", + "name": "appenders", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" + }, + "name": "categories", "type": { "_": "UnknownType" } }, - "modifiers": [ - "PublicKeyword" - ], + "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [ { "signature": { "enclosingClass": { - "name": "Animal" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" }, - "name": "constructor", - "parameters": [ - { - "name": "name", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], + "name": "@instance_init", + "parameters": [], "returnType": { "_": "UnknownType" } }, - "modifiers": [ - "PublicKeyword" - ], + "modifiers": [], "typeParameters": [], "body": { "locals": [ { - "name": "this", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "Animal" + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" } } }, { - "name": "name", + "name": "$temp1", "type": { - "_": "StringType" + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" + } } } ], @@ -6480,16 +8994,18 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "name", + "name": "this", "type": { - "_": "StringType" + "_": "UnknownType" } }, "right": { - "_": "ParameterRef", - "index": 0, + "_": "ThisRef", "type": { - "_": "StringType" + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" + } } } }, @@ -6497,24 +9013,135 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "this", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "Animal" + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" } } }, "right": { - "_": "ThisRef", + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" + }, + "name": "appenders", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "$temp0", "type": { "_": "ClassType", "signature": { - "name": "Animal" + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" } } } }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "AssignStmt", "left": { @@ -6525,15 +9152,15 @@ "type": { "_": "ClassType", "signature": { - "name": "Animal" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" } } }, "field": { "enclosingClass": { - "name": "" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" }, - "name": "name", + "name": "categories", "type": { "_": "UnknownType" } @@ -6541,9 +9168,12 @@ }, "right": { "_": "Local", - "name": "name", + "name": "$temp1", "type": { - "_": "StringType" + "_": "ClassType", + "signature": { + "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" + } } } }, @@ -6555,35 +9185,56 @@ ] } } - }, + } + ] + }, + { + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" + }, + "modifiers": [], + "typeParameters": [ + { + "_": "UNKNOWN_TYPE", + "type": "Type" + } + ], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ { "signature": { "enclosingClass": { - "name": "Animal" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" }, - "name": "sayHi", + "name": "content", + "type": { + "_": "UnclearReferenceType", + "name": "Type" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" + }, + "name": "@instance_init", "parameters": [], "returnType": { - "_": "VoidType" + "_": "UnknownType" } }, - "modifiers": [ - "PublicKeyword", - "AbstractKeyword" - ], + "modifiers": [], "typeParameters": [], "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Animal" - } - } - } - ], + "locals": [], "cfg": { "blocks": [ { @@ -6597,10 +9248,7 @@ "_": "Local", "name": "this", "type": { - "_": "ClassType", - "signature": { - "name": "Animal" - } + "_": "UnknownType" } }, "right": { @@ -6608,7 +9256,7 @@ "type": { "_": "ClassType", "signature": { - "name": "Animal" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" } } } @@ -6621,71 +9269,75 @@ ] } } - } - ] - }, - { - "signature": { - "name": "StringValidator" - }, - "modifiers": [ - "ExportKeyword" - ], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ + }, { "signature": { "enclosingClass": { - "name": "StringValidator" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" }, - "name": "color", - "type": { - "_": "StringType" + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": true, - "exclamationToken": false, - "initializer": null + } }, { "signature": { "enclosingClass": { - "name": "StringValidator" - }, - "name": "width", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": true, - "exclamationToken": false, - "initializer": null - } - ], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "StringValidator" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" }, - "name": "isAcceptable", + "name": "constructor", "parameters": [ { - "name": "s", + "name": "value", "type": { - "_": "StringType" + "_": "UnclearReferenceType", + "name": "Type" }, - "isOptional": true + "isOptional": false } ], "returnType": { - "_": "BooleanType" + "_": "UnknownType" } }, "modifiers": [], @@ -6697,14 +9349,15 @@ "type": { "_": "ClassType", "signature": { - "name": "StringValidator" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" } } }, { - "name": "s", + "name": "value", "type": { - "_": "StringType" + "_": "UnclearReferenceType", + "name": "Type" } } ], @@ -6715,20 +9368,46 @@ "successors": [], "predecessors": [], "stmts": [ + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, { "_": "AssignStmt", "left": { "_": "Local", - "name": "s", + "name": "value", "type": { - "_": "StringType" + "_": "UnclearReferenceType", + "name": "Type" } }, "right": { "_": "ParameterRef", "index": 0, "type": { - "_": "StringType" + "_": "UnclearReferenceType", + "name": "Type" } } }, @@ -6740,7 +9419,7 @@ "type": { "_": "ClassType", "signature": { - "name": "StringValidator" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" } } }, @@ -6749,9 +9428,42 @@ "type": { "_": "ClassType", "signature": { - "name": "StringValidator" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" + } + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "content", + "type": { + "_": "UnknownType" } } + }, + "right": { + "_": "Local", + "name": "value", + "type": { + "_": "UnclearReferenceType", + "name": "Type" + } } }, { @@ -6767,163 +9479,7 @@ }, { "signature": { - "name": "AnonymousClass-4" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-4" - }, - "name": "type", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "'pattern'", - "type": { - "_": "StringType" - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-4" - }, - "name": "pattern", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "'[%d] [%p] [%z] [ArkAnalyzer] - %m'", - "type": { - "_": "StringType" - } - } - } - ], - "methods": [] - }, - { - "signature": { - "name": "AnonymousClass-3" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-3" - }, - "name": "type", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "'console'", - "type": { - "_": "StringType" - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-3" - }, - "name": "layout", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-4" - }, - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-4" - } - } - } - } - ], - "methods": [] - }, - { - "signature": { - "name": "AnonymousClass-2" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-2" - }, - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-3" - }, - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-3" - } - } - } - } - ], - "methods": [] - }, - { - "signature": { - "name": "AnonymousClass-6" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" }, "modifiers": [], "typeParameters": [], @@ -6933,44 +9489,24 @@ { "signature": { "enclosingClass": { - "name": "AnonymousClass-6" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" }, - "name": "appenders", + "name": "x", "type": { "_": "UnknownType" } }, "modifiers": [], "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ArrayLiteralExpr", - "elements": [ - { - "_": "Constant", - "value": "'console'", - "type": { - "_": "StringType" - } - } - ], - "type": { - "_": "UnionType", - "types": [ - { - "_": "StringType" - } - ] - } - } + "questionToken": false, + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-6" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" }, - "name": "level", + "name": "y", "type": { "_": "UnknownType" } @@ -6978,21 +9514,14 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "'info'", - "type": { - "_": "StringType" - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-6" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" }, - "name": "enableCallStack", + "name": "z", "type": { "_": "UnknownType" } @@ -7000,60 +9529,161 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "false", - "type": { - "_": "BooleanType" - } - } + "exclamationToken": false } ], - "methods": [] - }, - { - "signature": { - "name": "AnonymousClass-5" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ + "methods": [ { "signature": { "enclosingClass": { - "name": "AnonymousClass-5" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" }, - "name": "default", - "type": { + "name": "@instance_init", + "parameters": [], + "returnType": { "_": "UnknownType" } }, "modifiers": [], "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-6" - }, - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-6" - } + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" + }, + "name": "x", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "u", + "type": { + "_": "UnknownType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" + }, + "name": "y", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "v", + "type": { + "_": "UnknownType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" + }, + "name": "z", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "w", + "type": { + "_": "UnknownType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] } } } - ], - "methods": [] + ] }, { "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" }, "modifiers": [], "typeParameters": [], @@ -7063,9 +9693,9 @@ { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" }, - "name": "appenders", + "name": "a", "type": { "_": "UnknownType" } @@ -7073,26 +9703,14 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-2" - }, - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-2" - } - } - } + "exclamationToken": false }, { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-1" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" }, - "name": "categories", + "name": "b", "type": { "_": "UnknownType" } @@ -7100,72 +9718,17 @@ "modifiers": [], "typeParameters": [], "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ObjectLiteralExpr", - "anonymousClass": { - "name": "AnonymousClass-5" - }, - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-5" - } - } - } - } - ], - "methods": [] - }, - { - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7" - }, - "modifiers": [], - "typeParameters": [ - { - "_": "UNKNOWN_TYPE", - "type": "Type" - } - ], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7" - }, - "name": "content", - "type": { - "_": "UnclearReferenceType", - "name": "Type" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": null + "exclamationToken": false } ], "methods": [ { "signature": { "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" }, - "name": "constructor", - "parameters": [ - { - "name": "value", - "type": { - "_": "UnclearReferenceType", - "name": "Type" - }, - "isOptional": false - } - ], + "name": "@instance_init", + "parameters": [], "returnType": { "_": "UnknownType" } @@ -7175,19 +9738,13 @@ "body": { "locals": [ { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7" - } - } - }, - { - "name": "value", + "name": "$temp0", "type": { - "_": "UnclearReferenceType", - "name": "Type" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } } ], @@ -7202,40 +9759,145 @@ "_": "AssignStmt", "left": { "_": "Local", - "name": "value", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" + }, + "name": "a", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "42", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", "type": { - "_": "UnclearReferenceType", - "name": "Type" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } }, "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnclearReferenceType", - "name": "Type" + "_": "NewArrayExpr", + "elementType": { + "_": "NumberType" + }, + "size": { + "_": "Constant", + "value": "2", + "type": { + "_": "NumberType" + } } } }, { "_": "AssignStmt", "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7" + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + } + }, + "index": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" } + }, + "type": { + "_": "NumberType" } }, "right": { - "_": "ThisRef", + "_": "Constant", + "value": "5", "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7" + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 + } + }, + "index": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" } + }, + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "Constant", + "value": "100", + "type": { + "_": "NumberType" } } }, @@ -7249,15 +9911,15 @@ "type": { "_": "ClassType", "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_METHOD-7" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" } } }, "field": { "enclosingClass": { - "name": "" + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" }, - "name": "content", + "name": "b", "type": { "_": "UnknownType" } @@ -7265,10 +9927,13 @@ }, "right": { "_": "Local", - "name": "value", + "name": "$temp0", "type": { - "_": "UnclearReferenceType", - "name": "Type" + "_": "ArrayType", + "elementType": { + "_": "NumberType" + }, + "dimensions": 1 } } }, @@ -7282,163 +9947,6 @@ } } ] - }, - { - "signature": { - "name": "AnonymousClass-listParameters-8" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-listParameters-8" - }, - "name": "x", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Local", - "name": "u", - "type": { - "_": "UnknownType" - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-listParameters-8" - }, - "name": "y", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Local", - "name": "v", - "type": { - "_": "UnknownType" - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-listParameters-8" - }, - "name": "z", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Local", - "name": "w", - "type": { - "_": "UnknownType" - } - } - } - ], - "methods": [] - }, - { - "signature": { - "name": "AnonymousClass-deleteTest-9" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-deleteTest-9" - }, - "name": "a", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "Constant", - "value": "42", - "type": { - "_": "NumberType" - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-deleteTest-9" - }, - "name": "b", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false, - "initializer": { - "_": "ArrayLiteralExpr", - "elements": [ - { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" - } - }, - { - "_": "Constant", - "value": "100", - "type": { - "_": "NumberType" - } - } - ], - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NumberType" - } - ] - } - } - } - ], - "methods": [] } ], "importInfos": [ @@ -7467,7 +9975,6 @@ { "exportClauseName": "classMethodTest", "exportClauseType": 2, - "nameBeforeAs": "classMethodTest", "isDefault": false, "modifiers": [ "ExportKeyword" @@ -7480,7 +9987,6 @@ { "exportClauseName": "foo", "exportClauseType": 2, - "nameBeforeAs": "foo", "isDefault": false, "modifiers": [ "ExportKeyword" @@ -7493,7 +9999,6 @@ { "exportClauseName": "listParameters", "exportClauseType": 2, - "nameBeforeAs": "listParameters", "isDefault": false, "modifiers": [ "ExportKeyword" @@ -7506,7 +10011,6 @@ { "exportClauseName": "SecurityDoor", "exportClauseType": 1, - "nameBeforeAs": "SecurityDoor", "isDefault": false, "modifiers": [ "ExportKeyword" @@ -7524,7 +10028,7 @@ "DefaultKeyword" ], "originTsPosition": { - "line": 199, + "line": 200, "col": 1 } }, @@ -7536,7 +10040,7 @@ "ExportKeyword" ], "originTsPosition": { - "line": 200, + "line": 201, "col": 1 } }, @@ -7548,44 +10052,40 @@ "ExportKeyword" ], "originTsPosition": { - "line": 201, + "line": 202, "col": 1 } }, { "exportClauseName": "StringValidator", "exportClauseType": 1, - "nameBeforeAs": "StringValidator", "isDefault": false, "modifiers": [ "ExportKeyword" ], "originTsPosition": { - "line": 202, + "line": 203, "col": 1 } }, { "exportClauseName": "ExtAdder", "exportClauseType": 4, - "exportFrom": "", "nameBeforeAs": "ExtendedAdder", "isDefault": false, "modifiers": [], "originTsPosition": { - "line": 207, + "line": 208, "col": 1 } }, { "exportClauseName": "ExtendedAdder", "exportClauseType": 4, - "exportFrom": "", - "nameBeforeAs": "ExtendedAdder", "isDefault": false, "modifiers": [], "originTsPosition": { - "line": 207, + "line": 208, "col": 1 } } diff --git a/jacodb-ets/src/test/resources/etsir/samples/save/enums.ts.json b/jacodb-ets/src/test/resources/etsir/samples/save/enums.ts.json new file mode 100644 index 000000000..0deaa861b --- /dev/null +++ b/jacodb-ets/src/test/resources/etsir/samples/save/enums.ts.json @@ -0,0 +1,2144 @@ +{ + "name": "save/enums.ts", + "namespaces": [], + "classes": [ + { + "signature": { + "name": "_DEFAULT_ARK_CLASS" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "_DEFAULT_ARK_CLASS" + }, + "name": "_DEFAULT_ARK_METHOD", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "_DEFAULT_ARK_CLASS" + } + } + }, + { + "name": "ALL_BUILD_STAGE", + "type": { + "_": "ArrayType", + "elementType": { + "_": "UnknownType" + }, + "dimensions": 1 + } + }, + { + "name": "SceneBuildStage", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp0", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp1", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp2", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp3", + "type": { + "_": "ArrayType", + "elementType": { + "_": "UnknownType" + }, + "dimensions": 1 + } + }, + { + "name": "systemComponent", + "type": { + "_": "UnknownType" + } + }, + { + "name": "ViewTreeNodeType", + "type": { + "_": "UnknownType" + } + }, + { + "name": "nameOfsystemComponent", + "type": { + "_": "UnknownType" + } + }, + { + "name": "obj", + "type": { + "_": "UnclearReferenceType", + "name": "Object" + } + }, + { + "name": "$temp4", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + { + "name": "Object", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp5", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp6", + "type": { + "_": "ClassType", + "signature": { + "name": "Iterator" + } + } + }, + { + "name": "$temp7", + "type": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } + } + }, + { + "name": "$temp8", + "type": { + "_": "BooleanType" + } + }, + { + "name": "$temp9", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp10", + "type": { + "_": "ArrayType", + "elementType": { + "_": "UnknownType" + }, + "dimensions": 1 + } + }, + { + "name": "key", + "type": { + "_": "UnknownType" + } + }, + { + "name": "value", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp11", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp12", + "type": { + "_": "UnknownType" + } + }, + { + "name": "console", + "type": { + "_": "UnknownType" + } + }, + { + "name": "$temp13", + "type": { + "_": "BooleanType" + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [ + 1 + ], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "_DEFAULT_ARK_CLASS" + } + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "_DEFAULT_ARK_CLASS" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "SceneBuildStage", + "type": { + "_": "UnknownType" + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "BUILD_INIT", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "SceneBuildStage", + "type": { + "_": "UnknownType" + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "CLASS_DONE", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp2", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "SceneBuildStage", + "type": { + "_": "UnknownType" + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "METHOD_DONE", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp3", + "type": { + "_": "ArrayType", + "elementType": { + "_": "UnknownType" + }, + "dimensions": 1 + } + }, + "right": { + "_": "NewArrayExpr", + "elementType": { + "_": "UnknownType" + }, + "size": { + "_": "Constant", + "value": "3", + "type": { + "_": "NumberType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp3", + "type": { + "_": "ArrayType", + "elementType": { + "_": "UnknownType" + }, + "dimensions": 1 + } + }, + "index": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + }, + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "UnknownType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp3", + "type": { + "_": "ArrayType", + "elementType": { + "_": "UnknownType" + }, + "dimensions": 1 + } + }, + "index": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + }, + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "Local", + "name": "$temp1", + "type": { + "_": "UnknownType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp3", + "type": { + "_": "ArrayType", + "elementType": { + "_": "UnknownType" + }, + "dimensions": 1 + } + }, + "index": { + "_": "Constant", + "value": "2", + "type": { + "_": "NumberType" + } + }, + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "Local", + "name": "$temp2", + "type": { + "_": "UnknownType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "ALL_BUILD_STAGE", + "type": { + "_": "ArrayType", + "elementType": { + "_": "UnknownType" + }, + "dimensions": 1 + } + }, + "right": { + "_": "Local", + "name": "$temp3", + "type": { + "_": "ArrayType", + "elementType": { + "_": "UnknownType" + }, + "dimensions": 1 + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "systemComponent", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "ViewTreeNodeType", + "type": { + "_": "UnknownType" + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "SystemComponent", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "nameOfsystemComponent", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "ViewTreeNodeType", + "type": { + "_": "UnknownType" + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "systemComponent", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp4", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "right": { + "_": "NewExpr", + "classType": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + } + }, + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp4", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "method": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "constructor", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "obj", + "type": { + "_": "UnclearReferenceType", + "name": "Object" + } + }, + "right": { + "_": "Local", + "name": "$temp4", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp5", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "Object", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "entries", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Local", + "name": "ViewTreeNodeType", + "type": { + "_": "UnknownType" + } + } + ] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp6", + "type": { + "_": "ClassType", + "signature": { + "name": "Iterator" + } + } + }, + "right": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp5", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "iterator", + "parameters": [], + "returnType": { + "_": "ClassType", + "signature": { + "name": "Iterator" + } + } + }, + "args": [] + } + } + ] + }, + { + "id": 1, + "successors": [ + 2, + 5 + ], + "predecessors": [ + 0, + 5 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp7", + "type": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } + } + }, + "right": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "$temp6", + "type": { + "_": "ClassType", + "signature": { + "name": "Iterator" + } + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "next", + "parameters": [], + "returnType": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } + } + }, + "args": [] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp8", + "type": { + "_": "BooleanType" + } + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "$temp7", + "type": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } + } + }, + "field": { + "enclosingClass": { + "name": "IteratorResult" + }, + "name": "done", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": "==", + "left": { + "_": "Local", + "name": "$temp8", + "type": { + "_": "BooleanType" + } + }, + "right": { + "_": "Constant", + "value": "true", + "type": { + "_": "BooleanType" + } + }, + "type": { + "_": "BooleanType" + } + } + } + ] + }, + { + "id": 2, + "successors": [ + 3, + 4 + ], + "predecessors": [ + 1 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp11", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "obj", + "type": { + "_": "UnclearReferenceType", + "name": "Object" + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "hasOwnProperty", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Constant", + "value": "SystemComponent", + "type": { + "_": "StringType" + } + } + ] + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp12", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "UnopExpr", + "op": "!", + "arg": { + "_": "Local", + "name": "$temp11", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "IfStmt", + "condition": { + "_": "ConditionExpr", + "op": "==", + "left": { + "_": "Local", + "name": "$temp12", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + }, + "type": { + "_": "BooleanType" + } + } + } + ] + }, + { + "id": 3, + "successors": [], + "predecessors": [ + 2, + 4 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp13", + "type": { + "_": "BooleanType" + } + }, + "right": { + "_": "DeleteExpr", + "arg": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "obj", + "type": { + "_": "UnclearReferenceType", + "name": "Object" + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "'x'", + "type": { + "_": "UnknownType" + } + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + }, + { + "id": 4, + "successors": [ + 3 + ], + "predecessors": [ + 2 + ], + "stmts": [ + { + "_": "CallStmt", + "expr": { + "_": "InstanceCallExpr", + "instance": { + "_": "Local", + "name": "console", + "type": { + "_": "UnknownType" + } + }, + "method": { + "enclosingClass": { + "name": "" + }, + "name": "log", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "args": [ + { + "_": "Constant", + "value": "error", + "type": { + "_": "StringType" + } + } + ] + } + } + ] + }, + { + "id": 5, + "successors": [ + 1 + ], + "predecessors": [ + 1 + ], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp9", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "$temp7", + "type": { + "_": "ClassType", + "signature": { + "name": "IteratorResult" + } + } + }, + "field": { + "enclosingClass": { + "name": "IteratorResult" + }, + "name": "value", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp10", + "type": { + "_": "ArrayType", + "elementType": { + "_": "UnknownType" + }, + "dimensions": 1 + } + }, + "right": { + "_": "CastExpr", + "arg": { + "_": "Local", + "name": "$temp9", + "type": { + "_": "UnknownType" + } + }, + "type": { + "_": "UnknownType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "key", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp10", + "type": { + "_": "ArrayType", + "elementType": { + "_": "UnknownType" + }, + "dimensions": 1 + } + }, + "index": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + }, + "type": { + "_": "UnknownType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "value", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ArrayRef", + "array": { + "_": "Local", + "name": "$temp10", + "type": { + "_": "ArrayType", + "elementType": { + "_": "UnknownType" + }, + "dimensions": 1 + } + }, + "index": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + }, + "type": { + "_": "UnknownType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "obj", + "type": { + "_": "UnclearReferenceType", + "name": "Object" + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "key", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Local", + "name": "value", + "type": { + "_": "UnknownType" + } + } + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "SceneBuildStage" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "SceneBuildStage" + }, + "name": "BUILD_INIT", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "SceneBuildStage" + }, + "name": "CLASS_DONE", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "SceneBuildStage" + }, + "name": "METHOD_DONE", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "SceneBuildStage" + }, + "name": "ALL", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "SceneBuildStage" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [ + { + "name": "$temp0", + "type": { + "_": "StringType" + } + } + ], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "SceneBuildStage" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SceneBuildStage" + } + } + }, + "field": { + "enclosingClass": { + "name": "SceneBuildStage" + }, + "name": "BUILD_INIT", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "BinopExpr", + "op": "<<", + "left": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SceneBuildStage" + } + } + }, + "field": { + "enclosingClass": { + "name": "SceneBuildStage" + }, + "name": "CLASS_DONE", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "BinopExpr", + "op": "<<", + "left": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + }, + "right": { + "_": "Constant", + "value": "2", + "type": { + "_": "NumberType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SceneBuildStage" + } + } + }, + "field": { + "enclosingClass": { + "name": "SceneBuildStage" + }, + "name": "METHOD_DONE", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "BinopExpr", + "op": "|", + "left": { + "_": "Local", + "name": "BUILD_INIT", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "Local", + "name": "CLASS_DONE", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "StringType" + } + }, + "right": { + "_": "Constant", + "value": "all", + "type": { + "_": "StringType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "SceneBuildStage" + } + } + }, + "field": { + "enclosingClass": { + "name": "SceneBuildStage" + }, + "name": "ALL", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "$temp0", + "type": { + "_": "StringType" + } + }, + "field": { + "enclosingClass": { + "name": "" + }, + "name": "length", + "type": { + "_": "UnknownType" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "ValueTag" + }, + "modifiers": [ + "ExportKeyword" + ], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "ValueTag" + }, + "name": "TAINT", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "ValueTag" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "ValueTag" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "ExportType" + }, + "modifiers": [ + "ExportKeyword" + ], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "ExportType" + }, + "name": "NAME_SPACE", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "ExportType" + }, + "name": "CLASS", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "ExportType" + }, + "name": "METHOD", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "ExportType" + }, + "name": "LOCAL", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "ExportType" + }, + "name": "UNKNOWN", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "ExportType" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "ExportType" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "ExportType" + } + } + }, + "field": { + "enclosingClass": { + "name": "ExportType" + }, + "name": "NAME_SPACE", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "0", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "ExportType" + } + } + }, + "field": { + "enclosingClass": { + "name": "ExportType" + }, + "name": "CLASS", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "ExportType" + } + } + }, + "field": { + "enclosingClass": { + "name": "ExportType" + }, + "name": "METHOD", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "2", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "ExportType" + } + } + }, + "field": { + "enclosingClass": { + "name": "ExportType" + }, + "name": "LOCAL", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "3", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "ExportType" + } + } + }, + "field": { + "enclosingClass": { + "name": "ExportType" + }, + "name": "UNKNOWN", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "4", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "ViewTreeNodeType" + }, + "modifiers": [ + "DeclareKeyword" + ], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "ViewTreeNodeType" + }, + "name": "SystemComponent", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "ViewTreeNodeType" + }, + "name": "CustomComponent", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "ViewTreeNodeType" + }, + "name": "Builder", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + }, + { + "signature": { + "enclosingClass": { + "name": "ViewTreeNodeType" + }, + "name": "BuilderParam", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [ + "StaticKeyword" + ], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "ViewTreeNodeType" + }, + "name": "@static_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "ViewTreeNodeType" + } + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + }, + { + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "modifiers": [], + "typeParameters": [], + "superClassName": "", + "implementedInterfaceNames": [], + "fields": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "x", + "type": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "questionToken": false, + "exclamationToken": false + } + ], + "methods": [ + { + "signature": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "@instance_init", + "parameters": [], + "returnType": { + "_": "UnknownType" + } + }, + "modifiers": [], + "typeParameters": [], + "body": { + "locals": [], + "cfg": { + "blocks": [ + { + "id": 0, + "successors": [], + "predecessors": [], + "stmts": [ + { + "_": "AssignStmt", + "left": { + "_": "Local", + "name": "this", + "type": { + "_": "UnknownType" + } + }, + "right": { + "_": "ThisRef", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + } + }, + { + "_": "AssignStmt", + "left": { + "_": "InstanceFieldRef", + "instance": { + "_": "Local", + "name": "this", + "type": { + "_": "ClassType", + "signature": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + } + } + }, + "field": { + "enclosingClass": { + "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" + }, + "name": "x", + "type": { + "_": "UnknownType" + } + } + }, + "right": { + "_": "Constant", + "value": "1", + "type": { + "_": "NumberType" + } + } + }, + { + "_": "ReturnVoidStmt" + } + ] + } + ] + } + } + } + ] + } + ], + "importInfos": [], + "exportInfos": [ + { + "exportClauseName": "ValueTag", + "exportClauseType": 1, + "isDefault": false, + "modifiers": [ + "ExportKeyword" + ], + "originTsPosition": { + "line": 14, + "col": 1 + } + }, + { + "exportClauseName": "ExportType", + "exportClauseType": 1, + "isDefault": false, + "modifiers": [ + "ExportKeyword" + ], + "originTsPosition": { + "line": 18, + "col": 1 + } + } + ] +} \ No newline at end of file diff --git a/jacodb-ets/src/test/resources/etsir/samples/taint.ts.json b/jacodb-ets/src/test/resources/etsir/samples/taint.ts.json index 3933ebc94..bd8c5bbe1 100644 --- a/jacodb-ets/src/test/resources/etsir/samples/taint.ts.json +++ b/jacodb-ets/src/test/resources/etsir/samples/taint.ts.json @@ -450,7 +450,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -578,7 +578,8 @@ { "id": 0, "successors": [ - 1 + 1, + 2 ], "predecessors": [], "stmts": [ @@ -665,7 +666,7 @@ } }, "type": { - "_": "UnknownType" + "_": "BooleanType" } } } @@ -674,6 +675,21 @@ { "id": 1, "successors": [], + "predecessors": [ + 0, + 2 + ], + "stmts": [ + { + "_": "ReturnVoidStmt" + } + ] + }, + { + "id": 2, + "successors": [ + 1 + ], "predecessors": [ 0 ], @@ -747,9 +763,6 @@ } } } - }, - { - "_": "ReturnVoidStmt" } ] } diff --git a/jacodb-ets/src/test/resources/samples/DefaultConstructor.ts b/jacodb-ets/src/test/resources/samples/DefaultConstructor.ts deleted file mode 100644 index 4146eab96..000000000 --- a/jacodb-ets/src/test/resources/samples/DefaultConstructor.ts +++ /dev/null @@ -1,3 +0,0 @@ -class Foo { - x: number = 99 -} diff --git a/jacodb-ets/src/test/resources/samples/PrependInitializer.ts b/jacodb-ets/src/test/resources/samples/PrependInitializer.ts deleted file mode 100644 index e2dbaddeb..000000000 --- a/jacodb-ets/src/test/resources/samples/PrependInitializer.ts +++ /dev/null @@ -1,18 +0,0 @@ -class Foo { - constructor() { - console.log("new Foo"); - } - - foo() { - Foo.y = 112; - console.log('print-foo'); - } - - static bar() { - this.y = 111; - console.log('print-bar') - } - - x: number = 99 - static y: number = 109 -} diff --git a/jacodb-ets/src/test/resources/samples/StaticField.ts b/jacodb-ets/src/test/resources/samples/StaticField.ts deleted file mode 100644 index beeb26ce0..000000000 --- a/jacodb-ets/src/test/resources/samples/StaticField.ts +++ /dev/null @@ -1,6 +0,0 @@ -class Foo { - constructor() { - } - - static y: number = 109 -} diff --git a/jacodb-ets/src/test/resources/samples/enums.ts b/jacodb-ets/src/test/resources/samples/enums.ts deleted file mode 100644 index 32910152b..000000000 --- a/jacodb-ets/src/test/resources/samples/enums.ts +++ /dev/null @@ -1,104 +0,0 @@ -let $temp0: any; -let c: Circle; -let a2: any; -let nameOfA: any; -let directions: (any)[]; -let $temp1: any; -let $temp2: any; -let $temp3: any; -let $temp4: any; -let $temp5: (any)[]; - -$temp0 = Response1.Yes; -respond('Princess Caroline',$temp0); -c = @save/enums: AnonymousClass-enums.ts-1; -f(E); -a2 = Enum.A; -nameOfA = Enum.a2; -$temp1 = Directions.Up; -$temp2 = Directions.Down; -$temp3 = Directions.Left; -$temp4 = Directions.Right; -$temp5 = new Array(1); -directions = $temp5; -return; -enum Direction1{ - Up, - Down, - Left, - Right, -} -enum Direction2{ - Up, - Down, - Left, - Right, -} -enum BooleanLikeHeterogeneousEnum{ - No, - Yes, -} -enum E1{ - X, - Y, - Z, -} -enum E2{ - A, - B, - C, -} -enum FileAccess{ - None, - Read, - Write, - ReadWrite, - G, -} -enum Response1{ - No, - Yes, -} -function respond(recipient: string,message: Response1): void { - - - - return; -} -enum ShapeKind{ - Circle, - Square, -} -interface Circle{ - kind:ShapeKind.Circle; - radius:number; -} -interface Square{ - kind:ShapeKind.Square; - sideLength:number; -} -object AnonymousClass-enums.ts-1{ - kind; - radius; -} -enum E{ - X, - Y, - Z, -} -function f(obj: any){ - let $temp0: any; - - - $temp0 = obj.X; - return $temp0; -} -declare enum Enum{ - A, -} -const enum Directions{ - Up, - Down, - Left, - Right, -} diff --git a/jacodb-ets/src/test/resources/samples/initializers.ts b/jacodb-ets/src/test/resources/samples/initializers.ts new file mode 100644 index 000000000..b85051440 --- /dev/null +++ b/jacodb-ets/src/test/resources/samples/initializers.ts @@ -0,0 +1,19 @@ +class Foo { + x: number = 99 + + static y: number = 111 + + constructor() { + console.log("inside Foo::constructor"); + } + + foo() { + Foo.y = 222; + console.log('inside Foo::foo'); + } + + static bar() { + this.y = 333; + console.log('inside Foo::bar') + } +} diff --git a/jacodb-ets/src/test/resources/samples/basic.ts b/jacodb-ets/src/test/resources/samples/save/basic.ts similarity index 99% rename from jacodb-ets/src/test/resources/samples/basic.ts rename to jacodb-ets/src/test/resources/samples/save/basic.ts index c152b5911..09bf3ea36 100644 --- a/jacodb-ets/src/test/resources/samples/basic.ts +++ b/jacodb-ets/src/test/resources/samples/save/basic.ts @@ -151,6 +151,7 @@ export function listParameters(u: number, v: number, w: string): { x: number, y: export class SecurityDoor extends Door implements Alarm, Alarm2 { x: number = 0; y: string = ''; + z: Person = new Person(10); alert(): void { logger.info("SecurityDoor alert"); } diff --git a/jacodb-ets/src/test/resources/samples/save/enums.ts b/jacodb-ets/src/test/resources/samples/save/enums.ts new file mode 100644 index 000000000..375202b3d --- /dev/null +++ b/jacodb-ets/src/test/resources/samples/save/enums.ts @@ -0,0 +1,45 @@ +enum SceneBuildStage { + BUILD_INIT = 1 << 1, + CLASS_DONE = 1 << 2, + METHOD_DONE = BUILD_INIT | CLASS_DONE, + ALL = 'all'.length, +} + +const ALL_BUILD_STAGE = [ + SceneBuildStage.BUILD_INIT, + SceneBuildStage.CLASS_DONE, + SceneBuildStage.METHOD_DONE, +]; + +export enum ValueTag { + TAINT, +} + +export enum ExportType { + NAME_SPACE = 0, + CLASS = 1, + METHOD = 2, + LOCAL = 3, + UNKNOWN = 4, +} + +declare enum ViewTreeNodeType { + SystemComponent, + CustomComponent, + Builder, + BuilderParam, +} + +let systemComponent = ViewTreeNodeType.SystemComponent; +let nameOfsystemComponent = ViewTreeNodeType[systemComponent]; + +let obj: Object = { x: 1 }; +for (const [key, value] of Object.entries(ViewTreeNodeType)) { + obj[key] = value; +} + +if (!obj.hasOwnProperty('SystemComponent')) { + console.log('error'); +} + +delete obj['x']; diff --git a/jacodb-ets/src/test/resources/samples/taint.ts b/jacodb-ets/src/test/resources/samples/taint.ts index 7b245f285..ea6ee035b 100644 --- a/jacodb-ets/src/test/resources/samples/taint.ts +++ b/jacodb-ets/src/test/resources/samples/taint.ts @@ -1,26 +1,30 @@ -function source(): number|null { +function source(): number | null { return null; } -function pass(data: number|null): number|null { + +function pass(data: number | null): number | null { return data; } -function validate(data: number|null): number { + +function validate(data: number | null): number { if (data == null) { return 0; } return data; } -function sink(data: number|null) { + +function sink(data: number | null) { if (data == null) { - new Error('Error!'); - throw $temp0 + throw new Error("Error!"); } } + function bad() { let data = source(); data = pass(data); sink(data); } + function good() { let data = source(); data = validate(data); diff --git a/jacodb-ets/src/test/resources/structure.txt b/jacodb-ets/src/test/resources/structure.txt new file mode 100644 index 000000000..fff9e895f --- /dev/null +++ b/jacodb-ets/src/test/resources/structure.txt @@ -0,0 +1,38 @@ +resources/ # +├── source/ # Sample source (TS/ETS) files +│ ├── *.ts # +│ └── *.ets # +├── etsir/ # EtsIR (JSON dump of ArkIR for ETS sources) for samples +│ └── *.ts.json # +├── abc/ # Compiled samples (ABC) +│ └── *.abc # +├── abcir/ # AbcIR (JSON dump of ArkIR for ABC inputs) for samples +│ └── *.abc.json # +├── dot/ # DOT files for visualizing IRs +│ ├── *.ts.json.dot # +│ └── *.abc.json.dot # +├── pdf/ # Rendered PDFs from DOT files +│ └── *.ts.json.pdf # +│ └── *.abc.json.pdf # +│ # +└── projects/ # Directory for individual projects + ├── projects.txt # List of projects and their URLs + ├── / # Some individual project + │ ├── README.md # + │ ├── source/ # TS/ETS files for the project + │ │ ├── *.ts # (note: can be an actual git repo) + │ │ └── *.ets # (note: typically, deeply nested) + │ ├── etsir/ # JSON dump of ArkIR for TS files in the project + │ │ └── *.ts.json # + │ ├── hap/ # HAP files for the project + │ │ └── *.hap # + │ ├── abc/ # Compiled ABC files (or extracted from HAP) for the project + │ │ └── *.abc # + │ ├── abcir/ # IR for ABC files for the project + │ │ └── *.abc.json # + │ ├── dot/ # DOT files for visualizing IRs for the project + │ │ └── *.dot # + │ └── pdf/ # Rendered PDFs from DOT files for the project + │ └── *.pdf # + ├── / # + ...