@Test public void testCountingLoopHasSideEffects() throws Exception { assertFalse(SideEffectChecker.isSideEffectFree(new ForStmt( new ExprStmt(new BinaryExpr( new VariableIdentifierExpr("i"), new IntConstantExpr("0"), BinOp.ASSIGN )), new BinaryExpr( new VariableIdentifierExpr("i"), new IntConstantExpr("10"), BinOp.LT), new UnaryExpr( new VariableIdentifierExpr("i"), UnOp.POST_INC ), new BlockStmt(Collections.emptyList(), false)), ShadingLanguageVersion.ESSL_310, ShaderKind.FRAGMENT)); }
public static boolean isSideEffectFree(Stmt stmt, ShadingLanguageVersion shadingLanguageVersion, ShaderKind shaderKind) { return isSideEffectFreeVisitor(stmt, shadingLanguageVersion, shaderKind); }
SideEffectChecker { public static boolean isSideEffectFree(Stmt stmt, ShadingLanguageVersion shadingLanguageVersion, ShaderKind shaderKind) { return isSideEffectFreeVisitor(stmt, shadingLanguageVersion, shaderKind); } }
SideEffectChecker { public static boolean isSideEffectFree(Stmt stmt, ShadingLanguageVersion shadingLanguageVersion, ShaderKind shaderKind) { return isSideEffectFreeVisitor(stmt, shadingLanguageVersion, shaderKind); }  }
SideEffectChecker { public static boolean isSideEffectFree(Stmt stmt, ShadingLanguageVersion shadingLanguageVersion, ShaderKind shaderKind) { return isSideEffectFreeVisitor(stmt, shadingLanguageVersion, shaderKind); }  static boolean isSideEffectFree(Stmt stmt, ShadingLanguageVersion shadingLanguageVersion,
                                         ShaderKind shaderKind); static boolean isSideEffectFree(Expr expr, ShadingLanguageVersion shadingLanguageVersion,
                                         ShaderKind shaderKind); }
SideEffectChecker { public static boolean isSideEffectFree(Stmt stmt, ShadingLanguageVersion shadingLanguageVersion, ShaderKind shaderKind) { return isSideEffectFreeVisitor(stmt, shadingLanguageVersion, shaderKind); }  static boolean isSideEffectFree(Stmt stmt, ShadingLanguageVersion shadingLanguageVersion,
                                         ShaderKind shaderKind); static boolean isSideEffectFree(Expr expr, ShadingLanguageVersion shadingLanguageVersion,
                                         ShaderKind shaderKind);  }