Score:0.3125 cop5556sp17.CodeGenVisitorTest: Score:0.3125 out of 10.0 Test Cases Total:32 Failure:31
Failed Test Cases:
identExprBooleanLocal: Testing failed with input: “identExprBooleanLocal {boolean i boolean j i<-false; j <- i;}". Unexpected error happened in source code. Stack Trace: java.lang.NullPointerException at cop5556sp17.CodeGenVisitor.visitDec(CodeGenVisitor.java:304) at cop5556sp17.AST.Dec.visit(Dec.java:63) at cop5556sp17.CodeGenVisitor.visitBlock(CodeGenVisitor.java:262) at cop5556sp17.AST.Block.visit(Block.java:72) at cop5556sp17.CodeGenVisitor.visitProgram(CodeGenVisitor.java:141) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:99) at cop5556sp17.CodeGenVisitorTest.identExprBooleanLocal(CodeGenVisitorTest.java:169) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
identExprBooleanParam: Testing failed with input: "identExprBooleanParam boolean i { boolean j j <- i;}". Unexpected error happened in source code. Stack Trace: java.lang.NullPointerException at cop5556sp17.CodeGenVisitor.visitParamDec(CodeGenVisitor.java:381) at cop5556sp17.AST.ParamDec.visit(ParamDec.java:19) at cop5556sp17.CodeGenVisitor.visitProgram(CodeGenVisitor.java:89) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:99) at cop5556sp17.CodeGenVisitorTest.identExprBooleanParam(CodeGenVisitorTest.java:162) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
exprComp: Testing failed with input: "exprComp { integer a a <- 1 - 3 * (2 + 1 -6) +2 + 5/2;} ". Unexpected error happened in source code. Stack Trace: java.lang.NullPointerException at cop5556sp17.CodeGenVisitor.visitDec(CodeGenVisitor.java:304) at cop5556sp17.AST.Dec.visit(Dec.java:63) at cop5556sp17.CodeGenVisitor.visitBlock(CodeGenVisitor.java:262) at cop5556sp17.AST.Block.visit(Block.java:72) at cop5556sp17.CodeGenVisitor.visitProgram(CodeGenVisitor.java:141) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:99) at cop5556sp17.CodeGenVisitorTest.exprComp(CodeGenVisitorTest.java:225) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
compProg0: Testing failed with input: "compProg0 { integer a0 a0<-0;if(a0 == 0){integer a00 integer b00 integer c00 integer d00 integer e00 e00 <- 5; d00 <- 4; c00 <- 3; b00 <- 2; a00 <- 1; if(a00 == 1){integer a01 integer b01 integer c01 integer d01 integer e01 e01 <- 55; d01 <- 44; c01 <- 33; b01 <- 22; a01 <- 11; }}} ". Unexpected error happened in source code. Stack Trace: java.lang.NullPointerException at cop5556sp17.CodeGenVisitor.visitDec(CodeGenVisitor.java:304) at cop5556sp17.AST.Dec.visit(Dec.java:63) at cop5556sp17.CodeGenVisitor.visitBlock(CodeGenVisitor.java:262) at cop5556sp17.AST.Block.visit(Block.java:72) at cop5556sp17.CodeGenVisitor.visitProgram(CodeGenVisitor.java:141) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:99) at cop5556sp17.CodeGenVisitorTest.compProg0(CodeGenVisitorTest.java:403) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
compProg1: Testing failed with input: "compProg1 integer a, integer b, integer c, boolean bool0 { a <- 4; b <- 5; boolean boolA boolean boolB boolA <- true; boolB <- false; if(boolA == true) {boolean a a <- boolA; bool0 <- false;while(a != boolB){integer d integer e c <- 3 + 5; d <- 10 - 1; c <- c * d; e <- d / 3; a <- boolB;if(c > d) { c <- d; if(c <= d) { boolA <- false; } if(boolA < boolB) { c <- 0; }}} } if(c >= 1) { /*boolB <- bool0 | true;*/} a <- 7;}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: This ident boolAis null or does not exist on the current scope at cop5556sp17.TypeCheckVisitor.visitIdentExpression(TypeCheckVisitor.java:316) at cop5556sp17.TypeCheckVisitor.visitExpression(TypeCheckVisitor.java:392) at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:382) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitIfStatement(TypeCheckVisitor.java:325) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:212) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.compProg1(CodeGenVisitorTest.java:457) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745) c
compProg2: Testing failed with input: "compProg2 integer x, integer y, integer z, boolean bool_1, boolean bool_2 { \nx <- 100; \ny <- x / 3 * 2; \nz <- y; \nbool_1 <- false; \nbool_2 <- true; \ninteger y \ny <- z + 20; \nz <- y; \nif(bool_2){ \nboolean bool_1 \nbool_1 <- bool_2; \n} \nif(bool_1) { \ninteger err \nerr <- 2333; \n} \ninteger pass_token \npass_token <- 0; \nwhile(pass_token != 4) { \ninteger local_1 \ninteger local_2 \nlocal_1 <- 45; \nlocal_2 <- 46; \nif(local_1 != local_2) {pass_token <- pass_token + 1;} \nif(local_1 == local_2) {pass_token <- pass_token + 1;} \nif(local_1 > local_2) {pass_token <- pass_token + 1;} \nif(local_1 >= 45) {pass_token <- pass_token + 1;} \nif(local_1 < local_2) {pass_token <- pass_token + 1;} \nif(46 <= local_2) {pass_token <- pass_token + 1;} \nif((local_1 > local_2)) {pass_token <- pass_token + 1;} \n} \n} ". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: This ident bool_2is null or does not exist on the current scope at cop5556sp17.TypeCheckVisitor.visitIdentExpression(TypeCheckVisitor.java:316) at cop5556sp17.TypeCheckVisitor.visitExpression(TypeCheckVisitor.java:392) at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:382) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitIfStatement(TypeCheckVisitor.java:325) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:212) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.compProg2(CodeGenVisitorTest.java:503) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
whileifwhileStatement0: Testing failed with input: "whileifwhileStatement0{\ninteger i \ninteger j \ninteger t \ni <-10; \nj <-1; \nt <-2; \nwhile (i > 0) {\ninteger k \nk <-i/j; \nif (k > 1) {\nwhile (t > 0) {t <- t-1;} \nj <- j+1;} \ni<-i-1;} \ni<-t;}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.whileifwhileStatement0(CodeGenVisitorTest.java:366) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
whileifwhileStatement1: Testing failed with input: "whileifwhileStatement1{\ninteger i \ninteger j \ninteger t \ni <-10; \nj <-1; \nt <-2; \nwhile (i > 0) {\ninteger k \nk <-i/j; \nif (k > 1) {\ninteger t \nt <-j; \nwhile (t > 0) {t <- t-1;} \nj <- j+1;} \ni<-i-1;} \ni<-t;}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.whileifwhileStatement1(CodeGenVisitorTest.java:373) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
assignParamNLocal: Testing failed with input: "assignParamNLocal integer int_foo, boolean bool_bar {int_foo <- 42;\n bool_bar <- false;integer local_foo0 \n local_foo0 <- 5; boolean local_bool0 \n local_bool0 <- true;}". Unexpected error happened in source code. Stack Trace: java.lang.NullPointerException at cop5556sp17.CodeGenVisitor.visitParamDec(CodeGenVisitor.java:381) at cop5556sp17.AST.ParamDec.visit(ParamDec.java:19) at cop5556sp17.CodeGenVisitor.visitProgram(CodeGenVisitor.java:89) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:99) at cop5556sp17.CodeGenVisitorTest.assignParamNLocal(CodeGenVisitorTest.java:233) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
ifwhileStatement0: Testing failed with input: "ifwhileStatement0{\ninteger i \ninteger j \ni <-10; \nj <-1; \nif (i > 0) {\ninteger k \nk <-i/j; \nwhile (k > 1) {j <- j+1; \nk <-i/j;} \n} \ni<-j;}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.ifwhileStatement0(CodeGenVisitorTest.java:359) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
booleanComp1: Testing failed with input: "booleanComp1 { boolean a a<- true == false;a <- 4< 5;a<- 4<=5;a<- 4 == 5;a<- 5 == 5;a<- 5 >= 4;a<- 5>=5;a<- 6> 5;a<- 4 != 5;a<- 4 < 5;a<- 4 <= 4;} ". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is INTEGER, is not as same as expression typeName which is BOOLEAN at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.booleanComp1(CodeGenVisitorTest.java:252) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
booleanComp2: Testing failed with input: "booleanComp2 { boolean a boolean b boolean c a<-true;b<-false; c<-ab;c<-a>=b;c<-a==b;c<-a!=b;a<-false; b<-true;c<-ab;c<-a>=b;c<-a==b;c<-a!=b;a<-true; b<-true;c<-ab;c<-a>=b;c<-a==b;c<-a!=b;a<-false; b<-false;c<-ab;c<-a>=b;c<-a==b;c<-a!=b;}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is INTEGER, is not as same as expression typeName which is BOOLEAN at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.booleanComp2(CodeGenVisitorTest.java:296) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
whileStatement0: Testing failed with input: "whileStatement0{\ninteger i \ninteger j \ni <-4; \nwhile (i > 0) {\nj <- i;\ni<-i-1;} \ni<-9;}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.whileStatement0(CodeGenVisitorTest.java:204) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
whileStatement1: Testing failed with input: "whileStatement1 integer y { integer x\tx <- 6;\ty <- x + 1; \twhile(x >= 2) { \t\tx <- x - 1;\t}}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: This ident xis null or does not exist on the current scope at cop5556sp17.TypeCheckVisitor.visitIdentLValue(TypeCheckVisitor.java:413) at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:381) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitWhileStatement(TypeCheckVisitor.java:354) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:210) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.whileStatement1(CodeGenVisitorTest.java:311) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
whileStatement2: Testing failed with input: "whileStatement2{\ninteger i \ninteger j \ni <-3; \nwhile (i > 0) {\ninteger j \nj <-i*2; \nwhile (j > i) {\nj<-j-1;} \ni<-i-1;} \ni<-0;}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.whileStatement2(CodeGenVisitorTest.java:319) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
identExprBooleanLocal1: Testing failed with input: "identExprBooleanLocal1 {boolean i boolean j i<-true; j <- i;}". Unexpected error happened in source code. Stack Trace: java.lang.NullPointerException at cop5556sp17.CodeGenVisitor.visitDec(CodeGenVisitor.java:304) at cop5556sp17.AST.Dec.visit(Dec.java:63) at cop5556sp17.CodeGenVisitor.visitBlock(CodeGenVisitor.java:262) at cop5556sp17.AST.Block.visit(Block.java:72) at cop5556sp17.CodeGenVisitor.visitProgram(CodeGenVisitor.java:141) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:99) at cop5556sp17.CodeGenVisitorTest.identExprBooleanLocal1(CodeGenVisitorTest.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
ifStatement0: Testing failed with input: "ifStatement0 {integer i \ninteger j \ni <-55; \nif (i == 55) {j <- 3;} \nif (i != 55){ j <- 1;}\n}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.ifStatement0(CodeGenVisitorTest.java:190) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
ifStatement1: Testing failed with input: "ifStatement1{\ninteger i \ninteger j \ni <-56; \nif (i == 55) {j <- 3;} \nif (i != 55){ j <- 1;}\n}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.ifStatement1(CodeGenVisitorTest.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
ifStatement2: Testing failed with input: "ifStatement2{\ninteger i \ninteger j \ni <-10; \nj <-0; \nif (i > 5) {j <- j+1; \nif (i > 7){ j <- j + 1; \nif (i > 8){ j <- j + 1;}\n}\n}\n}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.ifStatement2(CodeGenVisitorTest.java:326) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
ifStatement3: Testing failed with input: "ifStatement3{\ninteger i \ninteger j \ni <-10; \nj <-0; \nif (i > 5) {j <- j+1; \nif (i > 7){ \ninteger i \ni <-7; j <- j + 1; \nif (i > 8){ j <- j + 1;}\n}\n}\n}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.ifStatement3(CodeGenVisitorTest.java:333) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
ifStatement4: Testing failed with input: "ifStatement4 {integer local_int0\ninteger local_int1\nlocal_int0 <- 42;local_int1 <- 43;if(local_int0 == local_int1){integer local_int11 \n local_int11 <- 44;} if(local_int0 != local_int1){integer local_int22 \n local_int22 <- 45;}if(local_int0 != local_int1){integer local_int33 \n local_int33 <- 46;integer local_int44 \n local_int44 <- 47;}}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: This ident local_int0is null or does not exist on the current scope at cop5556sp17.TypeCheckVisitor.visitIdentExpression(TypeCheckVisitor.java:316) at cop5556sp17.TypeCheckVisitor.visitExpression(TypeCheckVisitor.java:392) at cop5556sp17.TypeCheckVisitor.visitBinaryExpression(TypeCheckVisitor.java:136) at cop5556sp17.TypeCheckVisitor.visitExpression(TypeCheckVisitor.java:400) at cop5556sp17.TypeCheckVisitor.visitIfStatement(TypeCheckVisitor.java:323) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:212) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.ifStatement4(CodeGenVisitorTest.java:345) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
ifwhileifStatement0: Testing failed with input: "ifwhileifStatement0{\ninteger i \ninteger j \ninteger k \nboolean b \ni <-10; \nj <-1; \nb <-true; \nif (b) {\nwhile (i > 0) {\nk <-i/j; \nif (k > 1) {j <- j+1;} \ni<-i-1;} \ni<-0;}\n}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.ifwhileifStatement0(CodeGenVisitorTest.java:380) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
ifwhileifStatement1: Testing failed with input: "ifwhileifStatement1{\ninteger i \ninteger j \nboolean b \ni <-10; \nj <-1; \nb <-true; \nif (b) {\nwhile (i > 0) {\ninteger k \nk <-i/j; \nif (k > 1) {j <- j+1;} \ni<-i-1;} \ni<-0;}\n}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.ifwhileifStatement1(CodeGenVisitorTest.java:387) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
add: Testing failed with input: "add {integer i \ninteger j \ni <-55; \nj <- 44; \nj <- i+j;\n}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.add(CodeGenVisitorTest.java:183) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
div: Testing failed with input: "div {integer i \ninteger j \ni <-33; \nj <- 3; \nj <- i/j;\n}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.div(CodeGenVisitorTest.java:218) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
times: Testing failed with input: "times {integer i \ninteger j \ni <-11; \nj <- 3; \nj <- i*j;\n}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.times(CodeGenVisitorTest.java:211) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
identExprLocal: Testing failed with input: "identExprLocal {integer i integer j i<-55; j <- i;}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.identExprLocal(CodeGenVisitorTest.java:155) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
identExprParam: Testing failed with input: "identExprParam integer i { integer j j <- i;}". Unexpected error happened in source code. Stack Trace: java.lang.NullPointerException at cop5556sp17.CodeGenVisitor.visitParamDec(CodeGenVisitor.java:381) at cop5556sp17.AST.ParamDec.visit(ParamDec.java:19) at cop5556sp17.CodeGenVisitor.visitProgram(CodeGenVisitor.java:89) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:99) at cop5556sp17.CodeGenVisitorTest.identExprParam(CodeGenVisitorTest.java:148) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
whileifStatement0: Testing failed with input: "whileifStatement0{\ninteger i \ninteger j \ni <-10; \nj <-1; \nwhile (i > 0) {\ninteger k \nk <-i/j; \nif (k > 1) {j <- j+1;} \ni<-i-1;} \ni<-0;}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.whileifStatement0(CodeGenVisitorTest.java:352) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
assignLocal: Testing failed with input: "assignLocal {integer i boolean b i<-33; b<-false;}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.assignLocal(CodeGenVisitorTest.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)
assignParam: Testing failed with input: "assignParam integer i, boolean b {i<-33; b<-false;}". Unexpected error happened in source code. Stack Trace: cop5556sp17.TypeCheckVisitor$TypeCheckException: IdentL typeName is BOOLEAN, is not as same as expression typeName which is INTEGER at cop5556sp17.TypeCheckVisitor.visitAssignmentStatement(TypeCheckVisitor.java:384) at cop5556sp17.TypeCheckVisitor.visitStatement(TypeCheckVisitor.java:214) at cop5556sp17.TypeCheckVisitor.visitBlock(TypeCheckVisitor.java:199) at cop5556sp17.TypeCheckVisitor.visitProgram(TypeCheckVisitor.java:374) at cop5556sp17.AST.Program.visit(Program.java:75) at cop5556sp17.CodeGenVisitorTest.genCodeAndExecute(CodeGenVisitorTest.java:94) at cop5556sp17.CodeGenVisitorTest.assignParam(CodeGenVisitorTest.java:134) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:745)