程序代写代做代考 Java junit Score:0.3125 cop5556sp17.CodeGenVisitorTest: Score:0.3125 out of 10.0 Test Cases Total:32 Failure:31
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 {
x <- 100;
y <- x / 3 * 2;
z <- y;
bool_1 <- false;
bool_2 <- true;
integer y
y <- z + 20;
z <- y;
if(bool_2){
boolean bool_1
bool_1 <- bool_2;
}
if(bool_1) {
integer err
err <- 2333;
}
integer pass_token
pass_token <- 0;
while(pass_token != 4) {
integer local_1
integer local_2
local_1 <- 45;
local_2 <- 46;
if(local_1 != local_2) {pass_token <- pass_token + 1;}
if(local_1 == local_2) {pass_token <- pass_token + 1;}
if(local_1 > local_2) {pass_token <- pass_token + 1;}
if(local_1 >= 45) {pass_token <- pass_token + 1;}
if(local_1 < local_2) {pass_token <- pass_token + 1;}
if(46 <= local_2) {pass_token <- pass_token + 1;}
if((local_1 > local_2)) {pass_token <- pass_token + 1;}
}
} ". 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{
integer i
integer j
integer t
i <-10;
j <-1;
t <-2;
while (i > 0) {
integer k
k <-i/j;
if (k > 1) {
while (t > 0) {t <- t-1;}
j <- j+1;}
i<-i-1;}
i<-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{
integer i
integer j
integer t
i <-10;
j <-1;
t <-2;
while (i > 0) {
integer k
k <-i/j;
if (k > 1) {
integer t
t <-j;
while (t > 0) {t <- t-1;}
j <- j+1;}
i<-i-1;}
i<-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;
bool_bar <- false;integer local_foo0
local_foo0 <- 5; boolean local_bool0
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{
integer i
integer j
i <-10;
j <-1;
if (i > 0) {
integer k
k <-i/j;
while (k > 1) {j <- j+1;
k <-i/j;}
}
i<-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{
integer i
integer j
i <-4;
while (i > 0) {
j <- i;
i<-i-1;}
i<-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 x <- 6; y <- x + 1; while(x >= 2) { x <- x - 1; }}". 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{
integer i
integer j
i <-3;
while (i > 0) {
integer j
j <-i*2;
while (j > i) {
j<-j-1;}
i<-i-1;}
i<-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
integer j
i <-55;
if (i == 55) {j <- 3;}
if (i != 55){ j <- 1;}
}". 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{
integer i
integer j
i <-56;
if (i == 55) {j <- 3;}
if (i != 55){ j <- 1;}
}". 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{
integer i
integer j
i <-10;
j <-0;
if (i > 5) {j <- j+1;
if (i > 7){ j <- j + 1;
if (i > 8){ j <- j + 1;}
}
}
}". 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{
integer i
integer j
i <-10;
j <-0;
if (i > 5) {j <- j+1;
if (i > 7){
integer i
i <-7; j <- j + 1;
if (i > 8){ j <- j + 1;}
}
}
}". 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
integer local_int1
local_int0 <- 42;local_int1 <- 43;if(local_int0 == local_int1){integer local_int11
local_int11 <- 44;} if(local_int0 != local_int1){integer local_int22
local_int22 <- 45;}if(local_int0 != local_int1){integer local_int33
local_int33 <- 46;integer local_int44
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{
integer i
integer j
integer k
boolean b
i <-10;
j <-1;
b <-true;
if (b) {
while (i > 0) {
k <-i/j;
if (k > 1) {j <- j+1;}
i<-i-1;}
i<-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.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{
integer i
integer j
boolean b
i <-10;
j <-1;
b <-true;
if (b) {
while (i > 0) {
integer k
k <-i/j;
if (k > 1) {j <- j+1;}
i<-i-1;}
i<-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.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
integer j
i <-55;
j <- 44;
j <- i+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.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
integer j
i <-33;
j <- 3;
j <- i/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.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
integer j
i <-11;
j <- 3;
j <- i*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.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{
integer i
integer j
i <-10;
j <-1;
while (i > 0) {
integer k
k <-i/j;
if (k > 1) {j <- j+1;}
i<-i-1;}
i<-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)