From 841218540e17ba43751751e8da1d1b2e2cf537d8 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Mon, 19 Nov 2018 13:18:27 +0100 Subject: [PATCH 1/3] C#: Add CFG test This test exhibits two issues with Boolean CFG splitting: incorrect handling of negated variables and incorrect splitting for variables defined inside a loop. --- .../controlflow/graph/BasicBlock.expected | 7 + .../graph/BasicBlockDominance.expected | 34 ++++ .../controlflow/graph/BooleanNode.expected | 50 ++++++ .../controlflow/graph/ConditionBlock.expected | 11 ++ .../graph/ConditionalFlow.expected | 12 ++ .../controlflow/graph/Conditions.cs | 13 ++ .../controlflow/graph/Dominance.expected | 153 ++++++++++++++++++ .../controlflow/graph/ElementGraph.expected | 40 +++++ .../controlflow/graph/EntryElement.expected | 38 +++++ .../controlflow/graph/EntryPoint.expected | 1 + .../controlflow/graph/ExitElement.expected | 45 ++++++ .../controlflow/graph/NodeGraph.expected | 81 ++++++++++ 12 files changed, 485 insertions(+) diff --git a/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected b/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected index 3f98400488d9..b99306289696 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected @@ -164,6 +164,13 @@ | Conditions.cs:108:13:109:24 | [b (line 102): false] if (...) ... | Conditions.cs:109:17:109:23 | ... = ... | 9 | | Conditions.cs:108:13:109:24 | [b (line 102): true] if (...) ... | Conditions.cs:108:18:108:18 | [b (line 102): true] access to parameter b | 3 | | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:102:12:102:13 | exit M8 | 3 | +| Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:116:24:116:38 | ... < ... | 14 | +| Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:113:10:113:11 | exit M9 | 1 | +| Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | 13 | +| Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | 13 | +| Conditions.cs:117:9:123:9 | {...} | Conditions.cs:119:18:119:21 | access to local variable last | 13 | +| Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | 16 | +| Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | 8 | | ExitMethods.cs:7:10:7:11 | enter M1 | ExitMethods.cs:7:10:7:11 | exit M1 | 7 | | ExitMethods.cs:13:10:13:11 | enter M2 | ExitMethods.cs:13:10:13:11 | exit M2 | 7 | | ExitMethods.cs:19:10:19:11 | enter M3 | ExitMethods.cs:19:10:19:11 | exit M3 | 6 | diff --git a/csharp/ql/test/library-tests/controlflow/graph/BasicBlockDominance.expected b/csharp/ql/test/library-tests/controlflow/graph/BasicBlockDominance.expected index 04c69bbb6c69..c8b07dab74be 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/BasicBlockDominance.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/BasicBlockDominance.expected @@ -360,6 +360,21 @@ | post | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:108:13:109:24 | [b (line 102): false] if (...) ... | | post | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:108:13:109:24 | [b (line 102): true] if (...) ... | | post | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:110:16:110:16 | access to local variable x | +| post | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:113:10:113:11 | enter M9 | +| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:113:10:113:11 | enter M9 | +| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:113:10:113:11 | exit M9 | +| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | +| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:117:9:123:9 | {...} | +| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | +| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | +| post | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | +| post | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| post | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:117:9:123:9 | {...} | +| post | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| post | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | +| post | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | +| post | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | | post | ExitMethods.cs:7:10:7:11 | enter M1 | ExitMethods.cs:7:10:7:11 | enter M1 | | post | ExitMethods.cs:13:10:13:11 | enter M2 | ExitMethods.cs:13:10:13:11 | enter M2 | | post | ExitMethods.cs:19:10:19:11 | enter M3 | ExitMethods.cs:19:10:19:11 | enter M3 | @@ -1705,6 +1720,25 @@ | pre | Conditions.cs:108:13:109:24 | [b (line 102): false] if (...) ... | Conditions.cs:108:13:109:24 | [b (line 102): false] if (...) ... | | pre | Conditions.cs:108:13:109:24 | [b (line 102): true] if (...) ... | Conditions.cs:108:13:109:24 | [b (line 102): true] if (...) ... | | pre | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:110:16:110:16 | access to local variable x | +| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:113:10:113:11 | enter M9 | +| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:113:10:113:11 | exit M9 | +| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | +| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:117:9:123:9 | {...} | +| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | +| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | +| pre | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:113:10:113:11 | exit M9 | +| pre | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | +| pre | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | +| pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:117:9:123:9 | {...} | +| pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | +| pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | +| pre | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| pre | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | +| pre | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | +| pre | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | | pre | ExitMethods.cs:7:10:7:11 | enter M1 | ExitMethods.cs:7:10:7:11 | enter M1 | | pre | ExitMethods.cs:13:10:13:11 | enter M2 | ExitMethods.cs:13:10:13:11 | enter M2 | | pre | ExitMethods.cs:19:10:19:11 | enter M3 | ExitMethods.cs:19:10:19:11 | enter M3 | diff --git a/csharp/ql/test/library-tests/controlflow/graph/BooleanNode.expected b/csharp/ql/test/library-tests/controlflow/graph/BooleanNode.expected index 84ce6e8c3016..cffb5425287e 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/BooleanNode.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/BooleanNode.expected @@ -98,3 +98,53 @@ | inc (line 3): true | Conditions.cs:7:9:8:16 | [inc (line 3): true] if (...) ... | | inc (line 3): true | Conditions.cs:7:13:7:16 | [inc (line 3): true] !... | | inc (line 3): true | Conditions.cs:7:14:7:16 | [inc (line 3): true] access to parameter inc | +| last (line 118): false | Conditions.cs:116:24:116:24 | [last (line 118): false] access to local variable i | +| last (line 118): false | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | +| last (line 118): false | Conditions.cs:116:28:116:31 | [last (line 118): false] access to parameter args | +| last (line 118): false | Conditions.cs:116:28:116:38 | [last (line 118): false] access to property Length | +| last (line 118): false | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | +| last (line 118): false | Conditions.cs:116:41:116:43 | [last (line 118): false] ...++ | +| last (line 118): false | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | +| last (line 118): false | Conditions.cs:118:13:118:44 | [last (line 118): false] ... ...; | +| last (line 118): false | Conditions.cs:118:17:118:20 | [last (line 118): false] access to local variable last | +| last (line 118): false | Conditions.cs:118:17:118:43 | [last (line 118): false] Boolean last = ... | +| last (line 118): false | Conditions.cs:118:24:118:24 | [last (line 118): false] access to local variable i | +| last (line 118): false | Conditions.cs:118:24:118:43 | [last (line 118): false] ... == ... | +| last (line 118): false | Conditions.cs:118:29:118:32 | [last (line 118): false] access to parameter args | +| last (line 118): false | Conditions.cs:118:29:118:39 | [last (line 118): false] access to property Length | +| last (line 118): false | Conditions.cs:118:29:118:43 | [last (line 118): false] ... - ... | +| last (line 118): false | Conditions.cs:118:43:118:43 | [last (line 118): false] 1 | +| last (line 118): false | Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | +| last (line 118): false | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | +| last (line 118): false | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | +| last (line 118): false | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | +| last (line 118): false | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | +| last (line 118): true | Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | +| last (line 118): true | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | +| last (line 118): true | Conditions.cs:116:28:116:31 | [last (line 118): true] access to parameter args | +| last (line 118): true | Conditions.cs:116:28:116:38 | [last (line 118): true] access to property Length | +| last (line 118): true | Conditions.cs:116:41:116:41 | [last (line 118): true] access to local variable i | +| last (line 118): true | Conditions.cs:116:41:116:43 | [last (line 118): true] ...++ | +| last (line 118): true | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| last (line 118): true | Conditions.cs:118:13:118:44 | [last (line 118): true] ... ...; | +| last (line 118): true | Conditions.cs:118:17:118:20 | [last (line 118): true] access to local variable last | +| last (line 118): true | Conditions.cs:118:17:118:43 | [last (line 118): true] Boolean last = ... | +| last (line 118): true | Conditions.cs:118:24:118:24 | [last (line 118): true] access to local variable i | +| last (line 118): true | Conditions.cs:118:24:118:43 | [last (line 118): true] ... == ... | +| last (line 118): true | Conditions.cs:118:29:118:32 | [last (line 118): true] access to parameter args | +| last (line 118): true | Conditions.cs:118:29:118:39 | [last (line 118): true] access to property Length | +| last (line 118): true | Conditions.cs:118:29:118:43 | [last (line 118): true] ... - ... | +| last (line 118): true | Conditions.cs:118:43:118:43 | [last (line 118): true] 1 | +| last (line 118): true | Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | +| last (line 118): true | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | +| last (line 118): true | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | +| last (line 118): true | Conditions.cs:120:17:120:17 | [last (line 118): true] access to local variable s | +| last (line 118): true | Conditions.cs:120:17:120:22 | [last (line 118): true] ... = ... | +| last (line 118): true | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | +| last (line 118): true | Conditions.cs:120:21:120:22 | [last (line 118): true] "" | +| last (line 118): true | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | +| last (line 118): true | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | +| last (line 118): true | Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | +| last (line 118): true | Conditions.cs:122:17:122:24 | [last (line 118): true] ... = ... | +| last (line 118): true | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | +| last (line 118): true | Conditions.cs:122:21:122:24 | [last (line 118): true] null | diff --git a/csharp/ql/test/library-tests/controlflow/graph/ConditionBlock.expected b/csharp/ql/test/library-tests/controlflow/graph/ConditionBlock.expected index 6c29210d9a9f..b638840a8b8d 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/ConditionBlock.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/ConditionBlock.expected @@ -155,6 +155,17 @@ | Conditions.cs:105:13:105:13 | access to parameter b | Conditions.cs:108:13:109:24 | [b (line 102): true] if (...) ... | true | | Conditions.cs:107:13:107:24 | [b (line 102): false] ... > ... | Conditions.cs:108:13:109:24 | [b (line 102): false] if (...) ... | true | | Conditions.cs:107:13:107:24 | [b (line 102): true] ... > ... | Conditions.cs:108:13:109:24 | [b (line 102): true] if (...) ... | true | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | true | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | true | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:117:9:123:9 | {...} | true | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | true | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | true | +| Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | true | +| Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | true | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | true | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | false | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | false | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | true | | ExitMethods.cs:43:9:46:9 | [exception: Exception] catch (...) {...} | ExitMethods.cs:47:9:50:9 | [exception: Exception] catch (...) {...} | false | | ExitMethods.cs:55:13:55:13 | access to parameter b | ExitMethods.cs:56:19:56:33 | object creation of type Exception | true | | ExitMethods.cs:61:13:61:13 | access to parameter b | ExitMethods.cs:62:19:62:33 | object creation of type Exception | true | diff --git a/csharp/ql/test/library-tests/controlflow/graph/ConditionalFlow.expected b/csharp/ql/test/library-tests/controlflow/graph/ConditionalFlow.expected index 3e5ddc8b28ab..1b864ed77609 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/ConditionalFlow.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/ConditionalFlow.expected @@ -187,10 +187,22 @@ | 108 | 18 | Conditions.cs:108:18:108:18 | [b (line 102): false] access to parameter b | false | 109 | 17 | Conditions.cs:109:17:109:24 | ...; | | 108 | 18 | Conditions.cs:108:18:108:18 | [b (line 102): true] access to parameter b | true | 110 | 16 | Conditions.cs:110:16:110:16 | access to local variable x | | 110 | 20 | cflow.cs:110:20:110:23 | true | true | 111 | 13 | cflow.cs:111:13:113:13 | {...} | +| 116 | 24 | Conditions.cs:116:24:116:38 | ... < ... | false | 113 | 10 | Conditions.cs:113:10:113:11 | exit M9 | +| 116 | 24 | Conditions.cs:116:24:116:38 | ... < ... | true | 117 | 9 | Conditions.cs:117:9:123:9 | {...} | +| 116 | 24 | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | false | 113 | 10 | Conditions.cs:113:10:113:11 | exit M9 | +| 116 | 24 | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | true | 117 | 9 | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | +| 116 | 24 | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | false | 113 | 10 | Conditions.cs:113:10:113:11 | exit M9 | +| 116 | 24 | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | true | 117 | 9 | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | | 117 | 25 | Switch.cs:117:25:117:32 | ... == ... | false | 118 | 13 | Switch.cs:118:13:118:33 | case ...: | | 117 | 25 | Switch.cs:117:25:117:32 | ... == ... | true | 117 | 43 | Switch.cs:117:43:117:43 | 1 | | 118 | 25 | Switch.cs:118:25:118:31 | ... == ... | false | 120 | 17 | Switch.cs:120:17:120:17 | 1 | | 118 | 25 | Switch.cs:118:25:118:31 | ... == ... | true | 118 | 42 | Switch.cs:118:42:118:42 | 2 | +| 119 | 18 | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | true | 121 | 13 | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | +| 119 | 18 | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | false | 120 | 17 | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | +| 119 | 18 | Conditions.cs:119:18:119:21 | access to local variable last | false | 120 | 17 | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | +| 119 | 18 | Conditions.cs:119:18:119:21 | access to local variable last | true | 121 | 13 | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | +| 121 | 17 | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | false | 116 | 41 | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | +| 121 | 17 | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | true | 122 | 17 | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | | 127 | 32 | cflow.cs:127:32:127:44 | ... == ... | false | 127 | 53 | cflow.cs:127:53:127:57 | this access | | 127 | 32 | cflow.cs:127:32:127:44 | ... == ... | true | 127 | 48 | cflow.cs:127:48:127:49 | "" | | 162 | 48 | cflow.cs:162:48:162:51 | [exception: Exception] true | true | 163 | 9 | cflow.cs:163:9:165:9 | {...} | diff --git a/csharp/ql/test/library-tests/controlflow/graph/Conditions.cs b/csharp/ql/test/library-tests/controlflow/graph/Conditions.cs index 80a205f732d6..d4c5d45a579f 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/Conditions.cs +++ b/csharp/ql/test/library-tests/controlflow/graph/Conditions.cs @@ -109,4 +109,17 @@ string M8(bool b) x += ""; return x; } + + void M9(string[] args) + { + string s = null; + for(var i = 0; i < args.Length; i++) + { + var last = i == args.Length - 1; + if (!last) + s = ""; + if (last) + s = null; + } + } } diff --git a/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected b/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected index e9b2d47aff5c..688fd5c3be23 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected @@ -621,6 +621,82 @@ | post | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:107:13:107:24 | [b (line 102): true] ... > ... | | post | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:108:18:108:18 | [b (line 102): true] access to parameter b | | post | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:109:17:109:23 | ... = ... | +| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:116:24:116:38 | ... < ... | +| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | +| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | +| post | Conditions.cs:114:5:124:5 | {...} | Conditions.cs:113:10:113:11 | enter M9 | +| post | Conditions.cs:115:9:115:24 | ... ...; | Conditions.cs:114:5:124:5 | {...} | +| post | Conditions.cs:115:16:115:16 | access to local variable s | Conditions.cs:115:9:115:24 | ... ...; | +| post | Conditions.cs:115:16:115:23 | String s = ... | Conditions.cs:115:20:115:23 | null | +| post | Conditions.cs:115:20:115:23 | null | Conditions.cs:115:16:115:16 | access to local variable s | +| post | Conditions.cs:116:9:123:9 | for (...;...;...) ... | Conditions.cs:115:16:115:23 | String s = ... | +| post | Conditions.cs:116:17:116:17 | access to local variable i | Conditions.cs:116:9:123:9 | for (...;...;...) ... | +| post | Conditions.cs:116:17:116:21 | Int32 i = ... | Conditions.cs:116:21:116:21 | 0 | +| post | Conditions.cs:116:21:116:21 | 0 | Conditions.cs:116:17:116:17 | access to local variable i | +| post | Conditions.cs:116:24:116:24 | [last (line 118): false] access to local variable i | Conditions.cs:116:41:116:43 | [last (line 118): false] ...++ | +| post | Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | Conditions.cs:116:41:116:43 | [last (line 118): true] ...++ | +| post | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:17:116:21 | Int32 i = ... | +| post | Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:116:28:116:38 | access to property Length | +| post | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | Conditions.cs:116:28:116:38 | [last (line 118): false] access to property Length | +| post | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | Conditions.cs:116:28:116:38 | [last (line 118): true] access to property Length | +| post | Conditions.cs:116:28:116:31 | [last (line 118): false] access to parameter args | Conditions.cs:116:24:116:24 | [last (line 118): false] access to local variable i | +| post | Conditions.cs:116:28:116:31 | [last (line 118): true] access to parameter args | Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | +| post | Conditions.cs:116:28:116:31 | access to parameter args | Conditions.cs:116:24:116:24 | access to local variable i | +| post | Conditions.cs:116:28:116:38 | [last (line 118): false] access to property Length | Conditions.cs:116:28:116:31 | [last (line 118): false] access to parameter args | +| post | Conditions.cs:116:28:116:38 | [last (line 118): true] access to property Length | Conditions.cs:116:28:116:31 | [last (line 118): true] access to parameter args | +| post | Conditions.cs:116:28:116:38 | access to property Length | Conditions.cs:116:28:116:31 | access to parameter args | +| post | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | +| post | Conditions.cs:116:41:116:41 | [last (line 118): true] access to local variable i | Conditions.cs:122:17:122:24 | [last (line 118): true] ... = ... | +| post | Conditions.cs:116:41:116:43 | [last (line 118): false] ...++ | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | +| post | Conditions.cs:116:41:116:43 | [last (line 118): true] ...++ | Conditions.cs:116:41:116:41 | [last (line 118): true] access to local variable i | +| post | Conditions.cs:118:13:118:44 | ... ...; | Conditions.cs:117:9:123:9 | {...} | +| post | Conditions.cs:118:13:118:44 | [last (line 118): false] ... ...; | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | +| post | Conditions.cs:118:13:118:44 | [last (line 118): true] ... ...; | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| post | Conditions.cs:118:17:118:20 | [last (line 118): false] access to local variable last | Conditions.cs:118:13:118:44 | [last (line 118): false] ... ...; | +| post | Conditions.cs:118:17:118:20 | [last (line 118): true] access to local variable last | Conditions.cs:118:13:118:44 | [last (line 118): true] ... ...; | +| post | Conditions.cs:118:17:118:20 | access to local variable last | Conditions.cs:118:13:118:44 | ... ...; | +| post | Conditions.cs:118:17:118:43 | Boolean last = ... | Conditions.cs:118:24:118:43 | ... == ... | +| post | Conditions.cs:118:17:118:43 | [last (line 118): false] Boolean last = ... | Conditions.cs:118:24:118:43 | [last (line 118): false] ... == ... | +| post | Conditions.cs:118:17:118:43 | [last (line 118): true] Boolean last = ... | Conditions.cs:118:24:118:43 | [last (line 118): true] ... == ... | +| post | Conditions.cs:118:24:118:24 | [last (line 118): false] access to local variable i | Conditions.cs:118:17:118:20 | [last (line 118): false] access to local variable last | +| post | Conditions.cs:118:24:118:24 | [last (line 118): true] access to local variable i | Conditions.cs:118:17:118:20 | [last (line 118): true] access to local variable last | +| post | Conditions.cs:118:24:118:24 | access to local variable i | Conditions.cs:118:17:118:20 | access to local variable last | +| post | Conditions.cs:118:24:118:43 | ... == ... | Conditions.cs:118:29:118:43 | ... - ... | +| post | Conditions.cs:118:24:118:43 | [last (line 118): false] ... == ... | Conditions.cs:118:29:118:43 | [last (line 118): false] ... - ... | +| post | Conditions.cs:118:24:118:43 | [last (line 118): true] ... == ... | Conditions.cs:118:29:118:43 | [last (line 118): true] ... - ... | +| post | Conditions.cs:118:29:118:32 | [last (line 118): false] access to parameter args | Conditions.cs:118:24:118:24 | [last (line 118): false] access to local variable i | +| post | Conditions.cs:118:29:118:32 | [last (line 118): true] access to parameter args | Conditions.cs:118:24:118:24 | [last (line 118): true] access to local variable i | +| post | Conditions.cs:118:29:118:32 | access to parameter args | Conditions.cs:118:24:118:24 | access to local variable i | +| post | Conditions.cs:118:29:118:39 | [last (line 118): false] access to property Length | Conditions.cs:118:29:118:32 | [last (line 118): false] access to parameter args | +| post | Conditions.cs:118:29:118:39 | [last (line 118): true] access to property Length | Conditions.cs:118:29:118:32 | [last (line 118): true] access to parameter args | +| post | Conditions.cs:118:29:118:39 | access to property Length | Conditions.cs:118:29:118:32 | access to parameter args | +| post | Conditions.cs:118:29:118:43 | ... - ... | Conditions.cs:118:43:118:43 | 1 | +| post | Conditions.cs:118:29:118:43 | [last (line 118): false] ... - ... | Conditions.cs:118:43:118:43 | [last (line 118): false] 1 | +| post | Conditions.cs:118:29:118:43 | [last (line 118): true] ... - ... | Conditions.cs:118:43:118:43 | [last (line 118): true] 1 | +| post | Conditions.cs:118:43:118:43 | 1 | Conditions.cs:118:29:118:39 | access to property Length | +| post | Conditions.cs:118:43:118:43 | [last (line 118): false] 1 | Conditions.cs:118:29:118:39 | [last (line 118): false] access to property Length | +| post | Conditions.cs:118:43:118:43 | [last (line 118): true] 1 | Conditions.cs:118:29:118:39 | [last (line 118): true] access to property Length | +| post | Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | Conditions.cs:118:17:118:43 | [last (line 118): false] Boolean last = ... | +| post | Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | Conditions.cs:118:17:118:43 | [last (line 118): true] Boolean last = ... | +| post | Conditions.cs:119:13:120:23 | if (...) ... | Conditions.cs:118:17:118:43 | Boolean last = ... | +| post | Conditions.cs:119:17:119:21 | !... | Conditions.cs:119:13:120:23 | if (...) ... | +| post | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | +| post | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | +| post | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | +| post | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | +| post | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:119:17:119:21 | !... | +| post | Conditions.cs:120:17:120:17 | [last (line 118): true] access to local variable s | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | +| post | Conditions.cs:120:17:120:22 | [last (line 118): true] ... = ... | Conditions.cs:120:21:120:22 | [last (line 118): true] "" | +| post | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | +| post | Conditions.cs:120:21:120:22 | [last (line 118): true] "" | Conditions.cs:120:17:120:17 | [last (line 118): true] access to local variable s | +| post | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | +| post | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:120:17:120:22 | [last (line 118): true] ... = ... | +| post | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | +| post | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | +| post | Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | +| post | Conditions.cs:122:17:122:24 | [last (line 118): true] ... = ... | Conditions.cs:122:21:122:24 | [last (line 118): true] null | +| post | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | +| post | Conditions.cs:122:21:122:24 | [last (line 118): true] null | Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | | post | ExitMethods.cs:7:10:7:11 | exit M1 | ExitMethods.cs:10:9:10:15 | return ...; | | post | ExitMethods.cs:8:5:11:5 | {...} | ExitMethods.cs:7:10:7:11 | enter M1 | | post | ExitMethods.cs:9:9:9:24 | call to method ErrorMaybe | ExitMethods.cs:9:20:9:23 | true | @@ -2748,6 +2824,83 @@ | pre | Conditions.cs:109:22:109:23 | "" | Conditions.cs:109:17:109:23 | ... + ... | | pre | Conditions.cs:110:9:110:17 | return ...; | Conditions.cs:102:12:102:13 | exit M8 | | pre | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:110:9:110:17 | return ...; | +| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:114:5:124:5 | {...} | +| pre | Conditions.cs:114:5:124:5 | {...} | Conditions.cs:115:9:115:24 | ... ...; | +| pre | Conditions.cs:115:9:115:24 | ... ...; | Conditions.cs:115:16:115:16 | access to local variable s | +| pre | Conditions.cs:115:16:115:16 | access to local variable s | Conditions.cs:115:20:115:23 | null | +| pre | Conditions.cs:115:16:115:23 | String s = ... | Conditions.cs:116:9:123:9 | for (...;...;...) ... | +| pre | Conditions.cs:115:20:115:23 | null | Conditions.cs:115:16:115:23 | String s = ... | +| pre | Conditions.cs:116:9:123:9 | for (...;...;...) ... | Conditions.cs:116:17:116:17 | access to local variable i | +| pre | Conditions.cs:116:17:116:17 | access to local variable i | Conditions.cs:116:21:116:21 | 0 | +| pre | Conditions.cs:116:17:116:21 | Int32 i = ... | Conditions.cs:116:24:116:24 | access to local variable i | +| pre | Conditions.cs:116:21:116:21 | 0 | Conditions.cs:116:17:116:21 | Int32 i = ... | +| pre | Conditions.cs:116:24:116:24 | [last (line 118): false] access to local variable i | Conditions.cs:116:28:116:31 | [last (line 118): false] access to parameter args | +| pre | Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | Conditions.cs:116:28:116:31 | [last (line 118): true] access to parameter args | +| pre | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:28:116:31 | access to parameter args | +| pre | Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:113:10:113:11 | exit M9 | +| pre | Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:117:9:123:9 | {...} | +| pre | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | +| pre | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| pre | Conditions.cs:116:28:116:31 | [last (line 118): false] access to parameter args | Conditions.cs:116:28:116:38 | [last (line 118): false] access to property Length | +| pre | Conditions.cs:116:28:116:31 | [last (line 118): true] access to parameter args | Conditions.cs:116:28:116:38 | [last (line 118): true] access to property Length | +| pre | Conditions.cs:116:28:116:31 | access to parameter args | Conditions.cs:116:28:116:38 | access to property Length | +| pre | Conditions.cs:116:28:116:38 | [last (line 118): false] access to property Length | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | +| pre | Conditions.cs:116:28:116:38 | [last (line 118): true] access to property Length | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | +| pre | Conditions.cs:116:28:116:38 | access to property Length | Conditions.cs:116:24:116:38 | ... < ... | +| pre | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | Conditions.cs:116:41:116:43 | [last (line 118): false] ...++ | +| pre | Conditions.cs:116:41:116:41 | [last (line 118): true] access to local variable i | Conditions.cs:116:41:116:43 | [last (line 118): true] ...++ | +| pre | Conditions.cs:116:41:116:43 | [last (line 118): false] ...++ | Conditions.cs:116:24:116:24 | [last (line 118): false] access to local variable i | +| pre | Conditions.cs:116:41:116:43 | [last (line 118): true] ...++ | Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | +| pre | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | Conditions.cs:118:13:118:44 | [last (line 118): false] ... ...; | +| pre | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | Conditions.cs:118:13:118:44 | [last (line 118): true] ... ...; | +| pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:118:13:118:44 | ... ...; | +| pre | Conditions.cs:118:13:118:44 | ... ...; | Conditions.cs:118:17:118:20 | access to local variable last | +| pre | Conditions.cs:118:13:118:44 | [last (line 118): false] ... ...; | Conditions.cs:118:17:118:20 | [last (line 118): false] access to local variable last | +| pre | Conditions.cs:118:13:118:44 | [last (line 118): true] ... ...; | Conditions.cs:118:17:118:20 | [last (line 118): true] access to local variable last | +| pre | Conditions.cs:118:17:118:20 | [last (line 118): false] access to local variable last | Conditions.cs:118:24:118:24 | [last (line 118): false] access to local variable i | +| pre | Conditions.cs:118:17:118:20 | [last (line 118): true] access to local variable last | Conditions.cs:118:24:118:24 | [last (line 118): true] access to local variable i | +| pre | Conditions.cs:118:17:118:20 | access to local variable last | Conditions.cs:118:24:118:24 | access to local variable i | +| pre | Conditions.cs:118:17:118:43 | Boolean last = ... | Conditions.cs:119:13:120:23 | if (...) ... | +| pre | Conditions.cs:118:17:118:43 | [last (line 118): false] Boolean last = ... | Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | +| pre | Conditions.cs:118:17:118:43 | [last (line 118): true] Boolean last = ... | Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | +| pre | Conditions.cs:118:24:118:24 | [last (line 118): false] access to local variable i | Conditions.cs:118:29:118:32 | [last (line 118): false] access to parameter args | +| pre | Conditions.cs:118:24:118:24 | [last (line 118): true] access to local variable i | Conditions.cs:118:29:118:32 | [last (line 118): true] access to parameter args | +| pre | Conditions.cs:118:24:118:24 | access to local variable i | Conditions.cs:118:29:118:32 | access to parameter args | +| pre | Conditions.cs:118:24:118:43 | ... == ... | Conditions.cs:118:17:118:43 | Boolean last = ... | +| pre | Conditions.cs:118:24:118:43 | [last (line 118): false] ... == ... | Conditions.cs:118:17:118:43 | [last (line 118): false] Boolean last = ... | +| pre | Conditions.cs:118:24:118:43 | [last (line 118): true] ... == ... | Conditions.cs:118:17:118:43 | [last (line 118): true] Boolean last = ... | +| pre | Conditions.cs:118:29:118:32 | [last (line 118): false] access to parameter args | Conditions.cs:118:29:118:39 | [last (line 118): false] access to property Length | +| pre | Conditions.cs:118:29:118:32 | [last (line 118): true] access to parameter args | Conditions.cs:118:29:118:39 | [last (line 118): true] access to property Length | +| pre | Conditions.cs:118:29:118:32 | access to parameter args | Conditions.cs:118:29:118:39 | access to property Length | +| pre | Conditions.cs:118:29:118:39 | [last (line 118): false] access to property Length | Conditions.cs:118:43:118:43 | [last (line 118): false] 1 | +| pre | Conditions.cs:118:29:118:39 | [last (line 118): true] access to property Length | Conditions.cs:118:43:118:43 | [last (line 118): true] 1 | +| pre | Conditions.cs:118:29:118:39 | access to property Length | Conditions.cs:118:43:118:43 | 1 | +| pre | Conditions.cs:118:29:118:43 | ... - ... | Conditions.cs:118:24:118:43 | ... == ... | +| pre | Conditions.cs:118:29:118:43 | [last (line 118): false] ... - ... | Conditions.cs:118:24:118:43 | [last (line 118): false] ... == ... | +| pre | Conditions.cs:118:29:118:43 | [last (line 118): true] ... - ... | Conditions.cs:118:24:118:43 | [last (line 118): true] ... == ... | +| pre | Conditions.cs:118:43:118:43 | 1 | Conditions.cs:118:29:118:43 | ... - ... | +| pre | Conditions.cs:118:43:118:43 | [last (line 118): false] 1 | Conditions.cs:118:29:118:43 | [last (line 118): false] ... - ... | +| pre | Conditions.cs:118:43:118:43 | [last (line 118): true] 1 | Conditions.cs:118:29:118:43 | [last (line 118): true] ... - ... | +| pre | Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | +| pre | Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | +| pre | Conditions.cs:119:13:120:23 | if (...) ... | Conditions.cs:119:17:119:21 | !... | +| pre | Conditions.cs:119:17:119:21 | !... | Conditions.cs:119:18:119:21 | access to local variable last | +| pre | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | +| pre | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | +| pre | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | +| pre | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | +| pre | Conditions.cs:120:17:120:17 | [last (line 118): true] access to local variable s | Conditions.cs:120:21:120:22 | [last (line 118): true] "" | +| pre | Conditions.cs:120:17:120:22 | [last (line 118): true] ... = ... | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | +| pre | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:120:17:120:17 | [last (line 118): true] access to local variable s | +| pre | Conditions.cs:120:21:120:22 | [last (line 118): true] "" | Conditions.cs:120:17:120:22 | [last (line 118): true] ... = ... | +| pre | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | +| pre | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | +| pre | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | +| pre | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | +| pre | Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | Conditions.cs:122:21:122:24 | [last (line 118): true] null | +| pre | Conditions.cs:122:17:122:24 | [last (line 118): true] ... = ... | Conditions.cs:116:41:116:41 | [last (line 118): true] access to local variable i | +| pre | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | +| pre | Conditions.cs:122:21:122:24 | [last (line 118): true] null | Conditions.cs:122:17:122:24 | [last (line 118): true] ... = ... | | pre | ExitMethods.cs:7:10:7:11 | enter M1 | ExitMethods.cs:8:5:11:5 | {...} | | pre | ExitMethods.cs:8:5:11:5 | {...} | ExitMethods.cs:9:9:9:25 | ...; | | pre | ExitMethods.cs:9:9:9:24 | call to method ErrorMaybe | ExitMethods.cs:10:9:10:15 | return ...; | diff --git a/csharp/ql/test/library-tests/controlflow/graph/ElementGraph.expected b/csharp/ql/test/library-tests/controlflow/graph/ElementGraph.expected index 8867c45ad34f..a4158402723e 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/ElementGraph.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/ElementGraph.expected @@ -474,6 +474,46 @@ | Conditions.cs:109:17:109:24 | ...; | Conditions.cs:109:17:109:17 | access to local variable x | semmle.label | successor | | Conditions.cs:109:22:109:23 | "" | Conditions.cs:109:17:109:23 | ... + ... | semmle.label | successor | | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:110:9:110:17 | return ...; | semmle.label | successor | +| Conditions.cs:114:5:124:5 | {...} | Conditions.cs:115:9:115:24 | ... ...; | semmle.label | successor | +| Conditions.cs:115:9:115:24 | ... ...; | Conditions.cs:115:16:115:16 | access to local variable s | semmle.label | successor | +| Conditions.cs:115:16:115:16 | access to local variable s | Conditions.cs:115:20:115:23 | null | semmle.label | successor | +| Conditions.cs:115:16:115:23 | String s = ... | Conditions.cs:116:9:123:9 | for (...;...;...) ... | semmle.label | successor | +| Conditions.cs:115:20:115:23 | null | Conditions.cs:115:16:115:23 | String s = ... | semmle.label | successor | +| Conditions.cs:116:9:123:9 | for (...;...;...) ... | Conditions.cs:116:17:116:17 | access to local variable i | semmle.label | successor | +| Conditions.cs:116:17:116:17 | access to local variable i | Conditions.cs:116:21:116:21 | 0 | semmle.label | successor | +| Conditions.cs:116:17:116:21 | Int32 i = ... | Conditions.cs:116:24:116:24 | access to local variable i | semmle.label | successor | +| Conditions.cs:116:21:116:21 | 0 | Conditions.cs:116:17:116:21 | Int32 i = ... | semmle.label | successor | +| Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:28:116:31 | access to parameter args | semmle.label | successor | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:117:9:123:9 | {...} | semmle.label | true | +| Conditions.cs:116:28:116:31 | access to parameter args | Conditions.cs:116:28:116:38 | access to property Length | semmle.label | successor | +| Conditions.cs:116:28:116:38 | access to property Length | Conditions.cs:116:24:116:38 | ... < ... | semmle.label | successor | +| Conditions.cs:116:41:116:41 | access to local variable i | Conditions.cs:116:41:116:43 | ...++ | semmle.label | successor | +| Conditions.cs:116:41:116:43 | ...++ | Conditions.cs:116:24:116:24 | access to local variable i | semmle.label | successor | +| Conditions.cs:117:9:123:9 | {...} | Conditions.cs:118:13:118:44 | ... ...; | semmle.label | successor | +| Conditions.cs:118:13:118:44 | ... ...; | Conditions.cs:118:17:118:20 | access to local variable last | semmle.label | successor | +| Conditions.cs:118:17:118:20 | access to local variable last | Conditions.cs:118:24:118:24 | access to local variable i | semmle.label | successor | +| Conditions.cs:118:17:118:43 | Boolean last = ... | Conditions.cs:119:13:120:23 | if (...) ... | semmle.label | successor | +| Conditions.cs:118:24:118:24 | access to local variable i | Conditions.cs:118:29:118:32 | access to parameter args | semmle.label | successor | +| Conditions.cs:118:24:118:43 | ... == ... | Conditions.cs:118:17:118:43 | Boolean last = ... | semmle.label | successor | +| Conditions.cs:118:29:118:32 | access to parameter args | Conditions.cs:118:29:118:39 | access to property Length | semmle.label | successor | +| Conditions.cs:118:29:118:39 | access to property Length | Conditions.cs:118:43:118:43 | 1 | semmle.label | successor | +| Conditions.cs:118:29:118:43 | ... - ... | Conditions.cs:118:24:118:43 | ... == ... | semmle.label | successor | +| Conditions.cs:118:43:118:43 | 1 | Conditions.cs:118:29:118:43 | ... - ... | semmle.label | successor | +| Conditions.cs:119:13:120:23 | if (...) ... | Conditions.cs:119:17:119:21 | !... | semmle.label | successor | +| Conditions.cs:119:17:119:21 | !... | Conditions.cs:119:18:119:21 | access to local variable last | semmle.label | successor | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:120:17:120:23 | ...; | semmle.label | false | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:121:13:122:25 | if (...) ... | semmle.label | true | +| Conditions.cs:120:17:120:17 | access to local variable s | Conditions.cs:120:21:120:22 | "" | semmle.label | successor | +| Conditions.cs:120:17:120:22 | ... = ... | Conditions.cs:121:13:122:25 | if (...) ... | semmle.label | successor | +| Conditions.cs:120:17:120:23 | ...; | Conditions.cs:120:17:120:17 | access to local variable s | semmle.label | successor | +| Conditions.cs:120:21:120:22 | "" | Conditions.cs:120:17:120:22 | ... = ... | semmle.label | successor | +| Conditions.cs:121:13:122:25 | if (...) ... | Conditions.cs:121:17:121:20 | access to local variable last | semmle.label | successor | +| Conditions.cs:121:17:121:20 | access to local variable last | Conditions.cs:116:41:116:41 | access to local variable i | semmle.label | false | +| Conditions.cs:121:17:121:20 | access to local variable last | Conditions.cs:122:17:122:25 | ...; | semmle.label | true | +| Conditions.cs:122:17:122:17 | access to local variable s | Conditions.cs:122:21:122:24 | null | semmle.label | successor | +| Conditions.cs:122:17:122:24 | ... = ... | Conditions.cs:116:41:116:41 | access to local variable i | semmle.label | successor | +| Conditions.cs:122:17:122:25 | ...; | Conditions.cs:122:17:122:17 | access to local variable s | semmle.label | successor | +| Conditions.cs:122:21:122:24 | null | Conditions.cs:122:17:122:24 | ... = ... | semmle.label | successor | | ExitMethods.cs:8:5:11:5 | {...} | ExitMethods.cs:9:9:9:25 | ...; | semmle.label | successor | | ExitMethods.cs:9:9:9:24 | call to method ErrorMaybe | ExitMethods.cs:10:9:10:15 | return ...; | semmle.label | successor | | ExitMethods.cs:9:9:9:25 | ...; | ExitMethods.cs:9:20:9:23 | true | semmle.label | successor | diff --git a/csharp/ql/test/library-tests/controlflow/graph/EntryElement.expected b/csharp/ql/test/library-tests/controlflow/graph/EntryElement.expected index bcd5f55c2924..2df036510c4f 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/EntryElement.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/EntryElement.expected @@ -478,6 +478,44 @@ | Conditions.cs:109:22:109:23 | "" | Conditions.cs:109:22:109:23 | "" | | Conditions.cs:110:9:110:17 | return ...; | Conditions.cs:110:16:110:16 | access to local variable x | | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:110:16:110:16 | access to local variable x | +| Conditions.cs:114:5:124:5 | {...} | Conditions.cs:114:5:124:5 | {...} | +| Conditions.cs:115:9:115:24 | ... ...; | Conditions.cs:115:9:115:24 | ... ...; | +| Conditions.cs:115:16:115:16 | access to local variable s | Conditions.cs:115:16:115:16 | access to local variable s | +| Conditions.cs:115:16:115:23 | String s = ... | Conditions.cs:115:16:115:16 | access to local variable s | +| Conditions.cs:115:20:115:23 | null | Conditions.cs:115:20:115:23 | null | +| Conditions.cs:116:9:123:9 | for (...;...;...) ... | Conditions.cs:116:9:123:9 | for (...;...;...) ... | +| Conditions.cs:116:17:116:17 | access to local variable i | Conditions.cs:116:17:116:17 | access to local variable i | +| Conditions.cs:116:17:116:21 | Int32 i = ... | Conditions.cs:116:17:116:17 | access to local variable i | +| Conditions.cs:116:21:116:21 | 0 | Conditions.cs:116:21:116:21 | 0 | +| Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:24:116:24 | access to local variable i | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:116:24:116:24 | access to local variable i | +| Conditions.cs:116:28:116:31 | access to parameter args | Conditions.cs:116:28:116:31 | access to parameter args | +| Conditions.cs:116:28:116:38 | access to property Length | Conditions.cs:116:28:116:31 | access to parameter args | +| Conditions.cs:116:41:116:41 | access to local variable i | Conditions.cs:116:41:116:41 | access to local variable i | +| Conditions.cs:116:41:116:43 | ...++ | Conditions.cs:116:41:116:41 | access to local variable i | +| Conditions.cs:117:9:123:9 | {...} | Conditions.cs:117:9:123:9 | {...} | +| Conditions.cs:118:13:118:44 | ... ...; | Conditions.cs:118:13:118:44 | ... ...; | +| Conditions.cs:118:17:118:20 | access to local variable last | Conditions.cs:118:17:118:20 | access to local variable last | +| Conditions.cs:118:17:118:43 | Boolean last = ... | Conditions.cs:118:17:118:20 | access to local variable last | +| Conditions.cs:118:24:118:24 | access to local variable i | Conditions.cs:118:24:118:24 | access to local variable i | +| Conditions.cs:118:24:118:43 | ... == ... | Conditions.cs:118:24:118:24 | access to local variable i | +| Conditions.cs:118:29:118:32 | access to parameter args | Conditions.cs:118:29:118:32 | access to parameter args | +| Conditions.cs:118:29:118:39 | access to property Length | Conditions.cs:118:29:118:32 | access to parameter args | +| Conditions.cs:118:29:118:43 | ... - ... | Conditions.cs:118:29:118:32 | access to parameter args | +| Conditions.cs:118:43:118:43 | 1 | Conditions.cs:118:43:118:43 | 1 | +| Conditions.cs:119:13:120:23 | if (...) ... | Conditions.cs:119:13:120:23 | if (...) ... | +| Conditions.cs:119:17:119:21 | !... | Conditions.cs:119:17:119:21 | !... | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:119:18:119:21 | access to local variable last | +| Conditions.cs:120:17:120:17 | access to local variable s | Conditions.cs:120:17:120:17 | access to local variable s | +| Conditions.cs:120:17:120:22 | ... = ... | Conditions.cs:120:17:120:17 | access to local variable s | +| Conditions.cs:120:17:120:23 | ...; | Conditions.cs:120:17:120:23 | ...; | +| Conditions.cs:120:21:120:22 | "" | Conditions.cs:120:21:120:22 | "" | +| Conditions.cs:121:13:122:25 | if (...) ... | Conditions.cs:121:13:122:25 | if (...) ... | +| Conditions.cs:121:17:121:20 | access to local variable last | Conditions.cs:121:17:121:20 | access to local variable last | +| Conditions.cs:122:17:122:17 | access to local variable s | Conditions.cs:122:17:122:17 | access to local variable s | +| Conditions.cs:122:17:122:24 | ... = ... | Conditions.cs:122:17:122:17 | access to local variable s | +| Conditions.cs:122:17:122:25 | ...; | Conditions.cs:122:17:122:25 | ...; | +| Conditions.cs:122:21:122:24 | null | Conditions.cs:122:21:122:24 | null | | ExitMethods.cs:8:5:11:5 | {...} | ExitMethods.cs:8:5:11:5 | {...} | | ExitMethods.cs:9:9:9:24 | call to method ErrorMaybe | ExitMethods.cs:9:20:9:23 | true | | ExitMethods.cs:9:9:9:25 | ...; | ExitMethods.cs:9:9:9:25 | ...; | diff --git a/csharp/ql/test/library-tests/controlflow/graph/EntryPoint.expected b/csharp/ql/test/library-tests/controlflow/graph/EntryPoint.expected index f218267882b8..000b67ba018e 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/EntryPoint.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/EntryPoint.expected @@ -32,6 +32,7 @@ | Conditions.cs:70:9:70:10 | M6 | Conditions.cs:71:5:84:5 | {...} | | Conditions.cs:86:9:86:10 | M7 | Conditions.cs:87:5:100:5 | {...} | | Conditions.cs:102:12:102:13 | M8 | Conditions.cs:103:5:111:5 | {...} | +| Conditions.cs:113:10:113:11 | M9 | Conditions.cs:114:5:124:5 | {...} | | ExitMethods.cs:7:10:7:11 | M1 | ExitMethods.cs:8:5:11:5 | {...} | | ExitMethods.cs:13:10:13:11 | M2 | ExitMethods.cs:14:5:17:5 | {...} | | ExitMethods.cs:19:10:19:11 | M3 | ExitMethods.cs:20:5:23:5 | {...} | diff --git a/csharp/ql/test/library-tests/controlflow/graph/ExitElement.expected b/csharp/ql/test/library-tests/controlflow/graph/ExitElement.expected index e96a67d12e6a..21e38d8163d8 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/ExitElement.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/ExitElement.expected @@ -672,6 +672,51 @@ | Conditions.cs:109:22:109:23 | "" | Conditions.cs:109:22:109:23 | "" | normal | | Conditions.cs:110:9:110:17 | return ...; | Conditions.cs:110:9:110:17 | return ...; | return | | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:110:16:110:16 | access to local variable x | normal | +| Conditions.cs:114:5:124:5 | {...} | Conditions.cs:116:24:116:38 | ... < ... | false/false | +| Conditions.cs:115:9:115:24 | ... ...; | Conditions.cs:115:16:115:23 | String s = ... | normal | +| Conditions.cs:115:16:115:16 | access to local variable s | Conditions.cs:115:16:115:16 | access to local variable s | normal | +| Conditions.cs:115:16:115:23 | String s = ... | Conditions.cs:115:16:115:23 | String s = ... | normal | +| Conditions.cs:115:20:115:23 | null | Conditions.cs:115:20:115:23 | null | normal | +| Conditions.cs:116:9:123:9 | for (...;...;...) ... | Conditions.cs:116:24:116:38 | ... < ... | false/false | +| Conditions.cs:116:17:116:17 | access to local variable i | Conditions.cs:116:17:116:17 | access to local variable i | normal | +| Conditions.cs:116:17:116:21 | Int32 i = ... | Conditions.cs:116:17:116:21 | Int32 i = ... | normal | +| Conditions.cs:116:21:116:21 | 0 | Conditions.cs:116:21:116:21 | 0 | normal | +| Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:24:116:24 | access to local variable i | normal | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:116:24:116:38 | ... < ... | false/false | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:116:24:116:38 | ... < ... | true/true | +| Conditions.cs:116:28:116:31 | access to parameter args | Conditions.cs:116:28:116:31 | access to parameter args | normal | +| Conditions.cs:116:28:116:38 | access to property Length | Conditions.cs:116:28:116:38 | access to property Length | normal | +| Conditions.cs:116:41:116:41 | access to local variable i | Conditions.cs:116:41:116:41 | access to local variable i | normal | +| Conditions.cs:116:41:116:43 | ...++ | Conditions.cs:116:41:116:43 | ...++ | normal | +| Conditions.cs:117:9:123:9 | {...} | Conditions.cs:121:17:121:20 | access to local variable last | false/false | +| Conditions.cs:117:9:123:9 | {...} | Conditions.cs:122:17:122:24 | ... = ... | normal | +| Conditions.cs:118:13:118:44 | ... ...; | Conditions.cs:118:17:118:43 | Boolean last = ... | normal | +| Conditions.cs:118:17:118:20 | access to local variable last | Conditions.cs:118:17:118:20 | access to local variable last | normal | +| Conditions.cs:118:17:118:43 | Boolean last = ... | Conditions.cs:118:17:118:43 | Boolean last = ... | normal | +| Conditions.cs:118:24:118:24 | access to local variable i | Conditions.cs:118:24:118:24 | access to local variable i | normal | +| Conditions.cs:118:24:118:43 | ... == ... | Conditions.cs:118:24:118:43 | ... == ... | normal | +| Conditions.cs:118:29:118:32 | access to parameter args | Conditions.cs:118:29:118:32 | access to parameter args | normal | +| Conditions.cs:118:29:118:39 | access to property Length | Conditions.cs:118:29:118:39 | access to property Length | normal | +| Conditions.cs:118:29:118:43 | ... - ... | Conditions.cs:118:29:118:43 | ... - ... | normal | +| Conditions.cs:118:43:118:43 | 1 | Conditions.cs:118:43:118:43 | 1 | normal | +| Conditions.cs:119:13:120:23 | if (...) ... | Conditions.cs:119:18:119:21 | access to local variable last | false/true | +| Conditions.cs:119:13:120:23 | if (...) ... | Conditions.cs:120:17:120:22 | ... = ... | normal | +| Conditions.cs:119:17:119:21 | !... | Conditions.cs:119:18:119:21 | access to local variable last | false/true | +| Conditions.cs:119:17:119:21 | !... | Conditions.cs:119:18:119:21 | access to local variable last | true/false | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:119:18:119:21 | access to local variable last | false/false | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:119:18:119:21 | access to local variable last | true/true | +| Conditions.cs:120:17:120:17 | access to local variable s | Conditions.cs:120:17:120:17 | access to local variable s | normal | +| Conditions.cs:120:17:120:22 | ... = ... | Conditions.cs:120:17:120:22 | ... = ... | normal | +| Conditions.cs:120:17:120:23 | ...; | Conditions.cs:120:17:120:22 | ... = ... | normal | +| Conditions.cs:120:21:120:22 | "" | Conditions.cs:120:21:120:22 | "" | normal | +| Conditions.cs:121:13:122:25 | if (...) ... | Conditions.cs:121:17:121:20 | access to local variable last | false/false | +| Conditions.cs:121:13:122:25 | if (...) ... | Conditions.cs:122:17:122:24 | ... = ... | normal | +| Conditions.cs:121:17:121:20 | access to local variable last | Conditions.cs:121:17:121:20 | access to local variable last | false/false | +| Conditions.cs:121:17:121:20 | access to local variable last | Conditions.cs:121:17:121:20 | access to local variable last | true/true | +| Conditions.cs:122:17:122:17 | access to local variable s | Conditions.cs:122:17:122:17 | access to local variable s | normal | +| Conditions.cs:122:17:122:24 | ... = ... | Conditions.cs:122:17:122:24 | ... = ... | normal | +| Conditions.cs:122:17:122:25 | ...; | Conditions.cs:122:17:122:24 | ... = ... | normal | +| Conditions.cs:122:21:122:24 | null | Conditions.cs:122:21:122:24 | null | normal | | ExitMethods.cs:8:5:11:5 | {...} | ExitMethods.cs:10:9:10:15 | return ...; | return | | ExitMethods.cs:9:9:9:24 | call to method ErrorMaybe | ExitMethods.cs:9:9:9:24 | call to method ErrorMaybe | normal | | ExitMethods.cs:9:9:9:25 | ...; | ExitMethods.cs:9:9:9:24 | call to method ErrorMaybe | normal | diff --git a/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected b/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected index 66c8d0bb675f..3a9fe38084a4 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected @@ -728,6 +728,87 @@ | Conditions.cs:109:22:109:23 | "" | Conditions.cs:109:17:109:23 | ... + ... | semmle.label | successor | | Conditions.cs:110:9:110:17 | return ...; | Conditions.cs:102:12:102:13 | exit M8 | semmle.label | return | | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:110:9:110:17 | return ...; | semmle.label | successor | +| Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:114:5:124:5 | {...} | semmle.label | successor | +| Conditions.cs:114:5:124:5 | {...} | Conditions.cs:115:9:115:24 | ... ...; | semmle.label | successor | +| Conditions.cs:115:9:115:24 | ... ...; | Conditions.cs:115:16:115:16 | access to local variable s | semmle.label | successor | +| Conditions.cs:115:16:115:16 | access to local variable s | Conditions.cs:115:20:115:23 | null | semmle.label | successor | +| Conditions.cs:115:16:115:23 | String s = ... | Conditions.cs:116:9:123:9 | for (...;...;...) ... | semmle.label | successor | +| Conditions.cs:115:20:115:23 | null | Conditions.cs:115:16:115:23 | String s = ... | semmle.label | successor | +| Conditions.cs:116:9:123:9 | for (...;...;...) ... | Conditions.cs:116:17:116:17 | access to local variable i | semmle.label | successor | +| Conditions.cs:116:17:116:17 | access to local variable i | Conditions.cs:116:21:116:21 | 0 | semmle.label | successor | +| Conditions.cs:116:17:116:21 | Int32 i = ... | Conditions.cs:116:24:116:24 | access to local variable i | semmle.label | successor | +| Conditions.cs:116:21:116:21 | 0 | Conditions.cs:116:17:116:21 | Int32 i = ... | semmle.label | successor | +| Conditions.cs:116:24:116:24 | [last (line 118): false] access to local variable i | Conditions.cs:116:28:116:31 | [last (line 118): false] access to parameter args | semmle.label | successor | +| Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | Conditions.cs:116:28:116:31 | [last (line 118): true] access to parameter args | semmle.label | successor | +| Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:28:116:31 | access to parameter args | semmle.label | successor | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:113:10:113:11 | exit M9 | semmle.label | false | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:117:9:123:9 | {...} | semmle.label | true | +| Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | Conditions.cs:113:10:113:11 | exit M9 | semmle.label | false | +| Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | semmle.label | true | +| Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | Conditions.cs:113:10:113:11 | exit M9 | semmle.label | false | +| Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | semmle.label | true | +| Conditions.cs:116:28:116:31 | [last (line 118): false] access to parameter args | Conditions.cs:116:28:116:38 | [last (line 118): false] access to property Length | semmle.label | successor | +| Conditions.cs:116:28:116:31 | [last (line 118): true] access to parameter args | Conditions.cs:116:28:116:38 | [last (line 118): true] access to property Length | semmle.label | successor | +| Conditions.cs:116:28:116:31 | access to parameter args | Conditions.cs:116:28:116:38 | access to property Length | semmle.label | successor | +| Conditions.cs:116:28:116:38 | [last (line 118): false] access to property Length | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | semmle.label | successor | +| Conditions.cs:116:28:116:38 | [last (line 118): true] access to property Length | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | semmle.label | successor | +| Conditions.cs:116:28:116:38 | access to property Length | Conditions.cs:116:24:116:38 | ... < ... | semmle.label | successor | +| Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | Conditions.cs:116:41:116:43 | [last (line 118): false] ...++ | semmle.label | successor | +| Conditions.cs:116:41:116:41 | [last (line 118): true] access to local variable i | Conditions.cs:116:41:116:43 | [last (line 118): true] ...++ | semmle.label | successor | +| Conditions.cs:116:41:116:43 | [last (line 118): false] ...++ | Conditions.cs:116:24:116:24 | [last (line 118): false] access to local variable i | semmle.label | successor | +| Conditions.cs:116:41:116:43 | [last (line 118): true] ...++ | Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | semmle.label | successor | +| Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | Conditions.cs:118:13:118:44 | [last (line 118): false] ... ...; | semmle.label | successor | +| Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | Conditions.cs:118:13:118:44 | [last (line 118): true] ... ...; | semmle.label | successor | +| Conditions.cs:117:9:123:9 | {...} | Conditions.cs:118:13:118:44 | ... ...; | semmle.label | successor | +| Conditions.cs:118:13:118:44 | ... ...; | Conditions.cs:118:17:118:20 | access to local variable last | semmle.label | successor | +| Conditions.cs:118:13:118:44 | [last (line 118): false] ... ...; | Conditions.cs:118:17:118:20 | [last (line 118): false] access to local variable last | semmle.label | successor | +| Conditions.cs:118:13:118:44 | [last (line 118): true] ... ...; | Conditions.cs:118:17:118:20 | [last (line 118): true] access to local variable last | semmle.label | successor | +| Conditions.cs:118:17:118:20 | [last (line 118): false] access to local variable last | Conditions.cs:118:24:118:24 | [last (line 118): false] access to local variable i | semmle.label | successor | +| Conditions.cs:118:17:118:20 | [last (line 118): true] access to local variable last | Conditions.cs:118:24:118:24 | [last (line 118): true] access to local variable i | semmle.label | successor | +| Conditions.cs:118:17:118:20 | access to local variable last | Conditions.cs:118:24:118:24 | access to local variable i | semmle.label | successor | +| Conditions.cs:118:17:118:43 | Boolean last = ... | Conditions.cs:119:13:120:23 | if (...) ... | semmle.label | successor | +| Conditions.cs:118:17:118:43 | [last (line 118): false] Boolean last = ... | Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | semmle.label | successor | +| Conditions.cs:118:17:118:43 | [last (line 118): true] Boolean last = ... | Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | semmle.label | successor | +| Conditions.cs:118:24:118:24 | [last (line 118): false] access to local variable i | Conditions.cs:118:29:118:32 | [last (line 118): false] access to parameter args | semmle.label | successor | +| Conditions.cs:118:24:118:24 | [last (line 118): true] access to local variable i | Conditions.cs:118:29:118:32 | [last (line 118): true] access to parameter args | semmle.label | successor | +| Conditions.cs:118:24:118:24 | access to local variable i | Conditions.cs:118:29:118:32 | access to parameter args | semmle.label | successor | +| Conditions.cs:118:24:118:43 | ... == ... | Conditions.cs:118:17:118:43 | Boolean last = ... | semmle.label | successor | +| Conditions.cs:118:24:118:43 | [last (line 118): false] ... == ... | Conditions.cs:118:17:118:43 | [last (line 118): false] Boolean last = ... | semmle.label | successor | +| Conditions.cs:118:24:118:43 | [last (line 118): true] ... == ... | Conditions.cs:118:17:118:43 | [last (line 118): true] Boolean last = ... | semmle.label | successor | +| Conditions.cs:118:29:118:32 | [last (line 118): false] access to parameter args | Conditions.cs:118:29:118:39 | [last (line 118): false] access to property Length | semmle.label | successor | +| Conditions.cs:118:29:118:32 | [last (line 118): true] access to parameter args | Conditions.cs:118:29:118:39 | [last (line 118): true] access to property Length | semmle.label | successor | +| Conditions.cs:118:29:118:32 | access to parameter args | Conditions.cs:118:29:118:39 | access to property Length | semmle.label | successor | +| Conditions.cs:118:29:118:39 | [last (line 118): false] access to property Length | Conditions.cs:118:43:118:43 | [last (line 118): false] 1 | semmle.label | successor | +| Conditions.cs:118:29:118:39 | [last (line 118): true] access to property Length | Conditions.cs:118:43:118:43 | [last (line 118): true] 1 | semmle.label | successor | +| Conditions.cs:118:29:118:39 | access to property Length | Conditions.cs:118:43:118:43 | 1 | semmle.label | successor | +| Conditions.cs:118:29:118:43 | ... - ... | Conditions.cs:118:24:118:43 | ... == ... | semmle.label | successor | +| Conditions.cs:118:29:118:43 | [last (line 118): false] ... - ... | Conditions.cs:118:24:118:43 | [last (line 118): false] ... == ... | semmle.label | successor | +| Conditions.cs:118:29:118:43 | [last (line 118): true] ... - ... | Conditions.cs:118:24:118:43 | [last (line 118): true] ... == ... | semmle.label | successor | +| Conditions.cs:118:43:118:43 | 1 | Conditions.cs:118:29:118:43 | ... - ... | semmle.label | successor | +| Conditions.cs:118:43:118:43 | [last (line 118): false] 1 | Conditions.cs:118:29:118:43 | [last (line 118): false] ... - ... | semmle.label | successor | +| Conditions.cs:118:43:118:43 | [last (line 118): true] 1 | Conditions.cs:118:29:118:43 | [last (line 118): true] ... - ... | semmle.label | successor | +| Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | semmle.label | successor | +| Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | semmle.label | successor | +| Conditions.cs:119:13:120:23 | if (...) ... | Conditions.cs:119:17:119:21 | !... | semmle.label | successor | +| Conditions.cs:119:17:119:21 | !... | Conditions.cs:119:18:119:21 | access to local variable last | semmle.label | successor | +| Conditions.cs:119:17:119:21 | [last (line 118): false] !... | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | semmle.label | successor | +| Conditions.cs:119:17:119:21 | [last (line 118): true] !... | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | semmle.label | successor | +| Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | semmle.label | true | +| Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | semmle.label | false | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | semmle.label | false | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | semmle.label | true | +| Conditions.cs:120:17:120:17 | [last (line 118): true] access to local variable s | Conditions.cs:120:21:120:22 | [last (line 118): true] "" | semmle.label | successor | +| Conditions.cs:120:17:120:22 | [last (line 118): true] ... = ... | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | semmle.label | successor | +| Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:120:17:120:17 | [last (line 118): true] access to local variable s | semmle.label | successor | +| Conditions.cs:120:21:120:22 | [last (line 118): true] "" | Conditions.cs:120:17:120:22 | [last (line 118): true] ... = ... | semmle.label | successor | +| Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | semmle.label | successor | +| Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | semmle.label | successor | +| Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | semmle.label | false | +| Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | semmle.label | true | +| Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | Conditions.cs:122:21:122:24 | [last (line 118): true] null | semmle.label | successor | +| Conditions.cs:122:17:122:24 | [last (line 118): true] ... = ... | Conditions.cs:116:41:116:41 | [last (line 118): true] access to local variable i | semmle.label | successor | +| Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | semmle.label | successor | +| Conditions.cs:122:21:122:24 | [last (line 118): true] null | Conditions.cs:122:17:122:24 | [last (line 118): true] ... = ... | semmle.label | successor | | ExitMethods.cs:7:10:7:11 | enter M1 | ExitMethods.cs:8:5:11:5 | {...} | semmle.label | successor | | ExitMethods.cs:8:5:11:5 | {...} | ExitMethods.cs:9:9:9:25 | ...; | semmle.label | successor | | ExitMethods.cs:9:9:9:24 | call to method ErrorMaybe | ExitMethods.cs:10:9:10:15 | return ...; | semmle.label | successor | From 89d5daa137bd6cb52bd9e0d9a4460596a4a8718f Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Mon, 19 Nov 2018 11:39:35 +0100 Subject: [PATCH 2/3] C#: Fix Boolean splitting negation bug --- .../csharp/controlflow/ControlFlowGraph.qll | 2 +- .../controlflow/graph/BasicBlock.expected | 4 +-- .../graph/BasicBlockDominance.expected | 28 +++++++++---------- .../controlflow/graph/BooleanNode.expected | 8 +++--- .../controlflow/graph/ConditionBlock.expected | 12 ++++---- .../graph/ConditionalFlow.expected | 8 +++--- .../controlflow/graph/Dominance.expected | 24 ++++++++-------- .../controlflow/graph/NodeGraph.expected | 16 +++++------ 8 files changed, 51 insertions(+), 51 deletions(-) diff --git a/csharp/ql/src/semmle/code/csharp/controlflow/ControlFlowGraph.qll b/csharp/ql/src/semmle/code/csharp/controlflow/ControlFlowGraph.qll index 6e232bf79dab..45cefe8db178 100644 --- a/csharp/ql/src/semmle/code/csharp/controlflow/ControlFlowGraph.qll +++ b/csharp/ql/src/semmle/code/csharp/controlflow/ControlFlowGraph.qll @@ -3636,7 +3636,7 @@ module ControlFlow { override predicate hasEntry(ControlFlowElement pred, ControlFlowElement succ, Completion c) { succ = succ(pred, c) and this.getSubKind().startsSplit(pred) and - c = any(BooleanCompletion bc | bc.getOuterValue() = this.getBranch()) + c = any(BooleanCompletion bc | bc.getInnerValue() = this.getBranch()) } private ConditionBlock getACorrelatedCondition(boolean inverted) { diff --git a/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected b/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected index b99306289696..2074fcb50a36 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected @@ -169,8 +169,8 @@ | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | 13 | | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | 13 | | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:119:18:119:21 | access to local variable last | 13 | -| Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | 16 | -| Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | 8 | +| Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | 12 | +| Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | 12 | | ExitMethods.cs:7:10:7:11 | enter M1 | ExitMethods.cs:7:10:7:11 | exit M1 | 7 | | ExitMethods.cs:13:10:13:11 | enter M2 | ExitMethods.cs:13:10:13:11 | exit M2 | 7 | | ExitMethods.cs:19:10:19:11 | enter M3 | ExitMethods.cs:19:10:19:11 | exit M3 | 6 | diff --git a/csharp/ql/test/library-tests/controlflow/graph/BasicBlockDominance.expected b/csharp/ql/test/library-tests/controlflow/graph/BasicBlockDominance.expected index c8b07dab74be..ce8bb03486d4 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/BasicBlockDominance.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/BasicBlockDominance.expected @@ -366,15 +366,15 @@ | post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | | post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | | post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:117:9:123:9 | {...} | -| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | -| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | +| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | +| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | | post | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | | post | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | | post | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:117:9:123:9 | {...} | -| post | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | -| post | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | -| post | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | -| post | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | +| post | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | +| post | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | +| post | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| post | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | | post | ExitMethods.cs:7:10:7:11 | enter M1 | ExitMethods.cs:7:10:7:11 | enter M1 | | post | ExitMethods.cs:13:10:13:11 | enter M2 | ExitMethods.cs:13:10:13:11 | enter M2 | | post | ExitMethods.cs:19:10:19:11 | enter M3 | ExitMethods.cs:19:10:19:11 | enter M3 | @@ -1725,20 +1725,20 @@ | pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | | pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | | pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:117:9:123:9 | {...} | -| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | -| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | +| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | +| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | | pre | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:113:10:113:11 | exit M9 | | pre | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | | pre | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | | pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | | pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | | pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:117:9:123:9 | {...} | -| pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | -| pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | -| pre | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | -| pre | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | -| pre | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | -| pre | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | +| pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | +| pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | +| pre | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | +| pre | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | +| pre | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| pre | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | | pre | ExitMethods.cs:7:10:7:11 | enter M1 | ExitMethods.cs:7:10:7:11 | enter M1 | | pre | ExitMethods.cs:13:10:13:11 | enter M2 | ExitMethods.cs:13:10:13:11 | enter M2 | | pre | ExitMethods.cs:19:10:19:11 | enter M3 | ExitMethods.cs:19:10:19:11 | enter M3 | diff --git a/csharp/ql/test/library-tests/controlflow/graph/BooleanNode.expected b/csharp/ql/test/library-tests/controlflow/graph/BooleanNode.expected index cffb5425287e..b75da7032d18 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/BooleanNode.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/BooleanNode.expected @@ -117,6 +117,10 @@ | last (line 118): false | Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | | last (line 118): false | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | | last (line 118): false | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | +| last (line 118): false | Conditions.cs:120:17:120:17 | [last (line 118): false] access to local variable s | +| last (line 118): false | Conditions.cs:120:17:120:22 | [last (line 118): false] ... = ... | +| last (line 118): false | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | +| last (line 118): false | Conditions.cs:120:21:120:22 | [last (line 118): false] "" | | last (line 118): false | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | | last (line 118): false | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | | last (line 118): true | Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | @@ -138,10 +142,6 @@ | last (line 118): true | Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | | last (line 118): true | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | | last (line 118): true | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | -| last (line 118): true | Conditions.cs:120:17:120:17 | [last (line 118): true] access to local variable s | -| last (line 118): true | Conditions.cs:120:17:120:22 | [last (line 118): true] ... = ... | -| last (line 118): true | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | -| last (line 118): true | Conditions.cs:120:21:120:22 | [last (line 118): true] "" | | last (line 118): true | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | | last (line 118): true | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | | last (line 118): true | Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | diff --git a/csharp/ql/test/library-tests/controlflow/graph/ConditionBlock.expected b/csharp/ql/test/library-tests/controlflow/graph/ConditionBlock.expected index b638840a8b8d..d6a117841988 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/ConditionBlock.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/ConditionBlock.expected @@ -158,14 +158,14 @@ | Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | true | | Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | true | | Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:117:9:123:9 | {...} | true | -| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | true | -| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | true | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | true | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | true | | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | true | | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | true | -| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | true | -| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | false | -| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | false | -| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | true | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | false | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | true | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | false | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | true | | ExitMethods.cs:43:9:46:9 | [exception: Exception] catch (...) {...} | ExitMethods.cs:47:9:50:9 | [exception: Exception] catch (...) {...} | false | | ExitMethods.cs:55:13:55:13 | access to parameter b | ExitMethods.cs:56:19:56:33 | object creation of type Exception | true | | ExitMethods.cs:61:13:61:13 | access to parameter b | ExitMethods.cs:62:19:62:33 | object creation of type Exception | true | diff --git a/csharp/ql/test/library-tests/controlflow/graph/ConditionalFlow.expected b/csharp/ql/test/library-tests/controlflow/graph/ConditionalFlow.expected index 1b864ed77609..b8c8c98dba2c 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/ConditionalFlow.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/ConditionalFlow.expected @@ -197,10 +197,10 @@ | 117 | 25 | Switch.cs:117:25:117:32 | ... == ... | true | 117 | 43 | Switch.cs:117:43:117:43 | 1 | | 118 | 25 | Switch.cs:118:25:118:31 | ... == ... | false | 120 | 17 | Switch.cs:120:17:120:17 | 1 | | 118 | 25 | Switch.cs:118:25:118:31 | ... == ... | true | 118 | 42 | Switch.cs:118:42:118:42 | 2 | -| 119 | 18 | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | true | 121 | 13 | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | -| 119 | 18 | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | false | 120 | 17 | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | -| 119 | 18 | Conditions.cs:119:18:119:21 | access to local variable last | false | 120 | 17 | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | -| 119 | 18 | Conditions.cs:119:18:119:21 | access to local variable last | true | 121 | 13 | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | +| 119 | 18 | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | false | 120 | 17 | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | +| 119 | 18 | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | true | 121 | 13 | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | +| 119 | 18 | Conditions.cs:119:18:119:21 | access to local variable last | false | 120 | 17 | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | +| 119 | 18 | Conditions.cs:119:18:119:21 | access to local variable last | true | 121 | 13 | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | | 121 | 17 | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | false | 116 | 41 | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | | 121 | 17 | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | true | 122 | 17 | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | | 127 | 32 | cflow.cs:127:32:127:44 | ... == ... | false | 127 | 53 | cflow.cs:127:53:127:57 | this access | diff --git a/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected b/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected index 688fd5c3be23..65d4c617b0be 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected @@ -685,12 +685,12 @@ | post | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | | post | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | | post | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:119:17:119:21 | !... | -| post | Conditions.cs:120:17:120:17 | [last (line 118): true] access to local variable s | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | -| post | Conditions.cs:120:17:120:22 | [last (line 118): true] ... = ... | Conditions.cs:120:21:120:22 | [last (line 118): true] "" | -| post | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | -| post | Conditions.cs:120:21:120:22 | [last (line 118): true] "" | Conditions.cs:120:17:120:17 | [last (line 118): true] access to local variable s | -| post | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | -| post | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:120:17:120:22 | [last (line 118): true] ... = ... | +| post | Conditions.cs:120:17:120:17 | [last (line 118): false] access to local variable s | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | +| post | Conditions.cs:120:17:120:22 | [last (line 118): false] ... = ... | Conditions.cs:120:21:120:22 | [last (line 118): false] "" | +| post | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | +| post | Conditions.cs:120:21:120:22 | [last (line 118): false] "" | Conditions.cs:120:17:120:17 | [last (line 118): false] access to local variable s | +| post | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:120:17:120:22 | [last (line 118): false] ... = ... | +| post | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | | post | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | | post | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | | post | Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | @@ -2887,12 +2887,12 @@ | pre | Conditions.cs:119:17:119:21 | !... | Conditions.cs:119:18:119:21 | access to local variable last | | pre | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | | pre | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | -| pre | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | -| pre | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | -| pre | Conditions.cs:120:17:120:17 | [last (line 118): true] access to local variable s | Conditions.cs:120:21:120:22 | [last (line 118): true] "" | -| pre | Conditions.cs:120:17:120:22 | [last (line 118): true] ... = ... | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | -| pre | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:120:17:120:17 | [last (line 118): true] access to local variable s | -| pre | Conditions.cs:120:21:120:22 | [last (line 118): true] "" | Conditions.cs:120:17:120:22 | [last (line 118): true] ... = ... | +| pre | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | +| pre | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | +| pre | Conditions.cs:120:17:120:17 | [last (line 118): false] access to local variable s | Conditions.cs:120:21:120:22 | [last (line 118): false] "" | +| pre | Conditions.cs:120:17:120:22 | [last (line 118): false] ... = ... | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | +| pre | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:120:17:120:17 | [last (line 118): false] access to local variable s | +| pre | Conditions.cs:120:21:120:22 | [last (line 118): false] "" | Conditions.cs:120:17:120:22 | [last (line 118): false] ... = ... | | pre | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | | pre | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | | pre | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | diff --git a/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected b/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected index 3a9fe38084a4..a0883986ab0c 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected @@ -793,14 +793,14 @@ | Conditions.cs:119:17:119:21 | !... | Conditions.cs:119:18:119:21 | access to local variable last | semmle.label | successor | | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | semmle.label | successor | | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | semmle.label | successor | -| Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | semmle.label | true | -| Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | semmle.label | false | -| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | semmle.label | false | -| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | semmle.label | true | -| Conditions.cs:120:17:120:17 | [last (line 118): true] access to local variable s | Conditions.cs:120:21:120:22 | [last (line 118): true] "" | semmle.label | successor | -| Conditions.cs:120:17:120:22 | [last (line 118): true] ... = ... | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | semmle.label | successor | -| Conditions.cs:120:17:120:23 | [last (line 118): true] ...; | Conditions.cs:120:17:120:17 | [last (line 118): true] access to local variable s | semmle.label | successor | -| Conditions.cs:120:21:120:22 | [last (line 118): true] "" | Conditions.cs:120:17:120:22 | [last (line 118): true] ... = ... | semmle.label | successor | +| Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | semmle.label | false | +| Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | semmle.label | true | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | semmle.label | false | +| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | semmle.label | true | +| Conditions.cs:120:17:120:17 | [last (line 118): false] access to local variable s | Conditions.cs:120:21:120:22 | [last (line 118): false] "" | semmle.label | successor | +| Conditions.cs:120:17:120:22 | [last (line 118): false] ... = ... | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | semmle.label | successor | +| Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:120:17:120:17 | [last (line 118): false] access to local variable s | semmle.label | successor | +| Conditions.cs:120:21:120:22 | [last (line 118): false] "" | Conditions.cs:120:17:120:22 | [last (line 118): false] ... = ... | semmle.label | successor | | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | semmle.label | successor | | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | semmle.label | successor | | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | semmle.label | false | From 8233e34ba2359424f99d8d00c2b485c29af4c321 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Mon, 19 Nov 2018 11:55:41 +0100 Subject: [PATCH 3/3] C#: Fix Boolean splitting for variables defined in a loop --- .../csharp/controlflow/ControlFlowGraph.qll | 34 ++++--- .../controlflow/graph/BasicBlock.expected | 10 +- .../graph/BasicBlockDominance.expected | 36 ++++--- .../controlflow/graph/BooleanNode.expected | 42 -------- .../controlflow/graph/ConditionBlock.expected | 8 +- .../graph/ConditionalFlow.expected | 10 +- .../controlflow/graph/Dominance.expected | 99 +++---------------- .../controlflow/graph/NodeGraph.expected | 54 ++-------- 8 files changed, 71 insertions(+), 222 deletions(-) diff --git a/csharp/ql/src/semmle/code/csharp/controlflow/ControlFlowGraph.qll b/csharp/ql/src/semmle/code/csharp/controlflow/ControlFlowGraph.qll index 45cefe8db178..14d12af5219a 100644 --- a/csharp/ql/src/semmle/code/csharp/controlflow/ControlFlowGraph.qll +++ b/csharp/ql/src/semmle/code/csharp/controlflow/ControlFlowGraph.qll @@ -3476,6 +3476,12 @@ module ControlFlow { this.correlatesConditions(any(ConditionBlock cb | cb.getLastElement() = cfe), _, _) } + /** + * Holds if basic block `bb` can reach a condition correlated with a + * split of this kind. + */ + abstract predicate canReachCorrelatedCondition(PreBasicBlock bb); + /** Gets the callable that this Boolean split kind belongs to. */ abstract Callable getEnclosingCallable(); @@ -3553,6 +3559,17 @@ module ControlFlow { ) } + override predicate canReachCorrelatedCondition(PreBasicBlock bb) { + this.correlatesConditions(_, bb, _) and + not def.getBasicBlock() = bb + or + exists(PreBasicBlock mid | + this.canReachCorrelatedCondition(mid) | + bb = mid.getAPredecessor() and + not def.getBasicBlock() = bb + ) + } + override Callable getEnclosingCallable() { result = def.getCallable() } @@ -3662,26 +3679,13 @@ module ControlFlow { ) } - /** - * Holds if basic block `bb` can reach a condition correlated with the value - * recorded in this split. - */ - private predicate canReachCorrelatedCondition(PreBasicBlock bb) { - bb = this.getACorrelatedCondition(_) - or - exists(PreBasicBlock mid | - this.canReachCorrelatedCondition(mid) | - bb = mid.getAPredecessor() - ) - } - override predicate hasExit(ControlFlowElement pred, ControlFlowElement succ, Completion c) { exists(PreBasicBlock bb | this.appliesToBlock(bb, c) | pred = bb.getLastElement() and succ = succ(pred, c) and // Exit this split if we can no longer reach a correlated condition - not this.canReachCorrelatedCondition(succ) + not this.getSubKind().canReachCorrelatedCondition(succ) ) } @@ -3702,7 +3706,7 @@ module ControlFlow { pred = bb.getLastElement() implies // We must still be able to reach a correlated condition to stay in this split - this.canReachCorrelatedCondition(succ) and + this.getSubKind().canReachCorrelatedCondition(succ) and c = c0 ) ) diff --git a/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected b/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected index 2074fcb50a36..74e4497068df 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/BasicBlock.expected @@ -164,13 +164,13 @@ | Conditions.cs:108:13:109:24 | [b (line 102): false] if (...) ... | Conditions.cs:109:17:109:23 | ... = ... | 9 | | Conditions.cs:108:13:109:24 | [b (line 102): true] if (...) ... | Conditions.cs:108:18:108:18 | [b (line 102): true] access to parameter b | 3 | | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:102:12:102:13 | exit M8 | 3 | -| Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:116:24:116:38 | ... < ... | 14 | +| Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:116:17:116:21 | Int32 i = ... | 10 | | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:113:10:113:11 | exit M9 | 1 | -| Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | 13 | -| Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | 13 | +| Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:24:116:38 | ... < ... | 4 | +| Conditions.cs:116:41:116:41 | access to local variable i | Conditions.cs:116:41:116:43 | ...++ | 2 | | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:119:18:119:21 | access to local variable last | 13 | -| Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | 12 | -| Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | 12 | +| Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | 6 | +| Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:122:17:122:24 | ... = ... | 6 | | ExitMethods.cs:7:10:7:11 | enter M1 | ExitMethods.cs:7:10:7:11 | exit M1 | 7 | | ExitMethods.cs:13:10:13:11 | enter M2 | ExitMethods.cs:13:10:13:11 | exit M2 | 7 | | ExitMethods.cs:19:10:19:11 | enter M3 | ExitMethods.cs:19:10:19:11 | exit M3 | 6 | diff --git a/csharp/ql/test/library-tests/controlflow/graph/BasicBlockDominance.expected b/csharp/ql/test/library-tests/controlflow/graph/BasicBlockDominance.expected index ce8bb03486d4..da73ec8b0bc2 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/BasicBlockDominance.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/BasicBlockDominance.expected @@ -363,17 +363,23 @@ | post | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:113:10:113:11 | enter M9 | | post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:113:10:113:11 | enter M9 | | post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:113:10:113:11 | exit M9 | -| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | -| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:116:24:116:24 | access to local variable i | +| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:116:41:116:41 | access to local variable i | | post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:117:9:123:9 | {...} | | post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | | post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | -| post | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | -| post | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| post | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:113:10:113:11 | enter M9 | +| post | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:24:116:24 | access to local variable i | +| post | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:41:116:41 | access to local variable i | +| post | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:117:9:123:9 | {...} | +| post | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | +| post | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | +| post | Conditions.cs:116:41:116:41 | access to local variable i | Conditions.cs:116:41:116:41 | access to local variable i | +| post | Conditions.cs:116:41:116:41 | access to local variable i | Conditions.cs:117:9:123:9 | {...} | +| post | Conditions.cs:116:41:116:41 | access to local variable i | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | +| post | Conditions.cs:116:41:116:41 | access to local variable i | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | | post | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:117:9:123:9 | {...} | -| post | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | | post | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | -| post | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | | post | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | | post | ExitMethods.cs:7:10:7:11 | enter M1 | ExitMethods.cs:7:10:7:11 | enter M1 | | post | ExitMethods.cs:13:10:13:11 | enter M2 | ExitMethods.cs:13:10:13:11 | enter M2 | @@ -1722,22 +1728,24 @@ | pre | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:110:16:110:16 | access to local variable x | | pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:113:10:113:11 | enter M9 | | pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:113:10:113:11 | exit M9 | -| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | -| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:116:24:116:24 | access to local variable i | +| pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:116:41:116:41 | access to local variable i | | pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:117:9:123:9 | {...} | | pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | | pre | Conditions.cs:113:10:113:11 | enter M9 | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | | pre | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:113:10:113:11 | exit M9 | -| pre | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | -| pre | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | -| pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | -| pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | +| pre | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:113:10:113:11 | exit M9 | +| pre | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:24:116:24 | access to local variable i | +| pre | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:41:116:41 | access to local variable i | +| pre | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:117:9:123:9 | {...} | +| pre | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | +| pre | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | +| pre | Conditions.cs:116:41:116:41 | access to local variable i | Conditions.cs:116:41:116:41 | access to local variable i | +| pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:116:41:116:41 | access to local variable i | | pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:117:9:123:9 | {...} | | pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | | pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | -| pre | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | | pre | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | -| pre | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | | pre | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | | pre | ExitMethods.cs:7:10:7:11 | enter M1 | ExitMethods.cs:7:10:7:11 | enter M1 | | pre | ExitMethods.cs:13:10:13:11 | enter M2 | ExitMethods.cs:13:10:13:11 | enter M2 | diff --git a/csharp/ql/test/library-tests/controlflow/graph/BooleanNode.expected b/csharp/ql/test/library-tests/controlflow/graph/BooleanNode.expected index b75da7032d18..f8c6e8b0872c 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/BooleanNode.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/BooleanNode.expected @@ -98,53 +98,11 @@ | inc (line 3): true | Conditions.cs:7:9:8:16 | [inc (line 3): true] if (...) ... | | inc (line 3): true | Conditions.cs:7:13:7:16 | [inc (line 3): true] !... | | inc (line 3): true | Conditions.cs:7:14:7:16 | [inc (line 3): true] access to parameter inc | -| last (line 118): false | Conditions.cs:116:24:116:24 | [last (line 118): false] access to local variable i | -| last (line 118): false | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | -| last (line 118): false | Conditions.cs:116:28:116:31 | [last (line 118): false] access to parameter args | -| last (line 118): false | Conditions.cs:116:28:116:38 | [last (line 118): false] access to property Length | -| last (line 118): false | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | -| last (line 118): false | Conditions.cs:116:41:116:43 | [last (line 118): false] ...++ | -| last (line 118): false | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | -| last (line 118): false | Conditions.cs:118:13:118:44 | [last (line 118): false] ... ...; | -| last (line 118): false | Conditions.cs:118:17:118:20 | [last (line 118): false] access to local variable last | -| last (line 118): false | Conditions.cs:118:17:118:43 | [last (line 118): false] Boolean last = ... | -| last (line 118): false | Conditions.cs:118:24:118:24 | [last (line 118): false] access to local variable i | -| last (line 118): false | Conditions.cs:118:24:118:43 | [last (line 118): false] ... == ... | -| last (line 118): false | Conditions.cs:118:29:118:32 | [last (line 118): false] access to parameter args | -| last (line 118): false | Conditions.cs:118:29:118:39 | [last (line 118): false] access to property Length | -| last (line 118): false | Conditions.cs:118:29:118:43 | [last (line 118): false] ... - ... | -| last (line 118): false | Conditions.cs:118:43:118:43 | [last (line 118): false] 1 | -| last (line 118): false | Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | -| last (line 118): false | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | -| last (line 118): false | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | | last (line 118): false | Conditions.cs:120:17:120:17 | [last (line 118): false] access to local variable s | | last (line 118): false | Conditions.cs:120:17:120:22 | [last (line 118): false] ... = ... | | last (line 118): false | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | | last (line 118): false | Conditions.cs:120:21:120:22 | [last (line 118): false] "" | | last (line 118): false | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | | last (line 118): false | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | -| last (line 118): true | Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | -| last (line 118): true | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | -| last (line 118): true | Conditions.cs:116:28:116:31 | [last (line 118): true] access to parameter args | -| last (line 118): true | Conditions.cs:116:28:116:38 | [last (line 118): true] access to property Length | -| last (line 118): true | Conditions.cs:116:41:116:41 | [last (line 118): true] access to local variable i | -| last (line 118): true | Conditions.cs:116:41:116:43 | [last (line 118): true] ...++ | -| last (line 118): true | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | -| last (line 118): true | Conditions.cs:118:13:118:44 | [last (line 118): true] ... ...; | -| last (line 118): true | Conditions.cs:118:17:118:20 | [last (line 118): true] access to local variable last | -| last (line 118): true | Conditions.cs:118:17:118:43 | [last (line 118): true] Boolean last = ... | -| last (line 118): true | Conditions.cs:118:24:118:24 | [last (line 118): true] access to local variable i | -| last (line 118): true | Conditions.cs:118:24:118:43 | [last (line 118): true] ... == ... | -| last (line 118): true | Conditions.cs:118:29:118:32 | [last (line 118): true] access to parameter args | -| last (line 118): true | Conditions.cs:118:29:118:39 | [last (line 118): true] access to property Length | -| last (line 118): true | Conditions.cs:118:29:118:43 | [last (line 118): true] ... - ... | -| last (line 118): true | Conditions.cs:118:43:118:43 | [last (line 118): true] 1 | -| last (line 118): true | Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | -| last (line 118): true | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | -| last (line 118): true | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | | last (line 118): true | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | | last (line 118): true | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | -| last (line 118): true | Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | -| last (line 118): true | Conditions.cs:122:17:122:24 | [last (line 118): true] ... = ... | -| last (line 118): true | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | -| last (line 118): true | Conditions.cs:122:21:122:24 | [last (line 118): true] null | diff --git a/csharp/ql/test/library-tests/controlflow/graph/ConditionBlock.expected b/csharp/ql/test/library-tests/controlflow/graph/ConditionBlock.expected index d6a117841988..ad2b1fc3c4dc 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/ConditionBlock.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/ConditionBlock.expected @@ -155,15 +155,11 @@ | Conditions.cs:105:13:105:13 | access to parameter b | Conditions.cs:108:13:109:24 | [b (line 102): true] if (...) ... | true | | Conditions.cs:107:13:107:24 | [b (line 102): false] ... > ... | Conditions.cs:108:13:109:24 | [b (line 102): false] if (...) ... | true | | Conditions.cs:107:13:107:24 | [b (line 102): true] ... > ... | Conditions.cs:108:13:109:24 | [b (line 102): true] if (...) ... | true | -| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | true | -| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | true | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:113:10:113:11 | exit M9 | false | +| Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:116:41:116:41 | access to local variable i | true | | Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:117:9:123:9 | {...} | true | | Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | true | | Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | true | -| Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | true | -| Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | true | -| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | false | -| Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | true | | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | false | | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | true | | ExitMethods.cs:43:9:46:9 | [exception: Exception] catch (...) {...} | ExitMethods.cs:47:9:50:9 | [exception: Exception] catch (...) {...} | false | diff --git a/csharp/ql/test/library-tests/controlflow/graph/ConditionalFlow.expected b/csharp/ql/test/library-tests/controlflow/graph/ConditionalFlow.expected index b8c8c98dba2c..101b935f13aa 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/ConditionalFlow.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/ConditionalFlow.expected @@ -189,20 +189,14 @@ | 110 | 20 | cflow.cs:110:20:110:23 | true | true | 111 | 13 | cflow.cs:111:13:113:13 | {...} | | 116 | 24 | Conditions.cs:116:24:116:38 | ... < ... | false | 113 | 10 | Conditions.cs:113:10:113:11 | exit M9 | | 116 | 24 | Conditions.cs:116:24:116:38 | ... < ... | true | 117 | 9 | Conditions.cs:117:9:123:9 | {...} | -| 116 | 24 | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | false | 113 | 10 | Conditions.cs:113:10:113:11 | exit M9 | -| 116 | 24 | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | true | 117 | 9 | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | -| 116 | 24 | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | false | 113 | 10 | Conditions.cs:113:10:113:11 | exit M9 | -| 116 | 24 | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | true | 117 | 9 | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | | 117 | 25 | Switch.cs:117:25:117:32 | ... == ... | false | 118 | 13 | Switch.cs:118:13:118:33 | case ...: | | 117 | 25 | Switch.cs:117:25:117:32 | ... == ... | true | 117 | 43 | Switch.cs:117:43:117:43 | 1 | | 118 | 25 | Switch.cs:118:25:118:31 | ... == ... | false | 120 | 17 | Switch.cs:120:17:120:17 | 1 | | 118 | 25 | Switch.cs:118:25:118:31 | ... == ... | true | 118 | 42 | Switch.cs:118:42:118:42 | 2 | -| 119 | 18 | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | false | 120 | 17 | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | -| 119 | 18 | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | true | 121 | 13 | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | | 119 | 18 | Conditions.cs:119:18:119:21 | access to local variable last | false | 120 | 17 | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | | 119 | 18 | Conditions.cs:119:18:119:21 | access to local variable last | true | 121 | 13 | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | -| 121 | 17 | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | false | 116 | 41 | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | -| 121 | 17 | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | true | 122 | 17 | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | +| 121 | 17 | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | false | 116 | 41 | Conditions.cs:116:41:116:41 | access to local variable i | +| 121 | 17 | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | true | 122 | 17 | Conditions.cs:122:17:122:25 | ...; | | 127 | 32 | cflow.cs:127:32:127:44 | ... == ... | false | 127 | 53 | cflow.cs:127:53:127:57 | this access | | 127 | 32 | cflow.cs:127:32:127:44 | ... == ... | true | 127 | 48 | cflow.cs:127:48:127:49 | "" | | 162 | 48 | cflow.cs:162:48:162:51 | [exception: Exception] true | true | 163 | 9 | cflow.cs:163:9:165:9 | {...} | diff --git a/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected b/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected index 65d4c617b0be..d141f51bd5cd 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/Dominance.expected @@ -622,8 +622,6 @@ | post | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:108:18:108:18 | [b (line 102): true] access to parameter b | | post | Conditions.cs:110:16:110:16 | access to local variable x | Conditions.cs:109:17:109:23 | ... = ... | | post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:116:24:116:38 | ... < ... | -| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | -| post | Conditions.cs:113:10:113:11 | exit M9 | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | | post | Conditions.cs:114:5:124:5 | {...} | Conditions.cs:113:10:113:11 | enter M9 | | post | Conditions.cs:115:9:115:24 | ... ...; | Conditions.cs:114:5:124:5 | {...} | | post | Conditions.cs:115:16:115:16 | access to local variable s | Conditions.cs:115:9:115:24 | ... ...; | @@ -633,70 +631,36 @@ | post | Conditions.cs:116:17:116:17 | access to local variable i | Conditions.cs:116:9:123:9 | for (...;...;...) ... | | post | Conditions.cs:116:17:116:21 | Int32 i = ... | Conditions.cs:116:21:116:21 | 0 | | post | Conditions.cs:116:21:116:21 | 0 | Conditions.cs:116:17:116:17 | access to local variable i | -| post | Conditions.cs:116:24:116:24 | [last (line 118): false] access to local variable i | Conditions.cs:116:41:116:43 | [last (line 118): false] ...++ | -| post | Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | Conditions.cs:116:41:116:43 | [last (line 118): true] ...++ | | post | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:17:116:21 | Int32 i = ... | +| post | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:41:116:43 | ...++ | | post | Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:116:28:116:38 | access to property Length | -| post | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | Conditions.cs:116:28:116:38 | [last (line 118): false] access to property Length | -| post | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | Conditions.cs:116:28:116:38 | [last (line 118): true] access to property Length | -| post | Conditions.cs:116:28:116:31 | [last (line 118): false] access to parameter args | Conditions.cs:116:24:116:24 | [last (line 118): false] access to local variable i | -| post | Conditions.cs:116:28:116:31 | [last (line 118): true] access to parameter args | Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | | post | Conditions.cs:116:28:116:31 | access to parameter args | Conditions.cs:116:24:116:24 | access to local variable i | -| post | Conditions.cs:116:28:116:38 | [last (line 118): false] access to property Length | Conditions.cs:116:28:116:31 | [last (line 118): false] access to parameter args | -| post | Conditions.cs:116:28:116:38 | [last (line 118): true] access to property Length | Conditions.cs:116:28:116:31 | [last (line 118): true] access to parameter args | | post | Conditions.cs:116:28:116:38 | access to property Length | Conditions.cs:116:28:116:31 | access to parameter args | -| post | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | -| post | Conditions.cs:116:41:116:41 | [last (line 118): true] access to local variable i | Conditions.cs:122:17:122:24 | [last (line 118): true] ... = ... | -| post | Conditions.cs:116:41:116:43 | [last (line 118): false] ...++ | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | -| post | Conditions.cs:116:41:116:43 | [last (line 118): true] ...++ | Conditions.cs:116:41:116:41 | [last (line 118): true] access to local variable i | +| post | Conditions.cs:116:41:116:41 | access to local variable i | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | +| post | Conditions.cs:116:41:116:41 | access to local variable i | Conditions.cs:122:17:122:24 | ... = ... | +| post | Conditions.cs:116:41:116:43 | ...++ | Conditions.cs:116:41:116:41 | access to local variable i | | post | Conditions.cs:118:13:118:44 | ... ...; | Conditions.cs:117:9:123:9 | {...} | -| post | Conditions.cs:118:13:118:44 | [last (line 118): false] ... ...; | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | -| post | Conditions.cs:118:13:118:44 | [last (line 118): true] ... ...; | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | -| post | Conditions.cs:118:17:118:20 | [last (line 118): false] access to local variable last | Conditions.cs:118:13:118:44 | [last (line 118): false] ... ...; | -| post | Conditions.cs:118:17:118:20 | [last (line 118): true] access to local variable last | Conditions.cs:118:13:118:44 | [last (line 118): true] ... ...; | | post | Conditions.cs:118:17:118:20 | access to local variable last | Conditions.cs:118:13:118:44 | ... ...; | | post | Conditions.cs:118:17:118:43 | Boolean last = ... | Conditions.cs:118:24:118:43 | ... == ... | -| post | Conditions.cs:118:17:118:43 | [last (line 118): false] Boolean last = ... | Conditions.cs:118:24:118:43 | [last (line 118): false] ... == ... | -| post | Conditions.cs:118:17:118:43 | [last (line 118): true] Boolean last = ... | Conditions.cs:118:24:118:43 | [last (line 118): true] ... == ... | -| post | Conditions.cs:118:24:118:24 | [last (line 118): false] access to local variable i | Conditions.cs:118:17:118:20 | [last (line 118): false] access to local variable last | -| post | Conditions.cs:118:24:118:24 | [last (line 118): true] access to local variable i | Conditions.cs:118:17:118:20 | [last (line 118): true] access to local variable last | | post | Conditions.cs:118:24:118:24 | access to local variable i | Conditions.cs:118:17:118:20 | access to local variable last | | post | Conditions.cs:118:24:118:43 | ... == ... | Conditions.cs:118:29:118:43 | ... - ... | -| post | Conditions.cs:118:24:118:43 | [last (line 118): false] ... == ... | Conditions.cs:118:29:118:43 | [last (line 118): false] ... - ... | -| post | Conditions.cs:118:24:118:43 | [last (line 118): true] ... == ... | Conditions.cs:118:29:118:43 | [last (line 118): true] ... - ... | -| post | Conditions.cs:118:29:118:32 | [last (line 118): false] access to parameter args | Conditions.cs:118:24:118:24 | [last (line 118): false] access to local variable i | -| post | Conditions.cs:118:29:118:32 | [last (line 118): true] access to parameter args | Conditions.cs:118:24:118:24 | [last (line 118): true] access to local variable i | | post | Conditions.cs:118:29:118:32 | access to parameter args | Conditions.cs:118:24:118:24 | access to local variable i | -| post | Conditions.cs:118:29:118:39 | [last (line 118): false] access to property Length | Conditions.cs:118:29:118:32 | [last (line 118): false] access to parameter args | -| post | Conditions.cs:118:29:118:39 | [last (line 118): true] access to property Length | Conditions.cs:118:29:118:32 | [last (line 118): true] access to parameter args | | post | Conditions.cs:118:29:118:39 | access to property Length | Conditions.cs:118:29:118:32 | access to parameter args | | post | Conditions.cs:118:29:118:43 | ... - ... | Conditions.cs:118:43:118:43 | 1 | -| post | Conditions.cs:118:29:118:43 | [last (line 118): false] ... - ... | Conditions.cs:118:43:118:43 | [last (line 118): false] 1 | -| post | Conditions.cs:118:29:118:43 | [last (line 118): true] ... - ... | Conditions.cs:118:43:118:43 | [last (line 118): true] 1 | | post | Conditions.cs:118:43:118:43 | 1 | Conditions.cs:118:29:118:39 | access to property Length | -| post | Conditions.cs:118:43:118:43 | [last (line 118): false] 1 | Conditions.cs:118:29:118:39 | [last (line 118): false] access to property Length | -| post | Conditions.cs:118:43:118:43 | [last (line 118): true] 1 | Conditions.cs:118:29:118:39 | [last (line 118): true] access to property Length | -| post | Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | Conditions.cs:118:17:118:43 | [last (line 118): false] Boolean last = ... | -| post | Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | Conditions.cs:118:17:118:43 | [last (line 118): true] Boolean last = ... | | post | Conditions.cs:119:13:120:23 | if (...) ... | Conditions.cs:118:17:118:43 | Boolean last = ... | | post | Conditions.cs:119:17:119:21 | !... | Conditions.cs:119:13:120:23 | if (...) ... | -| post | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | -| post | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | -| post | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | -| post | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | | post | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:119:17:119:21 | !... | | post | Conditions.cs:120:17:120:17 | [last (line 118): false] access to local variable s | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | | post | Conditions.cs:120:17:120:22 | [last (line 118): false] ... = ... | Conditions.cs:120:21:120:22 | [last (line 118): false] "" | -| post | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | | post | Conditions.cs:120:21:120:22 | [last (line 118): false] "" | Conditions.cs:120:17:120:17 | [last (line 118): false] access to local variable s | | post | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:120:17:120:22 | [last (line 118): false] ... = ... | -| post | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | | post | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | | post | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | -| post | Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | -| post | Conditions.cs:122:17:122:24 | [last (line 118): true] ... = ... | Conditions.cs:122:21:122:24 | [last (line 118): true] null | -| post | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | -| post | Conditions.cs:122:21:122:24 | [last (line 118): true] null | Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | +| post | Conditions.cs:122:17:122:17 | access to local variable s | Conditions.cs:122:17:122:25 | ...; | +| post | Conditions.cs:122:17:122:24 | ... = ... | Conditions.cs:122:21:122:24 | null | +| post | Conditions.cs:122:17:122:25 | ...; | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | +| post | Conditions.cs:122:21:122:24 | null | Conditions.cs:122:17:122:17 | access to local variable s | | post | ExitMethods.cs:7:10:7:11 | exit M1 | ExitMethods.cs:10:9:10:15 | return ...; | | post | ExitMethods.cs:8:5:11:5 | {...} | ExitMethods.cs:7:10:7:11 | enter M1 | | post | ExitMethods.cs:9:9:9:24 | call to method ErrorMaybe | ExitMethods.cs:9:20:9:23 | true | @@ -2834,59 +2798,24 @@ | pre | Conditions.cs:116:17:116:17 | access to local variable i | Conditions.cs:116:21:116:21 | 0 | | pre | Conditions.cs:116:17:116:21 | Int32 i = ... | Conditions.cs:116:24:116:24 | access to local variable i | | pre | Conditions.cs:116:21:116:21 | 0 | Conditions.cs:116:17:116:21 | Int32 i = ... | -| pre | Conditions.cs:116:24:116:24 | [last (line 118): false] access to local variable i | Conditions.cs:116:28:116:31 | [last (line 118): false] access to parameter args | -| pre | Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | Conditions.cs:116:28:116:31 | [last (line 118): true] access to parameter args | | pre | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:28:116:31 | access to parameter args | | pre | Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:113:10:113:11 | exit M9 | | pre | Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:117:9:123:9 | {...} | -| pre | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | -| pre | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | -| pre | Conditions.cs:116:28:116:31 | [last (line 118): false] access to parameter args | Conditions.cs:116:28:116:38 | [last (line 118): false] access to property Length | -| pre | Conditions.cs:116:28:116:31 | [last (line 118): true] access to parameter args | Conditions.cs:116:28:116:38 | [last (line 118): true] access to property Length | | pre | Conditions.cs:116:28:116:31 | access to parameter args | Conditions.cs:116:28:116:38 | access to property Length | -| pre | Conditions.cs:116:28:116:38 | [last (line 118): false] access to property Length | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | -| pre | Conditions.cs:116:28:116:38 | [last (line 118): true] access to property Length | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | | pre | Conditions.cs:116:28:116:38 | access to property Length | Conditions.cs:116:24:116:38 | ... < ... | -| pre | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | Conditions.cs:116:41:116:43 | [last (line 118): false] ...++ | -| pre | Conditions.cs:116:41:116:41 | [last (line 118): true] access to local variable i | Conditions.cs:116:41:116:43 | [last (line 118): true] ...++ | -| pre | Conditions.cs:116:41:116:43 | [last (line 118): false] ...++ | Conditions.cs:116:24:116:24 | [last (line 118): false] access to local variable i | -| pre | Conditions.cs:116:41:116:43 | [last (line 118): true] ...++ | Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | -| pre | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | Conditions.cs:118:13:118:44 | [last (line 118): false] ... ...; | -| pre | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | Conditions.cs:118:13:118:44 | [last (line 118): true] ... ...; | +| pre | Conditions.cs:116:41:116:41 | access to local variable i | Conditions.cs:116:41:116:43 | ...++ | | pre | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:118:13:118:44 | ... ...; | | pre | Conditions.cs:118:13:118:44 | ... ...; | Conditions.cs:118:17:118:20 | access to local variable last | -| pre | Conditions.cs:118:13:118:44 | [last (line 118): false] ... ...; | Conditions.cs:118:17:118:20 | [last (line 118): false] access to local variable last | -| pre | Conditions.cs:118:13:118:44 | [last (line 118): true] ... ...; | Conditions.cs:118:17:118:20 | [last (line 118): true] access to local variable last | -| pre | Conditions.cs:118:17:118:20 | [last (line 118): false] access to local variable last | Conditions.cs:118:24:118:24 | [last (line 118): false] access to local variable i | -| pre | Conditions.cs:118:17:118:20 | [last (line 118): true] access to local variable last | Conditions.cs:118:24:118:24 | [last (line 118): true] access to local variable i | | pre | Conditions.cs:118:17:118:20 | access to local variable last | Conditions.cs:118:24:118:24 | access to local variable i | | pre | Conditions.cs:118:17:118:43 | Boolean last = ... | Conditions.cs:119:13:120:23 | if (...) ... | -| pre | Conditions.cs:118:17:118:43 | [last (line 118): false] Boolean last = ... | Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | -| pre | Conditions.cs:118:17:118:43 | [last (line 118): true] Boolean last = ... | Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | -| pre | Conditions.cs:118:24:118:24 | [last (line 118): false] access to local variable i | Conditions.cs:118:29:118:32 | [last (line 118): false] access to parameter args | -| pre | Conditions.cs:118:24:118:24 | [last (line 118): true] access to local variable i | Conditions.cs:118:29:118:32 | [last (line 118): true] access to parameter args | | pre | Conditions.cs:118:24:118:24 | access to local variable i | Conditions.cs:118:29:118:32 | access to parameter args | | pre | Conditions.cs:118:24:118:43 | ... == ... | Conditions.cs:118:17:118:43 | Boolean last = ... | -| pre | Conditions.cs:118:24:118:43 | [last (line 118): false] ... == ... | Conditions.cs:118:17:118:43 | [last (line 118): false] Boolean last = ... | -| pre | Conditions.cs:118:24:118:43 | [last (line 118): true] ... == ... | Conditions.cs:118:17:118:43 | [last (line 118): true] Boolean last = ... | -| pre | Conditions.cs:118:29:118:32 | [last (line 118): false] access to parameter args | Conditions.cs:118:29:118:39 | [last (line 118): false] access to property Length | -| pre | Conditions.cs:118:29:118:32 | [last (line 118): true] access to parameter args | Conditions.cs:118:29:118:39 | [last (line 118): true] access to property Length | | pre | Conditions.cs:118:29:118:32 | access to parameter args | Conditions.cs:118:29:118:39 | access to property Length | -| pre | Conditions.cs:118:29:118:39 | [last (line 118): false] access to property Length | Conditions.cs:118:43:118:43 | [last (line 118): false] 1 | -| pre | Conditions.cs:118:29:118:39 | [last (line 118): true] access to property Length | Conditions.cs:118:43:118:43 | [last (line 118): true] 1 | | pre | Conditions.cs:118:29:118:39 | access to property Length | Conditions.cs:118:43:118:43 | 1 | | pre | Conditions.cs:118:29:118:43 | ... - ... | Conditions.cs:118:24:118:43 | ... == ... | -| pre | Conditions.cs:118:29:118:43 | [last (line 118): false] ... - ... | Conditions.cs:118:24:118:43 | [last (line 118): false] ... == ... | -| pre | Conditions.cs:118:29:118:43 | [last (line 118): true] ... - ... | Conditions.cs:118:24:118:43 | [last (line 118): true] ... == ... | | pre | Conditions.cs:118:43:118:43 | 1 | Conditions.cs:118:29:118:43 | ... - ... | -| pre | Conditions.cs:118:43:118:43 | [last (line 118): false] 1 | Conditions.cs:118:29:118:43 | [last (line 118): false] ... - ... | -| pre | Conditions.cs:118:43:118:43 | [last (line 118): true] 1 | Conditions.cs:118:29:118:43 | [last (line 118): true] ... - ... | -| pre | Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | -| pre | Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | | pre | Conditions.cs:119:13:120:23 | if (...) ... | Conditions.cs:119:17:119:21 | !... | | pre | Conditions.cs:119:17:119:21 | !... | Conditions.cs:119:18:119:21 | access to local variable last | -| pre | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | -| pre | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | | pre | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | | pre | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | | pre | Conditions.cs:120:17:120:17 | [last (line 118): false] access to local variable s | Conditions.cs:120:21:120:22 | [last (line 118): false] "" | @@ -2895,12 +2824,10 @@ | pre | Conditions.cs:120:21:120:22 | [last (line 118): false] "" | Conditions.cs:120:17:120:22 | [last (line 118): false] ... = ... | | pre | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | | pre | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | -| pre | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | -| pre | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | -| pre | Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | Conditions.cs:122:21:122:24 | [last (line 118): true] null | -| pre | Conditions.cs:122:17:122:24 | [last (line 118): true] ... = ... | Conditions.cs:116:41:116:41 | [last (line 118): true] access to local variable i | -| pre | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | -| pre | Conditions.cs:122:21:122:24 | [last (line 118): true] null | Conditions.cs:122:17:122:24 | [last (line 118): true] ... = ... | +| pre | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | Conditions.cs:122:17:122:25 | ...; | +| pre | Conditions.cs:122:17:122:17 | access to local variable s | Conditions.cs:122:21:122:24 | null | +| pre | Conditions.cs:122:17:122:25 | ...; | Conditions.cs:122:17:122:17 | access to local variable s | +| pre | Conditions.cs:122:21:122:24 | null | Conditions.cs:122:17:122:24 | ... = ... | | pre | ExitMethods.cs:7:10:7:11 | enter M1 | ExitMethods.cs:8:5:11:5 | {...} | | pre | ExitMethods.cs:8:5:11:5 | {...} | ExitMethods.cs:9:9:9:25 | ...; | | pre | ExitMethods.cs:9:9:9:24 | call to method ErrorMaybe | ExitMethods.cs:10:9:10:15 | return ...; | diff --git a/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected b/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected index a0883986ab0c..8655ab27d464 100644 --- a/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected +++ b/csharp/ql/test/library-tests/controlflow/graph/NodeGraph.expected @@ -738,63 +738,25 @@ | Conditions.cs:116:17:116:17 | access to local variable i | Conditions.cs:116:21:116:21 | 0 | semmle.label | successor | | Conditions.cs:116:17:116:21 | Int32 i = ... | Conditions.cs:116:24:116:24 | access to local variable i | semmle.label | successor | | Conditions.cs:116:21:116:21 | 0 | Conditions.cs:116:17:116:21 | Int32 i = ... | semmle.label | successor | -| Conditions.cs:116:24:116:24 | [last (line 118): false] access to local variable i | Conditions.cs:116:28:116:31 | [last (line 118): false] access to parameter args | semmle.label | successor | -| Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | Conditions.cs:116:28:116:31 | [last (line 118): true] access to parameter args | semmle.label | successor | | Conditions.cs:116:24:116:24 | access to local variable i | Conditions.cs:116:28:116:31 | access to parameter args | semmle.label | successor | | Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:113:10:113:11 | exit M9 | semmle.label | false | | Conditions.cs:116:24:116:38 | ... < ... | Conditions.cs:117:9:123:9 | {...} | semmle.label | true | -| Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | Conditions.cs:113:10:113:11 | exit M9 | semmle.label | false | -| Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | semmle.label | true | -| Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | Conditions.cs:113:10:113:11 | exit M9 | semmle.label | false | -| Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | semmle.label | true | -| Conditions.cs:116:28:116:31 | [last (line 118): false] access to parameter args | Conditions.cs:116:28:116:38 | [last (line 118): false] access to property Length | semmle.label | successor | -| Conditions.cs:116:28:116:31 | [last (line 118): true] access to parameter args | Conditions.cs:116:28:116:38 | [last (line 118): true] access to property Length | semmle.label | successor | | Conditions.cs:116:28:116:31 | access to parameter args | Conditions.cs:116:28:116:38 | access to property Length | semmle.label | successor | -| Conditions.cs:116:28:116:38 | [last (line 118): false] access to property Length | Conditions.cs:116:24:116:38 | [last (line 118): false] ... < ... | semmle.label | successor | -| Conditions.cs:116:28:116:38 | [last (line 118): true] access to property Length | Conditions.cs:116:24:116:38 | [last (line 118): true] ... < ... | semmle.label | successor | | Conditions.cs:116:28:116:38 | access to property Length | Conditions.cs:116:24:116:38 | ... < ... | semmle.label | successor | -| Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | Conditions.cs:116:41:116:43 | [last (line 118): false] ...++ | semmle.label | successor | -| Conditions.cs:116:41:116:41 | [last (line 118): true] access to local variable i | Conditions.cs:116:41:116:43 | [last (line 118): true] ...++ | semmle.label | successor | -| Conditions.cs:116:41:116:43 | [last (line 118): false] ...++ | Conditions.cs:116:24:116:24 | [last (line 118): false] access to local variable i | semmle.label | successor | -| Conditions.cs:116:41:116:43 | [last (line 118): true] ...++ | Conditions.cs:116:24:116:24 | [last (line 118): true] access to local variable i | semmle.label | successor | -| Conditions.cs:117:9:123:9 | [last (line 118): false] {...} | Conditions.cs:118:13:118:44 | [last (line 118): false] ... ...; | semmle.label | successor | -| Conditions.cs:117:9:123:9 | [last (line 118): true] {...} | Conditions.cs:118:13:118:44 | [last (line 118): true] ... ...; | semmle.label | successor | +| Conditions.cs:116:41:116:41 | access to local variable i | Conditions.cs:116:41:116:43 | ...++ | semmle.label | successor | +| Conditions.cs:116:41:116:43 | ...++ | Conditions.cs:116:24:116:24 | access to local variable i | semmle.label | successor | | Conditions.cs:117:9:123:9 | {...} | Conditions.cs:118:13:118:44 | ... ...; | semmle.label | successor | | Conditions.cs:118:13:118:44 | ... ...; | Conditions.cs:118:17:118:20 | access to local variable last | semmle.label | successor | -| Conditions.cs:118:13:118:44 | [last (line 118): false] ... ...; | Conditions.cs:118:17:118:20 | [last (line 118): false] access to local variable last | semmle.label | successor | -| Conditions.cs:118:13:118:44 | [last (line 118): true] ... ...; | Conditions.cs:118:17:118:20 | [last (line 118): true] access to local variable last | semmle.label | successor | -| Conditions.cs:118:17:118:20 | [last (line 118): false] access to local variable last | Conditions.cs:118:24:118:24 | [last (line 118): false] access to local variable i | semmle.label | successor | -| Conditions.cs:118:17:118:20 | [last (line 118): true] access to local variable last | Conditions.cs:118:24:118:24 | [last (line 118): true] access to local variable i | semmle.label | successor | | Conditions.cs:118:17:118:20 | access to local variable last | Conditions.cs:118:24:118:24 | access to local variable i | semmle.label | successor | | Conditions.cs:118:17:118:43 | Boolean last = ... | Conditions.cs:119:13:120:23 | if (...) ... | semmle.label | successor | -| Conditions.cs:118:17:118:43 | [last (line 118): false] Boolean last = ... | Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | semmle.label | successor | -| Conditions.cs:118:17:118:43 | [last (line 118): true] Boolean last = ... | Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | semmle.label | successor | -| Conditions.cs:118:24:118:24 | [last (line 118): false] access to local variable i | Conditions.cs:118:29:118:32 | [last (line 118): false] access to parameter args | semmle.label | successor | -| Conditions.cs:118:24:118:24 | [last (line 118): true] access to local variable i | Conditions.cs:118:29:118:32 | [last (line 118): true] access to parameter args | semmle.label | successor | | Conditions.cs:118:24:118:24 | access to local variable i | Conditions.cs:118:29:118:32 | access to parameter args | semmle.label | successor | | Conditions.cs:118:24:118:43 | ... == ... | Conditions.cs:118:17:118:43 | Boolean last = ... | semmle.label | successor | -| Conditions.cs:118:24:118:43 | [last (line 118): false] ... == ... | Conditions.cs:118:17:118:43 | [last (line 118): false] Boolean last = ... | semmle.label | successor | -| Conditions.cs:118:24:118:43 | [last (line 118): true] ... == ... | Conditions.cs:118:17:118:43 | [last (line 118): true] Boolean last = ... | semmle.label | successor | -| Conditions.cs:118:29:118:32 | [last (line 118): false] access to parameter args | Conditions.cs:118:29:118:39 | [last (line 118): false] access to property Length | semmle.label | successor | -| Conditions.cs:118:29:118:32 | [last (line 118): true] access to parameter args | Conditions.cs:118:29:118:39 | [last (line 118): true] access to property Length | semmle.label | successor | | Conditions.cs:118:29:118:32 | access to parameter args | Conditions.cs:118:29:118:39 | access to property Length | semmle.label | successor | -| Conditions.cs:118:29:118:39 | [last (line 118): false] access to property Length | Conditions.cs:118:43:118:43 | [last (line 118): false] 1 | semmle.label | successor | -| Conditions.cs:118:29:118:39 | [last (line 118): true] access to property Length | Conditions.cs:118:43:118:43 | [last (line 118): true] 1 | semmle.label | successor | | Conditions.cs:118:29:118:39 | access to property Length | Conditions.cs:118:43:118:43 | 1 | semmle.label | successor | | Conditions.cs:118:29:118:43 | ... - ... | Conditions.cs:118:24:118:43 | ... == ... | semmle.label | successor | -| Conditions.cs:118:29:118:43 | [last (line 118): false] ... - ... | Conditions.cs:118:24:118:43 | [last (line 118): false] ... == ... | semmle.label | successor | -| Conditions.cs:118:29:118:43 | [last (line 118): true] ... - ... | Conditions.cs:118:24:118:43 | [last (line 118): true] ... == ... | semmle.label | successor | | Conditions.cs:118:43:118:43 | 1 | Conditions.cs:118:29:118:43 | ... - ... | semmle.label | successor | -| Conditions.cs:118:43:118:43 | [last (line 118): false] 1 | Conditions.cs:118:29:118:43 | [last (line 118): false] ... - ... | semmle.label | successor | -| Conditions.cs:118:43:118:43 | [last (line 118): true] 1 | Conditions.cs:118:29:118:43 | [last (line 118): true] ... - ... | semmle.label | successor | -| Conditions.cs:119:13:120:23 | [last (line 118): false] if (...) ... | Conditions.cs:119:17:119:21 | [last (line 118): false] !... | semmle.label | successor | -| Conditions.cs:119:13:120:23 | [last (line 118): true] if (...) ... | Conditions.cs:119:17:119:21 | [last (line 118): true] !... | semmle.label | successor | | Conditions.cs:119:13:120:23 | if (...) ... | Conditions.cs:119:17:119:21 | !... | semmle.label | successor | | Conditions.cs:119:17:119:21 | !... | Conditions.cs:119:18:119:21 | access to local variable last | semmle.label | successor | -| Conditions.cs:119:17:119:21 | [last (line 118): false] !... | Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | semmle.label | successor | -| Conditions.cs:119:17:119:21 | [last (line 118): true] !... | Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | semmle.label | successor | -| Conditions.cs:119:18:119:21 | [last (line 118): false] access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | semmle.label | false | -| Conditions.cs:119:18:119:21 | [last (line 118): true] access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | semmle.label | true | | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:120:17:120:23 | [last (line 118): false] ...; | semmle.label | false | | Conditions.cs:119:18:119:21 | access to local variable last | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | semmle.label | true | | Conditions.cs:120:17:120:17 | [last (line 118): false] access to local variable s | Conditions.cs:120:21:120:22 | [last (line 118): false] "" | semmle.label | successor | @@ -803,12 +765,12 @@ | Conditions.cs:120:21:120:22 | [last (line 118): false] "" | Conditions.cs:120:17:120:22 | [last (line 118): false] ... = ... | semmle.label | successor | | Conditions.cs:121:13:122:25 | [last (line 118): false] if (...) ... | Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | semmle.label | successor | | Conditions.cs:121:13:122:25 | [last (line 118): true] if (...) ... | Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | semmle.label | successor | -| Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | Conditions.cs:116:41:116:41 | [last (line 118): false] access to local variable i | semmle.label | false | -| Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | semmle.label | true | -| Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | Conditions.cs:122:21:122:24 | [last (line 118): true] null | semmle.label | successor | -| Conditions.cs:122:17:122:24 | [last (line 118): true] ... = ... | Conditions.cs:116:41:116:41 | [last (line 118): true] access to local variable i | semmle.label | successor | -| Conditions.cs:122:17:122:25 | [last (line 118): true] ...; | Conditions.cs:122:17:122:17 | [last (line 118): true] access to local variable s | semmle.label | successor | -| Conditions.cs:122:21:122:24 | [last (line 118): true] null | Conditions.cs:122:17:122:24 | [last (line 118): true] ... = ... | semmle.label | successor | +| Conditions.cs:121:17:121:20 | [last (line 118): false] access to local variable last | Conditions.cs:116:41:116:41 | access to local variable i | semmle.label | false | +| Conditions.cs:121:17:121:20 | [last (line 118): true] access to local variable last | Conditions.cs:122:17:122:25 | ...; | semmle.label | true | +| Conditions.cs:122:17:122:17 | access to local variable s | Conditions.cs:122:21:122:24 | null | semmle.label | successor | +| Conditions.cs:122:17:122:24 | ... = ... | Conditions.cs:116:41:116:41 | access to local variable i | semmle.label | successor | +| Conditions.cs:122:17:122:25 | ...; | Conditions.cs:122:17:122:17 | access to local variable s | semmle.label | successor | +| Conditions.cs:122:21:122:24 | null | Conditions.cs:122:17:122:24 | ... = ... | semmle.label | successor | | ExitMethods.cs:7:10:7:11 | enter M1 | ExitMethods.cs:8:5:11:5 | {...} | semmle.label | successor | | ExitMethods.cs:8:5:11:5 | {...} | ExitMethods.cs:9:9:9:25 | ...; | semmle.label | successor | | ExitMethods.cs:9:9:9:24 | call to method ErrorMaybe | ExitMethods.cs:10:9:10:15 | return ...; | semmle.label | successor |