Update test-kotlin2

This commit is contained in:
Owen Mansel-Chan
2024-12-06 23:03:43 +00:00
parent 4978a6eb37
commit 5b575113c3
14 changed files with 72 additions and 126 deletions

View File

@@ -1,8 +1,8 @@
| Test.kt:3:1:80:1 | { ... } | 0 | Test.kt:3:1:80:1 | { ... } |
| Test.kt:3:1:80:1 | { ... } | 1 | Test.kt:3:1:80:1 | super(...) |
| Test.kt:3:1:80:1 | { ... } | 2 | Test.kt:3:1:80:1 | { ... } |
| Test.kt:3:1:80:1 | { ... } | 3 | Test.kt:3:1:80:1 | Test |
| Test.kt:4:2:79:2 | test | 0 | Test.kt:4:2:79:2 | test |
| Test.kt:3:1:80:1 | { ... } | 3 | Test.kt:3:1:80:1 | Exit |
| Test.kt:4:2:79:2 | Exit | 0 | Test.kt:4:2:79:2 | Exit |
| Test.kt:4:13:79:2 | { ... } | 0 | Test.kt:4:13:79:2 | { ... } |
| Test.kt:4:13:79:2 | { ... } | 1 | Test.kt:5:3:5:16 | var ...; |
| Test.kt:4:13:79:2 | { ... } | 2 | Test.kt:5:16:5:16 | 0 |
@@ -102,7 +102,7 @@
| Test.kt:43:3:43:8 | <Expr>; | 8 | Test.kt:77:3:77:8 | ...=... |
| Test.kt:43:3:43:8 | <Expr>; | 9 | Test.kt:78:9:78:9 | INSTANCE |
| Test.kt:43:3:43:8 | <Expr>; | 10 | Test.kt:78:3:78:8 | return ... |
| Test.kt:82:1:89:1 | t1 | 0 | Test.kt:82:1:89:1 | t1 |
| Test.kt:82:1:89:1 | Exit | 0 | Test.kt:82:1:89:1 | Exit |
| Test.kt:82:21:89:1 | { ... } | 0 | Test.kt:82:21:89:1 | { ... } |
| Test.kt:82:21:89:1 | { ... } | 1 | Test.kt:83:2:88:2 | try ... |
| Test.kt:82:21:89:1 | { ... } | 2 | Test.kt:83:6:86:2 | { ... } |
@@ -117,7 +117,7 @@
| Test.kt:86:4:88:2 | catch (...) | 2 | Test.kt:86:34:88:2 | { ... } |
| Test.kt:86:4:88:2 | catch (...) | 3 | Test.kt:87:10:87:10 | 2 |
| Test.kt:86:4:88:2 | catch (...) | 4 | Test.kt:87:3:87:10 | return ... |
| Test.kt:91:1:98:1 | t2 | 0 | Test.kt:91:1:98:1 | t2 |
| Test.kt:91:1:98:1 | Exit | 0 | Test.kt:91:1:98:1 | Exit |
| Test.kt:91:22:98:1 | { ... } | 0 | Test.kt:91:22:98:1 | { ... } |
| Test.kt:91:22:98:1 | { ... } | 1 | Test.kt:92:2:97:2 | try ... |
| Test.kt:91:22:98:1 | { ... } | 2 | Test.kt:92:6:95:2 | { ... } |
@@ -132,7 +132,7 @@
| Test.kt:95:4:97:2 | catch (...) | 2 | Test.kt:95:36:97:2 | { ... } |
| Test.kt:95:4:97:2 | catch (...) | 3 | Test.kt:96:10:96:10 | 2 |
| Test.kt:95:4:97:2 | catch (...) | 4 | Test.kt:96:3:96:10 | return ... |
| Test.kt:100:1:110:1 | fn | 0 | Test.kt:100:1:110:1 | fn |
| Test.kt:100:1:110:1 | Exit | 0 | Test.kt:100:1:110:1 | Exit |
| Test.kt:100:25:110:1 | { ... } | 0 | Test.kt:100:25:110:1 | { ... } |
| Test.kt:100:25:110:1 | { ... } | 1 | Test.kt:101:5:103:5 | <Expr>; |
| Test.kt:100:25:110:1 | { ... } | 2 | Test.kt:101:5:103:5 | when ... |
@@ -165,7 +165,7 @@
| Test.kt:107:27:109:5 | { ... } | 1 | Test.kt:108:9:108:29 | <Expr>; |
| Test.kt:107:27:109:5 | { ... } | 2 | Test.kt:108:17:108:28 | "y not null" |
| Test.kt:107:27:109:5 | { ... } | 3 | Test.kt:108:9:108:29 | println(...) |
| Test.kt:112:1:116:1 | fn | 0 | Test.kt:112:1:116:1 | fn |
| Test.kt:112:1:116:1 | Exit | 0 | Test.kt:112:1:116:1 | Exit |
| Test.kt:112:32:116:1 | { ... } | 0 | Test.kt:112:32:116:1 | { ... } |
| Test.kt:112:32:116:1 | { ... } | 1 | Test.kt:113:5:115:5 | <Expr>; |
| Test.kt:112:32:116:1 | { ... } | 2 | Test.kt:113:5:115:5 | when ... |
@@ -174,7 +174,7 @@
| Test.kt:112:32:116:1 | { ... } | 5 | Test.kt:113:9:113:9 | x |
| Test.kt:113:14:113:14 | y | 0 | Test.kt:113:14:113:14 | y |
| Test.kt:113:17:115:5 | { ... } | 0 | Test.kt:113:17:115:5 | { ... } |
| Test.kt:118:1:124:1 | fn_when | 0 | Test.kt:118:1:124:1 | fn_when |
| Test.kt:118:1:124:1 | Exit | 0 | Test.kt:118:1:124:1 | Exit |
| Test.kt:118:37:124:1 | { ... } | 0 | Test.kt:118:37:124:1 | { ... } |
| Test.kt:118:37:124:1 | { ... } | 1 | Test.kt:119:2:123:12 | <Expr>; |
| Test.kt:118:37:124:1 | { ... } | 2 | Test.kt:119:2:123:12 | when ... |

View File

