added edge 'error' -> 'sink'

added 'getLocalDeclarations' method to pseudocode
This commit is contained in:
Svetlana Isakova
2012-05-25 21:18:00 +04:00
parent 5c7b787e68
commit edb529f68f
16 changed files with 143 additions and 135 deletions
@@ -17,16 +17,14 @@
package org.jetbrains.jet.lang.cfg.pseudocode;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.lang.cfg.Label;
import org.jetbrains.jet.lang.psi.JetElement;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.*;
/**
* @author abreslav
@@ -95,6 +93,17 @@ public class Pseudocode {
return correspondingElement;
}
public Set<Pseudocode> getLocalDeclarations() {
Set<Pseudocode> localDeclarations = Sets.newLinkedHashSet();
//todo look recursively inside local declarations
for (Instruction instruction : instructions) {
if (instruction instanceof LocalDeclarationInstruction) {
localDeclarations.add(((LocalDeclarationInstruction) instruction).getBody());
}
}
return localDeclarations;
}
public PseudocodeLabel createLabel(String name) {
PseudocodeLabel label = new PseudocodeLabel(name);
labels.add(label);
@@ -190,10 +199,11 @@ public class Pseudocode {
public void postProcess() {
if (postPrecessed) return;
postPrecessed = true;
errorInstruction.setSink(getSinkInstruction());
exitInstruction.setSink(getSinkInstruction());
for (int i = 0, instructionsSize = mutableInstructionList.size(); i < instructionsSize; i++) {
processInstruction(mutableInstructionList.get(i), i);
}
getExitInstruction().setSink(getSinkInstruction());
Set<Instruction> reachableInstructions = collectReachableInstructions();
for (Instruction instruction : mutableInstructionList) {
if (reachableInstructions.contains(instruction)) {
@@ -46,10 +46,8 @@ public class SubroutineExitInstruction extends InstructionImpl {
@NotNull
@Override
public Collection<Instruction> getNextInstructions() {
if (sinkInstruction != null) {
return Collections.<Instruction>singleton(sinkInstruction);
}
return Collections.emptyList();
assert sinkInstruction != null;
return Collections.<Instruction>singleton(sinkInstruction);
}
@Override
@@ -7,9 +7,9 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[r(20)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== AnonymousInitializers ==
class AnonymousInitializers() {
@@ -46,16 +46,16 @@ l2:
l1:
<END> NEXT:[<SINK>] PREV:[w($i)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[d(get() = 20), <END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d(get() = 20)]
l3:
<START> NEXT:[r(20)] PREV:[]
r(20) NEXT:[<END>] PREV:[<START>]
l4:
<END> NEXT:[<SINK>] PREV:[r(20)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
@@ -35,7 +35,7 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[w(a[10])]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
@@ -9,9 +9,9 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[v(var x : Int;)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== assignments ==
fun assignments() : Unit {
@@ -72,7 +72,7 @@ l5:
l1:
<END> NEXT:[<SINK>] PREV:[w(t.x)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
+12 -12
View File
@@ -7,9 +7,9 @@ l3:
l4:
<END> NEXT:[<SINK>] PREV:[r(1)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== f ==
fun f(a : Boolean) : Unit {
@@ -78,18 +78,18 @@ l6:
l1:
<END> NEXT:[<SINK>] PREV:[r(a || false)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[d({1}), <END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d({1})]
l3:
<START> NEXT:[r(1)] PREV:[]
r(1) NEXT:[<END>] PREV:[<START>]
l4:
<END> NEXT:[<SINK>] PREV:[r(1)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== foo ==
fun foo(a : Boolean, b : Int) : Unit {}
@@ -104,9 +104,9 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== genfun ==
fun genfun<T>() : Unit {}
@@ -117,9 +117,9 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== flfun ==
fun flfun(f : () -> Any) : Unit {}
@@ -132,7 +132,7 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
@@ -7,7 +7,7 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
@@ -15,7 +15,7 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[]
error:
<ERROR> NEXT:[] PREV:[jmp(error)]
<ERROR> NEXT:[<SINK>] PREV:[jmp(error)]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
+42 -42
View File
@@ -21,9 +21,9 @@ l1:
l3:
<END> NEXT:[<SINK>] PREV:[r(2)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t2 ==
fun t2() {
@@ -65,9 +65,9 @@ l1:
l5:
<END> NEXT:[<SINK>] PREV:[ret l1, r(2)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== anonymous_0 ==
{ () =>
@@ -92,9 +92,9 @@ l4:
l6:
<END> NEXT:[<SINK>] PREV:[ret l4, read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t3 ==
fun t3() {
@@ -141,9 +141,9 @@ l1:
l8:
<END> NEXT:[<SINK>] PREV:[r(2)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[d({ () => if (2 > 3) { retur..), <END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d({ () => if (2 > 3) { retur..)]
l3:
<START> NEXT:[r(())] PREV:[]
r(()) NEXT:[r(2)] PREV:[<START>]
@@ -160,9 +160,9 @@ l4:
l6:
<END> NEXT:[<SINK>] PREV:[ret l4, read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== anonymous_1 ==
{ () =>
@@ -205,9 +205,9 @@ l4:
l8:
<END> NEXT:[<SINK>] PREV:[ret l4, r(2)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t4 ==
fun t4() {
@@ -250,9 +250,9 @@ l2:
l1:
<END> NEXT:[<SINK>] PREV:[r({ () => try { 1 if (2 > 3)..)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[d({ () => try { 1 if (2 > 3)..), <END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d({ () => try { 1 if (2 > 3)..)]
l3:
<START> NEXT:[r(())] PREV:[]
r(()) NEXT:[r(try { 1 if (2 > 3) { retur..)] PREV:[<START>]
@@ -282,9 +282,9 @@ l4:
l8:
<END> NEXT:[<SINK>] PREV:[ret l4, r(2)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t5 ==
fun t5() {
@@ -346,9 +346,9 @@ l3:
l1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t6 ==
fun t6() {
@@ -410,9 +410,9 @@ l1:
l9:
<END> NEXT:[<SINK>] PREV:[r(2)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t7 ==
fun t7() {
@@ -471,9 +471,9 @@ l1:
l9:
<END> NEXT:[<SINK>] PREV:[r(2)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t8 ==
fun t8(a : Int) {
@@ -542,9 +542,9 @@ l2:
l1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t9 ==
fun t9(a : Int) {
@@ -613,9 +613,9 @@ l1:
l9:
<END> NEXT:[<SINK>] PREV:[r(2)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t10 ==
fun t10(a : Int) {
@@ -681,9 +681,9 @@ l1:
l9:
<END> NEXT:[<SINK>] PREV:[r(2)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t11 ==
fun t11() {
@@ -714,9 +714,9 @@ l1:
l3:
<END> NEXT:[<SINK>] PREV:[ret(*) l1]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t12 ==
fun t12() : Int {
@@ -749,9 +749,9 @@ l1:
l3:
<END> NEXT:[<SINK>] PREV:[ret(*) l1]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t13 ==
fun t13() : Int {
@@ -802,9 +802,9 @@ l1:
l6:
<END> NEXT:[<SINK>] PREV:[ret(*) l1, r(doSmth(3))]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t14 ==
fun t14() : Int {
@@ -843,9 +843,9 @@ l4:
l6:
<END> NEXT:[<SINK>] PREV:[ret(*) l1, jmp(l4)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t15 ==
fun t15() : Int {
@@ -898,9 +898,9 @@ l1:
l6:
<END> NEXT:[<SINK>] PREV:[ret(*) l1, ret(*) l1]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t16 ==
fun t16() : Int {
@@ -951,9 +951,9 @@ l1:
l6:
<END> NEXT:[<SINK>] PREV:[ret(*) l1, r(doSmth(3))]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== doSmth ==
fun doSmth(i: Int) {
@@ -967,7 +967,7 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
+4 -4
View File
@@ -29,9 +29,9 @@ l2:
l1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== doSmth ==
fun doSmth(i: Int) {}
@@ -44,7 +44,7 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
+6 -6
View File
@@ -48,9 +48,9 @@ l5:
l1:
<END> NEXT:[<SINK>] PREV:[r(doSmth(r))]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== t2 ==
fun t2(b: Boolean) {
@@ -92,9 +92,9 @@ l1:
l5:
<END> NEXT:[<SINK>] PREV:[ret l1, ret l1, read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== doSmth ==
fun doSmth(s: String) {}
@@ -107,7 +107,7 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
@@ -72,7 +72,7 @@ l13:
l1:
<END> NEXT:[<SINK>] PREV:[r(14)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
@@ -25,9 +25,9 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[w(a)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== O ==
object O {
@@ -45,9 +45,9 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[w($x)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== null ==
object {
@@ -72,9 +72,9 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[w($x)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== doSmth ==
fun doSmth(i: Int) {}
@@ -87,9 +87,9 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== test1 ==
fun test1() {
@@ -122,9 +122,9 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[w(a)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== test2 ==
fun test2() {
@@ -152,9 +152,9 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[w(a)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== inner_bar ==
fun inner_bar() {
@@ -168,9 +168,9 @@ l3:
l4:
<END> NEXT:[<SINK>] PREV:[w(y)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== test3 ==
fun test3() {
@@ -206,9 +206,9 @@ l2:
l1:
<END> NEXT:[<SINK>] PREV:[w(a)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[d(fun inner_bar() { y = 10 }) , <END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d(fun inner_bar() { y = 10 }) ]
l3:
<START> NEXT:[r(10)] PREV:[]
r(10) NEXT:[w(y)] PREV:[<START>]
@@ -216,9 +216,9 @@ l3:
l4:
<END> NEXT:[<SINK>] PREV:[w(y)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== ggg ==
fun ggg() {
@@ -232,9 +232,9 @@ l3:
l4:
<END> NEXT:[<SINK>] PREV:[w(y)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== test4 ==
fun test4() {
@@ -285,9 +285,9 @@ l2:
l1:
<END> NEXT:[<SINK>] PREV:[w(a)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[d(fun ggg() { y = 10 }) , <END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d(fun ggg() { y = 10 }) ]
l3:
<START> NEXT:[r(10)] PREV:[]
r(10) NEXT:[w(y)] PREV:[<START>]
@@ -295,9 +295,9 @@ l3:
l4:
<END> NEXT:[<SINK>] PREV:[w(y)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== foo ==
fun foo() {
@@ -311,9 +311,9 @@ l3:
l4:
<END> NEXT:[<SINK>] PREV:[w(x)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== bar ==
fun bar() {
@@ -327,9 +327,9 @@ l6:
l7:
<END> NEXT:[<SINK>] PREV:[w(x)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== test5 ==
fun test5() {
@@ -392,9 +392,9 @@ l5:
l1:
<END> NEXT:[<SINK>] PREV:[w(a)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[d(fun foo() { x = 3 }) , d(fun bar() { x = 4 }) , <END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>, d(fun foo() { x = 3 }) , d(fun bar() { x = 4 }) ]
l3:
<START> NEXT:[r(3)] PREV:[]
r(3) NEXT:[w(x)] PREV:[<START>]
@@ -402,9 +402,9 @@ l3:
l4:
<END> NEXT:[<SINK>] PREV:[w(x)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
l6:
<START> NEXT:[r(4)] PREV:[]
r(4) NEXT:[w(x)] PREV:[<START>]
@@ -412,9 +412,9 @@ l6:
l7:
<END> NEXT:[<SINK>] PREV:[w(x)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== foo ==
fun foo() {
@@ -433,7 +433,7 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[r(doSmth(b))]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
@@ -25,9 +25,9 @@ l3:
l1:
<END> NEXT:[<SINK>] PREV:[read (Unit)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
== dowhile ==
fun dowhile() {
@@ -53,7 +53,7 @@ l3:
l1:
<END> NEXT:[<SINK>] PREV:[ret l1]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
@@ -15,7 +15,7 @@ l2:
l1:
<END> NEXT:[<SINK>] PREV:[ret(*) l1, r(false || (return false))]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================
@@ -7,7 +7,7 @@ l0:
l1:
<END> NEXT:[<SINK>] PREV:[r(1)]
error:
<ERROR> NEXT:[] PREV:[]
<ERROR> NEXT:[<SINK>] PREV:[]
sink:
<SINK> NEXT:[] PREV:[<END>]
<SINK> NEXT:[] PREV:[<ERROR>, <END>]
=====================