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/pa3-tests/core/op_is.py.ast.typed

598 lines
14 KiB

{
"kind" : "Program",
"location" : [ 1, 1, 19, 20 ],
"declarations" : [ {
"kind" : "ClassDef",
"location" : [ 1, 1, 2, 15 ],
"name" : {
"kind" : "Identifier",
"location" : [ 1, 7, 1, 7 ],
"name" : "A"
},
"superClass" : {
"kind" : "Identifier",
"location" : [ 1, 9, 1, 14 ],
"name" : "object"
},
"declarations" : [ {
"kind" : "VarDef",
"location" : [ 2, 5, 2, 14 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 2, 5, 2, 9 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 2, 5, 2, 5 ],
"name" : "a"
},
"type" : {
"kind" : "ClassType",
"location" : [ 2, 7, 2, 9 ],
"className" : "int"
}
},
"value" : {
"kind" : "IntegerLiteral",
"location" : [ 2, 13, 2, 14 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"value" : 42
}
} ]
}, {
"kind" : "VarDef",
"location" : [ 4, 1, 4, 11 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 4, 1, 4, 4 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 4, 1, 4, 2 ],
"name" : "a1"
},
"type" : {
"kind" : "ClassType",
"location" : [ 4, 4, 4, 4 ],
"className" : "A"
}
},
"value" : {
"kind" : "NoneLiteral",
"location" : [ 4, 8, 4, 11 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
}
}, {
"kind" : "VarDef",
"location" : [ 5, 1, 5, 11 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 5, 1, 5, 4 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 5, 1, 5, 2 ],
"name" : "a2"
},
"type" : {
"kind" : "ClassType",
"location" : [ 5, 4, 5, 4 ],
"className" : "A"
}
},
"value" : {
"kind" : "NoneLiteral",
"location" : [ 5, 8, 5, 11 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
}
}, {
"kind" : "VarDef",
"location" : [ 6, 1, 6, 11 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 6, 1, 6, 4 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 6, 1, 6, 2 ],
"name" : "a3"
},
"type" : {
"kind" : "ClassType",
"location" : [ 6, 4, 6, 4 ],
"className" : "A"
}
},
"value" : {
"kind" : "NoneLiteral",
"location" : [ 6, 8, 6, 11 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
}
}, {
"kind" : "VarDef",
"location" : [ 7, 1, 7, 11 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 7, 1, 7, 4 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 7, 1, 7, 2 ],
"name" : "a4"
},
"type" : {
"kind" : "ClassType",
"location" : [ 7, 4, 7, 4 ],
"className" : "A"
}
},
"value" : {
"kind" : "NoneLiteral",
"location" : [ 7, 8, 7, 11 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
}
} ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 9, 1, 9, 8 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 9, 1, 9, 2 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"name" : "a1"
} ],
"value" : {
"kind" : "CallExpr",
"location" : [ 9, 6, 9, 8 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"function" : {
"kind" : "Identifier",
"location" : [ 9, 6, 9, 6 ],
"name" : "A"
},
"args" : [ ]
}
}, {
"kind" : "AssignStmt",
"location" : [ 10, 1, 10, 7 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 10, 1, 10, 2 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"name" : "a2"
} ],
"value" : {
"kind" : "Identifier",
"location" : [ 10, 6, 10, 7 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"name" : "a1"
}
}, {
"kind" : "AssignStmt",
"location" : [ 11, 1, 11, 8 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 11, 1, 11, 2 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"name" : "a3"
} ],
"value" : {
"kind" : "CallExpr",
"location" : [ 11, 6, 11, 8 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"function" : {
"kind" : "Identifier",
"location" : [ 11, 6, 11, 6 ],
"name" : "A"
},
"args" : [ ]
}
}, {
"kind" : "ExprStmt",
"location" : [ 13, 1, 13, 15 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 13, 1, 13, 15 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
},
"function" : {
"kind" : "Identifier",
"location" : [ 13, 1, 13, 5 ],
"inferredType" : {
"kind" : "FuncType",
"parameters" : [ {
"kind" : "ClassValueType",
"className" : "object"
} ],
"returnType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
},
"name" : "print"
},
"args" : [ {
"kind" : "BinaryExpr",
"location" : [ 13, 7, 13, 14 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "bool"
},
"left" : {
"kind" : "Identifier",
"location" : [ 13, 7, 13, 8 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"name" : "a1"
},
"operator" : "is",
"right" : {
"kind" : "Identifier",
"location" : [ 13, 13, 13, 14 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"name" : "a1"
}
} ]
}
}, {
"kind" : "ExprStmt",
"location" : [ 14, 1, 14, 15 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 14, 1, 14, 15 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
},
"function" : {
"kind" : "Identifier",
"location" : [ 14, 1, 14, 5 ],
"inferredType" : {
"kind" : "FuncType",
"parameters" : [ {
"kind" : "ClassValueType",
"className" : "object"
} ],
"returnType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
},
"name" : "print"
},
"args" : [ {
"kind" : "BinaryExpr",
"location" : [ 14, 7, 14, 14 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "bool"
},
"left" : {
"kind" : "Identifier",
"location" : [ 14, 7, 14, 8 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"name" : "a1"
},
"operator" : "is",
"right" : {
"kind" : "Identifier",
"location" : [ 14, 13, 14, 14 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"name" : "a2"
}
} ]
}
}, {
"kind" : "ExprStmt",
"location" : [ 15, 1, 15, 15 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 15, 1, 15, 15 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
},
"function" : {
"kind" : "Identifier",
"location" : [ 15, 1, 15, 5 ],
"inferredType" : {
"kind" : "FuncType",
"parameters" : [ {
"kind" : "ClassValueType",
"className" : "object"
} ],
"returnType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
},
"name" : "print"
},
"args" : [ {
"kind" : "BinaryExpr",
"location" : [ 15, 7, 15, 14 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "bool"
},
"left" : {
"kind" : "Identifier",
"location" : [ 15, 7, 15, 8 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"name" : "a1"
},
"operator" : "is",
"right" : {
"kind" : "Identifier",
"location" : [ 15, 13, 15, 14 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"name" : "a3"
}
} ]
}
}, {
"kind" : "ExprStmt",
"location" : [ 16, 1, 16, 15 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 16, 1, 16, 15 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
},
"function" : {
"kind" : "Identifier",
"location" : [ 16, 1, 16, 5 ],
"inferredType" : {
"kind" : "FuncType",
"parameters" : [ {
"kind" : "ClassValueType",
"className" : "object"
} ],
"returnType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
},
"name" : "print"
},
"args" : [ {
"kind" : "BinaryExpr",
"location" : [ 16, 7, 16, 14 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "bool"
},
"left" : {
"kind" : "Identifier",
"location" : [ 16, 7, 16, 8 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"name" : "a1"
},
"operator" : "is",
"right" : {
"kind" : "Identifier",
"location" : [ 16, 13, 16, 14 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"name" : "a4"
}
} ]
}
}, {
"kind" : "ExprStmt",
"location" : [ 17, 1, 17, 17 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 17, 1, 17, 17 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
},
"function" : {
"kind" : "Identifier",
"location" : [ 17, 1, 17, 5 ],
"inferredType" : {
"kind" : "FuncType",
"parameters" : [ {
"kind" : "ClassValueType",
"className" : "object"
} ],
"returnType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
},
"name" : "print"
},
"args" : [ {
"kind" : "BinaryExpr",
"location" : [ 17, 7, 17, 16 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "bool"
},
"left" : {
"kind" : "Identifier",
"location" : [ 17, 7, 17, 8 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"name" : "a1"
},
"operator" : "is",
"right" : {
"kind" : "NoneLiteral",
"location" : [ 17, 13, 17, 16 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
}
} ]
}
}, {
"kind" : "ExprStmt",
"location" : [ 18, 1, 18, 17 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 18, 1, 18, 17 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
},
"function" : {
"kind" : "Identifier",
"location" : [ 18, 1, 18, 5 ],
"inferredType" : {
"kind" : "FuncType",
"parameters" : [ {
"kind" : "ClassValueType",
"className" : "object"
} ],
"returnType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
},
"name" : "print"
},
"args" : [ {
"kind" : "BinaryExpr",
"location" : [ 18, 7, 18, 16 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "bool"
},
"left" : {
"kind" : "Identifier",
"location" : [ 18, 7, 18, 8 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "A"
},
"name" : "a4"
},
"operator" : "is",
"right" : {
"kind" : "NoneLiteral",
"location" : [ 18, 13, 18, 16 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
}
} ]
}
}, {
"kind" : "ExprStmt",
"location" : [ 19, 1, 19, 19 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 19, 1, 19, 19 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
},
"function" : {
"kind" : "Identifier",
"location" : [ 19, 1, 19, 5 ],
"inferredType" : {
"kind" : "FuncType",
"parameters" : [ {
"kind" : "ClassValueType",
"className" : "object"
} ],
"returnType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
},
"name" : "print"
},
"args" : [ {
"kind" : "BinaryExpr",
"location" : [ 19, 7, 19, 18 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "bool"
},
"left" : {
"kind" : "NoneLiteral",
"location" : [ 19, 7, 19, 10 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
},
"operator" : "is",
"right" : {
"kind" : "NoneLiteral",
"location" : [ 19, 15, 19, 18 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
}
} ]
}
} ],
"errors" : {
"errors" : [ ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}