@@ -3,5 +3,5 @@ import default
from BasicBlock b, int i, ControlFlowNode n
where
b.getNode(i) = n and
b.getFile().(CompilationUnit).fromSource()
b.getLocation().getFile().(CompilationUnit).fromSource()
select b, i, n

View File

@@ -1,4 +1,4 @@
| Test.kt:4:13:79:2 | { ... } | Test.kt:4:2:79:2 | test |
| Test.kt:4:13:79:2 | { ... } | Test.kt:4:2:79:2 | Exit |
| Test.kt:4:13:79:2 | { ... } | Test.kt:11:14:14:3 | { ... } |
| Test.kt:4:13:79:2 | { ... } | Test.kt:14:10:16:3 | ... -> ... |
| Test.kt:4:13:79:2 | { ... } | Test.kt:18:3:18:7 | <Expr>; |
@@ -9,7 +9,7 @@
| Test.kt:4:13:79:2 | { ... } | Test.kt:38:9:38:9 | x |
| Test.kt:4:13:79:2 | { ... } | Test.kt:38:16:41:3 | { ... } |
| Test.kt:4:13:79:2 | { ... } | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:4:2:79:2 | test |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:4:2:79:2 | Exit |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:22:4:22:9 | <Expr>; |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:30:15:33:3 | { ... } |
@@ -27,13 +27,13 @@
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:38:9:38:9 | x | Test.kt:38:16:41:3 | { ... } |
| Test.kt:38:9:38:9 | x | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:82:21:89:1 | { ... } | Test.kt:82:1:89:1 | t1 |
| Test.kt:82:21:89:1 | { ... } | Test.kt:82:1:89:1 | Exit |
| Test.kt:82:21:89:1 | { ... } | Test.kt:84:3:84:18 | x |
| Test.kt:82:21:89:1 | { ... } | Test.kt:86:4:88:2 | catch (...) |
| Test.kt:91:22:98:1 | { ... } | Test.kt:91:1:98:1 | t2 |
| Test.kt:91:22:98:1 | { ... } | Test.kt:91:1:98:1 | Exit |
| Test.kt:91:22:98:1 | { ... } | Test.kt:93:3:93:13 | x |
| Test.kt:91:22:98:1 | { ... } | Test.kt:95:4:97:2 | catch (...) |
| Test.kt:100:25:110:1 | { ... } | Test.kt:100:1:110:1 | fn |
| Test.kt:100:25:110:1 | { ... } | Test.kt:100:1:110:1 | Exit |
| Test.kt:100:25:110:1 | { ... } | Test.kt:101:22:101:22 | y |
| Test.kt:100:25:110:1 | { ... } | Test.kt:101:33:103:5 | { ... } |
| Test.kt:100:25:110:1 | { ... } | Test.kt:105:5:109:5 | <Expr>; |
@@ -45,11 +45,11 @@
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:107:16:109:5 | ... -> ... |
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:107:27:109:5 | { ... } |
| Test.kt:107:16:109:5 | ... -> ... | Test.kt:107:27:109:5 | { ... } |
| Test.kt:112:32:116:1 | { ... } | Test.kt:112:1:116:1 | fn |
| Test.kt:112:32:116:1 | { ... } | Test.kt:112:1:116:1 | Exit |
| Test.kt:112:32:116:1 | { ... } | Test.kt:113:14:113:14 | y |
| Test.kt:112:32:116:1 | { ... } | Test.kt:113:17:115:5 | { ... } |
| Test.kt:113:14:113:14 | y | Test.kt:113:17:115:5 | { ... } |
| Test.kt:118:37:124:1 | { ... } | Test.kt:118:1:124:1 | fn_when |
| Test.kt:118:37:124:1 | { ... } | Test.kt:118:1:124:1 | Exit |
| Test.kt:118:37:124:1 | { ... } | Test.kt:121:9:121:9 | <Expr>; |
| Test.kt:118:37:124:1 | { ... } | Test.kt:122:12:122:16 | ... -> ... |
| Test.kt:118:37:124:1 | { ... } | Test.kt:123:8:123:10 | { ... } |

View File

