From a620c94695c870f28956911144d8bfefaeadd765 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 17:48:53 +0300 Subject: [PATCH 01/16] Move example --- .../src/test/kotlin/org/jacodb/ets/test/EtsFromJsonTest.kt | 4 ++-- jacodb-ets/src/test/resources/{source => samples}/example.ts | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename jacodb-ets/src/test/resources/{source => samples}/example.ts (100%) 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 1ad19ee42..cfba101f0 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 @@ -71,7 +71,7 @@ class EtsFromJsonTest { @Test fun testLoadEtsFileAutoConvert() { - val path = "/source/example.ts" + val path = "/samples/example.ts" val res = this::class.java.getResource(path)?.toURI()?.toPath() ?: error("Resource not found: $path") val etsFile = loadEtsFileAutoConvert(res) @@ -80,7 +80,7 @@ class EtsFromJsonTest { @Test fun testLoadEtsFileAutoConvertWithDot() { - val path = "/source/example.ts" + val path = "/samples/example.ts" val res = this::class.java.getResource(path)?.toURI()?.toPath() ?: error("Resource not found: $path") val etsFile = loadEtsFileAutoConvertWithDot(res) diff --git a/jacodb-ets/src/test/resources/source/example.ts b/jacodb-ets/src/test/resources/samples/example.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/example.ts rename to jacodb-ets/src/test/resources/samples/example.ts From 5cce0432790a8c9e7d5d6e43d4882b9440ba1075 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 17:50:52 +0300 Subject: [PATCH 02/16] Update structure guide --- jacodb-ets/src/test/resources/structure.txt | 46 ++++++++------------- 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/jacodb-ets/src/test/resources/structure.txt b/jacodb-ets/src/test/resources/structure.txt index fff9e895f..a0a0ff466 100644 --- a/jacodb-ets/src/test/resources/structure.txt +++ b/jacodb-ets/src/test/resources/structure.txt @@ -1,38 +1,26 @@ resources/ # ├── source/ # Sample source (TS/ETS) files -│ ├── *.ts # -│ └── *.ets # -├── etsir/ # EtsIR (JSON dump of ArkIR for ETS sources) for samples -│ └── *.ts.json # +│ └── *.ts # ├── 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 # +├── etsir/ # EtsIR (JSON dump of ArkIR) for samples +│ ├── ast/ # EtsIR-AST for samples from `source/` +│ │ └── *.ts.json # +│ └── abc/ # EtsIR-ABC for samples from `abc/` +│ └── *.abc.json # │ # └── 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 # + │ └── ... # ├── / # ... + +/generated/ +├── dot/ # DOT files for visualizing IRs +│ ├── *.ts.json.dot # +│ └── *.abc.json.dot # +├── pdf/ # Rendered PDFs from DOT files +│ ├── *.ts.json.pdf # +│ └── *.abc.json.pdf # +... +TODO: text representation From afe9cdd69f2b2c63053956643a807d6a76175c36 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 17:53:03 +0300 Subject: [PATCH 03/16] Cleanup gradle task --- jacodb-ets/build.gradle.kts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/jacodb-ets/build.gradle.kts b/jacodb-ets/build.gradle.kts index 7d63f4162..30da81eea 100644 --- a/jacodb-ets/build.gradle.kts +++ b/jacodb-ets/build.gradle.kts @@ -21,7 +21,8 @@ dependencies { // Example usage: // ``` -// ARKANALYZER_DIR=~/dev/arkanalyzer ./gradlew generateTestResources +// export ARKANALYZER_DIR=~/dev/arkanalyzer +// ./gradlew generateTestResources // ``` tasks.register("generateTestResources") { group = "build" @@ -35,13 +36,19 @@ tasks.register("generateTestResources") { defaultArkAnalyzerDir }) if (!arkAnalyzerDir.exists()) { - throw FileNotFoundException("ArkAnalyzer directory does not exist: '$arkAnalyzerDir'. Did you forget to set the '$envVarName' environment variable?") + throw FileNotFoundException( + "ArkAnalyzer directory does not exist: '$arkAnalyzerDir'. " + + "Did you forget to set the '$envVarName' environment variable?" + ) } val scriptSubPath = "src/save/serializeArkIR" val script = arkAnalyzerDir.resolve("out").resolve("$scriptSubPath.js") if (!script.exists()) { - throw FileNotFoundException("Script file not found: '$script'. Did you forget to execute 'npm run build' in the arkanalyzer project?") + throw FileNotFoundException( + "Script file not found: '$script'. " + + "Did you forget to execute 'npm run build' in the arkanalyzer project?" + ) } val resources = projectDir.resolve("src/test/resources") From 18098bff4beea872629017995184c7e46df509f0 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 17:56:20 +0300 Subject: [PATCH 04/16] Remove default ArkAnalyzer directory --- jacodb-ets/build.gradle.kts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/jacodb-ets/build.gradle.kts b/jacodb-ets/build.gradle.kts index 30da81eea..e85b0b3f9 100644 --- a/jacodb-ets/build.gradle.kts +++ b/jacodb-ets/build.gradle.kts @@ -29,12 +29,11 @@ tasks.register("generateTestResources") { description = "Generates test resources from TypeScript files using ArkAnalyzer." doLast { val envVarName = "ARKANALYZER_DIR" - val defaultArkAnalyzerDir = "../arkanalyzer" - val arkAnalyzerDir = rootDir.resolve(System.getenv(envVarName) ?: run { - println("Please, set $envVarName environment variable. Using default value: '$defaultArkAnalyzerDir'") - defaultArkAnalyzerDir - }) + val arkAnalyzerDir = rootDir.resolve( + System.getenv(envVarName) + ?: error("Please, set $envVarName environment variable.") + ) if (!arkAnalyzerDir.exists()) { throw FileNotFoundException( "ArkAnalyzer directory does not exist: '$arkAnalyzerDir'. " + From 58bf24090449358d49a4d635ec3bfb8af045d5df Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 18:07:19 +0300 Subject: [PATCH 05/16] Use absolute --- jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/LoadEtsFile.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/LoadEtsFile.kt b/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/LoadEtsFile.kt index 3bc696992..0656a53b7 100644 --- a/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/LoadEtsFile.kt +++ b/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/LoadEtsFile.kt @@ -22,6 +22,7 @@ import org.jacodb.ets.model.EtsFile import java.io.FileNotFoundException import java.nio.file.Path import kotlin.io.path.Path +import kotlin.io.path.absolute import kotlin.io.path.createTempDirectory import kotlin.io.path.div import kotlin.io.path.exists @@ -44,7 +45,7 @@ fun generateEtsFileIR(tsPath: Path): Path { val arkAnalyzerDir = Path(System.getenv(ENV_VAR_ARK_ANALYZER_DIR) ?: DEFAULT_ARK_ANALYZER_DIR) if (!arkAnalyzerDir.exists()) { throw FileNotFoundException( - "ArkAnalyzer directory does not exist: '$arkAnalyzerDir'. " + + "ArkAnalyzer directory does not exist: '${arkAnalyzerDir.absolute()}'. " + "Did you forget to set the '$ENV_VAR_ARK_ANALYZER_DIR' environment variable? " + "Current value is '${System.getenv(ENV_VAR_ARK_ANALYZER_DIR)}', " + "current dir is '${Path("").toAbsolutePath()}'." From 3a1414a386ca03016d9875fecfd71a00b6cac959 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 18:07:30 +0300 Subject: [PATCH 06/16] Cleanup gradle task --- jacodb-ets/build.gradle.kts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/jacodb-ets/build.gradle.kts b/jacodb-ets/build.gradle.kts index e85b0b3f9..0add4f3c7 100644 --- a/jacodb-ets/build.gradle.kts +++ b/jacodb-ets/build.gradle.kts @@ -29,15 +29,18 @@ tasks.register("generateTestResources") { description = "Generates test resources from TypeScript files using ArkAnalyzer." doLast { val envVarName = "ARKANALYZER_DIR" + val defaultArkAnalyzerDir = "arkanalyzer" - val arkAnalyzerDir = rootDir.resolve( - System.getenv(envVarName) - ?: error("Please, set $envVarName environment variable.") - ) + val arkAnalyzerDir = rootDir.resolve(System.getenv(envVarName) ?: run { + println("Please, set $envVarName environment variable. Using default value: '$defaultArkAnalyzerDir'") + defaultArkAnalyzerDir + }) if (!arkAnalyzerDir.exists()) { throw FileNotFoundException( - "ArkAnalyzer directory does not exist: '$arkAnalyzerDir'. " + - "Did you forget to set the '$envVarName' environment variable?" + "ArkAnalyzer directory does not exist: '${arkAnalyzerDir.absolutePath}'. " + + "Did you forget to set the '$envVarName' environment variable? " + + "Current value is '${System.getenv(envVarName)}', " + + "current dir is '${File("").absolutePath}'." ) } @@ -63,7 +66,7 @@ tasks.register("generateTestResources") { outputDir.relativeTo(resources).path, ) println("Running: '${cmd.joinToString(" ")}'") - val process = ProcessBuilder(cmd).directory(resources).start(); + val process = ProcessBuilder(cmd).directory(resources).start() val ok = process.waitFor(10, TimeUnit.MINUTES) val stdout = process.inputStream.bufferedReader().readText().trim() From c36a4ef90cbd24c1635bf17ecd8f5f05ae9d62bd Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 18:18:45 +0300 Subject: [PATCH 07/16] Remove JSON dumps, move source --- jacodb-ets/build.gradle.kts | 2 +- .../org/jacodb/ets/test/EtsFromJsonTest.kt | 4 +- .../kotlin/org/jacodb/ets/test/EtsIfds.kt | 2 +- .../org/jacodb/ets/test/utils/Entrypoints.kt | 2 +- .../etsir/samples/MethodCollision.ts.json | 1735 --- .../etsir/samples/TaintAnalysis.ts.json | 1104 -- .../etsir/samples/TypeMismatch.ts.json | 528 - .../etsir/samples/binary/Bitwise.ts.json | 421 - .../etsir/samples/binary/Division.ts.json | 1172 -- .../etsir/samples/binary/Subtraction.ts.json | 1145 -- .../etsir/samples/cases/case1.ts.json | 508 - .../etsir/samples/cases/case2.ts.json | 1658 --- .../etsir/samples/cases/case3.ts.json | 1539 --- .../etsir/samples/catch/TryCatch.ts.json | 267 - .../samples/catch/TryCatchFinally.ts.json | 312 - .../samples/catch/TryCatchMultiple.ts.json | 439 - .../samples/catch/TryCatchNested.ts.json | 334 - .../etsir/samples/catch/TryFinally.ts.json | 289 - .../samples/classes/AbstractClass.ts.json | 1023 -- .../samples/classes/AccessModifiers.ts.json | 709 - .../samples/classes/ConstructorClass.ts.json | 648 - .../samples/classes/FieldInitializers.ts.json | 688 - .../samples/classes/GenericClass.ts.json | 830 -- .../samples/classes/InheritanceClass.ts.json | 1170 -- .../classes/InterfaceImplementation.ts.json | 793 -- .../samples/classes/NestedInitializer.ts.json | 657 - .../etsir/samples/classes/SimpleClass.ts.json | 724 -- .../samples/classes/SingletonClass.ts.json | 823 -- .../etsir/samples/classes/StaticClass.ts.json | 665 - .../resources/etsir/samples/lang/in.ts.json | 457 - .../etsir/samples/lang/instanceof.ts.json | 407 - .../etsir/samples/lang/object.ts.json | 1414 -- .../samples/loop/BreadthFirstSearch.ts.json | 2165 ---- .../samples/loop/DepthFirstSearch.ts.json | 3332 ----- .../samples/loop/DijkstrasAlgorithm.ts.json | 3572 ------ .../etsir/samples/loop/DoWhileLoop.ts.json | 283 - .../etsir/samples/loop/ForInLoop.ts.json | 895 -- .../samples/loop/MatrixMultiplication.ts.json | 2852 ----- .../etsir/samples/loop/NestedLoops.ts.json | 1328 -- .../etsir/samples/loop/WhileLoop.ts.json | 292 - .../etsir/samples/save/basic.ts.json | 10687 ---------------- .../etsir/samples/save/enums.ts.json | 2206 ---- .../{samples => source}/MethodCollision.ts | 0 .../{samples => source}/TaintAnalysis.ts | 0 .../{samples => source}/TypeMismatch.ts | 0 .../{samples => source}/binary/Bitwise.ts | 0 .../{samples => source}/binary/Division.ts | 0 .../{samples => source}/binary/Subtraction.ts | 0 .../{samples => source}/cases/case1.ts | 0 .../{samples => source}/cases/case2.ts | 0 .../{samples => source}/cases/case3.ts | 0 .../{samples => source}/catch/TryCatch.ts | 0 .../catch/TryCatchFinally.ts | 0 .../catch/TryCatchMultiple.ts | 0 .../catch/TryCatchNested.ts | 0 .../{samples => source}/catch/TryFinally.ts | 0 .../classes/AbstractClass.ts | 0 .../classes/AccessModifiers.ts | 0 .../classes/ConstructorClass.ts | 0 .../classes/FieldInitializers.ts | 0 .../classes/GenericClass.ts | 0 .../classes/InheritanceClass.ts | 0 .../classes/InterfaceImplementation.ts | 0 .../classes/NestedInitializer.ts | 0 .../classes/SimpleClass.ts | 0 .../classes/SingletonClass.ts | 0 .../classes/StaticClass.ts | 0 .../resources/{samples => source}/example.ts | 0 .../resources/{samples => source}/lang/in.ts | 0 .../{samples => source}/lang/instanceof.ts | 0 .../{samples => source}/lang/object.ts | 0 .../loop/BreadthFirstSearch.ts | 0 .../loop/DepthFirstSearch.ts | 0 .../loop/DijkstrasAlgorithm.ts | 0 .../{samples => source}/loop/DoWhileLoop.ts | 0 .../{samples => source}/loop/ForInLoop.ts | 0 .../loop/MatrixMultiplication.ts | 0 .../{samples => source}/loop/NestedLoops.ts | 0 .../{samples => source}/loop/WhileLoop.ts | 0 .../{samples => source}/save/basic.ts | 0 .../{samples => source}/save/enums.ts | 0 jacodb-ets/src/test/resources/structure.txt | 2 +- 82 files changed, 6 insertions(+), 50077 deletions(-) delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/MethodCollision.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/TaintAnalysis.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/TypeMismatch.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/binary/Bitwise.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/binary/Division.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/binary/Subtraction.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/cases/case1.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/cases/case2.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/cases/case3.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/catch/TryCatch.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchFinally.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchMultiple.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchNested.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/catch/TryFinally.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/classes/AbstractClass.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/classes/AccessModifiers.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/classes/ConstructorClass.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/classes/FieldInitializers.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/classes/GenericClass.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/classes/InheritanceClass.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/classes/InterfaceImplementation.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/classes/NestedInitializer.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/classes/SimpleClass.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/classes/SingletonClass.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/classes/StaticClass.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/lang/in.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/lang/instanceof.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/lang/object.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/loop/BreadthFirstSearch.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/loop/DepthFirstSearch.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/loop/DijkstrasAlgorithm.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/loop/DoWhileLoop.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/loop/ForInLoop.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/loop/MatrixMultiplication.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/loop/NestedLoops.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/loop/WhileLoop.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/save/basic.ts.json delete mode 100644 jacodb-ets/src/test/resources/etsir/samples/save/enums.ts.json rename jacodb-ets/src/test/resources/{samples => source}/MethodCollision.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/TaintAnalysis.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/TypeMismatch.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/binary/Bitwise.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/binary/Division.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/binary/Subtraction.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/cases/case1.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/cases/case2.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/cases/case3.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/catch/TryCatch.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/catch/TryCatchFinally.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/catch/TryCatchMultiple.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/catch/TryCatchNested.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/catch/TryFinally.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/classes/AbstractClass.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/classes/AccessModifiers.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/classes/ConstructorClass.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/classes/FieldInitializers.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/classes/GenericClass.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/classes/InheritanceClass.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/classes/InterfaceImplementation.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/classes/NestedInitializer.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/classes/SimpleClass.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/classes/SingletonClass.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/classes/StaticClass.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/example.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/lang/in.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/lang/instanceof.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/lang/object.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/loop/BreadthFirstSearch.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/loop/DepthFirstSearch.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/loop/DijkstrasAlgorithm.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/loop/DoWhileLoop.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/loop/ForInLoop.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/loop/MatrixMultiplication.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/loop/NestedLoops.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/loop/WhileLoop.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/save/basic.ts (100%) rename jacodb-ets/src/test/resources/{samples => source}/save/enums.ts (100%) diff --git a/jacodb-ets/build.gradle.kts b/jacodb-ets/build.gradle.kts index 0add4f3c7..3e6c5b43c 100644 --- a/jacodb-ets/build.gradle.kts +++ b/jacodb-ets/build.gradle.kts @@ -55,7 +55,7 @@ tasks.register("generateTestResources") { val resources = projectDir.resolve("src/test/resources") val inputDir = resources.resolve("source") - val outputDir = resources.resolve("etsir/generated") + val outputDir = resources.resolve("etsir/ast") println("Generating test resources in '${outputDir.relativeTo(projectDir)}'...") val cmd: List = listOf( 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 cfba101f0..1ad19ee42 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 @@ -71,7 +71,7 @@ class EtsFromJsonTest { @Test fun testLoadEtsFileAutoConvert() { - val path = "/samples/example.ts" + val path = "/source/example.ts" val res = this::class.java.getResource(path)?.toURI()?.toPath() ?: error("Resource not found: $path") val etsFile = loadEtsFileAutoConvert(res) @@ -80,7 +80,7 @@ class EtsFromJsonTest { @Test fun testLoadEtsFileAutoConvertWithDot() { - val path = "/samples/example.ts" + val path = "/source/example.ts" val res = this::class.java.getResource(path)?.toURI()?.toPath() ?: error("Resource not found: $path") val etsFile = loadEtsFileAutoConvertWithDot(res) diff --git a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsIfds.kt b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsIfds.kt index c2edb6112..029e7ffc7 100644 --- a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsIfds.kt +++ b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsIfds.kt @@ -61,7 +61,7 @@ class EtsIfds { } private fun projectAvailable(): Boolean { - val resource = object {}::class.java.getResource("/samples/project1")?.toURI() + val resource = object {}::class.java.getResource("/source/project1")?.toURI() return resource != null && resource.toPath().exists() } diff --git a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt index 134665611..b0e5eaf05 100644 --- a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt +++ b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt @@ -81,7 +81,7 @@ object DumpEtsFileToDot { @OptIn(ExperimentalPathApi::class) object DumpEtsFilesToDot { private const val ETSIR_BASE = "/etsir" - private const val ETSIR_DIR = "samples" // relative to BASE + private const val ETSIR_DIR = "source" // relative to BASE private val DOT_DIR = Path("generated/dot") @JvmStatic diff --git a/jacodb-ets/src/test/resources/etsir/samples/MethodCollision.ts.json b/jacodb-ets/src/test/resources/etsir/samples/MethodCollision.ts.json deleted file mode 100644 index e8b4d8ba7..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/MethodCollision.ts.json +++ /dev/null @@ -1,1735 +0,0 @@ -{ - "name": "MethodCollision.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": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "add", - "parameters": [ - { - "name": "a", - "type": { - "_": "UnknownType" - }, - "isOptional": false - }, - { - "name": "b", - "type": { - "_": "UnknownType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "a", - "type": { - "_": "UnknownType" - } - }, - { - "name": "b", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [ - 1, - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "b", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!=", - "left": { - "_": "TypeOfExpr", - "arg": { - "_": "Local", - "name": "a", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "TypeOfExpr", - "arg": { - "_": "Local", - "name": "b", - "type": { - "_": "UnknownType" - } - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 1, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Local", - "name": "b", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - } - } - ] - }, - { - "id": 2, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "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": [ - { - "_": "Constant", - "value": "Types mismatch!", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ThrowStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "main", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "a", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - { - "name": "b", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - { - "name": "c", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - { - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp3", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - { - "name": "add", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp5", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "method": { - "enclosingClass": { - "name": "Foo" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - "method": { - "enclosingClass": { - "name": "Bar" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "b", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - "right": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "a", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "isSame", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "9", - "type": { - "_": "NumberType" - } - } - ] - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!=", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - "right": { - "_": "Local", - "name": "b", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - "right": { - "_": "Local", - "name": "a", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "c", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - "right": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "a", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "x", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Constant", - "value": "9", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "add", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "123", - "type": { - "_": "NumberType" - } - }, - { - "_": "Constant", - "value": "15", - "type": { - "_": "NumberType" - } - } - ] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp4", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "c", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "isSame", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "9", - "type": { - "_": "NumberType" - } - } - ] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp5", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Foo" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Foo" - }, - "name": "x", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "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": { - "name": "Foo" - }, - "name": "isSame", - "parameters": [ - { - "name": "y", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "BooleanType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - { - "name": "y", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp1", - "type": { - "_": "BooleanType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "y", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "x", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "ConditionExpr", - "op": "===", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Local", - "name": "y", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - }, - { - "_": "ReturnStmt", - "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" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "Foo" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Bar" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Bar" - }, - "name": "x", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "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": { - "name": "Bar" - }, - "name": "isSame", - "parameters": [ - { - "name": "y", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "BooleanType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - { - "name": "y", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp1", - "type": { - "_": "BooleanType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "y", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "x", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "ConditionExpr", - "op": "===", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Local", - "name": "y", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - }, - { - "_": "ReturnStmt", - "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" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "Bar" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file diff --git a/jacodb-ets/src/test/resources/etsir/samples/TaintAnalysis.ts.json b/jacodb-ets/src/test/resources/etsir/samples/TaintAnalysis.ts.json deleted file mode 100644 index 14629f710..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/TaintAnalysis.ts.json +++ /dev/null @@ -1,1104 +0,0 @@ -{ - "name": "TaintAnalysis.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": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "source", - "parameters": [], - "returnType": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - }, - "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" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Constant", - "value": "null", - "type": { - "_": "NullType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "pass", - "parameters": [ - { - "name": "data", - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "data", - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "data", - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "data", - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "validate", - "parameters": [ - { - "name": "data", - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "data", - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [ - 1, - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "data", - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "==", - "left": { - "_": "Local", - "name": "data", - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - }, - "right": { - "_": "Constant", - "value": "null", - "type": { - "_": "NullType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 1, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "data", - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - } - } - ] - }, - { - "id": 2, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "ReturnStmt", - "arg": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "sink", - "parameters": [ - { - "name": "data", - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "data", - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [ - 1, - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "data", - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "==", - "left": { - "_": "Local", - "name": "data", - "type": { - "_": "UnionType", - "types": [ - { - "_": "NumberType" - }, - { - "_": "NullType" - } - ] - } - }, - "right": { - "_": "Constant", - "value": "null", - "type": { - "_": "NullType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 1, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnVoidStmt" - } - ] - }, - { - "id": 2, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "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": [ - { - "_": "Constant", - "value": "Error!", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ThrowStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "bad", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "data", - "type": { - "_": "UnknownType" - } - }, - { - "name": "source", - "type": { - "_": "UnknownType" - } - }, - { - "name": "pass", - "type": { - "_": "UnknownType" - } - }, - { - "name": "sink", - "type": { - "_": "UnknownType" - } - } - ], - "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": "data", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "source", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "data", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "pass", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "data", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "sink", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "data", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "good", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "data", - "type": { - "_": "UnknownType" - } - }, - { - "name": "source", - "type": { - "_": "UnknownType" - } - }, - { - "name": "validate", - "type": { - "_": "UnknownType" - } - }, - { - "name": "sink", - "type": { - "_": "UnknownType" - } - } - ], - "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": "data", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "source", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "data", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "validate", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "data", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "sink", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "data", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "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 deleted file mode 100644 index 1ee5f8b65..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/TypeMismatch.ts.json +++ /dev/null @@ -1,528 +0,0 @@ -{ - "name": "TypeMismatch.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": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "add", - "parameters": [ - { - "name": "a", - "type": { - "_": "UnknownType" - }, - "isOptional": false - }, - { - "name": "b", - "type": { - "_": "UnknownType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "a", - "type": { - "_": "UnknownType" - } - }, - { - "name": "b", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [ - 1, - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "b", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!=", - "left": { - "_": "TypeOfExpr", - "arg": { - "_": "Local", - "name": "a", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "TypeOfExpr", - "arg": { - "_": "Local", - "name": "b", - "type": { - "_": "UnknownType" - } - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 1, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Local", - "name": "b", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - } - } - ] - }, - { - "id": 2, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "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": [ - { - "_": "Constant", - "value": "Types mismatch!", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ThrowStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "main", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "add", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "UnknownType" - } - }, - "right": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "add", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "123", - "type": { - "_": "NumberType" - } - }, - { - "_": "Constant", - "value": "15", - "type": { - "_": "NumberType" - } - } - ] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 36a88238e..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/binary/Bitwise.ts.json +++ /dev/null @@ -1,421 +0,0 @@ -{ - "name": "binary/Bitwise.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": "a", - "type": { - "_": "NumberType" - } - }, - { - "name": "b", - "type": { - "_": "NumberType" - } - }, - { - "name": "andResult", - "type": { - "_": "NumberType" - } - }, - { - "name": "orResult", - "type": { - "_": "NumberType" - } - }, - { - "name": "xorResult", - "type": { - "_": "NumberType" - } - }, - { - "name": "notResult", - "type": { - "_": "NumberType" - } - }, - { - "name": "leftShiftResult", - "type": { - "_": "NumberType" - } - }, - { - "name": "rightShiftResult", - "type": { - "_": "NumberType" - } - }, - { - "name": "unsignedRightShiftResult", - "type": { - "_": "NumberType" - } - }, - { - "name": "c", - "type": { - "_": "NumberType" - } - }, - { - "name": "unsignedRightShiftNegativeResult", - "type": { - "_": "NumberType" - } - } - ], - "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": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "3", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "andResult", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "&", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "orResult", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "|", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "xorResult", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "^", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "notResult", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "UnopExpr", - "op": "~", - "arg": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "leftShiftResult", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "<<", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "rightShiftResult", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": ">>", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "unsignedRightShiftResult", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": ">>>", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "c", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "UnopExpr", - "op": "-", - "arg": { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "unsignedRightShiftNegativeResult", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": ">>>", - "left": { - "_": "Local", - "name": "c", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index c99f4881f..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/binary/Division.ts.json +++ /dev/null @@ -1,1172 +0,0 @@ -{ - "name": "binary/Division.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": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "divideByConstant", - "parameters": [ - { - "name": "number", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "number", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "number", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "/", - "left": { - "_": "Local", - "name": "number", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "divideConstantByNumber", - "parameters": [ - { - "name": "number", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "number", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "number", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "/", - "left": { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "number", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "divideNumbers", - "parameters": [ - { - "name": "a", - "type": { - "_": "NumberType" - }, - "isOptional": false - }, - { - "name": "b", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "a", - "type": { - "_": "NumberType" - } - }, - { - "name": "b", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "/", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "divideNumbersReversed", - "parameters": [ - { - "name": "a", - "type": { - "_": "NumberType" - }, - "isOptional": false - }, - { - "name": "b", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "a", - "type": { - "_": "NumberType" - } - }, - { - "name": "b", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "/", - "left": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "divideByOne", - "parameters": [ - { - "name": "number", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "number", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "number", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "/", - "left": { - "_": "Local", - "name": "number", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "divideOneByNumber", - "parameters": [ - { - "name": "number", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "number", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "number", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "/", - "left": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "number", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "divideMixedNumbers", - "parameters": [ - { - "name": "a", - "type": { - "_": "NumberType" - }, - "isOptional": false - }, - { - "name": "b", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "a", - "type": { - "_": "NumberType" - } - }, - { - "name": "b", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp1", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp2", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "NumberType" - } - }, - "right": { - "_": "UnopExpr", - "op": "-", - "arg": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "UnopExpr", - "op": "-", - "arg": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "/", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 9ed3373c5..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/binary/Subtraction.ts.json +++ /dev/null @@ -1,1145 +0,0 @@ -{ - "name": "binary/Subtraction.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": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "subtraction", - "parameters": [ - { - "name": "num", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "num", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "num", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "-", - "left": { - "_": "Local", - "name": "num", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "subtractReversed", - "parameters": [ - { - "name": "num", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "num", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "num", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "-", - "left": { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "num", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "subtractNumbers", - "parameters": [ - { - "name": "a", - "type": { - "_": "NumberType" - }, - "isOptional": false - }, - { - "name": "b", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "a", - "type": { - "_": "NumberType" - } - }, - { - "name": "b", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "-", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "subtractNumbersReversed", - "parameters": [ - { - "name": "a", - "type": { - "_": "NumberType" - }, - "isOptional": false - }, - { - "name": "b", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "a", - "type": { - "_": "NumberType" - } - }, - { - "name": "b", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "-", - "left": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "subtractFromZero", - "parameters": [ - { - "name": "number", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "number", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "number", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "-", - "left": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "number", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "subtractToZero", - "parameters": [ - { - "name": "number", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "number", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "number", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "-", - "left": { - "_": "Local", - "name": "number", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "subtractMixedNumbers", - "parameters": [ - { - "name": "a", - "type": { - "_": "NumberType" - }, - "isOptional": false - }, - { - "name": "b", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "a", - "type": { - "_": "NumberType" - } - }, - { - "name": "b", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp1", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "NumberType" - } - }, - "right": { - "_": "UnopExpr", - "op": "-", - "arg": { - "_": "Local", - "name": "a", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "-", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "b", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 8e5c48761..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/cases/case1.ts.json +++ /dev/null @@ -1,508 +0,0 @@ -{ - "name": "cases/case1.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": "RESULT", - "type": { - "_": "NumberType" - } - } - ], - "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": "RESULT", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "9", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "readInt", - "parameters": [ - { - "name": "data", - "type": { - "_": "UnclearReferenceType", - "name": "Message" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "data", - "type": { - "_": "UnclearReferenceType", - "name": "Message" - } - }, - { - "name": "RESULT", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "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": "_DEFAULT_ARK_CLASS" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "RESULT", - "type": { - "_": "UnknownType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "onRequest", - "parameters": [ - { - "name": "data", - "type": { - "_": "UnclearReferenceType", - "name": "Message" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "data", - "type": { - "_": "UnclearReferenceType", - "name": "Message" - } - }, - { - "name": "opt", - "type": { - "_": "UnknownType" - } - }, - { - "name": "readInt", - "type": { - "_": "UnknownType" - } - }, - { - "name": "i", - "type": { - "_": "NumberType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [ - 1 - ], - "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": "_DEFAULT_ARK_CLASS" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "opt", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "readInt", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "data", - "type": { - "_": "UnclearReferenceType", - "name": "Message" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 1, - "successors": [ - 2, - 3 - ], - "predecessors": [], - "stmts": [ - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "opt", - "type": { - "_": "UnknownType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 2, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnStmt", - "arg": { - "_": "Constant", - "value": "true", - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 3, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 0e651c4a5..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/cases/case2.ts.json +++ /dev/null @@ -1,1658 +0,0 @@ -{ - "name": "cases/case2.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": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "createPixelMap", - "parameters": [ - { - "name": "bytes", - "type": { - "_": "UnclearReferenceType", - "name": "ArrayBuffer" - }, - "isOptional": false - }, - { - "name": "size", - "type": { - "_": "UnclearReferenceType", - "name": "Size" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnclearReferenceType", - "name": "PixelMap" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "bytes", - "type": { - "_": "UnclearReferenceType", - "name": "ArrayBuffer" - } - }, - { - "name": "size", - "type": { - "_": "UnclearReferenceType", - "name": "Size" - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "PixelMap" - } - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "bytes", - "type": { - "_": "UnclearReferenceType", - "name": "ArrayBuffer" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnclearReferenceType", - "name": "ArrayBuffer" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "size", - "type": { - "_": "UnclearReferenceType", - "name": "Size" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "UnclearReferenceType", - "name": "Size" - } - } - }, - { - "_": "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": { - "_": "ClassType", - "signature": { - "name": "PixelMap" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "PixelMap" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "PixelMap" - } - } - }, - "method": { - "enclosingClass": { - "name": "PixelMap" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "PixelMap" - } - } - } - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Message" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "Message" - }, - "name": "readInt", - "parameters": [], - "returnType": { - "_": "NumberType" - } - }, - "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": [], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "PixelMap" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "PixelMap" - }, - "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": "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": "PixelMap" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "PixelMap" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Size" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Size" - }, - "name": "height", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "Size" - }, - "name": "width", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - } - ], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "Size" - }, - "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": "Size" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "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" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "Size" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "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": [], - "stmts": [ - { - "_": "ReturnStmt", - "arg": { - "_": "Constant", - "value": "true", - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 2, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnStmt", - "arg": { - "_": "Constant", - "value": "false", - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 3, - "successors": [ - 1 - ], - "predecessors": [], - "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" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "Request" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "AnonymousClass-Request-onRemoteMessageRequest-0" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-Request-onRemoteMessageRequest-0" - }, - "name": "height", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-Request-onRemoteMessageRequest-0" - }, - "name": "width", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "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" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-Request-onRemoteMessageRequest-0" - }, - "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": "AnonymousClass-Request-onRemoteMessageRequest-0" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-Request-onRemoteMessageRequest-0" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 6f0ac287d..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/cases/case3.ts.json +++ /dev/null @@ -1,1539 +0,0 @@ -{ - "name": "cases/case3.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": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "AnonymousMethod-0", - "parameters": [ - { - "name": "err", - "type": { - "_": "UnclearReferenceType", - "name": "MyError" - }, - "isOptional": false - } - ], - "returnType": { - "_": "VoidType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": null - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "publishEvent", - "parameters": [ - { - "name": "event", - "type": { - "_": "StringType" - }, - "isOptional": false - }, - { - "name": "password", - "type": { - "_": "UnclearReferenceType", - "name": "String" - }, - "isOptional": false - }, - { - "name": "callback", - "type": { - "_": "FunctionType", - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "AnonymousMethod-0", - "parameters": [ - { - "name": "err", - "type": { - "_": "UnclearReferenceType", - "name": "MyError" - }, - "isOptional": false - } - ], - "returnType": { - "_": "VoidType" - } - } - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "event", - "type": { - "_": "StringType" - } - }, - { - "name": "password", - "type": { - "_": "UnclearReferenceType", - "name": "String" - } - }, - { - "name": "callback", - "type": { - "_": "FunctionType", - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "AnonymousMethod-0", - "parameters": [ - { - "name": "err", - "type": { - "_": "UnclearReferenceType", - "name": "MyError" - }, - "isOptional": false - } - ], - "returnType": { - "_": "VoidType" - } - } - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "event", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "password", - "type": { - "_": "UnclearReferenceType", - "name": "String" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "UnclearReferenceType", - "name": "String" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "callback", - "type": { - "_": "FunctionType", - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "AnonymousMethod-0", - "parameters": [ - { - "name": "err", - "type": { - "_": "UnclearReferenceType", - "name": "MyError" - }, - "isOptional": false - } - ], - "returnType": { - "_": "VoidType" - } - } - } - }, - "right": { - "_": "ParameterRef", - "index": 2, - "type": { - "_": "FunctionType", - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "AnonymousMethod-0", - "parameters": [ - { - "name": "err", - "type": { - "_": "UnclearReferenceType", - "name": "MyError" - }, - "isOptional": false - } - ], - "returnType": { - "_": "VoidType" - } - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "MyError" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "MyError" - }, - "name": "code", - "type": { - "_": "UnclearReferenceType", - "name": "int" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "MyError" - }, - "name": "name", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "MyError" - }, - "name": "message", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "MyError" - }, - "name": "stack", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": true, - "exclamationToken": false - } - ], - "methods": [] - }, - { - "signature": { - "name": "CommonSecurity" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "CommonSecurity" - }, - "name": "publish", - "type": { - "_": "UnclearReferenceType", - "name": "String" - } - }, - "modifiers": [ - "PrivateKeyword" - ], - "typeParameters": [], - "questionToken": false, - "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": { - "name": "CommonSecurity" - }, - "name": "getPassword", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [ - "PrivateKeyword" - ], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "CommonSecurity" - } - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "CommonSecurity" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "CommonSecurity" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Constant", - "value": "Password123", - "type": { - "_": "StringType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "CommonSecurity" - }, - "name": "publishEventWithData", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [ - "PrivateKeyword" - ], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "CommonSecurity" - } - } - }, - { - "name": "password", - "type": { - "_": "UnknownType" - } - }, - { - "name": "AnonymousMethod-publishEventWithData-0", - "type": { - "_": "FunctionType", - "signature": { - "enclosingClass": { - "name": "CommonSecurity" - }, - "name": "AnonymousMethod-publishEventWithData-0", - "parameters": [ - { - "name": "err", - "type": { - "_": "UnknownType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - } - } - }, - { - "name": "publishEvent", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "CommonSecurity" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "CommonSecurity" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "password", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "CommonSecurity" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "getPassword", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "publishEvent", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "MyCommonEvent", - "type": { - "_": "StringType" - } - }, - { - "_": "Local", - "name": "password", - "type": { - "_": "UnknownType" - } - }, - { - "_": "Local", - "name": "AnonymousMethod-publishEventWithData-0", - "type": { - "_": "FunctionType", - "signature": { - "enclosingClass": { - "name": "CommonSecurity" - }, - "name": "AnonymousMethod-publishEventWithData-0", - "parameters": [ - { - "name": "err", - "type": { - "_": "UnknownType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - } - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "CommonSecurity" - }, - "name": "AnonymousMethod-publishEventWithData-0", - "parameters": [ - { - "name": "err", - "type": { - "_": "UnknownType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "CommonSecurity" - } - } - }, - { - "name": "err", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp2", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp3", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp5", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp6", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp7", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp8", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp9", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp10", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp11", - "type": { - "_": "StringType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [ - 1, - 3 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "err", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "CommonSecurity" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "CommonSecurity" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "err", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "code", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!=", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 1, - "successors": [ - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "CommonSecurity" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "publish", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Constant", - "value": "publish event with data success", - "type": { - "_": "StringType" - } - } - } - ] - }, - { - "id": 2, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnVoidStmt" - } - ] - }, - { - "id": 3, - "successors": [ - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "err", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "code", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Constant", - "value": "publish event error: ", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": ", ", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "err", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "message", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": ", ", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp7", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "err", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "name", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Local", - "name": "$temp7", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp9", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": ", ", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp10", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "err", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "stack", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp11", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp9", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Local", - "name": "$temp10", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "CommonSecurity" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "publish", - "type": { - "_": "UnknownType" - } - } - }, - "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" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "CommonSecurity" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index d37d8057b..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatch.ts.json +++ /dev/null @@ -1,267 +0,0 @@ -{ - "name": "catch/TryCatch.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": "result", - "type": { - "_": "StringType" - } - }, - { - "name": "message", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - }, - { - "name": "error", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - } - ], - "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": "result", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "", - "type": { - "_": "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": [], - "predecessors": [], - "stmts": [ - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "result", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 4bc336957..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchFinally.ts.json +++ /dev/null @@ -1,312 +0,0 @@ -{ - "name": "catch/TryCatchFinally.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": "result", - "type": { - "_": "StringType" - } - }, - { - "name": "message", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - { - "name": "error", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": "result", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "", - "type": { - "_": "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": [ - 2 - ], - "predecessors": [], - "stmts": [] - }, - { - "id": 2, - "successors": [ - 3 - ], - "predecessors": [], - "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": [], - "stmts": [ - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "result", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 74d6d199d..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchMultiple.ts.json +++ /dev/null @@ -1,439 +0,0 @@ -{ - "name": "catch/TryCatchMultiple.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": "result1", - "type": { - "_": "StringType" - } - }, - { - "name": "result2", - "type": { - "_": "StringType" - } - }, - { - "name": "message1", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - { - "name": "message2", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - }, - { - "name": "error", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp3", - "type": { - "_": "UnknownType" - } - } - ], - "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": "result1", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "", - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "result2", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "", - "type": { - "_": "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" - } - } - } - } - ] - }, - { - "id": 1, - "successors": [ - 2 - ], - "predecessors": [], - "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, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "result1", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "result2", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 3b64bfb99..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/catch/TryCatchNested.ts.json +++ /dev/null @@ -1,334 +0,0 @@ -{ - "name": "catch/TryCatchNested.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": "outerResult", - "type": { - "_": "StringType" - } - }, - { - "name": "innerResult", - "type": { - "_": "StringType" - } - }, - { - "name": "innerMessage", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - }, - { - "name": "innerError", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "outerError", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp2", - "type": { - "_": "UnknownType" - } - } - ], - "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": "outerResult", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "", - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "innerResult", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "", - "type": { - "_": "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" - } - } - } - } - ] - }, - { - "id": 1, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "outerResult", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "innerResult", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 1573fe4fe..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/catch/TryFinally.ts.json +++ /dev/null @@ -1,289 +0,0 @@ -{ - "name": "catch/TryFinally.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": "result", - "type": { - "_": "StringType" - } - }, - { - "name": "message", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": "result", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "", - "type": { - "_": "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": [ - 2 - ], - "predecessors": [], - "stmts": [] - }, - { - "id": 2, - "successors": [ - 3 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "result", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "Finally block executed.", - "type": { - "_": "StringType" - } - } - } - ] - }, - { - "id": 3, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "result", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 18334a4ac..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/AbstractClass.ts.json +++ /dev/null @@ -1,1023 +0,0 @@ -{ - "name": "classes/AbstractClass.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": "rectangle", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - "method": { - "enclosingClass": { - "name": "Rectangle" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" - } - }, - { - "_": "Constant", - "value": "10", - "type": { - "_": "NumberType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "rectangle", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "rectangle", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "getArea", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Shape" - }, - "modifiers": [ - "AbstractKeyword" - ], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "Shape" - }, - "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": "Shape" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Shape" - }, - "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": "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", - "type": { - "_": "ClassType", - "signature": { - "name": "Shape" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "Shape" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Rectangle" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "Shape", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Rectangle" - }, - "name": "width", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "Rectangle" - }, - "name": "height", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "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": { - "name": "Rectangle" - }, - "name": "constructor", - "parameters": [ - { - "name": "width", - "type": { - "_": "NumberType" - }, - "isOptional": false - }, - { - "name": "height", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - { - "name": "width", - "type": { - "_": "NumberType" - } - }, - { - "name": "height", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "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": { - "_": "Local", - "name": "width", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "height", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "super", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "width", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "width", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "height", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "height", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Rectangle" - }, - "name": "getArea", - "parameters": [], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp2", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "width", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Rectangle" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "height", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "BinopExpr", - "op": "*", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "UnknownType" - } - } - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index cd3631785..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/AccessModifiers.ts.json +++ /dev/null @@ -1,709 +0,0 @@ -{ - "name": "classes/AccessModifiers.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": "user", - "type": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - }, - "method": { - "enclosingClass": { - "name": "User" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "johndoe", - "type": { - "_": "StringType" - } - }, - { - "_": "Constant", - "value": "johndoe@example.com", - "type": { - "_": "StringType" - } - }, - { - "_": "Constant", - "value": "John Doe", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "user", - "type": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "user", - "type": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "name", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "User" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "User" - }, - "name": "username", - "type": { - "_": "StringType" - } - }, - "modifiers": [ - "PrivateKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "User" - }, - "name": "email", - "type": { - "_": "StringType" - } - }, - "modifiers": [ - "ProtectedKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "User" - }, - "name": "name", - "type": { - "_": "StringType" - } - }, - "modifiers": [ - "PublicKeyword" - ], - "typeParameters": [], - "questionToken": false, - "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": { - "name": "User" - }, - "name": "constructor", - "parameters": [ - { - "name": "username", - "type": { - "_": "StringType" - }, - "isOptional": false - }, - { - "name": "email", - "type": { - "_": "StringType" - }, - "isOptional": false - }, - { - "name": "name", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - }, - { - "name": "username", - "type": { - "_": "StringType" - } - }, - { - "name": "email", - "type": { - "_": "StringType" - } - }, - { - "name": "name", - "type": { - "_": "StringType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "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": { - "_": "Local", - "name": "username", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "email", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "name", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ParameterRef", - "index": 2, - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "username", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "username", - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "email", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "email", - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "User" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "name", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "name", - "type": { - "_": "StringType" - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 6a086583d..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/ConstructorClass.ts.json +++ /dev/null @@ -1,648 +0,0 @@ -{ - "name": "classes/ConstructorClass.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": "constructorObj", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - }, - "method": { - "enclosingClass": { - "name": "ConstructorClass" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "Constructor Example", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "constructorObj", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "constructorObj", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "getName", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "ConstructorClass" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "ConstructorClass" - }, - "name": "name", - "type": { - "_": "StringType" - } - }, - "modifiers": [ - "PrivateKeyword", - "ReadonlyKeyword" - ], - "typeParameters": [], - "questionToken": false, - "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": { - "name": "ConstructorClass" - }, - "name": "constructor", - "parameters": [ - { - "name": "name", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - }, - { - "name": "name", - "type": { - "_": "StringType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "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": { - "_": "Local", - "name": "name", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "name", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "name", - "type": { - "_": "StringType" - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "ConstructorClass" - }, - "name": "getName", - "parameters": [], - "returnType": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ConstructorClass" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "name", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file diff --git a/jacodb-ets/src/test/resources/etsir/samples/classes/FieldInitializers.ts.json b/jacodb-ets/src/test/resources/etsir/samples/classes/FieldInitializers.ts.json deleted file mode 100644 index 013407036..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/FieldInitializers.ts.json +++ /dev/null @@ -1,688 +0,0 @@ -{ - "name": "classes/FieldInitializers.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 - }, - { - "signature": { - "enclosingClass": { - "name": "Foo" - }, - "name": "y", - "type": { - "_": "NumberType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "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": { - "name": "Foo" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "Foo" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "inside Foo::constructor", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Foo" - }, - "name": "foo", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - { - "name": "Foo", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "Foo", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "y", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Constant", - "value": "222", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "inside Foo::foo", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Foo" - }, - "name": "bar", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "y", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Constant", - "value": "333", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "inside Foo::bar", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index dba309813..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/GenericClass.ts.json +++ /dev/null @@ -1,830 +0,0 @@ -{ - "name": "classes/GenericClass.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": "stringObj", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - }, - { - "name": "numberObj", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - { - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - { - "name": "$temp3", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - "method": { - "enclosingClass": { - "name": "GenericClass" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "String Example", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "stringObj", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "stringObj", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "getData", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - "method": { - "enclosingClass": { - "name": "GenericClass" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "100", - "type": { - "_": "NumberType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "numberObj", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - "right": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "numberObj", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "getData", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp3", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "GenericClass" - }, - "modifiers": [], - "typeParameters": [ - { - "_": "UNKNOWN_TYPE", - "type": "T" - } - ], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "GenericClass" - }, - "name": "data", - "type": { - "_": "UnclearReferenceType", - "name": "T" - } - }, - "modifiers": [ - "PrivateKeyword", - "ReadonlyKeyword" - ], - "typeParameters": [], - "questionToken": false, - "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": { - "name": "GenericClass" - }, - "name": "constructor", - "parameters": [ - { - "name": "data", - "type": { - "_": "UnclearReferenceType", - "name": "T" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - { - "name": "data", - "type": { - "_": "UnclearReferenceType", - "name": "T" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "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": { - "_": "Local", - "name": "data", - "type": { - "_": "UnclearReferenceType", - "name": "T" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnclearReferenceType", - "name": "T" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "data", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "data", - "type": { - "_": "UnclearReferenceType", - "name": "T" - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "GenericClass" - }, - "name": "getData", - "parameters": [], - "returnType": { - "_": "UnclearReferenceType", - "name": "T" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "GenericClass" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "data", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index f97f61133..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/InheritanceClass.ts.json +++ /dev/null @@ -1,1170 +0,0 @@ -{ - "name": "classes/InheritanceClass.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": "childObj", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp2", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - }, - "method": { - "enclosingClass": { - "name": "ChildClass" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "Child Example", - "type": { - "_": "StringType" - } - }, - { - "_": "Constant", - "value": "25", - "type": { - "_": "NumberType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "childObj", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "childObj", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "getName", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "childObj", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "getAge", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp2", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "ParentClass" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "ParentClass" - }, - "name": "name", - "type": { - "_": "StringType" - } - }, - "modifiers": [ - "ProtectedKeyword" - ], - "typeParameters": [], - "questionToken": false, - "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": { - "name": "ParentClass" - }, - "name": "constructor", - "parameters": [ - { - "name": "name", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ParentClass" - } - } - }, - { - "name": "name", - "type": { - "_": "StringType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "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": { - "_": "Local", - "name": "name", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ParentClass" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "ParentClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ParentClass" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "name", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "name", - "type": { - "_": "StringType" - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "ParentClass" - }, - "name": "getName", - "parameters": [], - "returnType": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ParentClass" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ParentClass" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "ParentClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ParentClass" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "name", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "ChildClass" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "ParentClass", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "ChildClass" - }, - "name": "age", - "type": { - "_": "NumberType" - } - }, - "modifiers": [ - "PrivateKeyword", - "ReadonlyKeyword" - ], - "typeParameters": [], - "questionToken": false, - "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": { - "name": "ChildClass" - }, - "name": "constructor", - "parameters": [ - { - "name": "name", - "type": { - "_": "StringType" - }, - "isOptional": false - }, - { - "name": "age", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - }, - { - "name": "name", - "type": { - "_": "StringType" - } - }, - { - "name": "age", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "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": { - "_": "Local", - "name": "name", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "age", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "super", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "name", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "age", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "age", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "ChildClass" - }, - "name": "getAge", - "parameters": [], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ChildClass" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "age", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 3cd0fc1d2..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/InterfaceImplementation.ts.json +++ /dev/null @@ -1,793 +0,0 @@ -{ - "name": "classes/InterfaceImplementation.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": "circle", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - "method": { - "enclosingClass": { - "name": "Circle" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "circle", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "circle", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "getArea", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "Circle area:", - "type": { - "_": "StringType" - } - }, - { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Shape" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "Shape" - }, - "name": "getArea", - "parameters": [], - "returnType": { - "_": "NumberType" - } - }, - "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": [], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Circle" - }, - "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": "Circle" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Circle" - }, - "name": "constructor", - "parameters": [ - { - "name": "radius", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - { - "name": "radius", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "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": { - "_": "Local", - "name": "radius", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "radius", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "radius", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Circle" - }, - "name": "getArea", - "parameters": [], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - { - "name": "Math", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp3", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "Math", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "PI", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Circle" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "radius", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "BinopExpr", - "op": "**", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "BinopExpr", - "op": "*", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "UnknownType" - } - } - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file diff --git a/jacodb-ets/src/test/resources/etsir/samples/classes/NestedInitializer.ts.json b/jacodb-ets/src/test/resources/etsir/samples/classes/NestedInitializer.ts.json deleted file mode 100644 index cc1a10325..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/NestedInitializer.ts.json +++ /dev/null @@ -1,657 +0,0 @@ -{ - "name": "classes/NestedInitializer.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": "foo", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - } - ], - "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": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "method": { - "enclosingClass": { - "name": "Foo" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "foo", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Bar" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [], - "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": { - "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" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "Bar" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Foo" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Foo" - }, - "name": "bar", - "type": { - "_": "UnclearReferenceType", - "name": "Bar" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - } - ], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "Foo" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - }, - "method": { - "enclosingClass": { - "name": "Bar" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Foo" - } - } - }, - "field": { - "enclosingClass": { - "name": "Foo" - }, - "name": "bar", - "type": { - "_": "UnclearReferenceType", - "name": "Bar" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Bar" - } - } - } - }, - { - "_": "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": { - "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" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "Foo" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 8d07d55ec..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/SimpleClass.ts.json +++ /dev/null @@ -1,724 +0,0 @@ -{ - "name": "classes/SimpleClass.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": "simpleObj", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - }, - "method": { - "enclosingClass": { - "name": "SimpleClass" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "simpleObj", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "simpleObj", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "setName", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "Example", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "simpleObj", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "getName", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "SimpleClass" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "SimpleClass" - }, - "name": "name", - "type": { - "_": "StringType" - } - }, - "modifiers": [ - "PrivateKeyword" - ], - "typeParameters": [], - "questionToken": false, - "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": { - "name": "SimpleClass" - }, - "name": "setName", - "parameters": [ - { - "name": "name", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "VoidType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - }, - { - "name": "name", - "type": { - "_": "StringType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "name", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "name", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "name", - "type": { - "_": "StringType" - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "SimpleClass" - }, - "name": "getName", - "parameters": [], - "returnType": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "SimpleClass" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "name", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - } - ] - } - ] - } - } - }, - { - "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" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "SimpleClass" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 7c3df21bd..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/SingletonClass.ts.json +++ /dev/null @@ -1,823 +0,0 @@ -{ - "name": "classes/SingletonClass.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": "logger", - "type": { - "_": "UnknownType" - } - }, - { - "name": "Logger", - "type": { - "_": "UnknownType" - } - } - ], - "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": "logger", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "Logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "getInstance", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "This is a log message.", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Logger" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Logger" - }, - "name": "instance", - "type": { - "_": "UnclearReferenceType", - "name": "Logger" - } - }, - "modifiers": [ - "PrivateKeyword", - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "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": { - "name": "Logger" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [ - "PrivateKeyword" - ], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "Logger" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Logger" - }, - "name": "log", - "parameters": [ - { - "name": "message", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "VoidType" - } - }, - "modifiers": [ - "PublicKeyword" - ], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - }, - { - "name": "message", - "type": { - "_": "StringType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "message", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "message", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Logger" - }, - "name": "getInstance", - "parameters": [], - "returnType": { - "_": "UnclearReferenceType", - "name": "Logger" - } - }, - "modifiers": [ - "PublicKeyword", - "StaticKeyword" - ], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - }, - { - "name": "Logger", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - }, - { - "name": "$temp3", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [ - 1, - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "Logger", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "instance", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "UnopExpr", - "op": "!", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!=", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 1, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "Logger", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "instance", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "UnknownType" - } - } - } - ] - }, - { - "id": 2, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - }, - "method": { - "enclosingClass": { - "name": "Logger" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "Logger", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "instance", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "Logger" - } - } - } - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 913786f0f..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/classes/StaticClass.ts.json +++ /dev/null @@ -1,665 +0,0 @@ -{ - "name": "classes/StaticClass.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": "StaticClass", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "StaticClass", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "incrementCount", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "StaticClass", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "getCount", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "StaticClass" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "StaticClass" - }, - "name": "count", - "type": { - "_": "NumberType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "questionToken": false, - "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" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "StaticClass" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "StaticClass" - }, - "name": "incrementCount", - "parameters": [], - "returnType": { - "_": "VoidType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "StaticClass" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "StaticClass" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "StaticClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "StaticClass" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "count", - "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": "StaticClass" - }, - "name": "getCount", - "parameters": [], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "StaticClass" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "StaticClass" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "StaticClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "StaticClass" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "count", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file diff --git a/jacodb-ets/src/test/resources/etsir/samples/lang/in.ts.json b/jacodb-ets/src/test/resources/etsir/samples/lang/in.ts.json deleted file mode 100644 index 3b55d41de..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/lang/in.ts.json +++ /dev/null @@ -1,457 +0,0 @@ -{ - "name": "lang/in.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": "cat", - "type": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - }, - { - "name": "catHasName", - "type": { - "_": "UnknownType" - } - }, - { - "name": "catHasMeow", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - }, - "method": { - "enclosingClass": { - "name": "Cat" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "Barsik", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "cat", - "type": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "catHasName", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "catHasMeow", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "undefined", - "type": { - "_": "UndefinedType" - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Cat" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "Cat" - }, - "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": "Cat" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Cat" - }, - "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": "Cat" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Cat" - }, - "name": "constructor", - "parameters": [ - { - "name": "name", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - }, - { - "name": "name", - "type": { - "_": "StringType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "Cat" - }, - "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": "Cat" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file diff --git a/jacodb-ets/src/test/resources/etsir/samples/lang/instanceof.ts.json b/jacodb-ets/src/test/resources/etsir/samples/lang/instanceof.ts.json deleted file mode 100644 index 399955335..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/lang/instanceof.ts.json +++ /dev/null @@ -1,407 +0,0 @@ -{ - "name": "lang/instanceof.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": "x", - "type": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - }, - "method": { - "enclosingClass": { - "name": "Cat" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "x", - "type": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "InstanceOfExpr", - "arg": { - "_": "Local", - "name": "x", - "type": { - "_": "ClassType", - "signature": { - "name": "Cat" - } - } - }, - "checkType": { - "_": "UnclearReferenceType", - "name": "Cat" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Cat" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "Cat" - }, - "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": "Cat" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Cat" - }, - "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": "Cat" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Cat" - }, - "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": "Cat" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "Cat" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file diff --git a/jacodb-ets/src/test/resources/etsir/samples/lang/object.ts.json b/jacodb-ets/src/test/resources/etsir/samples/lang/object.ts.json deleted file mode 100644 index 49c342744..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/lang/object.ts.json +++ /dev/null @@ -1,1414 +0,0 @@ -{ - "name": "lang/object.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": "main", - "type": { - "_": "UnknownType" - } - } - ], - "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" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "main", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "main", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "b", - "type": { - "_": "NumberType" - } - }, - { - "name": "c", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" - } - } - }, - { - "name": "obj", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp3", - "type": { - "_": "UnknownType" - } - } - ], - "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": "b", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" - } - } - }, - "right": { - "_": "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-_DEFAULT_ARK_CLASS-main-0" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - }, - "right": { - "_": "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-_DEFAULT_ARK_CLASS-main-1" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "obj", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - } - ] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "obj", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "method", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "obj", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "accessor", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp2", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "obj", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "accessor", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Constant", - "value": "new value", - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "obj", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "accessor", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp3", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" - }, - "name": "c1", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" - }, - "name": "c2", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "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" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" - }, - "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": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-0" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - }, - "name": "a", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - }, - "name": "b", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - }, - "name": "", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - }, - "name": "_value", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - } - ], - "methods": [ - { - "signature": { - "enclosingClass": { - "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": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "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": "method", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - }, - "name": "Get-accessor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Constant", - "value": "getter", - "type": { - "_": "StringType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - }, - "name": "Set-accessor", - "parameters": [ - { - "name": "value", - "type": { - "_": "UnknownType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - }, - { - "name": "value", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "value", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "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" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - }, - "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": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-main-1" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 524121725..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/BreadthFirstSearch.ts.json +++ /dev/null @@ -1,2165 +0,0 @@ -{ - "name": "loop/BreadthFirstSearch.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": "graph", - "type": { - "_": "UnclearReferenceType", - "name": "Graph" - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - }, - { - "name": "visitOrder", - "type": { - "_": "UnknownType" - } - }, - { - "name": "bfs", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "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": "$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_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "visitOrder", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "bfs", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "graph", - "type": { - "_": "UnclearReferenceType", - "name": "Graph" - } - }, - { - "_": "Constant", - "value": "a", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "Visit order:", - "type": { - "_": "StringType" - } - }, - { - "_": "Local", - "name": "visitOrder", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "bfs", - "parameters": [ - { - "name": "graph", - "type": { - "_": "UnclearReferenceType", - "name": "Graph" - }, - "isOptional": false - }, - { - "name": "startNode", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "graph", - "type": { - "_": "UnclearReferenceType", - "name": "Graph" - } - }, - { - "name": "startNode", - "type": { - "_": "StringType" - } - }, - { - "name": "visited", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - { - "name": "queue", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - { - "name": "node", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp3", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - { - "name": "neighbours", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp5", - "type": { - "_": "ClassType", - "signature": { - "name": "Iterator" - } - } - }, - { - "name": "$temp6", - "type": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - { - "name": "$temp7", - "type": { - "_": "BooleanType" - } - }, - { - "name": "$temp8", - "type": { - "_": "UnknownType" - } - }, - { - "name": "neighbour", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp9", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp10", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "graph", - "type": { - "_": "UnclearReferenceType", - "name": "Graph" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnclearReferenceType", - "name": "Graph" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "startNode", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "StringType" - } - } - }, - { - "_": "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": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "AnyType" - }, - "size": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "visited", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "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": { - "_": "Local", - "name": "startNode", - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "queue", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - } - } - ] - }, - { - "id": 1, - "successors": [ - 2 - ], - "predecessors": [], - "stmts": [] - }, - { - "id": 2, - "successors": [ - 3, - 4 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "queue", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "length", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": ">", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 3, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "visited", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - } - } - ] - }, - { - "id": 4, - "successors": [ - 2, - 5 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "node", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "queue", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "shift", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "visited", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "includes", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "node", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "UnopExpr", - "op": "!", - "arg": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!=", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 5, - "successors": [ - 6 - ], - "predecessors": [], - "stmts": [ - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "visited", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "push", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "node", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "neighbours", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "graph", - "type": { - "_": "UnclearReferenceType", - "name": "Graph" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "node", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "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": 6, - "successors": [ - 2, - 7 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - "right": { - "_": "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": "$temp7", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - "field": { - "enclosingClass": { - "name": "IteratorResult" - }, - "name": "done", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "==", - "left": { - "_": "Local", - "name": "$temp7", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "Constant", - "value": "true", - "type": { - "_": "BooleanType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 7, - "successors": [ - 6, - 8 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - "field": { - "enclosingClass": { - "name": "IteratorResult" - }, - "name": "value", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "neighbour", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "CastExpr", - "arg": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "UnknownType" - } - }, - "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp9", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "visited", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "includes", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "neighbour", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp10", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "UnopExpr", - "op": "!", - "arg": { - "_": "Local", - "name": "$temp9", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!=", - "left": { - "_": "Local", - "name": "$temp10", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 8, - "successors": [ - 6 - ], - "predecessors": [], - "stmts": [ - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "queue", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "push", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "neighbour", - "type": { - "_": "UnknownType" - } - } - ] - } - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Graph" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Graph" - }, - "name": "IndexSignature-Graph-0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - } - ], - "methods": [] - }, - { - "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": "a", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "name": "b", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "name": "c", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "name": "d", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "name": "e", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "name": "f", - "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": { - "_": "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" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "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": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index d0f9de350..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/DepthFirstSearch.ts.json +++ /dev/null @@ -1,3332 +0,0 @@ -{ - "name": "loop/DepthFirstSearch.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": "tree", - "type": { - "_": "UnclearReferenceType", - "name": "TreeNode" - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - }, - { - "name": "traversalResult", - "type": { - "_": "UnknownType" - } - }, - { - "name": "iterativeDFS", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "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": "$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_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "traversalResult", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "iterativeDFS", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "tree", - "type": { - "_": "UnclearReferenceType", - "name": "TreeNode" - } - } - ] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "Iterative DFS result:", - "type": { - "_": "StringType" - } - }, - { - "_": "Local", - "name": "traversalResult", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "iterativeDFS", - "parameters": [ - { - "name": "root", - "type": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - }, - "isOptional": false - } - ], - "returnType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "root", - "type": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - } - }, - { - "name": "$temp0", - "type": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - } - }, - { - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - { - "name": "stack", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - "dimensions": 1 - } - }, - { - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - }, - "dimensions": 1 - } - }, - { - "name": "result", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - { - "name": "node", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp5", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp6", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp7", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp8", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp9", - "type": { - "_": "UnknownType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [ - 1, - 9 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "root", - "type": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - } - } - }, - { - "_": "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": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - } - }, - "right": { - "_": "UnopExpr", - "op": "!", - "arg": { - "_": "Local", - "name": "root", - "type": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!=", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 1, - "successors": [ - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - }, - "size": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - } - }, - "right": { - "_": "Local", - "name": "root", - "type": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "stack", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - "dimensions": 1 - } - }, - "right": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - { - "_": "UndefinedType" - } - ] - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "AnyType" - }, - "size": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "result", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - } - } - ] - }, - { - "id": 2, - "successors": [ - 3, - 4 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "stack", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - "dimensions": 1 - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "length", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!=", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 3, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "result", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - } - ] - }, - { - "id": 4, - "successors": [ - 2, - 5 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "node", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "stack", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - "dimensions": 1 - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "pop", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!=", - "left": { - "_": "Local", - "name": "node", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 5, - "successors": [ - 6, - 8 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "node", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "value", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "result", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "push", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp5", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "node", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "right", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!=", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 6, - "successors": [ - 2, - 7 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "node", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "left", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!=", - "left": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 7, - "successors": [ - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp9", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "node", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "left", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "stack", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - "dimensions": 1 - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "push", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp9", - "type": { - "_": "UnknownType" - } - } - ] - } - } - ] - }, - { - "id": 8, - "successors": [ - 6 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp7", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "node", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "right", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "stack", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnclearReferenceType", - "name": "TreeNode" - }, - "dimensions": 1 - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "push", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp7", - "type": { - "_": "UnknownType" - } - } - ] - } - } - ] - }, - { - "id": 9, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "AnyType" - }, - "size": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - } - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "TreeNode" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "TreeNode" - }, - "name": "value", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "TreeNode" - }, - "name": "left", - "type": { - "_": "UnclearReferenceType", - "name": "TreeNode" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": true, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "TreeNode" - }, - "name": "right", - "type": { - "_": "UnclearReferenceType", - "name": "TreeNode" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": true, - "exclamationToken": false - } - ], - "methods": [] - }, - { - "signature": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" - }, - "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-1-@instance_init-2" - }, - "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-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" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" - }, - "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": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-2" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" - }, - "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-1-@instance_init-3" - }, - "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-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" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" - }, - "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": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1-@instance_init-3" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" - }, - "name": "value", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" - }, - "name": "left", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" - }, - "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-1" - }, - "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-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" - } - } - } - ], - "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": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" - }, - "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": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-1" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "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": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" - }, - "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": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-5" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "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": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" - }, - "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": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4-@instance_init-6" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "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": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" - }, - "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": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0-@instance_init-4" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "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" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "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": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 3c62c8ca9..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/DijkstrasAlgorithm.ts.json +++ /dev/null @@ -1,3572 +0,0 @@ -{ - "name": "loop/DijkstrasAlgorithm.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": "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 - } - }, - { - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp4", - "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 - } - }, - { - "name": "dijkstra", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp5", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "NumberType" - }, - "size": { - "_": "Constant", - "value": "4", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "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": "2", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "4", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "3", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "NumberType" - }, - "size": { - "_": "Constant", - "value": "4", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "3", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "4", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "NumberType" - }, - "size": { - "_": "Constant", - "value": "4", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "4", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "3", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "NumberType" - }, - "size": { - "_": "Constant", - "value": "4", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "4", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "3", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp4", - "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 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "size": { - "_": "Constant", - "value": "4", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp4", - "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 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp4", - "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 - } - }, - "index": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - } - }, - "right": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp4", - "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 - } - }, - "index": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - } - }, - "right": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp4", - "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 - } - }, - "index": { - "_": "Constant", - "value": "3", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - } - }, - "right": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "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 - } - }, - "right": { - "_": "Local", - "name": "$temp4", - "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 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "dijkstra", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "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 - } - }, - { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - ] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "Shortest paths from vertex 0:", - "type": { - "_": "StringType" - } - }, - { - "_": "Local", - "name": "$temp5", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "dijkstra", - "parameters": [ - { - "name": "graph", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - }, - "isOptional": false - }, - { - "name": "startVertex", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "graph", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - { - "name": "startVertex", - "type": { - "_": "NumberType" - } - }, - { - "name": "distances", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "Infinity", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - { - "name": "visited", - "type": { - "_": "ArrayType", - "elementType": { - "_": "BooleanType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - { - "name": "i", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp3", - "type": { - "_": "UnknownType" - } - }, - { - "name": "minDistance", - "type": { - "_": "NumberType" - } - }, - { - "name": "minIndex", - "type": { - "_": "NumberType" - } - }, - { - "name": "v", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp5", - "type": { - "_": "BooleanType" - } - }, - { - "name": "$temp6", - "type": { - "_": "BooleanType" - } - }, - { - "name": "$temp7", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp8", - "type": { - "_": "BooleanType" - } - }, - { - "name": "$temp9", - "type": { - "_": "BooleanType" - } - }, - { - "name": "$temp10", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp11", - "type": { - "_": "BooleanType" - } - }, - { - "name": "$temp12", - "type": { - "_": "BooleanType" - } - }, - { - "name": "$temp13", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp14", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp15", - "type": { - "_": "BooleanType" - } - }, - { - "name": "$temp16", - "type": { - "_": "BooleanType" - } - }, - { - "name": "$temp17", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp18", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp19", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp20", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp21", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp22", - "type": { - "_": "BooleanType" - } - }, - { - "name": "$temp23", - "type": { - "_": "BooleanType" - } - }, - { - "name": "$temp24", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp25", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp26", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp27", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "graph", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "startVertex", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "AnyType" - }, - "size": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "graph", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "length", - "type": { - "_": "UnknownType" - } - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "distances", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "fill", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "Infinity", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "distances", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "startVertex", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "AnyType" - }, - "size": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "graph", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "length", - "type": { - "_": "UnknownType" - } - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "visited", - "type": { - "_": "ArrayType", - "elementType": { - "_": "BooleanType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "fill", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "false", - "type": { - "_": "BooleanType" - } - } - ] - } - } - ] - }, - { - "id": 1, - "successors": [ - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 2, - "successors": [ - 3, - 4 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "graph", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "length", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "BinopExpr", - "op": "-", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "UnknownType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 3, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "distances", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - } - ] - }, - { - "id": 4, - "successors": [ - 5 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "minDistance", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "Infinity", - "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "minIndex", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "UnopExpr", - "op": "-", - "arg": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 5, - "successors": [ - 6, - 11 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "graph", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "length", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 6, - "successors": [ - 7 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "visited", - "type": { - "_": "ArrayType", - "elementType": { - "_": "BooleanType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "minIndex", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "Constant", - "value": "true", - "type": { - "_": "BooleanType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 7, - "successors": [ - 2, - 8 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp10", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "graph", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "length", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "$temp10", - "type": { - "_": "UnknownType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 8, - "successors": [ - 9, - 10 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp11", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "visited", - "type": { - "_": "ArrayType", - "elementType": { - "_": "BooleanType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp12", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "UnopExpr", - "op": "!", - "arg": { - "_": "Local", - "name": "$temp11", - "type": { - "_": "BooleanType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp13", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "graph", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "minIndex", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp14", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp13", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp15", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "ConditionExpr", - "op": "!==", - "left": { - "_": "Local", - "name": "$temp14", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp16", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "BinopExpr", - "op": "&&", - "left": { - "_": "Local", - "name": "$temp12", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "Local", - "name": "$temp15", - "type": { - "_": "BooleanType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp17", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "distances", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "minIndex", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp18", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "graph", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "minIndex", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp19", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp18", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp20", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp17", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "$temp19", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp21", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "distances", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp22", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "$temp20", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "$temp21", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp23", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "BinopExpr", - "op": "&&", - "left": { - "_": "Local", - "name": "$temp16", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "Local", - "name": "$temp22", - "type": { - "_": "BooleanType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!=", - "left": { - "_": "Local", - "name": "$temp23", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 9, - "successors": [ - 7 - ], - "predecessors": [], - "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": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp24", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "distances", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "minIndex", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp25", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "graph", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "minIndex", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp26", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp25", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp27", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp24", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "$temp26", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "distances", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "$temp27", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 11, - "successors": [ - 12, - 13 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "visited", - "type": { - "_": "ArrayType", - "elementType": { - "_": "BooleanType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "UnopExpr", - "op": "!", - "arg": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "BooleanType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp7", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "distances", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "ConditionExpr", - "op": "<=", - "left": { - "_": "Local", - "name": "$temp7", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "minDistance", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp9", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "BinopExpr", - "op": "&&", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "BooleanType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!=", - "left": { - "_": "Local", - "name": "$temp9", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 12, - "successors": [ - 5 - ], - "predecessors": [], - "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": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "minDistance", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "distances", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "minIndex", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - } - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 01a4f8c27..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/DoWhileLoop.ts.json +++ /dev/null @@ -1,283 +0,0 @@ -{ - "name": "loop/DoWhileLoop.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": "count", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp1", - "type": { - "_": "StringType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": "count", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 1, - "successors": [ - 1, - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Constant", - "value": "Count is ", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Local", - "name": "count", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp1", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "count", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "count", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "count", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 2, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index e33ef2eb0..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/ForInLoop.ts.json +++ /dev/null @@ -1,895 +0,0 @@ -{ - "name": "loop/ForInLoop.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": "person", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "Iterator" - } - } - }, - { - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - { - "name": "$temp3", - "type": { - "_": "BooleanType" - } - }, - { - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - { - "name": "key", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp5", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp6", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp7", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp8", - "type": { - "_": "StringType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "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": "$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": "person", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "Iterator" - } - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "person", - "type": { - "_": "ClassType", - "signature": { - "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": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "Iterator" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "next", - "parameters": [], - "returnType": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - "field": { - "enclosingClass": { - "name": "IteratorResult" - }, - "name": "done", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "==", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "Constant", - "value": "true", - "type": { - "_": "BooleanType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 2, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnVoidStmt" - } - ] - }, - { - "id": 3, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "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" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Constant", - "value": "", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Local", - "name": "key", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": ": ", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp7", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "person", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "key", - "type": { - "_": "UnknownType" - } - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp7", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp8", - "type": { - "_": "StringType" - } - } - ] - } - } - ] - } - ] - } - } - } - ] - }, - { - "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": "firstName", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "name": "lastName", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "name": "age", - "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": "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" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "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": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index e35bd8de6..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/MatrixMultiplication.ts.json +++ /dev/null @@ -1,2852 +0,0 @@ -{ - "name": "loop/MatrixMultiplication.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": "A", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - { - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - { - "name": "B", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - { - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp4", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp5", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - { - "name": "product", - "type": { - "_": "UnknownType" - } - }, - { - "name": "multiplyMatrices", - "type": { - "_": "UnknownType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "NumberType" - }, - "size": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "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": "2", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "NumberType" - }, - "size": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "3", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "4", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "size": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - } - }, - "right": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "A", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - "right": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "NumberType" - }, - "size": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "NumberType" - }, - "size": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "size": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - } - }, - "right": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - } - }, - "right": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "B", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - "right": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "product", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "multiplyMatrices", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "A", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - }, - { - "_": "Local", - "name": "B", - "type": { - "_": "ArrayType", - "elementType": { - "_": "UnionType", - "types": [ - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - ] - }, - "dimensions": 1 - } - } - ] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "Product of matrices A and B is:", - "type": { - "_": "StringType" - } - }, - { - "_": "Local", - "name": "product", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "multiplyMatrices", - "parameters": [ - { - "name": "A", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - }, - "isOptional": false - }, - { - "name": "B", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - }, - "isOptional": false - } - ], - "returnType": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "A", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - { - "name": "B", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - { - "name": "rowsA", - "type": { - "_": "UnknownType" - } - }, - { - "name": "colsA", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "rowsB", - "type": { - "_": "UnknownType" - } - }, - { - "name": "colsB", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "result", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" - } - } - }, - { - "name": "AnonymousMethod-multiplyMatrices-0", - "type": { - "_": "FunctionType", - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "AnonymousMethod-multiplyMatrices-0", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - } - } - }, - { - "name": "Array", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp3", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - { - "name": "i", - "type": { - "_": "NumberType" - } - }, - { - "name": "j", - "type": { - "_": "NumberType" - } - }, - { - "name": "k", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp5", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp6", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp7", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp8", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp9", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [ - 1, - 9 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "A", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "B", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - } - }, - { - "_": "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": "rowsA", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "A", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "length", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "A", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "colsA", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "length", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "rowsB", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "B", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "length", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "B", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "colsB", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "length", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "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": { - "_": "Local", - "name": "result", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "Array", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "from", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" - } - } - }, - { - "_": "Local", - "name": "AnonymousMethod-multiplyMatrices-0", - "type": { - "_": "FunctionType", - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "AnonymousMethod-multiplyMatrices-0", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - } - } - } - ] - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "!==", - "left": { - "_": "Local", - "name": "colsA", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Local", - "name": "rowsB", - "type": { - "_": "UnknownType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 1, - "successors": [ - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 2, - "successors": [ - 3, - 4 - ], - "predecessors": [], - "stmts": [ - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "rowsA", - "type": { - "_": "UnknownType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 3, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "result", - "type": { - "_": "UnknownType" - } - } - } - ] - }, - { - "id": 4, - "successors": [ - 5 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "j", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 5, - "successors": [ - 2, - 6 - ], - "predecessors": [], - "stmts": [ - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "j", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "colsB", - "type": { - "_": "UnknownType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 6, - "successors": [ - 7 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 7, - "successors": [ - 5, - 8 - ], - "predecessors": [], - "stmts": [ - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "colsA", - "type": { - "_": "UnknownType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 8, - "successors": [ - 7 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "result", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "i", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "A", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp7", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "B", - "type": { - "_": "ArrayType", - "elementType": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp7", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "j", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp9", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "*", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "j", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "UnknownType" - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "j", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "$temp9", - "type": { - "_": "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" - } - } - } - } - ] - }, - { - "id": 9, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - "method": { - "enclosingClass": { - "name": "Error" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "Columns of A must match rows of B", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ThrowStmt", - "arg": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "AnonymousMethod-multiplyMatrices-0", - "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": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" - }, - "name": "length", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "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" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" - }, - "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": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-multiplyMatrices-0" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index 415e87ebb..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/NestedLoops.ts.json +++ /dev/null @@ -1,1328 +0,0 @@ -{ - "name": "loop/NestedLoops.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": "colors", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - { - "name": "sizes", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - { - "name": "combinations", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "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": { - "_": "UnknownType" - } - }, - { - "name": "$temp7", - "type": { - "_": "ClassType", - "signature": { - "name": "Iterator" - } - } - }, - { - "name": "$temp8", - "type": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - { - "name": "$temp9", - "type": { - "_": "BooleanType" - } - }, - { - "name": "$temp10", - "type": { - "_": "UnknownType" - } - }, - { - "name": "size", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp11", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "StringType" - }, - "size": { - "_": "Constant", - "value": "3", - "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": "red", - "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": "green", - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "blue", - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "colors", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "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": "3", - "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": "small", - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "medium", - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "large", - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "sizes", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "AnyType" - }, - "size": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "combinations", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - } - } - ] - }, - { - "id": 1, - "successors": [ - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ClassType", - "signature": { - "name": "Iterator" - } - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "colors", - "type": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "iterator", - "parameters": [], - "returnType": { - "_": "ClassType", - "signature": { - "name": "Iterator" - } - } - }, - "args": [] - } - } - ] - }, - { - "id": 2, - "successors": [ - 3, - 4 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "ClassType", - "signature": { - "name": "Iterator" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "next", - "parameters": [], - "returnType": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - "field": { - "enclosingClass": { - "name": "IteratorResult" - }, - "name": "done", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "==", - "left": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "Constant", - "value": "true", - "type": { - "_": "BooleanType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 3, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "Color and size combinations:", - "type": { - "_": "StringType" - } - }, - { - "_": "Local", - "name": "combinations", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - }, - { - "id": 4, - "successors": [ - 5 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - "field": { - "enclosingClass": { - "name": "IteratorResult" - }, - "name": "value", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "color", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "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": { - "_": "ArrayType", - "elementType": { - "_": "StringType" - }, - "dimensions": 1 - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "iterator", - "parameters": [], - "returnType": { - "_": "ClassType", - "signature": { - "name": "Iterator" - } - } - }, - "args": [] - } - } - ] - }, - { - "id": 5, - "successors": [ - 2, - 6 - ], - "predecessors": [], - "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": "$temp9", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - "field": { - "enclosingClass": { - "name": "IteratorResult" - }, - "name": "done", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "==", - "left": { - "_": "Local", - "name": "$temp9", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "Constant", - "value": "true", - "type": { - "_": "BooleanType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 6, - "successors": [ - 5 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp10", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "ClassType", - "signature": { - "name": "IteratorResult" - } - } - }, - "field": { - "enclosingClass": { - "name": "IteratorResult" - }, - "name": "value", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "size", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "CastExpr", - "arg": { - "_": "Local", - "name": "$temp10", - "type": { - "_": "UnknownType" - } - }, - "type": { - "_": "UnknownType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp11", - "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": "$temp11", - "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": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "combinations", - "type": { - "_": "ArrayType", - "elementType": { - "_": "AnyType" - }, - "dimensions": 1 - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "push", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp11", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - } - ] - } - } - ] - } - ] - } - } - } - ] - }, - { - "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": "color", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "name": "size", - "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" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "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": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file 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 deleted file mode 100644 index d956e5b75..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/loop/WhileLoop.ts.json +++ /dev/null @@ -1,292 +0,0 @@ -{ - "name": "loop/WhileLoop.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": "counter", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp0", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp1", - "type": { - "_": "StringType" - } - }, - { - "name": "console", - "type": { - "_": "UnknownType" - } - } - ], - "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": "counter", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 1, - "successors": [ - 2, - 3 - ], - "predecessors": [], - "stmts": [ - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "counter", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 2, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnVoidStmt" - } - ] - }, - { - "id": 3, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Constant", - "value": "Counter is ", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Local", - "name": "counter", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "console", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "log", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp1", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "counter", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "counter", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [], - "exportInfos": [] -} \ No newline at end of file diff --git a/jacodb-ets/src/test/resources/etsir/samples/save/basic.ts.json b/jacodb-ets/src/test/resources/etsir/samples/save/basic.ts.json deleted file mode 100644 index 6ed227019..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/save/basic.ts.json +++ /dev/null @@ -1,10687 +0,0 @@ -{ - "name": "save/basic.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": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" - } - } - }, - { - "name": "configure", - "type": { - "_": "UnknownType" - } - }, - { - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - { - "name": "getLogger", - "type": { - "_": "UnknownType" - } - }, - { - "name": "someClass", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" - } - } - }, - { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" - } - } - }, - { - "name": "m", - "type": { - "_": "ClassType", - "signature": { - "name": "someClass" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "someClass" - } - } - }, - { - "name": "x", - "type": { - "_": "NumberType" - } - }, - { - "name": "soo", - "type": { - "_": "NumberType" - } - }, - { - "name": "forLoopTest", - "type": { - "_": "UnknownType" - } - }, - { - "name": "controlTest", - "type": { - "_": "UnknownType" - } - }, - { - "name": "deleteTest", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "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": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "configure", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" - } - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "getLogger", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "someClass", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" - } - } - }, - "right": { - "_": "Local", - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "someClass" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "someClass" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "someClass" - } - } - }, - "method": { - "enclosingClass": { - "name": "someClass" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "Hello, world", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "m", - "type": { - "_": "ClassType", - "signature": { - "name": "someClass" - } - } - }, - "right": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "someClass" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "x", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "soo", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "123", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "forLoopTest", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "controlTest", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "deleteTest", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "forLoopTest", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "myPerson", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - { - "name": "i", - "type": { - "_": "NumberType" - } - }, - { - "name": "newAge", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "logger", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "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": { - "_": "Local", - "name": "myPerson", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 1, - "successors": [ - 2, - 3 - ], - "predecessors": [], - "stmts": [ - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "10", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 2, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnVoidStmt" - } - ] - }, - { - "id": 3, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "myPerson", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "age", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "newAge", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "newAge", - "type": { - "_": "UnknownType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "controlTest", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "sampleData", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "i", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp2", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp3", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp4", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp5", - "type": { - "_": "StringType" - } - }, - { - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp6", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp7", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp8", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp9", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp10", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp11", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp12", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp13", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp14", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp15", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp16", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp17", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp18", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp19", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp20", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp21", - "type": { - "_": "StringType" - } - }, - { - "name": "count", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp22", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp23", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp24", - "type": { - "_": "StringType" - } - }, - { - "name": "j", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp25", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp26", - "type": { - "_": "StringType" - } - }, - { - "name": "k", - "type": { - "_": "NumberType" - } - }, - { - "name": "$temp27", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp28", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp29", - "type": { - "_": "StringType" - } - } - ], - "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": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "NumberType" - }, - "size": { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "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": "2", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "3", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "3", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "4", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "4", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "sampleData", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - } - ] - }, - { - "id": 1, - "successors": [ - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 2, - "successors": [ - 3, - 4 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "sampleData", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "length", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "UnknownType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 3, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnVoidStmt" - } - ] - }, - { - "id": 4, - "successors": [ - 5, - 23 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "sampleData", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "%", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "===", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 5, - "successors": [ - 6 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Constant", - "value": "", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "sampleData", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp7", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp6", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": " 是奇数", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp7", - "type": { - "_": "StringType" - } - } - ] - } - } - ] - }, - { - "id": 6, - "successors": [ - 7, - 20, - 21, - 22 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "sampleData", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp9", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "%", - "left": { - "_": "Local", - "name": "$temp8", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "3", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp10", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "sampleData", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp11", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "$temp9", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp12", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "sampleData", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp13", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "$temp9", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp14", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "sampleData", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp15", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "$temp9", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 7, - "successors": [ - 8 - ], - "predecessors": [], - "stmts": [ - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "无法判断", - "type": { - "_": "StringType" - } - } - ] - } - } - ] - }, - { - "id": 8, - "successors": [ - 9 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "count", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 9, - "successors": [ - 10, - 19 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp22", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "sampleData", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "count", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "$temp22", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 10, - "successors": [ - 11 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "j", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 11, - "successors": [ - 12, - 16 - ], - "predecessors": [], - "stmts": [ - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "j", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "5", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 12, - "successors": [ - 13 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 13, - "successors": [ - 14, - 15 - ], - "predecessors": [], - "stmts": [ - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "3", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 14, - "successors": [ - 2 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - } - ] - }, - { - "id": 15, - "successors": [ - 13, - 14 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp27", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Constant", - "value": "外层循环计数: ", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp28", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp27", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp28", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp29", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Constant", - "value": "Department name: ", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp29", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "===", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - } - ] - }, - { - "id": 16, - "successors": [ - 17, - 18 - ], - "predecessors": [], - "stmts": [ - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "===", - "left": { - "_": "Local", - "name": "j", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 17, - "successors": [ - 18 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp25", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Constant", - "value": "当前内层循环计数: ", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Local", - "name": "j", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp26", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp25", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp26", - "type": { - "_": "StringType" - } - } - ] - } - } - ] - }, - { - "id": 18, - "successors": [ - 11 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "j", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "j", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - } - ] - }, - { - "id": 19, - "successors": [ - 9 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp23", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Constant", - "value": "当前计数: ", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Local", - "name": "count", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp24", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp23", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": "", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp24", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "count", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "count", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - } - ] - }, - { - "id": 20, - "successors": [ - 8 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp16", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Constant", - "value": "", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "sampleData", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp17", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp16", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": " 除以 3 余 2", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp17", - "type": { - "_": "StringType" - } - } - ] - } - } - ] - }, - { - "id": 21, - "successors": [ - 8 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp18", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Constant", - "value": "", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "sampleData", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp19", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp18", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": " 除以 3 余 1", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp19", - "type": { - "_": "StringType" - } - } - ] - } - } - ] - }, - { - "id": 22, - "successors": [ - 8 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp20", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Constant", - "value": "", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "sampleData", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp21", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp20", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": " 可被 3 整除", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp21", - "type": { - "_": "StringType" - } - } - ] - } - } - ] - }, - { - "id": 23, - "successors": [ - 6 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Constant", - "value": "", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "sampleData", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Local", - "name": "i", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp5", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp4", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "Constant", - "value": " 是偶数", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "$temp5", - "type": { - "_": "StringType" - } - } - ] - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "classMethodTest", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [ - "ExportKeyword" - ], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "notPerson", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - { - "name": "x", - "type": { - "_": "ClassType", - "signature": { - "name": "Map" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "Map" - } - } - }, - { - "name": "z", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - { - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - { - "name": "y", - "type": { - "_": "UnknownType" - } - }, - { - "name": "controlTest", - "type": { - "_": "UnknownType" - } - }, - { - "name": "a", - "type": { - "_": "UnknownType" - } - }, - { - "name": "Person", - "type": { - "_": "UnknownType" - } - } - ], - "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": { - "_": "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": { - "_": "Local", - "name": "notPerson", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "Map" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "Map" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "Map" - } - } - }, - "method": { - "enclosingClass": { - "name": "Map" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "x", - "type": { - "_": "ClassType", - "signature": { - "name": "Map" - } - } - }, - "right": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "Map" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - "method": { - "enclosingClass": { - "name": "Error" - }, - "name": "constructor", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "z", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - }, - "right": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "ClassType", - "signature": { - "name": "Error" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "y", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "StaticCallExpr", - "method": { - "enclosingClass": { - "name": "" - }, - "name": "controlTest", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "a", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "notPerson", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "age", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "notPerson", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "growOld", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "Person", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "wooooof", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "foo", - "parameters": [ - { - "name": "x", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "NumberType" - } - }, - "modifiers": [ - "ExportKeyword" - ], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "x", - "type": { - "_": "NumberType" - } - }, - { - "name": "y", - "type": { - "_": "NumberType" - } - }, - { - "name": "k", - "type": { - "_": "NumberType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "x", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "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": "y", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 1, - "successors": [ - 2, - 3 - ], - "predecessors": [], - "stmts": [ - { - "_": "IfStmt", - "condition": { - "_": "ConditionExpr", - "op": "<", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "x", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "BooleanType" - } - } - } - ] - }, - { - "id": 2, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "y", - "type": { - "_": "NumberType" - } - } - } - ] - }, - { - "id": 3, - "successors": [ - 1 - ], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "y", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "y", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "k", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "1", - "type": { - "_": "NumberType" - } - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "listParameters", - "parameters": [ - { - "name": "u", - "type": { - "_": "NumberType" - }, - "isOptional": false - }, - { - "name": "v", - "type": { - "_": "NumberType" - }, - "isOptional": false - }, - { - "name": "w", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-0" - } - } - }, - "modifiers": [ - "ExportKeyword" - ], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "u", - "type": { - "_": "NumberType" - } - }, - { - "name": "v", - "type": { - "_": "NumberType" - } - }, - { - "name": "w", - "type": { - "_": "StringType" - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" - } - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "u", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "v", - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "ParameterRef", - "index": 1, - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "w", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ParameterRef", - "index": 2, - "type": { - "_": "StringType" - } - } - }, - { - "_": "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": { - "_": "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": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" - } - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "_DEFAULT_ARK_CLASS" - }, - "name": "deleteTest", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "_DEFAULT_ARK_CLASS" - } - } - }, - { - "name": "x", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - } - } - }, - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - } - } - }, - { - "name": "bbb", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - { - "name": "$temp1", - "type": { - "_": "BooleanType" - } - }, - { - "name": "$temp2", - "type": { - "_": "BooleanType" - } - }, - { - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - { - "name": "$temp3", - "type": { - "_": "BooleanType" - } - } - ], - "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": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - } - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - }, - "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" - } - }, - "right": { - "_": "DeleteExpr", - "arg": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "x", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "a", - "type": { - "_": "UnknownType" - } - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp2", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "DeleteExpr", - "arg": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "bbb", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "x", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - } - } - } - ] - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp3", - "type": { - "_": "BooleanType" - } - }, - "right": { - "_": "DeleteExpr", - "arg": { - "_": "Local", - "name": "x", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - } - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Person" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Person" - }, - "name": "x", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "Person" - }, - "name": "growOld", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - } - ], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "Person" - }, - "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": "Person" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - "field": { - "enclosingClass": { - "name": "Person" - }, - "name": "x", - "type": { - "_": "NumberType" - } - } - }, - "right": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - "field": { - "enclosingClass": { - "name": "Person" - }, - "name": "growOld", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "AnonymousMethod-@instance_init-0", - "type": { - "_": "FunctionType", - "signature": { - "enclosingClass": { - "name": "Person" - }, - "name": "AnonymousMethod-@instance_init-0", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Person" - }, - "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": "Person" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Person" - }, - "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": "getAge", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [ - "PublicKeyword" - ], - "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" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - } - ] - } - ] - } - } - }, - { - "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": "wooooof", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [ - "StaticKeyword" - ], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - }, - { - "name": "logger", - "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" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "logger", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "info", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Constant", - "value": "not a person sound", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Alarm" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "Alarm" - }, - "name": "alert", - "parameters": [], - "returnType": { - "_": "VoidType" - } - }, - "modifiers": [], - "typeParameters": [], - "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": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Door" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Door" - }, - "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": "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": "Door" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "Door" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "Adder" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "Adder" - }, - "name": "add", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - } - ], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "Adder" - }, - "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": "Adder" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Adder" - } - } - }, - "field": { - "enclosingClass": { - "name": "Adder" - }, - "name": "add", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "AnonymousMethod-@instance_init-0", - "type": { - "_": "FunctionType", - "signature": { - "enclosingClass": { - "name": "Adder" - }, - "name": "AnonymousMethod-@instance_init-0", - "parameters": [ - { - "name": "b", - "type": { - "_": "StringType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "StringType" - } - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "Adder" - }, - "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": "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" - } - }, - { - "name": "$temp1", - "type": { - "_": "StringType" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "b", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Adder" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "Adder" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceFieldRef", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "Adder" - } - } - }, - "field": { - "enclosingClass": { - "name": "" - }, - "name": "a", - "type": { - "_": "UnknownType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "StringType" - } - }, - "right": { - "_": "BinopExpr", - "op": "+", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "Local", - "name": "b", - "type": { - "_": "StringType" - } - } - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "StringType" - } - } - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "ExtendedAdder" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "Adder", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "ExtendedAdder" - }, - "name": "superAdd", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [ - "PrivateKeyword" - ], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "ExtendedAdder" - }, - "name": "add", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - } - ], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "ExtendedAdder" - }, - "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": "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": { - "_": "FunctionType", - "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": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "StringType" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ExtendedAdder" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "name": "ExtendedAdder" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - }, - "right": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "ExtendedAdder" - } - } - }, - "method": { - "enclosingClass": { - "name": "" - }, - "name": "superAdd", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [ - { - "_": "Local", - "name": "b", - "type": { - "_": "StringType" - } - } - ] - } - }, - { - "_": "ReturnStmt", - "arg": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "UnknownType" - } - } - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "ExtendedAdder" - }, - "name": "constructor", - "parameters": [ - { - "name": "a", - "type": { - "_": "NumberType" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "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": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "ExtendedAdder" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "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" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "AnonymousClass-0" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-0" - }, - "name": "x", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-0" - }, - "name": "y", - "type": { - "_": "NumberType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-0" - }, - "name": "z", - "type": { - "_": "StringType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - } - ], - "methods": [] - }, - { - "signature": { - "name": "AnonymousClass-SecurityDoor-@instance_init-1" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-SecurityDoor-@instance_init-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-SecurityDoor-@instance_init-1" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-SecurityDoor-@instance_init-1" - }, - "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-SecurityDoor-@instance_init-1" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-SecurityDoor-@instance_init-1" - }, - "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": "AnonymousClass-SecurityDoor-@instance_init-1" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-SecurityDoor-@instance_init-1" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "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": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "Person" - } - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "successors": [], - "predecessors": [], - "stmts": [ - { - "_": "AssignStmt", - "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": { - "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" - } - }, - "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" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "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" - } - }, - "args": [] - } - }, - { - "_": "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": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" - }, - "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": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3-@instance_init-4" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "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": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" - }, - "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": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "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": { - "_": "Constant", - "value": "info", - "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": "enableCallStack", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Constant", - "value": "false", - "type": { - "_": "BooleanType" - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" - }, - "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": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" - }, - "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" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" - } - } - } - ], - "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-6" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" - } - } - }, - "right": { - "_": "NewExpr", - "classType": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" - } - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" - }, - "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-6" - } - } - }, - "field": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" - }, - "name": "default", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6-@instance_init-7" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" - }, - "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": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" - }, - "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": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - } - ], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" - } - } - }, - { - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" - } - } - } - ], - "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-2" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-3" - } - } - }, - "right": { - "_": "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": "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": { - "_": "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": "categories", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "$temp1", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2-@instance_init-6" - } - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" - }, - "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": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-2" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" - }, - "modifiers": [], - "typeParameters": [ - { - "_": "UNKNOWN_TYPE", - "type": "Type" - } - ], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" - }, - "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": { - "_": "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" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" - }, - "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" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" - }, - "name": "constructor", - "parameters": [ - { - "name": "value", - "type": { - "_": "UnclearReferenceType", - "name": "Type" - }, - "isOptional": false - } - ], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" - } - } - }, - { - "name": "value", - "type": { - "_": "UnclearReferenceType", - "name": "Type" - } - } - ], - "cfg": { - "blocks": [ - { - "id": 0, - "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": "value", - "type": { - "_": "UnclearReferenceType", - "name": "Type" - } - }, - "right": { - "_": "ParameterRef", - "index": 0, - "type": { - "_": "UnclearReferenceType", - "name": "Type" - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "Local", - "name": "this", - "type": { - "_": "ClassType", - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-8" - } - } - }, - "right": { - "_": "ThisRef", - "type": { - "_": "ClassType", - "signature": { - "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" - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" - }, - "name": "x", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" - }, - "name": "y", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" - }, - "name": "z", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - } - ], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" - }, - "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-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" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" - }, - "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": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-listParameters-9" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - }, - { - "signature": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - }, - "modifiers": [], - "typeParameters": [], - "superClassName": "", - "implementedInterfaceNames": [], - "fields": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - }, - "name": "a", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - }, - "name": "b", - "type": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "questionToken": false, - "exclamationToken": false - } - ], - "methods": [ - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "modifiers": [], - "typeParameters": [], - "body": { - "locals": [ - { - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "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-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": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "right": { - "_": "NewArrayExpr", - "elementType": { - "_": "NumberType" - }, - "size": { - "_": "Constant", - "value": "2", - "type": { - "_": "NumberType" - } - } - } - }, - { - "_": "AssignStmt", - "left": { - "_": "ArrayRef", - "array": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - }, - "index": { - "_": "Constant", - "value": "0", - "type": { - "_": "NumberType" - } - }, - "type": { - "_": "NumberType" - } - }, - "right": { - "_": "Constant", - "value": "5", - "type": { - "_": "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" - } - } - }, - { - "_": "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": "b", - "type": { - "_": "UnknownType" - } - } - }, - "right": { - "_": "Local", - "name": "$temp0", - "type": { - "_": "ArrayType", - "elementType": { - "_": "NumberType" - }, - "dimensions": 1 - } - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - }, - "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": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-deleteTest-10" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "ReturnVoidStmt" - } - ] - } - ] - } - } - } - ] - } - ], - "importInfos": [ - { - "importClauseName": "getLogger", - "importType": "NamedImports", - "importFrom": "log4js", - "modifiers": [], - "originTsPosition": { - "line": 1, - "col": 1 - } - }, - { - "importClauseName": "configure", - "importType": "NamedImports", - "importFrom": "log4js", - "modifiers": [], - "originTsPosition": { - "line": 1, - "col": 1 - } - } - ], - "exportInfos": [ - { - "exportClauseName": "classMethodTest", - "exportClauseType": 2, - "isDefault": false, - "modifiers": [ - "ExportKeyword" - ], - "originTsPosition": { - "line": 101, - "col": 1 - } - }, - { - "exportClauseName": "foo", - "exportClauseType": 2, - "isDefault": false, - "modifiers": [ - "ExportKeyword" - ], - "originTsPosition": { - "line": 122, - "col": 1 - } - }, - { - "exportClauseName": "listParameters", - "exportClauseType": 2, - "isDefault": false, - "modifiers": [ - "ExportKeyword" - ], - "originTsPosition": { - "line": 147, - "col": 1 - } - }, - { - "exportClauseName": "SecurityDoor", - "exportClauseType": 1, - "isDefault": false, - "modifiers": [ - "ExportKeyword" - ], - "originTsPosition": { - "line": 151, - "col": 1 - } - }, - { - "exportClauseName": "default", - "exportClauseType": 4, - "isDefault": true, - "modifiers": [ - "DefaultKeyword" - ], - "originTsPosition": { - "line": 200, - "col": 1 - } - }, - { - "exportClauseName": "x", - "exportClauseType": 3, - "isDefault": false, - "modifiers": [ - "ExportKeyword" - ], - "originTsPosition": { - "line": 201, - "col": 1 - } - }, - { - "exportClauseName": "soo", - "exportClauseType": 3, - "isDefault": false, - "modifiers": [ - "ExportKeyword" - ], - "originTsPosition": { - "line": 202, - "col": 1 - } - }, - { - "exportClauseName": "StringValidator", - "exportClauseType": 1, - "isDefault": false, - "modifiers": [ - "ExportKeyword" - ], - "originTsPosition": { - "line": 203, - "col": 1 - } - }, - { - "exportClauseName": "ExtAdder", - "exportClauseType": 4, - "nameBeforeAs": "ExtendedAdder", - "isDefault": false, - "modifiers": [], - "originTsPosition": { - "line": 208, - "col": 1 - } - }, - { - "exportClauseName": "ExtendedAdder", - "exportClauseType": 4, - "isDefault": false, - "modifiers": [], - "originTsPosition": { - "line": 208, - "col": 1 - } - } - ] -} \ No newline at end of file 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 deleted file mode 100644 index 9ea70d8af..000000000 --- a/jacodb-ets/src/test/resources/etsir/samples/save/enums.ts.json +++ /dev/null @@ -1,2206 +0,0 @@ -{ - "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": [], - "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": [], - "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": [], - "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": [], - "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": [], - "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" - } - ] - } - ] - } - } - }, - { - "signature": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "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": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - } - } - } - }, - { - "_": "CallStmt", - "expr": { - "_": "InstanceCallExpr", - "instance": { - "_": "Local", - "name": "this", - "type": { - "_": "UnknownType" - } - }, - "method": { - "enclosingClass": { - "name": "AnonymousClass-_DEFAULT_ARK_CLASS-_DEFAULT_ARK_METHOD-0" - }, - "name": "@instance_init", - "parameters": [], - "returnType": { - "_": "UnknownType" - } - }, - "args": [] - } - }, - { - "_": "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/samples/MethodCollision.ts b/jacodb-ets/src/test/resources/source/MethodCollision.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/MethodCollision.ts rename to jacodb-ets/src/test/resources/source/MethodCollision.ts diff --git a/jacodb-ets/src/test/resources/samples/TaintAnalysis.ts b/jacodb-ets/src/test/resources/source/TaintAnalysis.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/TaintAnalysis.ts rename to jacodb-ets/src/test/resources/source/TaintAnalysis.ts diff --git a/jacodb-ets/src/test/resources/samples/TypeMismatch.ts b/jacodb-ets/src/test/resources/source/TypeMismatch.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/TypeMismatch.ts rename to jacodb-ets/src/test/resources/source/TypeMismatch.ts diff --git a/jacodb-ets/src/test/resources/samples/binary/Bitwise.ts b/jacodb-ets/src/test/resources/source/binary/Bitwise.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/binary/Bitwise.ts rename to jacodb-ets/src/test/resources/source/binary/Bitwise.ts diff --git a/jacodb-ets/src/test/resources/samples/binary/Division.ts b/jacodb-ets/src/test/resources/source/binary/Division.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/binary/Division.ts rename to jacodb-ets/src/test/resources/source/binary/Division.ts diff --git a/jacodb-ets/src/test/resources/samples/binary/Subtraction.ts b/jacodb-ets/src/test/resources/source/binary/Subtraction.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/binary/Subtraction.ts rename to jacodb-ets/src/test/resources/source/binary/Subtraction.ts diff --git a/jacodb-ets/src/test/resources/samples/cases/case1.ts b/jacodb-ets/src/test/resources/source/cases/case1.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/cases/case1.ts rename to jacodb-ets/src/test/resources/source/cases/case1.ts diff --git a/jacodb-ets/src/test/resources/samples/cases/case2.ts b/jacodb-ets/src/test/resources/source/cases/case2.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/cases/case2.ts rename to jacodb-ets/src/test/resources/source/cases/case2.ts diff --git a/jacodb-ets/src/test/resources/samples/cases/case3.ts b/jacodb-ets/src/test/resources/source/cases/case3.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/cases/case3.ts rename to jacodb-ets/src/test/resources/source/cases/case3.ts diff --git a/jacodb-ets/src/test/resources/samples/catch/TryCatch.ts b/jacodb-ets/src/test/resources/source/catch/TryCatch.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/catch/TryCatch.ts rename to jacodb-ets/src/test/resources/source/catch/TryCatch.ts diff --git a/jacodb-ets/src/test/resources/samples/catch/TryCatchFinally.ts b/jacodb-ets/src/test/resources/source/catch/TryCatchFinally.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/catch/TryCatchFinally.ts rename to jacodb-ets/src/test/resources/source/catch/TryCatchFinally.ts diff --git a/jacodb-ets/src/test/resources/samples/catch/TryCatchMultiple.ts b/jacodb-ets/src/test/resources/source/catch/TryCatchMultiple.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/catch/TryCatchMultiple.ts rename to jacodb-ets/src/test/resources/source/catch/TryCatchMultiple.ts diff --git a/jacodb-ets/src/test/resources/samples/catch/TryCatchNested.ts b/jacodb-ets/src/test/resources/source/catch/TryCatchNested.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/catch/TryCatchNested.ts rename to jacodb-ets/src/test/resources/source/catch/TryCatchNested.ts diff --git a/jacodb-ets/src/test/resources/samples/catch/TryFinally.ts b/jacodb-ets/src/test/resources/source/catch/TryFinally.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/catch/TryFinally.ts rename to jacodb-ets/src/test/resources/source/catch/TryFinally.ts diff --git a/jacodb-ets/src/test/resources/samples/classes/AbstractClass.ts b/jacodb-ets/src/test/resources/source/classes/AbstractClass.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/classes/AbstractClass.ts rename to jacodb-ets/src/test/resources/source/classes/AbstractClass.ts diff --git a/jacodb-ets/src/test/resources/samples/classes/AccessModifiers.ts b/jacodb-ets/src/test/resources/source/classes/AccessModifiers.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/classes/AccessModifiers.ts rename to jacodb-ets/src/test/resources/source/classes/AccessModifiers.ts diff --git a/jacodb-ets/src/test/resources/samples/classes/ConstructorClass.ts b/jacodb-ets/src/test/resources/source/classes/ConstructorClass.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/classes/ConstructorClass.ts rename to jacodb-ets/src/test/resources/source/classes/ConstructorClass.ts diff --git a/jacodb-ets/src/test/resources/samples/classes/FieldInitializers.ts b/jacodb-ets/src/test/resources/source/classes/FieldInitializers.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/classes/FieldInitializers.ts rename to jacodb-ets/src/test/resources/source/classes/FieldInitializers.ts diff --git a/jacodb-ets/src/test/resources/samples/classes/GenericClass.ts b/jacodb-ets/src/test/resources/source/classes/GenericClass.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/classes/GenericClass.ts rename to jacodb-ets/src/test/resources/source/classes/GenericClass.ts diff --git a/jacodb-ets/src/test/resources/samples/classes/InheritanceClass.ts b/jacodb-ets/src/test/resources/source/classes/InheritanceClass.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/classes/InheritanceClass.ts rename to jacodb-ets/src/test/resources/source/classes/InheritanceClass.ts diff --git a/jacodb-ets/src/test/resources/samples/classes/InterfaceImplementation.ts b/jacodb-ets/src/test/resources/source/classes/InterfaceImplementation.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/classes/InterfaceImplementation.ts rename to jacodb-ets/src/test/resources/source/classes/InterfaceImplementation.ts diff --git a/jacodb-ets/src/test/resources/samples/classes/NestedInitializer.ts b/jacodb-ets/src/test/resources/source/classes/NestedInitializer.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/classes/NestedInitializer.ts rename to jacodb-ets/src/test/resources/source/classes/NestedInitializer.ts diff --git a/jacodb-ets/src/test/resources/samples/classes/SimpleClass.ts b/jacodb-ets/src/test/resources/source/classes/SimpleClass.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/classes/SimpleClass.ts rename to jacodb-ets/src/test/resources/source/classes/SimpleClass.ts diff --git a/jacodb-ets/src/test/resources/samples/classes/SingletonClass.ts b/jacodb-ets/src/test/resources/source/classes/SingletonClass.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/classes/SingletonClass.ts rename to jacodb-ets/src/test/resources/source/classes/SingletonClass.ts diff --git a/jacodb-ets/src/test/resources/samples/classes/StaticClass.ts b/jacodb-ets/src/test/resources/source/classes/StaticClass.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/classes/StaticClass.ts rename to jacodb-ets/src/test/resources/source/classes/StaticClass.ts diff --git a/jacodb-ets/src/test/resources/samples/example.ts b/jacodb-ets/src/test/resources/source/example.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/example.ts rename to jacodb-ets/src/test/resources/source/example.ts diff --git a/jacodb-ets/src/test/resources/samples/lang/in.ts b/jacodb-ets/src/test/resources/source/lang/in.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/lang/in.ts rename to jacodb-ets/src/test/resources/source/lang/in.ts diff --git a/jacodb-ets/src/test/resources/samples/lang/instanceof.ts b/jacodb-ets/src/test/resources/source/lang/instanceof.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/lang/instanceof.ts rename to jacodb-ets/src/test/resources/source/lang/instanceof.ts diff --git a/jacodb-ets/src/test/resources/samples/lang/object.ts b/jacodb-ets/src/test/resources/source/lang/object.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/lang/object.ts rename to jacodb-ets/src/test/resources/source/lang/object.ts diff --git a/jacodb-ets/src/test/resources/samples/loop/BreadthFirstSearch.ts b/jacodb-ets/src/test/resources/source/loop/BreadthFirstSearch.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/loop/BreadthFirstSearch.ts rename to jacodb-ets/src/test/resources/source/loop/BreadthFirstSearch.ts diff --git a/jacodb-ets/src/test/resources/samples/loop/DepthFirstSearch.ts b/jacodb-ets/src/test/resources/source/loop/DepthFirstSearch.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/loop/DepthFirstSearch.ts rename to jacodb-ets/src/test/resources/source/loop/DepthFirstSearch.ts diff --git a/jacodb-ets/src/test/resources/samples/loop/DijkstrasAlgorithm.ts b/jacodb-ets/src/test/resources/source/loop/DijkstrasAlgorithm.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/loop/DijkstrasAlgorithm.ts rename to jacodb-ets/src/test/resources/source/loop/DijkstrasAlgorithm.ts diff --git a/jacodb-ets/src/test/resources/samples/loop/DoWhileLoop.ts b/jacodb-ets/src/test/resources/source/loop/DoWhileLoop.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/loop/DoWhileLoop.ts rename to jacodb-ets/src/test/resources/source/loop/DoWhileLoop.ts diff --git a/jacodb-ets/src/test/resources/samples/loop/ForInLoop.ts b/jacodb-ets/src/test/resources/source/loop/ForInLoop.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/loop/ForInLoop.ts rename to jacodb-ets/src/test/resources/source/loop/ForInLoop.ts diff --git a/jacodb-ets/src/test/resources/samples/loop/MatrixMultiplication.ts b/jacodb-ets/src/test/resources/source/loop/MatrixMultiplication.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/loop/MatrixMultiplication.ts rename to jacodb-ets/src/test/resources/source/loop/MatrixMultiplication.ts diff --git a/jacodb-ets/src/test/resources/samples/loop/NestedLoops.ts b/jacodb-ets/src/test/resources/source/loop/NestedLoops.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/loop/NestedLoops.ts rename to jacodb-ets/src/test/resources/source/loop/NestedLoops.ts diff --git a/jacodb-ets/src/test/resources/samples/loop/WhileLoop.ts b/jacodb-ets/src/test/resources/source/loop/WhileLoop.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/loop/WhileLoop.ts rename to jacodb-ets/src/test/resources/source/loop/WhileLoop.ts diff --git a/jacodb-ets/src/test/resources/samples/save/basic.ts b/jacodb-ets/src/test/resources/source/save/basic.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/save/basic.ts rename to jacodb-ets/src/test/resources/source/save/basic.ts diff --git a/jacodb-ets/src/test/resources/samples/save/enums.ts b/jacodb-ets/src/test/resources/source/save/enums.ts similarity index 100% rename from jacodb-ets/src/test/resources/samples/save/enums.ts rename to jacodb-ets/src/test/resources/source/save/enums.ts diff --git a/jacodb-ets/src/test/resources/structure.txt b/jacodb-ets/src/test/resources/structure.txt index a0a0ff466..1d3d502ec 100644 --- a/jacodb-ets/src/test/resources/structure.txt +++ b/jacodb-ets/src/test/resources/structure.txt @@ -1,5 +1,5 @@ resources/ # -├── source/ # Sample source (TS/ETS) files +├── source/ # Sample sources (TS) │ └── *.ts # ├── abc/ # Compiled samples (ABC) │ └── *.abc # From 942672bbe6d14840dbeeb0ac6dfd8746aab62bb4 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 18:22:01 +0300 Subject: [PATCH 08/16] Add some messages --- jacodb-ets/build.gradle.kts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jacodb-ets/build.gradle.kts b/jacodb-ets/build.gradle.kts index 3e6c5b43c..0ca95716f 100644 --- a/jacodb-ets/build.gradle.kts +++ b/jacodb-ets/build.gradle.kts @@ -28,6 +28,9 @@ tasks.register("generateTestResources") { group = "build" description = "Generates test resources from TypeScript files using ArkAnalyzer." doLast { + println("Generating test resources using ArkAnalyzer...") + val startTime = System.currentTimeMillis() + val envVarName = "ARKANALYZER_DIR" val defaultArkAnalyzerDir = "arkanalyzer" @@ -43,6 +46,7 @@ tasks.register("generateTestResources") { "current dir is '${File("").absolutePath}'." ) } + println("Using ArkAnalyzer directory: '${arkAnalyzerDir.relativeTo(rootDir)}'") val scriptSubPath = "src/save/serializeArkIR" val script = arkAnalyzerDir.resolve("out").resolve("$scriptSubPath.js") @@ -52,6 +56,7 @@ tasks.register("generateTestResources") { "Did you forget to execute 'npm run build' in the arkanalyzer project?" ) } + println("Using script: '${script.relativeTo(arkAnalyzerDir)}'") val resources = projectDir.resolve("src/test/resources") val inputDir = resources.resolve("source") @@ -83,6 +88,6 @@ tasks.register("generateTestResources") { process.destroy() } - println("Done generating test resources!") + println("Done generating test resources in %.1fs".format((System.currentTimeMillis() - startTime) / 1000.0)) } } From ff5e390ecc9d08cabc87e8f7e13ffc66713b1507 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 18:24:23 +0300 Subject: [PATCH 09/16] Fix path --- jacodb-ets/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jacodb-ets/build.gradle.kts b/jacodb-ets/build.gradle.kts index 0ca95716f..84584d287 100644 --- a/jacodb-ets/build.gradle.kts +++ b/jacodb-ets/build.gradle.kts @@ -60,7 +60,7 @@ tasks.register("generateTestResources") { val resources = projectDir.resolve("src/test/resources") val inputDir = resources.resolve("source") - val outputDir = resources.resolve("etsir/ast") + val outputDir = resources.resolve("etsir/samples") println("Generating test resources in '${outputDir.relativeTo(projectDir)}'...") val cmd: List = listOf( From cb71bc23d108c9effc400f1550a3429e74f16cc4 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 18:36:26 +0300 Subject: [PATCH 10/16] Reorganize --- jacodb-ets/.gitignore | 1 - jacodb-ets/build.gradle.kts | 4 ++-- .../kotlin/org/jacodb/ets/test/EtsFileTest.kt | 10 ++++++---- .../org/jacodb/ets/test/EtsFromJsonTest.kt | 6 +++--- .../test/kotlin/org/jacodb/ets/test/EtsIfds.kt | 4 ++-- .../org/jacodb/ets/test/EtsTaintAnalysisTest.kt | 4 ++-- .../org/jacodb/ets/test/utils/Entrypoints.kt | 17 ++++++++--------- jacodb-ets/src/test/resources/.gitignore | 3 +++ .../{ => samples}/source/MethodCollision.ts | 0 .../{ => samples}/source/TaintAnalysis.ts | 0 .../{ => samples}/source/TypeMismatch.ts | 0 .../{ => samples}/source/binary/Bitwise.ts | 0 .../{ => samples}/source/binary/Division.ts | 0 .../{ => samples}/source/binary/Subtraction.ts | 0 .../{ => samples}/source/cases/case1.ts | 0 .../{ => samples}/source/cases/case2.ts | 0 .../{ => samples}/source/cases/case3.ts | 0 .../{ => samples}/source/catch/TryCatch.ts | 0 .../source/catch/TryCatchFinally.ts | 0 .../source/catch/TryCatchMultiple.ts | 0 .../source/catch/TryCatchNested.ts | 0 .../{ => samples}/source/catch/TryFinally.ts | 0 .../source/classes/AbstractClass.ts | 0 .../source/classes/AccessModifiers.ts | 0 .../source/classes/ConstructorClass.ts | 0 .../source/classes/FieldInitializers.ts | 0 .../source/classes/GenericClass.ts | 0 .../source/classes/InheritanceClass.ts | 0 .../source/classes/InterfaceImplementation.ts | 0 .../source/classes/NestedInitializer.ts | 0 .../{ => samples}/source/classes/SimpleClass.ts | 0 .../source/classes/SingletonClass.ts | 0 .../{ => samples}/source/classes/StaticClass.ts | 0 .../resources/{ => samples}/source/example.ts | 0 .../resources/{ => samples}/source/lang/in.ts | 0 .../{ => samples}/source/lang/instanceof.ts | 0 .../{ => samples}/source/lang/object.ts | 0 .../source/loop/BreadthFirstSearch.ts | 0 .../source/loop/DepthFirstSearch.ts | 0 .../source/loop/DijkstrasAlgorithm.ts | 0 .../{ => samples}/source/loop/DoWhileLoop.ts | 0 .../{ => samples}/source/loop/ForInLoop.ts | 0 .../source/loop/MatrixMultiplication.ts | 0 .../{ => samples}/source/loop/NestedLoops.ts | 0 .../{ => samples}/source/loop/WhileLoop.ts | 0 .../{ => samples}/source/save/basic.ts | 0 .../{ => samples}/source/save/enums.ts | 0 47 files changed, 26 insertions(+), 23 deletions(-) delete mode 100644 jacodb-ets/.gitignore create mode 100644 jacodb-ets/src/test/resources/.gitignore rename jacodb-ets/src/test/resources/{ => samples}/source/MethodCollision.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/TaintAnalysis.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/TypeMismatch.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/binary/Bitwise.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/binary/Division.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/binary/Subtraction.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/cases/case1.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/cases/case2.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/cases/case3.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/catch/TryCatch.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/catch/TryCatchFinally.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/catch/TryCatchMultiple.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/catch/TryCatchNested.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/catch/TryFinally.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/classes/AbstractClass.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/classes/AccessModifiers.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/classes/ConstructorClass.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/classes/FieldInitializers.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/classes/GenericClass.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/classes/InheritanceClass.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/classes/InterfaceImplementation.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/classes/NestedInitializer.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/classes/SimpleClass.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/classes/SingletonClass.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/classes/StaticClass.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/example.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/lang/in.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/lang/instanceof.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/lang/object.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/loop/BreadthFirstSearch.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/loop/DepthFirstSearch.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/loop/DijkstrasAlgorithm.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/loop/DoWhileLoop.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/loop/ForInLoop.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/loop/MatrixMultiplication.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/loop/NestedLoops.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/loop/WhileLoop.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/save/basic.ts (100%) rename jacodb-ets/src/test/resources/{ => samples}/source/save/enums.ts (100%) diff --git a/jacodb-ets/.gitignore b/jacodb-ets/.gitignore deleted file mode 100644 index 3b2dfe89c..000000000 --- a/jacodb-ets/.gitignore +++ /dev/null @@ -1 +0,0 @@ -src/test/resources/etsir/generated/ diff --git a/jacodb-ets/build.gradle.kts b/jacodb-ets/build.gradle.kts index 84584d287..2d18f61d5 100644 --- a/jacodb-ets/build.gradle.kts +++ b/jacodb-ets/build.gradle.kts @@ -59,8 +59,8 @@ tasks.register("generateTestResources") { println("Using script: '${script.relativeTo(arkAnalyzerDir)}'") val resources = projectDir.resolve("src/test/resources") - val inputDir = resources.resolve("source") - val outputDir = resources.resolve("etsir/samples") + val inputDir = resources.resolve("samples/source") + val outputDir = resources.resolve("samples/etsir/ast") println("Generating test resources in '${outputDir.relativeTo(projectDir)}'...") val cmd: List = listOf( 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 5da8bddb5..934191d53 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 @@ -33,14 +33,16 @@ private val logger = mu.KotlinLogging.logger {} class EtsFileTest { companion object { + private const val BASE = "/samples/etsir/ast" + private fun load(name: String): EtsFile { - return loadEtsFileFromResource("/$name.ts.json") + return loadEtsFileFromResource("$BASE/$name.ts.json") } } @Test fun printEtsInstructions() { - val etsFile = load("etsir/samples/classes/SimpleClass") + val etsFile = load("classes/SimpleClass") etsFile.classes.forEach { cls -> cls.methods.forEach { method -> logger.info { @@ -55,7 +57,7 @@ class EtsFileTest { @Test fun `test sample TypeMismatch`() { - val etsFile = load("etsir/samples/TypeMismatch") + val etsFile = load("TypeMismatch") etsFile.classes.forEach { cls -> cls.methods.forEach { method -> when (method.name) { @@ -73,7 +75,7 @@ class EtsFileTest { @Test fun `test sample FieldInitializers`() { - val etsFile = load("etsir/samples/classes/FieldInitializers") + val etsFile = load("classes/FieldInitializers") val cls = etsFile.classes.single { it.name == "Foo" } 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 1ad19ee42..49439d9a5 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 @@ -62,7 +62,7 @@ class EtsFromJsonTest { @Test fun testLoadEtsFileFromJson() { - val path = "/etsir/samples/save/basic.ts.json" + val path = "/samples/etsir/ast/save/basic.ts.json" val etsDto = loadEtsFileDtoFromResource("$path") println("etsDto = $etsDto") val ets = convertToEtsFile(etsDto) @@ -71,7 +71,7 @@ class EtsFromJsonTest { @Test fun testLoadEtsFileAutoConvert() { - val path = "/source/example.ts" + val path = "/samples/source/example.ts" val res = this::class.java.getResource(path)?.toURI()?.toPath() ?: error("Resource not found: $path") val etsFile = loadEtsFileAutoConvert(res) @@ -80,7 +80,7 @@ class EtsFromJsonTest { @Test fun testLoadEtsFileAutoConvertWithDot() { - val path = "/source/example.ts" + val path = "/samples/source/example.ts" val res = this::class.java.getResource(path)?.toURI()?.toPath() ?: error("Resource not found: $path") val etsFile = loadEtsFileAutoConvertWithDot(res) diff --git a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsIfds.kt b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsIfds.kt index 029e7ffc7..8b326ae06 100644 --- a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsIfds.kt +++ b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsIfds.kt @@ -61,7 +61,7 @@ class EtsIfds { } private fun projectAvailable(): Boolean { - val resource = object {}::class.java.getResource("/source/project1")?.toURI() + val resource = object {}::class.java.getResource("/samples/source/project1")?.toURI() return resource != null && resource.toPath().exists() } @@ -162,7 +162,7 @@ class EtsIfds { val getConfigForMethod: ForwardTaintFlowFunctions.(EtsMethod) -> List? = { method -> val rules = buildList { - if (method.name == "source") add( + if (method.name == "samples/source") add( TaintMethodSource( method = method, condition = ConstantTrue, diff --git a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsTaintAnalysisTest.kt b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsTaintAnalysisTest.kt index 2e8cafaf6..3a7cac2a2 100644 --- a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsTaintAnalysisTest.kt +++ b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsTaintAnalysisTest.kt @@ -48,7 +48,7 @@ private val logger = mu.KotlinLogging.logger {} class EtsTaintAnalysisTest { companion object : EtsTraits { - private const val BASE_PATH = "/etsir/samples" + private const val BASE_PATH = "/samples/etsir/ast" private const val DECOMPILED_PATH = "/decompiled" @@ -63,7 +63,7 @@ class EtsTaintAnalysisTest { val getConfigForMethod: ForwardTaintFlowFunctions.(EtsMethod) -> List? = { method -> val rules = buildList { - if (method.name == "source") add( + if (method.name == "samples/source") add( TaintMethodSource( method = method, condition = ConstantTrue, diff --git a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt index b0e5eaf05..2a8c760ce 100644 --- a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt +++ b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt @@ -80,20 +80,21 @@ object DumpEtsFileToDot { */ @OptIn(ExperimentalPathApi::class) object DumpEtsFilesToDot { - private const val ETSIR_BASE = "/etsir" - private const val ETSIR_DIR = "source" // relative to BASE + private const val BASE = "/samples" + private const val ETSIR_DIR = "etsir/ast" // relative to BASE private val DOT_DIR = Path("generated/dot") @JvmStatic fun main(args: Array) { - val resPath = "$ETSIR_BASE/$ETSIR_DIR" - val etsirDir = object {}::class.java.getResource(resPath)?.toURI()?.toPath() - ?: error("Resource not found: '$resPath'") - logger.info { "baseDir = $etsirDir" } + val res = "$BASE/$ETSIR_DIR" + val etsirDir = object {}::class.java.getResource(res)?.toURI()?.toPath() + ?: error("Resource not found: '$res'") + logger.info { "etsirDir = $etsirDir" } etsirDir.walk() .filter { it.name.endsWith(".json") } .forEach { path -> + logger.info { "Processing: $path" } val relative = path.relativeTo(etsirDir) process(relative, ".dto") { @@ -102,8 +103,6 @@ object DumpEtsFilesToDot { process(relative, "") { loadEtsFileFromResource(it) } - - logger.info { "Processed: $path" } } } @@ -112,7 +111,7 @@ object DumpEtsFilesToDot { suffix: String, load: (String) -> T, ) { - val resourcePath = "$ETSIR_BASE/$ETSIR_DIR/$relative" + val resourcePath = "$BASE/$ETSIR_DIR/$relative" val relativeDot = (Path(ETSIR_DIR) / relative) .resolveSibling("${relative.nameWithoutExtension}$suffix.dot") val dotPath = DOT_DIR / relativeDot diff --git a/jacodb-ets/src/test/resources/.gitignore b/jacodb-ets/src/test/resources/.gitignore new file mode 100644 index 000000000..730a420e7 --- /dev/null +++ b/jacodb-ets/src/test/resources/.gitignore @@ -0,0 +1,3 @@ +/samples/etsir/ +/samples/abc/ +/projects diff --git a/jacodb-ets/src/test/resources/source/MethodCollision.ts b/jacodb-ets/src/test/resources/samples/source/MethodCollision.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/MethodCollision.ts rename to jacodb-ets/src/test/resources/samples/source/MethodCollision.ts diff --git a/jacodb-ets/src/test/resources/source/TaintAnalysis.ts b/jacodb-ets/src/test/resources/samples/source/TaintAnalysis.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/TaintAnalysis.ts rename to jacodb-ets/src/test/resources/samples/source/TaintAnalysis.ts diff --git a/jacodb-ets/src/test/resources/source/TypeMismatch.ts b/jacodb-ets/src/test/resources/samples/source/TypeMismatch.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/TypeMismatch.ts rename to jacodb-ets/src/test/resources/samples/source/TypeMismatch.ts diff --git a/jacodb-ets/src/test/resources/source/binary/Bitwise.ts b/jacodb-ets/src/test/resources/samples/source/binary/Bitwise.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/binary/Bitwise.ts rename to jacodb-ets/src/test/resources/samples/source/binary/Bitwise.ts diff --git a/jacodb-ets/src/test/resources/source/binary/Division.ts b/jacodb-ets/src/test/resources/samples/source/binary/Division.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/binary/Division.ts rename to jacodb-ets/src/test/resources/samples/source/binary/Division.ts diff --git a/jacodb-ets/src/test/resources/source/binary/Subtraction.ts b/jacodb-ets/src/test/resources/samples/source/binary/Subtraction.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/binary/Subtraction.ts rename to jacodb-ets/src/test/resources/samples/source/binary/Subtraction.ts diff --git a/jacodb-ets/src/test/resources/source/cases/case1.ts b/jacodb-ets/src/test/resources/samples/source/cases/case1.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/cases/case1.ts rename to jacodb-ets/src/test/resources/samples/source/cases/case1.ts diff --git a/jacodb-ets/src/test/resources/source/cases/case2.ts b/jacodb-ets/src/test/resources/samples/source/cases/case2.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/cases/case2.ts rename to jacodb-ets/src/test/resources/samples/source/cases/case2.ts diff --git a/jacodb-ets/src/test/resources/source/cases/case3.ts b/jacodb-ets/src/test/resources/samples/source/cases/case3.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/cases/case3.ts rename to jacodb-ets/src/test/resources/samples/source/cases/case3.ts diff --git a/jacodb-ets/src/test/resources/source/catch/TryCatch.ts b/jacodb-ets/src/test/resources/samples/source/catch/TryCatch.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/catch/TryCatch.ts rename to jacodb-ets/src/test/resources/samples/source/catch/TryCatch.ts diff --git a/jacodb-ets/src/test/resources/source/catch/TryCatchFinally.ts b/jacodb-ets/src/test/resources/samples/source/catch/TryCatchFinally.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/catch/TryCatchFinally.ts rename to jacodb-ets/src/test/resources/samples/source/catch/TryCatchFinally.ts diff --git a/jacodb-ets/src/test/resources/source/catch/TryCatchMultiple.ts b/jacodb-ets/src/test/resources/samples/source/catch/TryCatchMultiple.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/catch/TryCatchMultiple.ts rename to jacodb-ets/src/test/resources/samples/source/catch/TryCatchMultiple.ts diff --git a/jacodb-ets/src/test/resources/source/catch/TryCatchNested.ts b/jacodb-ets/src/test/resources/samples/source/catch/TryCatchNested.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/catch/TryCatchNested.ts rename to jacodb-ets/src/test/resources/samples/source/catch/TryCatchNested.ts diff --git a/jacodb-ets/src/test/resources/source/catch/TryFinally.ts b/jacodb-ets/src/test/resources/samples/source/catch/TryFinally.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/catch/TryFinally.ts rename to jacodb-ets/src/test/resources/samples/source/catch/TryFinally.ts diff --git a/jacodb-ets/src/test/resources/source/classes/AbstractClass.ts b/jacodb-ets/src/test/resources/samples/source/classes/AbstractClass.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/classes/AbstractClass.ts rename to jacodb-ets/src/test/resources/samples/source/classes/AbstractClass.ts diff --git a/jacodb-ets/src/test/resources/source/classes/AccessModifiers.ts b/jacodb-ets/src/test/resources/samples/source/classes/AccessModifiers.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/classes/AccessModifiers.ts rename to jacodb-ets/src/test/resources/samples/source/classes/AccessModifiers.ts diff --git a/jacodb-ets/src/test/resources/source/classes/ConstructorClass.ts b/jacodb-ets/src/test/resources/samples/source/classes/ConstructorClass.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/classes/ConstructorClass.ts rename to jacodb-ets/src/test/resources/samples/source/classes/ConstructorClass.ts diff --git a/jacodb-ets/src/test/resources/source/classes/FieldInitializers.ts b/jacodb-ets/src/test/resources/samples/source/classes/FieldInitializers.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/classes/FieldInitializers.ts rename to jacodb-ets/src/test/resources/samples/source/classes/FieldInitializers.ts diff --git a/jacodb-ets/src/test/resources/source/classes/GenericClass.ts b/jacodb-ets/src/test/resources/samples/source/classes/GenericClass.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/classes/GenericClass.ts rename to jacodb-ets/src/test/resources/samples/source/classes/GenericClass.ts diff --git a/jacodb-ets/src/test/resources/source/classes/InheritanceClass.ts b/jacodb-ets/src/test/resources/samples/source/classes/InheritanceClass.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/classes/InheritanceClass.ts rename to jacodb-ets/src/test/resources/samples/source/classes/InheritanceClass.ts diff --git a/jacodb-ets/src/test/resources/source/classes/InterfaceImplementation.ts b/jacodb-ets/src/test/resources/samples/source/classes/InterfaceImplementation.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/classes/InterfaceImplementation.ts rename to jacodb-ets/src/test/resources/samples/source/classes/InterfaceImplementation.ts diff --git a/jacodb-ets/src/test/resources/source/classes/NestedInitializer.ts b/jacodb-ets/src/test/resources/samples/source/classes/NestedInitializer.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/classes/NestedInitializer.ts rename to jacodb-ets/src/test/resources/samples/source/classes/NestedInitializer.ts diff --git a/jacodb-ets/src/test/resources/source/classes/SimpleClass.ts b/jacodb-ets/src/test/resources/samples/source/classes/SimpleClass.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/classes/SimpleClass.ts rename to jacodb-ets/src/test/resources/samples/source/classes/SimpleClass.ts diff --git a/jacodb-ets/src/test/resources/source/classes/SingletonClass.ts b/jacodb-ets/src/test/resources/samples/source/classes/SingletonClass.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/classes/SingletonClass.ts rename to jacodb-ets/src/test/resources/samples/source/classes/SingletonClass.ts diff --git a/jacodb-ets/src/test/resources/source/classes/StaticClass.ts b/jacodb-ets/src/test/resources/samples/source/classes/StaticClass.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/classes/StaticClass.ts rename to jacodb-ets/src/test/resources/samples/source/classes/StaticClass.ts diff --git a/jacodb-ets/src/test/resources/source/example.ts b/jacodb-ets/src/test/resources/samples/source/example.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/example.ts rename to jacodb-ets/src/test/resources/samples/source/example.ts diff --git a/jacodb-ets/src/test/resources/source/lang/in.ts b/jacodb-ets/src/test/resources/samples/source/lang/in.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/lang/in.ts rename to jacodb-ets/src/test/resources/samples/source/lang/in.ts diff --git a/jacodb-ets/src/test/resources/source/lang/instanceof.ts b/jacodb-ets/src/test/resources/samples/source/lang/instanceof.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/lang/instanceof.ts rename to jacodb-ets/src/test/resources/samples/source/lang/instanceof.ts diff --git a/jacodb-ets/src/test/resources/source/lang/object.ts b/jacodb-ets/src/test/resources/samples/source/lang/object.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/lang/object.ts rename to jacodb-ets/src/test/resources/samples/source/lang/object.ts diff --git a/jacodb-ets/src/test/resources/source/loop/BreadthFirstSearch.ts b/jacodb-ets/src/test/resources/samples/source/loop/BreadthFirstSearch.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/loop/BreadthFirstSearch.ts rename to jacodb-ets/src/test/resources/samples/source/loop/BreadthFirstSearch.ts diff --git a/jacodb-ets/src/test/resources/source/loop/DepthFirstSearch.ts b/jacodb-ets/src/test/resources/samples/source/loop/DepthFirstSearch.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/loop/DepthFirstSearch.ts rename to jacodb-ets/src/test/resources/samples/source/loop/DepthFirstSearch.ts diff --git a/jacodb-ets/src/test/resources/source/loop/DijkstrasAlgorithm.ts b/jacodb-ets/src/test/resources/samples/source/loop/DijkstrasAlgorithm.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/loop/DijkstrasAlgorithm.ts rename to jacodb-ets/src/test/resources/samples/source/loop/DijkstrasAlgorithm.ts diff --git a/jacodb-ets/src/test/resources/source/loop/DoWhileLoop.ts b/jacodb-ets/src/test/resources/samples/source/loop/DoWhileLoop.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/loop/DoWhileLoop.ts rename to jacodb-ets/src/test/resources/samples/source/loop/DoWhileLoop.ts diff --git a/jacodb-ets/src/test/resources/source/loop/ForInLoop.ts b/jacodb-ets/src/test/resources/samples/source/loop/ForInLoop.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/loop/ForInLoop.ts rename to jacodb-ets/src/test/resources/samples/source/loop/ForInLoop.ts diff --git a/jacodb-ets/src/test/resources/source/loop/MatrixMultiplication.ts b/jacodb-ets/src/test/resources/samples/source/loop/MatrixMultiplication.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/loop/MatrixMultiplication.ts rename to jacodb-ets/src/test/resources/samples/source/loop/MatrixMultiplication.ts diff --git a/jacodb-ets/src/test/resources/source/loop/NestedLoops.ts b/jacodb-ets/src/test/resources/samples/source/loop/NestedLoops.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/loop/NestedLoops.ts rename to jacodb-ets/src/test/resources/samples/source/loop/NestedLoops.ts diff --git a/jacodb-ets/src/test/resources/source/loop/WhileLoop.ts b/jacodb-ets/src/test/resources/samples/source/loop/WhileLoop.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/loop/WhileLoop.ts rename to jacodb-ets/src/test/resources/samples/source/loop/WhileLoop.ts diff --git a/jacodb-ets/src/test/resources/source/save/basic.ts b/jacodb-ets/src/test/resources/samples/source/save/basic.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/save/basic.ts rename to jacodb-ets/src/test/resources/samples/source/save/basic.ts diff --git a/jacodb-ets/src/test/resources/source/save/enums.ts b/jacodb-ets/src/test/resources/samples/source/save/enums.ts similarity index 100% rename from jacodb-ets/src/test/resources/source/save/enums.ts rename to jacodb-ets/src/test/resources/samples/source/save/enums.ts From 4de3412fada3b23c8139a6f8239ab40a85687cd6 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 18:38:20 +0300 Subject: [PATCH 11/16] Fix generated path --- .../src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt index 2a8c760ce..4599e046a 100644 --- a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt +++ b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt @@ -82,7 +82,7 @@ object DumpEtsFileToDot { object DumpEtsFilesToDot { private const val BASE = "/samples" private const val ETSIR_DIR = "etsir/ast" // relative to BASE - private val DOT_DIR = Path("generated/dot") + private val DOT_DIR = Path("generated/samples/dot") @JvmStatic fun main(args: Array) { From b767697dcce439ec06d50700d8fab7c2de50e218 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 18:42:13 +0300 Subject: [PATCH 12/16] Fix source name --- .../src/test/kotlin/org/jacodb/ets/test/EtsTaintAnalysisTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsTaintAnalysisTest.kt b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsTaintAnalysisTest.kt index 3a7cac2a2..89e1f5069 100644 --- a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsTaintAnalysisTest.kt +++ b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/EtsTaintAnalysisTest.kt @@ -63,7 +63,7 @@ class EtsTaintAnalysisTest { val getConfigForMethod: ForwardTaintFlowFunctions.(EtsMethod) -> List? = { method -> val rules = buildList { - if (method.name == "samples/source") add( + if (method.name == "source") add( TaintMethodSource( method = method, condition = ConstantTrue, From 4c0a45fbcac77e3a0f1821b61e910cf05692fb08 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 19:00:45 +0300 Subject: [PATCH 13/16] Add fancy Path.resolveSibling extension --- .../src/main/kotlin/org/jacodb/ets/utils/Utils.kt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/Utils.kt b/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/Utils.kt index 73c341591..d2f7f6a19 100644 --- a/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/Utils.kt +++ b/jacodb-ets/src/main/kotlin/org/jacodb/ets/utils/Utils.kt @@ -19,6 +19,7 @@ package org.jacodb.ets.utils import mu.KotlinLogging import org.jacodb.ets.dto.EtsFileDto import org.jacodb.ets.model.EtsFile +import java.nio.file.Path import java.util.concurrent.TimeUnit import kotlin.time.Duration @@ -49,6 +50,20 @@ internal fun runProcess(cmd: List, timeout: Duration? = null) { } } +/** + * Returns the path to the sibling of this path with the given name. + * + * Usage: + * ``` + * val path = Path("foo/bar.jpeg") + * val sibling = path.resolveSibling { it.nameWithoutExtension + ".png" } + * println(sibling) // foo/bar.png + * ``` + */ +internal fun Path.resolveSibling(name: (Path) -> String): Path { + return resolveSibling(name(this)) +} + fun EtsFileDto.toText(): String { val lines: MutableList = mutableListOf() lines += "EtsFileDto '${name}':" From 5d0be84415738bdeca5c4424fa2ca547fb06a7f2 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 19:03:35 +0300 Subject: [PATCH 14/16] Simplify DOT generation --- .../org/jacodb/ets/test/utils/Entrypoints.kt | 44 +++++++++---------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt index 4599e046a..d5bdfdc57 100644 --- a/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt +++ b/jacodb-ets/src/test/kotlin/org/jacodb/ets/test/utils/Entrypoints.kt @@ -17,9 +17,11 @@ package org.jacodb.ets.test.utils import org.jacodb.ets.dto.EtsFileDto +import org.jacodb.ets.dto.convertToEtsFile import org.jacodb.ets.model.EtsFile import org.jacodb.ets.utils.dumpDot import org.jacodb.ets.utils.render +import org.jacodb.ets.utils.resolveSibling import org.jacodb.ets.utils.toText import java.nio.file.Path import kotlin.io.path.ExperimentalPathApi @@ -81,45 +83,39 @@ object DumpEtsFileToDot { @OptIn(ExperimentalPathApi::class) object DumpEtsFilesToDot { private const val BASE = "/samples" - private const val ETSIR_DIR = "etsir/ast" // relative to BASE + private const val ETSIR = "etsir/ast" // relative to BASE private val DOT_DIR = Path("generated/samples/dot") @JvmStatic fun main(args: Array) { - val res = "$BASE/$ETSIR_DIR" + val res = "$BASE/$ETSIR" val etsirDir = object {}::class.java.getResource(res)?.toURI()?.toPath() ?: error("Resource not found: '$res'") logger.info { "etsirDir = $etsirDir" } etsirDir.walk() .filter { it.name.endsWith(".json") } + .map { it.relativeTo(etsirDir) } .forEach { path -> logger.info { "Processing: $path" } - val relative = path.relativeTo(etsirDir) - process(relative, ".dto") { - loadEtsFileDtoFromResource(it) + val etsFileDto = loadEtsFileDtoFromResource("$BASE/$ETSIR/$path") + run { + val dotPath = DOT_DIR / path.resolveSibling { + it.nameWithoutExtension + ".dto.dot" + } + etsFileDto.dumpDot(dotPath) + render(DOT_DIR, dotPath.relativeTo(DOT_DIR)) } - process(relative, "") { - loadEtsFileFromResource(it) + + val etsFile = convertToEtsFile(etsFileDto) + run { + val dotPath = DOT_DIR / path.resolveSibling { + it.nameWithoutExtension + ".dot" + } + etsFile.dumpDot(dotPath) + render(DOT_DIR, dotPath.relativeTo(DOT_DIR)) } } } - - private fun process( - relative: Path, - suffix: String, - load: (String) -> T, - ) { - val resourcePath = "$BASE/$ETSIR_DIR/$relative" - val relativeDot = (Path(ETSIR_DIR) / relative) - .resolveSibling("${relative.nameWithoutExtension}$suffix.dot") - val dotPath = DOT_DIR / relativeDot - when (val f = load(resourcePath)) { - is EtsFileDto -> f.dumpDot(dotPath) - is EtsFile -> f.dumpDot(dotPath) - else -> error("Unknown type: $f") - } - render(DOT_DIR, relativeDot) - } } From 685018114735d02bebf5317c84965d4797989fb7 Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 19:16:08 +0300 Subject: [PATCH 15/16] Update structure --- jacodb-ets/src/test/resources/structure.txt | 38 ++++++++++++--------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/jacodb-ets/src/test/resources/structure.txt b/jacodb-ets/src/test/resources/structure.txt index 1d3d502ec..dd7a1a0ff 100644 --- a/jacodb-ets/src/test/resources/structure.txt +++ b/jacodb-ets/src/test/resources/structure.txt @@ -1,14 +1,16 @@ resources/ # -├── source/ # Sample sources (TS) -│ └── *.ts # -├── abc/ # Compiled samples (ABC) -│ └── *.abc # -├── etsir/ # EtsIR (JSON dump of ArkIR) for samples -│ ├── ast/ # EtsIR-AST for samples from `source/` -│ │ └── *.ts.json # -│ └── abc/ # EtsIR-ABC for samples from `abc/` -│ └── *.abc.json # -│ # +├── samples # +│ ├── source/ # Sample sources (TS) +│ │ └── *.ts # +│ ├── abc/ # Compiled samples (ABC) +│ │ └── *.abc # +│ ├── etsir/ # EtsIR (JSON dump of ArkIR) for samples +│ │ ├── ast/ # EtsIR-AST for samples from `source/` +│ │ │ └── *.ts.json # +│ │ └── abc/ # EtsIR-ABC for samples from `abc/` +│ │ └── *.abc.json # +│ ... # +│ └── projects/ # Directory for individual projects ├── / # Some individual project │ └── ... # @@ -16,11 +18,13 @@ resources/ # ... /generated/ -├── dot/ # DOT files for visualizing IRs -│ ├── *.ts.json.dot # -│ └── *.abc.json.dot # -├── pdf/ # Rendered PDFs from DOT files -│ ├── *.ts.json.pdf # -│ └── *.abc.json.pdf # +├── samples +│ ├── dot/ # DOT files for visualizing IRs +│ │ ├── *.ts.json.dot # +│ │ └── *.abc.json.dot # +│ ├── pdf/ # Rendered PDFs from DOT files +│ │ ├── *.ts.json.pdf # +│ │ └── *.abc.json.pdf # +│ ... +│ TODO: text representation ... -TODO: text representation From a0543271bd43c0ccc86571a2cffc2b2a46def83c Mon Sep 17 00:00:00 2001 From: Konstantin Chukharev Date: Thu, 8 Aug 2024 19:39:58 +0300 Subject: [PATCH 16/16] Generate test resources in GHA --- .github/workflows/build-and-test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 0059e3cb5..113f0652c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -85,6 +85,9 @@ jobs: npm install npm run build + - name: Generate test resources + run: ./gradlew :jacodb-ets:generateTestResources --scan + - name: Run ETS tests first run: ./gradlew :jacodb-ets:test --scan