You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ChocoPy/src/test/data/pa2/student_contributed/good.py.ast.typed

1301 lines
31 KiB

{
"kind" : "Program",
"location" : [ 2, 1, 109, 11 ],
"declarations" : [ {
"kind" : "ClassDef",
"location" : [ 2, 1, 9, 16 ],
"name" : {
"kind" : "Identifier",
"location" : [ 2, 7, 2, 13 ],
"name" : "A_CLASS"
},
"superClass" : {
"kind" : "Identifier",
"location" : [ 2, 15, 2, 20 ],
"name" : "object"
},
"declarations" : [ {
"kind" : "VarDef",
"location" : [ 3, 5, 3, 21 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 3, 5, 3, 17 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 3, 5, 3, 13 ],
"name" : "a_class_i"
},
"type" : {
"kind" : "ClassType",
"location" : [ 3, 15, 3, 17 ],
"className" : "int"
}
},
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 3, 21, 3, 21 ],
"value" : 0
}
}, {
"kind" : "FuncDef",
"location" : [ 4, 5, 5, 18 ],
"name" : {
"kind" : "Identifier",
"location" : [ 4, 9, 4, 16 ],
"errorMsg" : "Method overridden with different type signature: __init__",
"name" : "__init__"
},
"params" : [ {
"kind" : "TypedVar",
"location" : [ 4, 18, 4, 31 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 4, 18, 4, 21 ],
"name" : "self"
},
"type" : {
"kind" : "ClassType",
"location" : [ 4, 23, 4, 31 ],
"className" : "A_CLASS"
}
}, {
"kind" : "TypedVar",
"location" : [ 4, 34, 4, 38 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 4, 34, 4, 34 ],
"name" : "x"
},
"type" : {
"kind" : "ClassType",
"location" : [ 4, 36, 4, 38 ],
"className" : "int"
}
} ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 4, 40, 4, 40 ],
"className" : "<None>"
},
"declarations" : [ ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 5, 9, 5, 18 ],
"targets" : [ {
"kind" : "MemberExpr",
"location" : [ 5, 9, 5, 14 ],
"object" : {
"kind" : "Identifier",
"location" : [ 5, 9, 5, 12 ],
"name" : "self"
},
"member" : {
"kind" : "Identifier",
"location" : [ 5, 14, 5, 14 ],
"name" : "x"
}
} ],
"value" : {
"kind" : "Identifier",
"location" : [ 5, 18, 5, 18 ],
"name" : "x"
}
} ]
}, {
"kind" : "FuncDef",
"location" : [ 7, 5, 9, 16 ],
"name" : {
"kind" : "Identifier",
"location" : [ 7, 9, 7, 11 ],
"name" : "add"
},
"params" : [ {
"kind" : "TypedVar",
"location" : [ 7, 13, 7, 26 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 7, 13, 7, 16 ],
"name" : "self"
},
"type" : {
"kind" : "ClassType",
"location" : [ 7, 18, 7, 26 ],
"className" : "A_CLASS"
}
}, {
"kind" : "TypedVar",
"location" : [ 7, 29, 7, 33 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 7, 29, 7, 29 ],
"name" : "y"
},
"type" : {
"kind" : "ClassType",
"location" : [ 7, 31, 7, 33 ],
"className" : "int"
}
} ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 7, 39, 7, 41 ],
"className" : "int"
},
"declarations" : [ ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 8, 9, 8, 20 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 8, 9, 8, 9 ],
"name" : "y"
} ],
"value" : {
"kind" : "BinaryExpr",
"location" : [ 8, 13, 8, 20 ],
"left" : {
"kind" : "Identifier",
"location" : [ 8, 13, 8, 13 ],
"name" : "y"
},
"operator" : "+",
"right" : {
"kind" : "MemberExpr",
"location" : [ 8, 15, 8, 20 ],
"object" : {
"kind" : "Identifier",
"location" : [ 8, 15, 8, 18 ],
"name" : "self"
},
"member" : {
"kind" : "Identifier",
"location" : [ 8, 20, 8, 20 ],
"name" : "x"
}
}
}
}, {
"kind" : "ReturnStmt",
"location" : [ 9, 9, 9, 16 ],
"value" : {
"kind" : "Identifier",
"location" : [ 9, 16, 9, 16 ],
"name" : "y"
}
} ]
} ]
}, {
"kind" : "ClassDef",
"location" : [ 11, 1, 12, 21 ],
"name" : {
"kind" : "Identifier",
"location" : [ 11, 7, 11, 13 ],
"name" : "B_CLASS"
},
"superClass" : {
"kind" : "Identifier",
"location" : [ 11, 15, 11, 20 ],
"name" : "object"
},
"declarations" : [ {
"kind" : "VarDef",
"location" : [ 12, 5, 12, 21 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 12, 5, 12, 17 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 12, 5, 12, 13 ],
"name" : "b_class_i"
},
"type" : {
"kind" : "ClassType",
"location" : [ 12, 15, 12, 17 ],
"className" : "int"
}
},
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 12, 21, 12, 21 ],
"value" : 0
}
} ]
}, {
"kind" : "ClassDef",
"location" : [ 14, 1, 0, 0 ],
"name" : {
"kind" : "Identifier",
"location" : [ 14, 7, 14, 13 ],
"name" : "C_CLASS"
},
"superClass" : {
"kind" : "Identifier",
"location" : [ 14, 15, 14, 21 ],
"name" : "B_CLASS"
},
"declarations" : [ ]
}, {
"kind" : "VarDef",
"location" : [ 18, 1, 18, 15 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 18, 1, 18, 7 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 18, 1, 18, 3 ],
"name" : "a_s"
},
"type" : {
"kind" : "ClassType",
"location" : [ 18, 5, 18, 7 ],
"className" : "str"
}
},
"value" : {
"kind" : "StringLiteral",
"location" : [ 18, 11, 18, 15 ],
"value" : "a_s"
}
}, {
"kind" : "VarDef",
"location" : [ 19, 1, 19, 15 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 19, 1, 19, 7 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 19, 1, 19, 3 ],
"name" : "b_s"
},
"type" : {
"kind" : "ClassType",
"location" : [ 19, 5, 19, 7 ],
"className" : "str"
}
},
"value" : {
"kind" : "StringLiteral",
"location" : [ 19, 11, 19, 15 ],
"value" : "b_s"
}
}, {
"kind" : "VarDef",
"location" : [ 20, 1, 20, 15 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 20, 1, 20, 7 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 20, 1, 20, 3 ],
"name" : "c_s"
},
"type" : {
"kind" : "ClassType",
"location" : [ 20, 5, 20, 7 ],
"className" : "str"
}
},
"value" : {
"kind" : "StringLiteral",
"location" : [ 20, 11, 20, 15 ],
"value" : "c_s"
}
}, {
"kind" : "VarDef",
"location" : [ 22, 1, 22, 11 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 22, 1, 22, 7 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 22, 1, 22, 3 ],
"name" : "a_i"
},
"type" : {
"kind" : "ClassType",
"location" : [ 22, 5, 22, 7 ],
"className" : "int"
}
},
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 22, 11, 22, 11 ],
"value" : 0
}
}, {
"kind" : "VarDef",
"location" : [ 23, 1, 23, 11 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 23, 1, 23, 7 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 23, 1, 23, 3 ],
"name" : "b_i"
},
"type" : {
"kind" : "ClassType",
"location" : [ 23, 5, 23, 7 ],
"className" : "int"
}
},
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 23, 11, 23, 11 ],
"value" : 0
}
}, {
"kind" : "VarDef",
"location" : [ 24, 1, 24, 11 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 24, 1, 24, 7 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 24, 1, 24, 3 ],
"name" : "c_i"
},
"type" : {
"kind" : "ClassType",
"location" : [ 24, 5, 24, 7 ],
"className" : "int"
}
},
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 24, 11, 24, 11 ],
"value" : 0
}
}, {
"kind" : "VarDef",
"location" : [ 26, 1, 26, 16 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 26, 1, 26, 8 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 26, 1, 26, 3 ],
"name" : "a_b"
},
"type" : {
"kind" : "ClassType",
"location" : [ 26, 5, 26, 8 ],
"className" : "bool"
}
},
"value" : {
"kind" : "BooleanLiteral",
"location" : [ 26, 12, 26, 16 ],
"value" : false
}
}, {
"kind" : "VarDef",
"location" : [ 27, 1, 27, 16 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 27, 1, 27, 8 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 27, 1, 27, 3 ],
"name" : "b_b"
},
"type" : {
"kind" : "ClassType",
"location" : [ 27, 5, 27, 8 ],
"className" : "bool"
}
},
"value" : {
"kind" : "BooleanLiteral",
"location" : [ 27, 12, 27, 16 ],
"value" : false
}
}, {
"kind" : "VarDef",
"location" : [ 28, 1, 28, 16 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 28, 1, 28, 8 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 28, 1, 28, 3 ],
"name" : "c_b"
},
"type" : {
"kind" : "ClassType",
"location" : [ 28, 5, 28, 8 ],
"className" : "bool"
}
},
"value" : {
"kind" : "BooleanLiteral",
"location" : [ 28, 12, 28, 16 ],
"value" : false
}
}, {
"kind" : "VarDef",
"location" : [ 30, 1, 30, 19 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 30, 1, 30, 12 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 30, 1, 30, 6 ],
"name" : "a_list"
},
"type" : {
"kind" : "ListType",
"location" : [ 30, 8, 30, 12 ],
"elementType" : {
"kind" : "ClassType",
"location" : [ 30, 9, 30, 11 ],
"className" : "int"
}
}
},
"value" : {
"kind" : "NoneLiteral",
"location" : [ 30, 16, 30, 19 ]
}
}, {
"kind" : "VarDef",
"location" : [ 31, 1, 31, 19 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 31, 1, 31, 12 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 31, 1, 31, 6 ],
"name" : "b_list"
},
"type" : {
"kind" : "ListType",
"location" : [ 31, 8, 31, 12 ],
"elementType" : {
"kind" : "ClassType",
"location" : [ 31, 9, 31, 11 ],
"className" : "int"
}
}
},
"value" : {
"kind" : "NoneLiteral",
"location" : [ 31, 16, 31, 19 ]
}
}, {
"kind" : "VarDef",
"location" : [ 32, 1, 32, 19 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 32, 1, 32, 12 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 32, 1, 32, 6 ],
"name" : "c_list"
},
"type" : {
"kind" : "ListType",
"location" : [ 32, 8, 32, 12 ],
"elementType" : {
"kind" : "ClassType",
"location" : [ 32, 9, 32, 11 ],
"className" : "int"
}
}
},
"value" : {
"kind" : "NoneLiteral",
"location" : [ 32, 16, 32, 19 ]
}
}, {
"kind" : "VarDef",
"location" : [ 34, 1, 34, 22 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 34, 1, 34, 15 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 34, 1, 34, 7 ],
"name" : "a_class"
},
"type" : {
"kind" : "ClassType",
"location" : [ 34, 9, 34, 15 ],
"className" : "A_CLASS"
}
},
"value" : {
"kind" : "NoneLiteral",
"location" : [ 34, 19, 34, 22 ]
}
}, {
"kind" : "VarDef",
"location" : [ 35, 1, 35, 22 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 35, 1, 35, 15 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 35, 1, 35, 7 ],
"name" : "b_class"
},
"type" : {
"kind" : "ClassType",
"location" : [ 35, 9, 35, 15 ],
"className" : "B_CLASS"
}
},
"value" : {
"kind" : "NoneLiteral",
"location" : [ 35, 19, 35, 22 ]
}
}, {
"kind" : "VarDef",
"location" : [ 36, 1, 36, 22 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 36, 1, 36, 15 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 36, 1, 36, 7 ],
"name" : "c_class"
},
"type" : {
"kind" : "ClassType",
"location" : [ 36, 9, 36, 15 ],
"className" : "C_CLASS"
}
},
"value" : {
"kind" : "NoneLiteral",
"location" : [ 36, 19, 36, 22 ]
}
}, {
"kind" : "FuncDef",
"location" : [ 40, 1, 0, 0 ],
"name" : {
"kind" : "Identifier",
"location" : [ 40, 5, 40, 7 ],
"name" : "f_1"
},
"params" : [ ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 40, 14, 40, 19 ],
"className" : "object"
},
"declarations" : [ {
"kind" : "FuncDef",
"location" : [ 41, 5, 43, 18 ],
"name" : {
"kind" : "Identifier",
"location" : [ 41, 9, 41, 13 ],
"name" : "f_f_1"
},
"params" : [ ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 41, 20, 41, 25 ],
"className" : "object"
},
"declarations" : [ {
"kind" : "GlobalDecl",
"location" : [ 42, 9, 42, 18 ],
"variable" : {
"kind" : "Identifier",
"location" : [ 42, 16, 42, 18 ],
"name" : "a_s"
}
} ],
"statements" : [ {
"kind" : "ExprStmt",
"location" : [ 43, 9, 43, 18 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 43, 9, 43, 18 ],
"function" : {
"kind" : "Identifier",
"location" : [ 43, 9, 43, 13 ],
"name" : "print"
},
"args" : [ {
"kind" : "Identifier",
"location" : [ 43, 15, 43, 17 ],
"name" : "a_s"
} ]
}
} ]
} ],
"statements" : [ ]
}, {
"kind" : "FuncDef",
"location" : [ 47, 1, 0, 0 ],
"name" : {
"kind" : "Identifier",
"location" : [ 47, 5, 47, 7 ],
"name" : "f_2"
},
"params" : [ ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 47, 14, 47, 19 ],
"className" : "object"
},
"declarations" : [ {
"kind" : "VarDef",
"location" : [ 48, 5, 48, 19 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 48, 5, 48, 13 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 48, 5, 48, 9 ],
"name" : "f_a_s"
},
"type" : {
"kind" : "ClassType",
"location" : [ 48, 11, 48, 13 ],
"className" : "str"
}
},
"value" : {
"kind" : "StringLiteral",
"location" : [ 48, 17, 48, 19 ],
"value" : "s"
}
}, {
"kind" : "FuncDef",
"location" : [ 49, 5, 51, 20 ],
"name" : {
"kind" : "Identifier",
"location" : [ 49, 9, 49, 13 ],
"name" : "f_f_2"
},
"params" : [ ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 49, 20, 49, 25 ],
"className" : "object"
},
"declarations" : [ {
"kind" : "NonLocalDecl",
"location" : [ 50, 9, 50, 22 ],
"variable" : {
"kind" : "Identifier",
"location" : [ 50, 18, 50, 22 ],
"name" : "f_a_s"
}
} ],
"statements" : [ {
"kind" : "ExprStmt",
"location" : [ 51, 9, 51, 20 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 51, 9, 51, 20 ],
"function" : {
"kind" : "Identifier",
"location" : [ 51, 9, 51, 13 ],
"name" : "print"
},
"args" : [ {
"kind" : "Identifier",
"location" : [ 51, 15, 51, 19 ],
"name" : "f_a_s"
} ]
}
} ]
} ],
"statements" : [ ]
}, {
"kind" : "FuncDef",
"location" : [ 55, 1, 57, 18 ],
"name" : {
"kind" : "Identifier",
"location" : [ 55, 5, 55, 7 ],
"name" : "f_3"
},
"params" : [ {
"kind" : "TypedVar",
"location" : [ 55, 9, 55, 13 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 55, 9, 55, 9 ],
"name" : "x"
},
"type" : {
"kind" : "ClassType",
"location" : [ 55, 11, 55, 13 ],
"className" : "int"
}
} ],
"returnType" : {
"kind" : "ClassType",
"location" : [ 55, 19, 55, 21 ],
"className" : "int"
},
"declarations" : [ {
"kind" : "VarDef",
"location" : [ 56, 5, 56, 17 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 56, 5, 56, 13 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 56, 5, 56, 9 ],
"name" : "f_b_s"
},
"type" : {
"kind" : "ClassType",
"location" : [ 56, 11, 56, 13 ],
"className" : "int"
}
},
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 56, 17, 56, 17 ],
"value" : 3
}
} ],
"statements" : [ {
"kind" : "ReturnStmt",
"location" : [ 57, 5, 57, 18 ],
"value" : {
"kind" : "BinaryExpr",
"location" : [ 57, 12, 57, 18 ],
"left" : {
"kind" : "Identifier",
"location" : [ 57, 12, 57, 12 ],
"name" : "x"
},
"operator" : "*",
"right" : {
"kind" : "Identifier",
"location" : [ 57, 14, 57, 18 ],
"name" : "f_b_s"
}
}
} ]
} ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 60, 1, 60, 18 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 60, 1, 60, 6 ],
"name" : "a_list"
} ],
"value" : {
"kind" : "ListExpr",
"location" : [ 60, 10, 60, 18 ],
"elements" : [ {
"kind" : "IntegerLiteral",
"location" : [ 60, 11, 60, 11 ],
"value" : 1
}, {
"kind" : "IntegerLiteral",
"location" : [ 60, 14, 60, 14 ],
"value" : 2
}, {
"kind" : "IntegerLiteral",
"location" : [ 60, 17, 60, 17 ],
"value" : 3
} ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 61, 1, 61, 18 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 61, 1, 61, 6 ],
"name" : "b_list"
} ],
"value" : {
"kind" : "ListExpr",
"location" : [ 61, 10, 61, 18 ],
"elements" : [ {
"kind" : "IntegerLiteral",
"location" : [ 61, 11, 61, 11 ],
"value" : 0
}, {
"kind" : "IntegerLiteral",
"location" : [ 61, 14, 61, 14 ],
"value" : 0
}, {
"kind" : "IntegerLiteral",
"location" : [ 61, 17, 61, 17 ],
"value" : 0
} ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 62, 1, 62, 21 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 62, 1, 62, 6 ],
"name" : "c_list"
} ],
"value" : {
"kind" : "ListExpr",
"location" : [ 62, 10, 62, 21 ],
"elements" : [ {
"kind" : "UnaryExpr",
"location" : [ 62, 11, 62, 12 ],
"operator" : "-",
"operand" : {
"kind" : "IntegerLiteral",
"location" : [ 62, 12, 62, 12 ],
"value" : 1
}
}, {
"kind" : "UnaryExpr",
"location" : [ 62, 15, 62, 16 ],
"operator" : "-",
"operand" : {
"kind" : "IntegerLiteral",
"location" : [ 62, 16, 62, 16 ],
"value" : 2
}
}, {
"kind" : "UnaryExpr",
"location" : [ 62, 19, 62, 20 ],
"operator" : "-",
"operand" : {
"kind" : "IntegerLiteral",
"location" : [ 62, 20, 62, 20 ],
"value" : 3
}
} ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 64, 1, 64, 20 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 64, 1, 64, 7 ],
"name" : "a_class"
} ],
"value" : {
"kind" : "CallExpr",
"location" : [ 64, 11, 64, 20 ],
"function" : {
"kind" : "Identifier",
"location" : [ 64, 11, 64, 17 ],
"name" : "A_CLASS"
},
"args" : [ {
"kind" : "IntegerLiteral",
"location" : [ 64, 19, 64, 19 ],
"value" : 5
} ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 65, 1, 65, 19 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 65, 1, 65, 7 ],
"name" : "b_class"
} ],
"value" : {
"kind" : "CallExpr",
"location" : [ 65, 11, 65, 19 ],
"function" : {
"kind" : "Identifier",
"location" : [ 65, 11, 65, 17 ],
"name" : "B_CLASS"
},
"args" : [ ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 66, 1, 66, 19 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 66, 1, 66, 7 ],
"name" : "c_class"
} ],
"value" : {
"kind" : "CallExpr",
"location" : [ 66, 11, 66, 19 ],
"function" : {
"kind" : "Identifier",
"location" : [ 66, 11, 66, 17 ],
"name" : "C_CLASS"
},
"args" : [ ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 74, 1, 74, 15 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 74, 1, 74, 3 ],
"name" : "a_s"
} ],
"value" : {
"kind" : "BinaryExpr",
"location" : [ 74, 7, 74, 15 ],
"left" : {
"kind" : "Identifier",
"location" : [ 74, 7, 74, 9 ],
"name" : "a_s"
},
"operator" : "+",
"right" : {
"kind" : "Identifier",
"location" : [ 74, 13, 74, 15 ],
"name" : "b_s"
}
}
}, {
"kind" : "ExprStmt",
"location" : [ 75, 1, 75, 10 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 75, 1, 75, 10 ],
"function" : {
"kind" : "Identifier",
"location" : [ 75, 1, 75, 5 ],
"name" : "print"
},
"args" : [ {
"kind" : "Identifier",
"location" : [ 75, 7, 75, 9 ],
"name" : "a_s"
} ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 78, 1, 78, 12 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 78, 1, 78, 3 ],
"name" : "c_s"
} ],
"value" : {
"kind" : "IndexExpr",
"location" : [ 78, 7, 78, 12 ],
"list" : {
"kind" : "Identifier",
"location" : [ 78, 7, 78, 9 ],
"name" : "a_s"
},
"index" : {
"kind" : "IntegerLiteral",
"location" : [ 78, 11, 78, 11 ],
"value" : 0
}
}
}, {
"kind" : "ExprStmt",
"location" : [ 79, 1, 79, 10 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 79, 1, 79, 10 ],
"function" : {
"kind" : "Identifier",
"location" : [ 79, 1, 79, 5 ],
"name" : "print"
},
"args" : [ {
"kind" : "Identifier",
"location" : [ 79, 7, 79, 9 ],
"name" : "c_s"
} ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 84, 1, 84, 28 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 84, 1, 84, 3 ],
"name" : "a_b"
} ],
"value" : {
"kind" : "BinaryExpr",
"location" : [ 84, 7, 84, 28 ],
"left" : {
"kind" : "BinaryExpr",
"location" : [ 84, 7, 84, 16 ],
"left" : {
"kind" : "Identifier",
"location" : [ 84, 7, 84, 9 ],
"name" : "a_i"
},
"operator" : "==",
"right" : {
"kind" : "Identifier",
"location" : [ 84, 14, 84, 16 ],
"name" : "b_i"
}
},
"operator" : "and",
"right" : {
"kind" : "UnaryExpr",
"location" : [ 84, 22, 84, 28 ],
"operator" : "not",
"operand" : {
"kind" : "Identifier",
"location" : [ 84, 26, 84, 28 ],
"name" : "b_b"
}
}
}
}, {
"kind" : "ExprStmt",
"location" : [ 85, 1, 85, 10 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 85, 1, 85, 10 ],
"function" : {
"kind" : "Identifier",
"location" : [ 85, 1, 85, 5 ],
"name" : "print"
},
"args" : [ {
"kind" : "Identifier",
"location" : [ 85, 7, 85, 9 ],
"name" : "a_b"
} ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 90, 1, 90, 24 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 90, 1, 90, 6 ],
"name" : "a_list"
} ],
"value" : {
"kind" : "BinaryExpr",
"location" : [ 90, 10, 90, 24 ],
"left" : {
"kind" : "Identifier",
"location" : [ 90, 10, 90, 15 ],
"name" : "a_list"
},
"operator" : "+",
"right" : {
"kind" : "Identifier",
"location" : [ 90, 19, 90, 24 ],
"name" : "b_list"
}
}
}, {
"kind" : "AssignStmt",
"location" : [ 91, 1, 91, 15 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 91, 1, 91, 3 ],
"name" : "c_i"
} ],
"value" : {
"kind" : "IndexExpr",
"location" : [ 91, 7, 91, 15 ],
"list" : {
"kind" : "Identifier",
"location" : [ 91, 7, 91, 12 ],
"name" : "a_list"
},
"index" : {
"kind" : "IntegerLiteral",
"location" : [ 91, 14, 91, 14 ],
"value" : 0
}
}
}, {
"kind" : "AssignStmt",
"location" : [ 92, 1, 92, 13 ],
"targets" : [ {
"kind" : "IndexExpr",
"location" : [ 92, 1, 92, 9 ],
"list" : {
"kind" : "Identifier",
"location" : [ 92, 1, 92, 6 ],
"name" : "a_list"
},
"index" : {
"kind" : "IntegerLiteral",
"location" : [ 92, 8, 92, 8 ],
"value" : 1
}
} ],
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 92, 13, 92, 13 ],
"value" : 2
}
}, {
"kind" : "AssignStmt",
"location" : [ 97, 1, 97, 16 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 97, 1, 97, 3 ],
"name" : "a_i"
} ],
"value" : {
"kind" : "BinaryExpr",
"location" : [ 97, 7, 97, 16 ],
"left" : {
"kind" : "CallExpr",
"location" : [ 97, 7, 97, 12 ],
"function" : {
"kind" : "Identifier",
"location" : [ 97, 7, 97, 9 ],
"name" : "f_3"
},
"args" : [ {
"kind" : "IntegerLiteral",
"location" : [ 97, 11, 97, 11 ],
"value" : 3
} ]
},
"operator" : "+",
"right" : {
"kind" : "IntegerLiteral",
"location" : [ 97, 16, 97, 16 ],
"value" : 5
}
}
}, {
"kind" : "ExprStmt",
"location" : [ 98, 1, 98, 5 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 98, 1, 98, 5 ],
"function" : {
"kind" : "Identifier",
"location" : [ 98, 1, 98, 3 ],
"name" : "f_1"
},
"args" : [ ]
}
}, {
"kind" : "ExprStmt",
"location" : [ 99, 1, 99, 5 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 99, 1, 99, 5 ],
"function" : {
"kind" : "Identifier",
"location" : [ 99, 1, 99, 3 ],
"name" : "f_2"
},
"args" : [ ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 104, 1, 104, 20 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 104, 1, 104, 3 ],
"name" : "a_i"
} ],
"value" : {
"kind" : "MethodCallExpr",
"location" : [ 104, 7, 104, 20 ],
"method" : {
"kind" : "MemberExpr",
"location" : [ 104, 7, 104, 17 ],
"object" : {
"kind" : "Identifier",
"location" : [ 104, 7, 104, 13 ],
"name" : "a_class"
},
"member" : {
"kind" : "Identifier",
"location" : [ 104, 15, 104, 17 ],
"name" : "add"
}
},
"args" : [ {
"kind" : "IntegerLiteral",
"location" : [ 104, 19, 104, 19 ],
"value" : 2
} ]
}
}, {
"kind" : "ExprStmt",
"location" : [ 105, 1, 105, 10 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 105, 1, 105, 10 ],
"function" : {
"kind" : "Identifier",
"location" : [ 105, 1, 105, 5 ],
"name" : "print"
},
"args" : [ {
"kind" : "Identifier",
"location" : [ 105, 7, 105, 9 ],
"name" : "a_i"
} ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 108, 1, 108, 36 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 108, 1, 108, 3 ],
"name" : "a_i"
} ],
"value" : {
"kind" : "MethodCallExpr",
"location" : [ 108, 7, 108, 36 ],
"method" : {
"kind" : "MemberExpr",
"location" : [ 108, 7, 108, 17 ],
"object" : {
"kind" : "Identifier",
"location" : [ 108, 7, 108, 13 ],
"name" : "a_class"
},
"member" : {
"kind" : "Identifier",
"location" : [ 108, 15, 108, 17 ],
"name" : "add"
}
},
"args" : [ {
"kind" : "MemberExpr",
"location" : [ 108, 19, 108, 35 ],
"object" : {
"kind" : "Identifier",
"location" : [ 108, 19, 108, 25 ],
"name" : "c_class"
},
"member" : {
"kind" : "Identifier",
"location" : [ 108, 27, 108, 35 ],
"name" : "b_class_i"
}
} ]
}
}, {
"kind" : "ExprStmt",
"location" : [ 109, 1, 109, 10 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 109, 1, 109, 10 ],
"function" : {
"kind" : "Identifier",
"location" : [ 109, 1, 109, 5 ],
"name" : "print"
},
"args" : [ {
"kind" : "Identifier",
"location" : [ 109, 7, 109, 9 ],
"name" : "a_i"
} ]
}
} ],
"errors" : {
"errors" : [ {
"kind" : "CompilerError",
"location" : [ 4, 9, 4, 16 ],
"message" : "Method overridden with different type signature: __init__"
} ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}