@@ -6,40 +6,40 @@
| Test.kt:18:3:18:7 | <Expr>; | Test.kt:24:4:24:9 | ... -> ... |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:30:15:33:3 | { ... } |
| Test.kt:22:4:22:9 | <Expr>; | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:24:4:24:9 | ... -> ... | Test.kt:4:2:79:2 | test |
| Test.kt:24:4:24:9 | ... -> ... | Test.kt:4:2:79:2 | Exit |
| Test.kt:30:15:33:3 | { ... } | Test.kt:35:3:35:8 | <Expr>; |
| Test.kt:35:3:35:8 | <Expr>; | Test.kt:38:9:38:9 | x |
| Test.kt:38:9:38:9 | x | Test.kt:38:16:41:3 | { ... } |
| Test.kt:38:9:38:9 | x | Test.kt:43:3:43:8 | <Expr>; |
| Test.kt:38:16:41:3 | { ... } | Test.kt:38:9:38:9 | x |
| Test.kt:43:3:43:8 | <Expr>; | Test.kt:4:2:79:2 | test |
| Test.kt:43:3:43:8 | <Expr>; | Test.kt:4:2:79:2 | Exit |
| Test.kt:82:21:89:1 | { ... } | Test.kt:84:3:84:18 | x |
| Test.kt:82:21:89:1 | { ... } | Test.kt:86:4:88:2 | catch (...) |
| Test.kt:84:3:84:18 | x | Test.kt:82:1:89:1 | t1 |
| Test.kt:86:4:88:2 | catch (...) | Test.kt:82:1:89:1 | t1 |
| Test.kt:84:3:84:18 | x | Test.kt:82:1:89:1 | Exit |
| Test.kt:86:4:88:2 | catch (...) | Test.kt:82:1:89:1 | Exit |
| Test.kt:91:22:98:1 | { ... } | Test.kt:93:3:93:13 | x |
| Test.kt:91:22:98:1 | { ... } | Test.kt:95:4:97:2 | catch (...) |
| Test.kt:93:3:93:13 | x | Test.kt:91:1:98:1 | t2 |
| Test.kt:95:4:97:2 | catch (...) | Test.kt:91:1:98:1 | t2 |
| Test.kt:93:3:93:13 | x | Test.kt:91:1:98:1 | Exit |
| Test.kt:95:4:97:2 | catch (...) | Test.kt:91:1:98:1 | Exit |
| Test.kt:100:25:110:1 | { ... } | Test.kt:101:22:101:22 | y |
| Test.kt:100:25:110:1 | { ... } | Test.kt:105:5:109:5 | <Expr>; |
| Test.kt:101:22:101:22 | y | Test.kt:101:33:103:5 | { ... } |
| Test.kt:101:22:101:22 | y | Test.kt:105:5:109:5 | <Expr>; |
| Test.kt:101:33:103:5 | { ... } | Test.kt:100:1:110:1 | fn |
| Test.kt:101:33:103:5 | { ... } | Test.kt:100:1:110:1 | Exit |
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:105:20:107:5 | { ... } |
| Test.kt:105:5:109:5 | <Expr>; | Test.kt:107:16:109:5 | ... -> ... |
| Test.kt:105:20:107:5 | { ... } | Test.kt:100:1:110:1 | fn |
| Test.kt:107:16:109:5 | ... -> ... | Test.kt:100:1:110:1 | fn |
| Test.kt:105:20:107:5 | { ... } | Test.kt:100:1:110:1 | Exit |
| Test.kt:107:16:109:5 | ... -> ... | Test.kt:100:1:110:1 | Exit |
| Test.kt:107:16:109:5 | ... -> ... | Test.kt:107:27:109:5 | { ... } |
| Test.kt:107:27:109:5 | { ... } | Test.kt:100:1:110:1 | fn |
| Test.kt:112:32:116:1 | { ... } | Test.kt:112:1:116:1 | fn |
| Test.kt:107:27:109:5 | { ... } | Test.kt:100:1:110:1 | Exit |
| Test.kt:112:32:116:1 | { ... } | Test.kt:112:1:116:1 | Exit |
| Test.kt:112:32:116:1 | { ... } | Test.kt:113:14:113:14 | y |
| Test.kt:113:14:113:14 | y | Test.kt:112:1:116:1 | fn |
| Test.kt:113:14:113:14 | y | Test.kt:112:1:116:1 | Exit |
| Test.kt:113:14:113:14 | y | Test.kt:113:17:115:5 | { ... } |
| Test.kt:113:17:115:5 | { ... } | Test.kt:112:1:116:1 | fn |
| Test.kt:113:17:115:5 | { ... } | Test.kt:112:1:116:1 | Exit |
| Test.kt:118:37:124:1 | { ... } | Test.kt:121:9:121:9 | <Expr>; |
| Test.kt:118:37:124:1 | { ... } | Test.kt:122:12:122:16 | ... -> ... |
| Test.kt:121:9:121:9 | <Expr>; | Test.kt:118:1:124:1 | fn_when |
| Test.kt:121:9:121:9 | <Expr>; | Test.kt:118:1:124:1 | Exit |
| Test.kt:121:9:121:9 | <Expr>; | Test.kt:123:8:123:10 | { ... } |
| Test.kt:122:12:122:16 | ... -> ... | Test.kt:118:1:124:1 | fn_when |
| Test.kt:123:8:123:10 | { ... } | Test.kt:118:1:124:1 | fn_when |
| Test.kt:122:12:122:16 | ... -> ... | Test.kt:118:1:124:1 | Exit |
| Test.kt:123:8:123:10 | { ... } | Test.kt:118:1:124:1 | Exit |

View File

@@ -1,26 +1,19 @@
#select
| Test.kt:0:0:0:0 | TestKt | Class | file://:0:0:0:0 | <none> | <none> |
| Test.kt:3:1:80:1 | Test | Class | file://:0:0:0:0 | <none> | <none> |
| Test.kt:3:1:80:1 | Test | Constructor | file://:0:0:0:0 | <none> | <none> |
| Test.kt:3:1:80:1 | Exit | Constructor | file://:0:0:0:0 | <none> | <none> |
| Test.kt:3:1:80:1 | super(...) | SuperConstructorInvocationStmt | Test.kt:3:1:80:1 | { ... } | BlockStmt |
| Test.kt:3:1:80:1 | { ... } | BlockStmt | Test.kt:3:1:80:1 | Test | Constructor |
| Test.kt:3:1:80:1 | { ... } | BlockStmt | Test.kt:3:1:80:1 | Exit | Constructor |
| Test.kt:3:1:80:1 | { ... } | BlockStmt | Test.kt:3:1:80:1 | super(...) | SuperConstructorInvocationStmt |
| Test.kt:4:2:79:2 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:4:2:79:2 | test | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:4:2:79:2 | Exit | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:4:13:79:2 | { ... } | BlockStmt | Test.kt:5:3:5:16 | var ...; | LocalVariableDeclStmt |
| Test.kt:5:3:5:16 | int x | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:5:3:5:16 | var ...; | LocalVariableDeclStmt | Test.kt:5:16:5:16 | 0 | IntegerLiteral |
| Test.kt:5:3:5:16 | x | LocalVariableDeclExpr | Test.kt:6:3:6:18 | var ...; | LocalVariableDeclStmt |
| Test.kt:5:16:5:16 | 0 | IntegerLiteral | Test.kt:5:3:5:16 | x | LocalVariableDeclExpr |
| Test.kt:6:3:6:18 | long y | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:6:3:6:18 | var ...; | LocalVariableDeclStmt | Test.kt:6:17:6:18 | 50 | LongLiteral |
| Test.kt:6:3:6:18 | y | LocalVariableDeclExpr | Test.kt:7:3:7:16 | var ...; | LocalVariableDeclStmt |
| Test.kt:6:17:6:18 | 50 | LongLiteral | Test.kt:6:3:6:18 | y | LocalVariableDeclExpr |
| Test.kt:7:3:7:16 | int z | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:7:3:7:16 | var ...; | LocalVariableDeclStmt | Test.kt:7:16:7:16 | 0 | IntegerLiteral |
| Test.kt:7:3:7:16 | z | LocalVariableDeclExpr | Test.kt:8:3:8:16 | var ...; | LocalVariableDeclStmt |
| Test.kt:7:16:7:16 | 0 | IntegerLiteral | Test.kt:7:3:7:16 | z | LocalVariableDeclExpr |
| Test.kt:8:3:8:16 | int w | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:8:3:8:16 | var ...; | LocalVariableDeclStmt | Test.kt:8:16:8:16 | 0 | IntegerLiteral |
| Test.kt:8:3:8:16 | w | LocalVariableDeclExpr | Test.kt:11:3:16:3 | <Expr>; | ExprStmt |
| Test.kt:8:16:8:16 | 0 | IntegerLiteral | Test.kt:8:3:8:16 | w | LocalVariableDeclExpr |
@@ -34,22 +27,18 @@
| Test.kt:11:14:14:3 | { ... } | BlockStmt | Test.kt:12:4:12:9 | <Expr>; | ExprStmt |
| Test.kt:12:4:12:9 | ...=... | AssignExpr | Test.kt:13:4:13:9 | <Expr>; | ExprStmt |
| Test.kt:12:4:12:9 | <Expr>; | ExprStmt | Test.kt:12:8:12:9 | 20 | LongLiteral |
| Test.kt:12:4:12:9 | y | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:12:8:12:9 | 20 | LongLiteral | Test.kt:12:4:12:9 | ...=... | AssignExpr |
| Test.kt:13:4:13:9 | ...=... | AssignExpr | Test.kt:18:3:18:7 | <Expr>; | ExprStmt |
| Test.kt:13:4:13:9 | <Expr>; | ExprStmt | Test.kt:13:8:13:9 | 10 | IntegerLiteral |
| Test.kt:13:4:13:9 | z | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:13:8:13:9 | 10 | IntegerLiteral | Test.kt:13:4:13:9 | ...=... | AssignExpr |
| Test.kt:14:10:16:3 | ... -> ... | WhenBranch | Test.kt:14:10:16:3 | true | BooleanLiteral |
| Test.kt:14:10:16:3 | true | BooleanLiteral | Test.kt:14:10:16:3 | { ... } | BlockStmt |
| Test.kt:14:10:16:3 | { ... } | BlockStmt | Test.kt:15:4:15:9 | <Expr>; | ExprStmt |
| Test.kt:15:4:15:9 | ...=... | AssignExpr | Test.kt:18:3:18:7 | <Expr>; | ExprStmt |
| Test.kt:15:4:15:9 | <Expr>; | ExprStmt | Test.kt:15:8:15:9 | 30 | LongLiteral |
| Test.kt:15:4:15:9 | y | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:15:8:15:9 | 30 | LongLiteral | Test.kt:15:4:15:9 | ...=... | AssignExpr |
| Test.kt:18:3:18:7 | ...=... | AssignExpr | Test.kt:21:3:24:9 | <Expr>; | ExprStmt |
| Test.kt:18:3:18:7 | <Expr>; | ExprStmt | Test.kt:18:7:18:7 | 0 | IntegerLiteral |
| Test.kt:18:3:18:7 | z | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:18:7:18:7 | 0 | IntegerLiteral | Test.kt:18:3:18:7 | ...=... | AssignExpr |
| Test.kt:21:3:24:9 | <Expr>; | ExprStmt | Test.kt:21:3:24:9 | when ... | WhenExpr |
| Test.kt:21:3:24:9 | when ... | WhenExpr | Test.kt:21:6:22:9 | ... -> ... | WhenBranch |
@@ -60,15 +49,13 @@
| Test.kt:21:10:21:10 | 0 | IntegerLiteral | Test.kt:21:6:21:10 | ... < ... | LTExpr |
| Test.kt:22:4:22:9 | ...=... | AssignExpr | Test.kt:27:3:27:8 | <Expr>; | ExprStmt |
| Test.kt:22:4:22:9 | <Expr>; | ExprStmt | Test.kt:22:8:22:9 | 40 | LongLiteral |
| Test.kt:22:4:22:9 | y | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:22:8:22:9 | 40 | LongLiteral | Test.kt:22:4:22:9 | ...=... | AssignExpr |
| Test.kt:24:4:24:9 | ... -> ... | WhenBranch | Test.kt:24:4:24:9 | true | BooleanLiteral |
| Test.kt:24:4:24:9 | return ... | ReturnStmt | Test.kt:4:2:79:2 | test | Method |
| Test.kt:24:4:24:9 | return ... | ReturnStmt | Test.kt:4:2:79:2 | Exit | Method |
| Test.kt:24:4:24:9 | true | BooleanLiteral | Test.kt:24:10:24:10 | INSTANCE | VarAccess |
| Test.kt:24:10:24:10 | INSTANCE | VarAccess | Test.kt:24:4:24:9 | return ... | ReturnStmt |
| Test.kt:27:3:27:8 | ...=... | AssignExpr | Test.kt:30:3:33:3 | <Expr>; | ExprStmt |
| Test.kt:27:3:27:8 | <Expr>; | ExprStmt | Test.kt:27:7:27:8 | 10 | IntegerLiteral |
| Test.kt:27:3:27:8 | z | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:27:7:27:8 | 10 | IntegerLiteral | Test.kt:27:3:27:8 | ...=... | AssignExpr |
| Test.kt:30:3:33:3 | <Expr>; | ExprStmt | Test.kt:30:3:33:3 | when ... | WhenExpr |
| Test.kt:30:3:33:3 | when ... | WhenExpr | Test.kt:30:7:33:3 | ... -> ... | WhenBranch |
@@ -80,15 +67,12 @@
| Test.kt:30:15:33:3 | { ... } | BlockStmt | Test.kt:31:4:31:9 | <Expr>; | ExprStmt |
| Test.kt:31:4:31:9 | ...=... | AssignExpr | Test.kt:32:4:32:9 | <Expr>; | ExprStmt |
| Test.kt:31:4:31:9 | <Expr>; | ExprStmt | Test.kt:31:8:31:9 | 60 | LongLiteral |
| Test.kt:31:4:31:9 | y | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:31:8:31:9 | 60 | LongLiteral | Test.kt:31:4:31:9 | ...=... | AssignExpr |
| Test.kt:32:4:32:9 | ...=... | AssignExpr | Test.kt:35:3:35:8 | <Expr>; | ExprStmt |
| Test.kt:32:4:32:9 | <Expr>; | ExprStmt | Test.kt:32:8:32:9 | 10 | IntegerLiteral |
| Test.kt:32:4:32:9 | z | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:32:8:32:9 | 10 | IntegerLiteral | Test.kt:32:4:32:9 | ...=... | AssignExpr |
| Test.kt:35:3:35:8 | ...=... | AssignExpr | Test.kt:38:3:41:3 | while (...) | WhileStmt |
| Test.kt:35:3:35:8 | <Expr>; | ExprStmt | Test.kt:35:7:35:8 | 20 | IntegerLiteral |
| Test.kt:35:3:35:8 | z | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:35:7:35:8 | 20 | IntegerLiteral | Test.kt:35:3:35:8 | ...=... | AssignExpr |
| Test.kt:38:3:41:3 | while (...) | WhileStmt | Test.kt:38:9:38:9 | x | VarAccess |
| Test.kt:38:9:38:9 | x | VarAccess | Test.kt:38:13:38:13 | 0 | IntegerLiteral |
@@ -98,7 +82,6 @@
| Test.kt:38:16:41:3 | { ... } | BlockStmt | Test.kt:39:4:39:9 | <Expr>; | ExprStmt |
| Test.kt:39:4:39:9 | ...=... | AssignExpr | Test.kt:40:4:40:6 | <Expr>; | ExprStmt |
| Test.kt:39:4:39:9 | <Expr>; | ExprStmt | Test.kt:39:8:39:9 | 10 | LongLiteral |
| Test.kt:39:4:39:9 | y | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:39:8:39:9 | 10 | LongLiteral | Test.kt:39:4:39:9 | ...=... | AssignExpr |
| Test.kt:40:4:40:4 | x | VarAccess | Test.kt:40:4:40:6 | <unary> | LocalVariableDeclExpr |
| Test.kt:40:4:40:6 | ...=... | AssignExpr | Test.kt:40:4:40:6 | <Expr>; | ExprStmt |
@@ -110,77 +93,53 @@
| Test.kt:40:4:40:6 | <unary> | LocalVariableDeclExpr | Test.kt:40:4:40:6 | <Expr>; | ExprStmt |
| Test.kt:40:4:40:6 | <unary> | VarAccess | Test.kt:40:4:40:6 | <implicit coercion to unit> | ImplicitCoercionToUnitExpr |
| Test.kt:40:4:40:6 | <unary> | VarAccess | Test.kt:40:4:40:6 | dec(...) | MethodCall |
| Test.kt:40:4:40:6 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:40:4:40:6 | dec(...) | MethodCall | Test.kt:40:4:40:6 | ...=... | AssignExpr |
| Test.kt:40:4:40:6 | int <unary> | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:40:4:40:6 | var ...; | LocalVariableDeclStmt | Test.kt:40:4:40:4 | x | VarAccess |
| Test.kt:40:4:40:6 | x | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:40:4:40:6 | { ... } | BlockStmt | Test.kt:40:4:40:6 | var ...; | LocalVariableDeclStmt |
| Test.kt:43:3:43:8 | ...=... | AssignExpr | Test.kt:73:3:73:8 | <Expr>; | ExprStmt |
| Test.kt:43:3:43:8 | <Expr>; | ExprStmt | Test.kt:43:7:43:8 | 30 | IntegerLiteral |
| Test.kt:43:3:43:8 | z | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:43:7:43:8 | 30 | IntegerLiteral | Test.kt:43:3:43:8 | ...=... | AssignExpr |
| Test.kt:73:3:73:8 | ...=... | AssignExpr | Test.kt:77:3:77:8 | <Expr>; | ExprStmt |
| Test.kt:73:3:73:8 | <Expr>; | ExprStmt | Test.kt:73:7:73:8 | 50 | IntegerLiteral |
| Test.kt:73:3:73:8 | z | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:73:7:73:8 | 50 | IntegerLiteral | Test.kt:73:3:73:8 | ...=... | AssignExpr |
| Test.kt:77:3:77:8 | ...=... | AssignExpr | Test.kt:78:9:78:9 | INSTANCE | VarAccess |
| Test.kt:77:3:77:8 | <Expr>; | ExprStmt | Test.kt:77:7:77:8 | 40 | IntegerLiteral |
| Test.kt:77:3:77:8 | w | VarAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:77:7:77:8 | 40 | IntegerLiteral | Test.kt:77:3:77:8 | ...=... | AssignExpr |
| Test.kt:78:3:78:8 | return ... | ReturnStmt | Test.kt:4:2:79:2 | test | Method |
| Test.kt:78:3:78:8 | return ... | ReturnStmt | Test.kt:4:2:79:2 | Exit | Method |
| Test.kt:78:9:78:9 | INSTANCE | VarAccess | Test.kt:78:3:78:8 | return ... | ReturnStmt |
| Test.kt:82:1:89:1 | int | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:82:1:89:1 | t1 | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:82:8:82:13 | Object | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:82:8:82:13 | o | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:82:1:89:1 | Exit | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:82:21:89:1 | { ... } | BlockStmt | Test.kt:83:2:88:2 | try ... | TryStmt |
| Test.kt:83:2:88:2 | try ... | TryStmt | Test.kt:83:6:86:2 | { ... } | BlockStmt |
| Test.kt:83:6:86:2 | { ... } | BlockStmt | Test.kt:84:3:84:18 | var ...; | LocalVariableDeclStmt |
| Test.kt:84:3:84:18 | int x | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:84:3:84:18 | var ...; | LocalVariableDeclStmt | Test.kt:84:11:84:11 | o | VarAccess |
| Test.kt:84:3:84:18 | x | LocalVariableDeclExpr | Test.kt:85:10:85:10 | 1 | IntegerLiteral |
| Test.kt:84:11:84:11 | o | VarAccess | Test.kt:84:11:84:18 | (...)... | CastExpr |
| Test.kt:84:11:84:18 | (...)... | CastExpr | Test.kt:84:3:84:18 | x | LocalVariableDeclExpr |
| Test.kt:84:11:84:18 | (...)... | CastExpr | Test.kt:86:4:88:2 | catch (...) | CatchClause |
| Test.kt:84:11:84:18 | int | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:85:3:85:10 | return ... | ReturnStmt | Test.kt:82:1:89:1 | t1 | Method |
| Test.kt:85:3:85:10 | return ... | ReturnStmt | Test.kt:82:1:89:1 | Exit | Method |
| Test.kt:85:10:85:10 | 1 | IntegerLiteral | Test.kt:85:3:85:10 | return ... | ReturnStmt |
| Test.kt:86:4:88:2 | catch (...) | CatchClause | Test.kt:86:11:86:31 | e | LocalVariableDeclExpr |
| Test.kt:86:11:86:31 | ClassCastException | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:86:11:86:31 | ClassCastException e | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:86:11:86:31 | e | LocalVariableDeclExpr | Test.kt:86:34:88:2 | { ... } | BlockStmt |
| Test.kt:86:34:88:2 | { ... } | BlockStmt | Test.kt:87:10:87:10 | 2 | IntegerLiteral |
| Test.kt:87:3:87:10 | return ... | ReturnStmt | Test.kt:82:1:89:1 | t1 | Method |
| Test.kt:87:3:87:10 | return ... | ReturnStmt | Test.kt:82:1:89:1 | Exit | Method |
| Test.kt:87:10:87:10 | 2 | IntegerLiteral | Test.kt:87:3:87:10 | return ... | ReturnStmt |
| Test.kt:91:1:98:1 | int | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:91:1:98:1 | t2 | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:91:8:91:14 | Object | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:91:8:91:14 | o | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:91:1:98:1 | Exit | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:91:22:98:1 | { ... } | BlockStmt | Test.kt:92:2:97:2 | try ... | TryStmt |
| Test.kt:92:2:97:2 | try ... | TryStmt | Test.kt:92:6:95:2 | { ... } | BlockStmt |
| Test.kt:92:6:95:2 | { ... } | BlockStmt | Test.kt:93:3:93:13 | var ...; | LocalVariableDeclStmt |
| Test.kt:93:3:93:13 | Object x | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:93:3:93:13 | var ...; | LocalVariableDeclStmt | Test.kt:93:11:93:11 | o | VarAccess |
| Test.kt:93:3:93:13 | x | LocalVariableDeclExpr | Test.kt:94:10:94:10 | 1 | IntegerLiteral |
| Test.kt:93:11:93:11 | o | VarAccess | Test.kt:93:11:93:13 | ...!! | NotNullExpr |
| Test.kt:93:11:93:13 | ...!! | NotNullExpr | Test.kt:93:3:93:13 | x | LocalVariableDeclExpr |
| Test.kt:93:11:93:13 | ...!! | NotNullExpr | Test.kt:95:4:97:2 | catch (...) | CatchClause |
| Test.kt:94:3:94:10 | return ... | ReturnStmt | Test.kt:91:1:98:1 | t2 | Method |
| Test.kt:94:3:94:10 | return ... | ReturnStmt | Test.kt:91:1:98:1 | Exit | Method |
| Test.kt:94:10:94:10 | 1 | IntegerLiteral | Test.kt:94:3:94:10 | return ... | ReturnStmt |
| Test.kt:95:4:97:2 | catch (...) | CatchClause | Test.kt:95:11:95:33 | e | LocalVariableDeclExpr |
| Test.kt:95:11:95:33 | NullPointerException | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:95:11:95:33 | NullPointerException e | LocalVariableDecl | file://:0:0:0:0 | <none> | <none> |
| Test.kt:95:11:95:33 | e | LocalVariableDeclExpr | Test.kt:95:36:97:2 | { ... } | BlockStmt |
| Test.kt:95:36:97:2 | { ... } | BlockStmt | Test.kt:96:10:96:10 | 2 | IntegerLiteral |
| Test.kt:96:3:96:10 | return ... | ReturnStmt | Test.kt:91:1:98:1 | t2 | Method |
| Test.kt:96:3:96:10 | return ... | ReturnStmt | Test.kt:91:1:98:1 | Exit | Method |
| Test.kt:96:10:96:10 | 2 | IntegerLiteral | Test.kt:96:3:96:10 | return ... | ReturnStmt |
| Test.kt:100:1:110:1 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:1:110:1 | fn | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:8:100:13 | Object | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:8:100:13 | x | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:16:100:22 | Object | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:16:100:22 | y | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:1:110:1 | Exit | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:100:25:110:1 | { ... } | BlockStmt | Test.kt:101:5:103:5 | <Expr>; | ExprStmt |
| Test.kt:101:5:103:5 | <Expr>; | ExprStmt | Test.kt:101:5:103:5 | when ... | WhenExpr |
| Test.kt:101:5:103:5 | when ... | WhenExpr | Test.kt:101:9:103:5 | ... -> ... | WhenBranch |
@@ -195,8 +154,7 @@
| Test.kt:101:22:101:30 | ... (value equals) ... | ValueEQExpr | Test.kt:105:5:109:5 | <Expr>; | ExprStmt |
| Test.kt:101:27:101:30 | null | NullLiteral | Test.kt:101:22:101:30 | ... (value equals) ... | ValueEQExpr |
| Test.kt:101:33:103:5 | { ... } | BlockStmt | Test.kt:102:15:102:25 | new Exception(...) | ClassInstanceExpr |
| Test.kt:102:9:102:25 | throw ... | ThrowStmt | Test.kt:100:1:110:1 | fn | Method |
| Test.kt:102:15:102:25 | Exception | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:102:9:102:25 | throw ... | ThrowStmt | Test.kt:100:1:110:1 | Exit | Method |
| Test.kt:102:15:102:25 | new Exception(...) | ClassInstanceExpr | Test.kt:102:9:102:25 | throw ... | ThrowStmt |
| Test.kt:105:5:109:5 | <Expr>; | ExprStmt | Test.kt:105:5:109:5 | when ... | WhenExpr |
| Test.kt:105:5:109:5 | when ... | WhenExpr | Test.kt:105:9:107:5 | ... -> ... | WhenBranch |
@@ -207,41 +165,29 @@
| Test.kt:105:14:105:17 | null | NullLiteral | Test.kt:105:9:105:17 | ... (value not-equals) ... | ValueNEExpr |
| Test.kt:105:20:107:5 | { ... } | BlockStmt | Test.kt:106:9:106:29 | <Expr>; | ExprStmt |
| Test.kt:106:9:106:29 | <Expr>; | ExprStmt | Test.kt:106:17:106:28 | "x not null" | StringLiteral |
| Test.kt:106:9:106:29 | ConsoleKt | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:106:9:106:29 | println(...) | MethodCall | Test.kt:100:1:110:1 | fn | Method |
| Test.kt:106:9:106:29 | println(...) | MethodCall | Test.kt:100:1:110:1 | Exit | Method |
| Test.kt:106:17:106:28 | "x not null" | StringLiteral | Test.kt:106:9:106:29 | println(...) | MethodCall |
| Test.kt:107:16:107:16 | y | VarAccess | Test.kt:107:21:107:24 | null | NullLiteral |
| Test.kt:107:16:107:24 | ... (value not-equals) ... | ValueNEExpr | Test.kt:100:1:110:1 | fn | Method |
| Test.kt:107:16:107:24 | ... (value not-equals) ... | ValueNEExpr | Test.kt:100:1:110:1 | Exit | Method |
| Test.kt:107:16:107:24 | ... (value not-equals) ... | ValueNEExpr | Test.kt:107:27:109:5 | { ... } | BlockStmt |
| Test.kt:107:16:109:5 | ... -> ... | WhenBranch | Test.kt:107:16:107:16 | y | VarAccess |
| Test.kt:107:21:107:24 | null | NullLiteral | Test.kt:107:16:107:24 | ... (value not-equals) ... | ValueNEExpr |
| Test.kt:107:27:109:5 | { ... } | BlockStmt | Test.kt:108:9:108:29 | <Expr>; | ExprStmt |
| Test.kt:108:9:108:29 | <Expr>; | ExprStmt | Test.kt:108:17:108:28 | "y not null" | StringLiteral |
| Test.kt:108:9:108:29 | ConsoleKt | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:108:9:108:29 | println(...) | MethodCall | Test.kt:100:1:110:1 | fn | Method |
| Test.kt:108:9:108:29 | println(...) | MethodCall | Test.kt:100:1:110:1 | Exit | Method |
| Test.kt:108:17:108:28 | "y not null" | StringLiteral | Test.kt:108:9:108:29 | println(...) | MethodCall |
| Test.kt:112:1:116:1 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:112:1:116:1 | fn | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:112:8:112:17 | boolean | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:112:8:112:17 | x | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:112:20:112:29 | boolean | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:112:20:112:29 | y | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:112:1:116:1 | Exit | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:112:32:116:1 | { ... } | BlockStmt | Test.kt:113:5:115:5 | <Expr>; | ExprStmt |
| Test.kt:113:5:115:5 | <Expr>; | ExprStmt | Test.kt:113:5:115:5 | when ... | WhenExpr |
| Test.kt:113:5:115:5 | when ... | WhenExpr | Test.kt:113:9:115:5 | ... -> ... | WhenBranch |
| Test.kt:113:9:113:9 | x | VarAccess | Test.kt:112:1:116:1 | fn | Method |
| Test.kt:113:9:113:9 | x | VarAccess | Test.kt:112:1:116:1 | Exit | Method |
| Test.kt:113:9:113:9 | x | VarAccess | Test.kt:113:14:113:14 | y | VarAccess |
| Test.kt:113:9:113:14 | ... && ... | AndLogicalExpr | Test.kt:113:9:113:9 | x | VarAccess |
| Test.kt:113:9:115:5 | ... -> ... | WhenBranch | Test.kt:113:9:113:14 | ... && ... | AndLogicalExpr |
| Test.kt:113:14:113:14 | y | VarAccess | Test.kt:112:1:116:1 | fn | Method |
| Test.kt:113:14:113:14 | y | VarAccess | Test.kt:112:1:116:1 | Exit | Method |
| Test.kt:113:14:113:14 | y | VarAccess | Test.kt:113:17:115:5 | { ... } | BlockStmt |
| Test.kt:113:17:115:5 | { ... } | BlockStmt | Test.kt:112:1:116:1 | fn | Method |
| Test.kt:118:1:124:1 | Unit | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:118:1:124:1 | fn_when | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:118:13:118:22 | boolean | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:118:13:118:22 | x | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:118:25:118:34 | boolean | TypeAccess | file://:0:0:0:0 | <none> | <none> |
| Test.kt:118:25:118:34 | y | Parameter | file://:0:0:0:0 | <none> | <none> |
| Test.kt:113:17:115:5 | { ... } | BlockStmt | Test.kt:112:1:116:1 | Exit | Method |
| Test.kt:118:1:124:1 | Exit | Method | file://:0:0:0:0 | <none> | <none> |
| Test.kt:118:37:124:1 | { ... } | BlockStmt | Test.kt:119:2:123:12 | <Expr>; | ExprStmt |
| Test.kt:119:2:123:12 | <Expr>; | ExprStmt | Test.kt:119:2:123:12 | when ... | WhenExpr |
| Test.kt:119:2:123:12 | when ... | WhenExpr | Test.kt:120:3:123:10 | ... -> ... | WhenBranch |
@@ -251,11 +197,11 @@
| Test.kt:121:4:121:4 | x | VarAccess | Test.kt:122:12:122:16 | ... -> ... | WhenBranch |
| Test.kt:121:4:121:9 | ... -> ... | WhenBranch | Test.kt:121:4:121:4 | x | VarAccess |
| Test.kt:121:9:121:9 | <Expr>; | ExprStmt | Test.kt:121:9:121:9 | y | VarAccess |
| Test.kt:121:9:121:9 | y | VarAccess | Test.kt:118:1:124:1 | fn_when | Method |
| Test.kt:121:9:121:9 | y | VarAccess | Test.kt:118:1:124:1 | Exit | Method |
| Test.kt:121:9:121:9 | y | VarAccess | Test.kt:123:8:123:10 | { ... } | BlockStmt |
| Test.kt:122:12:122:16 | ... -> ... | WhenBranch | Test.kt:122:12:122:16 | true | BooleanLiteral |
| Test.kt:122:12:122:16 | <Expr>; | ExprStmt | Test.kt:122:12:122:16 | false | BooleanLiteral |
| Test.kt:122:12:122:16 | false | BooleanLiteral | Test.kt:118:1:124:1 | fn_when | Method |
| Test.kt:122:12:122:16 | false | BooleanLiteral | Test.kt:118:1:124:1 | Exit | Method |
| Test.kt:122:12:122:16 | true | BooleanLiteral | Test.kt:122:12:122:16 | <Expr>; | ExprStmt |
| Test.kt:123:8:123:10 | { ... } | BlockStmt | Test.kt:118:1:124:1 | fn_when | Method |
| Test.kt:123:8:123:10 | { ... } | BlockStmt | Test.kt:118:1:124:1 | Exit | Method |
missingSuccessor

View File

@@ -21,7 +21,7 @@ class YesMaybeControlFlowNode extends MaybeControlFlowNode {
override Location getLocation() { result = c.getLocation() }
override string getPrimaryQlClasses() { result = c.getPrimaryQlClasses() }
override string getPrimaryQlClasses() { result = c.getAstNode().getPrimaryQlClasses() }
}
class NoMaybeControlFlowNode extends MaybeControlFlowNode {
@@ -43,11 +43,11 @@ MaybeControlFlowNode maybeSuccessor(ControlFlowNode n) {
from ControlFlowNode n, MaybeControlFlowNode m
where
m = maybeSuccessor(n) and
n.getFile().(CompilationUnit).fromSource()
select n, n.getPrimaryQlClasses(), m, m.getPrimaryQlClasses()
n.getLocation().getFile().(CompilationUnit).fromSource()
select n, n.getAstNode().getPrimaryQlClasses(), m, m.getPrimaryQlClasses()
query predicate missingSuccessor(Expr n) {
maybeSuccessor(n) instanceof NoMaybeControlFlowNode and
maybeSuccessor(n.getControlFlowNode()) instanceof NoMaybeControlFlowNode and
n.getFile().(CompilationUnit).fromSource() and
not n instanceof TypeAccess and
not n instanceof VarWrite

View File

@@ -2,5 +2,5 @@ import default
import semmle.code.java.controlflow.Dominance
from Stmt pre, Stmt post
where strictlyDominates(pre, post)
where strictlyDominates(pre.getControlFlowNode(), post.getControlFlowNode())
select pre, post

View File

@@ -2,5 +2,5 @@ import default
import semmle.code.java.controlflow.Dominance
from Stmt pre, Stmt post
where strictlyPostDominates(post, pre)
where strictlyPostDominates(post.getControlFlowNode(), pre.getControlFlowNode())
select post, pre

View File

@@ -4,6 +4,6 @@ import semmle.code.java.controlflow.Dominance
from IfStmt i, BlockStmt b
where
b = i.getThen() and
dominates(i.getThen(), b) and
dominates(i.getElse(), b)
dominates(i.getThen().getControlFlowNode(), b.getControlFlowNode()) and
dominates(i.getElse().getControlFlowNode(), b.getControlFlowNode())
select i, b

View File

@@ -17,5 +17,5 @@ predicate dominanceCounterExample(ControlFlowNode entry, ControlFlowNode dom, Co
from Callable c, ControlFlowNode dom, ControlFlowNode node
where
(strictlyDominates(dom, node) or bbStrictlyDominates(dom, node)) and
dominanceCounterExample(c.getBody(), dom, node)
dominanceCounterExample(c.getBody().getControlFlowNode(), dom, node)
select c, dom, node

View File

@@ -3,14 +3,14 @@ import default
import semmle.code.java.controlflow.Dominance
ControlFlowNode reachableIn(Method func) {
result = func.getBody() or
result = func.getBody().getControlFlowNode() or
result = reachableIn(func).getASuccessor()
}
from Method func, ControlFlowNode entry, ControlFlowNode node
where
func.getBody() = entry and
func.getBody().getControlFlowNode() = entry and
reachableIn(func) = node and
entry != node and
not strictlyDominates(func.getBody(), node)
not strictlyDominates(func.getBody().getControlFlowNode(), node)
select func, node

View File

@@ -41,7 +41,7 @@
| Test.kt:21:3:24:11 | <Expr>; | Test.kt:21:3:24:11 | when ... |
| Test.kt:21:3:24:11 | when ... | Test.kt:21:7:22:9 | ... -> ... |
| Test.kt:21:7:21:7 | x | Test.kt:21:11:21:11 | 0 |
| Test.kt:21:7:21:11 | ... < ... | Test.kt:2:2:79:2 | test |
| Test.kt:21:7:21:11 | ... < ... | Test.kt:2:2:79:2 | Exit |
| Test.kt:21:7:21:11 | ... < ... | Test.kt:22:4:22:9 | <Expr>; |
| Test.kt:21:7:21:11 | ... < ... | Test.kt:24:4:24:11 | ... -> ... |
| Test.kt:21:7:22:9 | ... -> ... | Test.kt:21:7:21:7 | x |
@@ -141,7 +141,7 @@
| Test.kt:92:4:93:9 | <Expr>; | Test.kt:92:4:93:9 | when ... |
| Test.kt:92:4:93:9 | when ... | Test.kt:92:8:93:9 | ... -> ... |
| Test.kt:92:8:92:8 | a | Test.kt:92:13:92:14 | 10 |
| Test.kt:92:8:92:14 | ... (value equals) ... | Test.kt:81:2:98:2 | test2 |
| Test.kt:92:8:92:14 | ... (value equals) ... | Test.kt:81:2:98:2 | Exit |
| Test.kt:92:8:92:14 | ... (value equals) ... | Test.kt:93:5:93:9 | break |
| Test.kt:92:8:92:14 | ... (value equals) ... | Test.kt:94:4:95:12 | <Expr>; |
| Test.kt:92:8:93:9 | ... -> ... | Test.kt:92:8:92:8 | a |

View File

@@ -4,13 +4,13 @@ import semmle.code.java.controlflow.Dominance
/** transitive dominance */
ControlFlowNode reachableIn(Method func) {
result = func.getBody() or
result = func.getBody().getControlFlowNode() or
result = reachableIn(func).getASuccessor()
}
from Method func, ControlFlowNode node
where
node = reachableIn(func) and
node != func.getBody() and
node != func.getBody().getControlFlowNode() and
not iDominates(_, node)
select func, node

View File

@@ -5,7 +5,7 @@ class PathTestConf extends ActionConfiguration {
PathTestConf() { this = "PathTestConf" }
override predicate isAction(ControlFlowNode node) {
node.(MethodCall).getMethod().hasName("action")
node.asExpr().(MethodCall).getMethod().hasName("action")
}
}