Commit 3435020f authored by Noric Couderc's avatar Noric Couderc
Browse files

Improved instructions for task

Added a case for null objects.
parent c746233e
......@@ -101,10 +101,14 @@ Here:
- `<update-kind>` It represents the type non-null variable.
- if the variable is used as an index in array assignment print `NI`.
- if the variable is an array used in array indexing, print `NA`.
- if you are trying to access the field of an object that is null, print `NO`.
- Otherwise, print `N`
You may print other lines (e.g. for debugging), as long as they do not start with `N`.
- `obj` means that the variable points to an object
- `null` means that it points to a null literal. You must keep track of the source location of that particular `null` literal. Hence it has a line number and a column number.
- `<line-number>` is the line number of the allocation site of the variable.
- `<column-number>` is the column number of the allocation site of the variable.
......@@ -138,6 +142,21 @@ Where:
- `obj 6 29` refers to the literal `0`
- `null 3 50` is the source location where `null` was created.
Likewise, for the input:
fun main() = {
var a := null;
a.x := 1;
Your analysis should print:
NO 2 8 -> null 2 13
## Hints and Starting Points
The []( file contains some high-level pieces of
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment