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/list_get_element_oob_1.py.a...

156 lines
3.7 KiB

{
"kind" : "Program",
"location" : [ 1, 1, 4, 13 ],
"declarations" : [ {
"kind" : "VarDef",
"location" : [ 1, 1, 1, 14 ],
"var" : {
"kind" : "TypedVar",
"location" : [ 1, 1, 1, 7 ],
"identifier" : {
"kind" : "Identifier",
"location" : [ 1, 1, 1, 1 ],
"name" : "x"
},
"type" : {
"kind" : "ListType",
"location" : [ 1, 3, 1, 7 ],
"elementType" : {
"kind" : "ClassType",
"location" : [ 1, 4, 1, 6 ],
"className" : "int"
}
}
},
"value" : {
"kind" : "NoneLiteral",
"location" : [ 1, 11, 1, 14 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
}
} ],
"statements" : [ {
"kind" : "AssignStmt",
"location" : [ 3, 1, 3, 13 ],
"targets" : [ {
"kind" : "Identifier",
"location" : [ 3, 1, 3, 1 ],
"inferredType" : {
"kind" : "ListValueType",
"elementType" : {
"kind" : "ClassValueType",
"className" : "int"
}
},
"name" : "x"
} ],
"value" : {
"kind" : "ListExpr",
"location" : [ 3, 5, 3, 13 ],
"inferredType" : {
"kind" : "ListValueType",
"elementType" : {
"kind" : "ClassValueType",
"className" : "int"
}
},
"elements" : [ {
"kind" : "IntegerLiteral",
"location" : [ 3, 6, 3, 6 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"value" : 1
}, {
"kind" : "IntegerLiteral",
"location" : [ 3, 9, 3, 9 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"value" : 2
}, {
"kind" : "IntegerLiteral",
"location" : [ 3, 12, 3, 12 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"value" : 3
} ]
}
}, {
"kind" : "ExprStmt",
"location" : [ 4, 1, 4, 12 ],
"expr" : {
"kind" : "CallExpr",
"location" : [ 4, 1, 4, 12 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "<None>"
},
"function" : {
"kind" : "Identifier",
"location" : [ 4, 1, 4, 5 ],
"inferredType" : {
"kind" : "FuncType",
"parameters" : [ {
"kind" : "ClassValueType",
"className" : "object"
} ],
"returnType" : {
"kind" : "ClassValueType",
"className" : "<None>"
}
},
"name" : "print"
},
"args" : [ {
"kind" : "IndexExpr",
"location" : [ 4, 7, 4, 11 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"list" : {
"kind" : "Identifier",
"location" : [ 4, 7, 4, 7 ],
"inferredType" : {
"kind" : "ListValueType",
"elementType" : {
"kind" : "ClassValueType",
"className" : "int"
}
},
"name" : "x"
},
"index" : {
"kind" : "UnaryExpr",
"location" : [ 4, 9, 4, 10 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"operator" : "-",
"operand" : {
"kind" : "IntegerLiteral",
"location" : [ 4, 10, 4, 10 ],
"inferredType" : {
"kind" : "ClassValueType",
"className" : "int"
},
"value" : 1
}
}
} ]
}
} ],
"errors" : {
"errors" : [ ],
"kind" : "Errors",
"location" : [ 0, 0, 0, 0 ]
}
}