Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Christoph Reichenbach
EDAP15-exercise-3
Commits
e736e42d
Commit
e736e42d
authored
Dec 04, 2020
by
Christoph Reichenbach
Browse files
Removed NF -> N
parent
20d39015
Changes
3
Show whitespace changes
Inline
Side-by-side
Exercise3.md
View file @
e736e42d
...
@@ -102,7 +102,6 @@ Here:
...
@@ -102,7 +102,6 @@ Here:
-
For array indexes (
`i`
in
`a[i]`
), print
`NI`
.
-
For array indexes (
`i`
in
`a[i]`
), print
`NI`
.
-
For arrays that we are indexing in an array indexing expression (
`a`
in
`a[i]`
), print
`NA`
.
-
For arrays that we are indexing in an array indexing expression (
`a`
in
`a[i]`
), print
`NA`
.
-
For the base object in a field access (
`o`
in
`o.x`
), print
`NO`
.
-
For the base object in a field access (
`o`
in
`o.x`
), print
`NO`
.
-
For writes to
`nonnull`
fields, print
`NF`
.
-
Otherwise (parameters, returns, local/global variable assignments), print
`N`
-
Otherwise (parameters, returns, local/global variable assignments), print
`N`
You may print other lines (e.g. for debugging), as long as they do not start with
`N`
.
You may print other lines (e.g. for debugging), as long as they do not start with
`N`
.
...
@@ -133,12 +132,12 @@ fun main(n : int) = {
...
@@ -133,12 +132,12 @@ fun main(n : int) = {
Your analysis should print the following:
Your analysis should print the following:
```
```
N
F
6 29 -> obj 6 29
N 6 29 -> obj 6 29
N
F
8 4 -> null 3 50
N 8 4 -> null 3 50
```
```
Where:
Where:
-
`N
F
`
means that we are talking about an assignment to a nonnull field
-
`N`
means that we are talking about an assignment to a nonnull
variable (here, a
field
).
-
`6 29`
refers to the source location that Teal associates with the initial field assignment
-
`6 29`
refers to the source location that Teal associates with the initial field assignment
-
`obj 6 29`
refers to the literal number
`5`
-
`obj 6 29`
refers to the literal number
`5`
-
`8 4`
is the source location of the second assignment
-
`8 4`
is the source location of the second assignment
...
...
examples/pair.expected
View file @
e736e42d
N
F
6 29 -> obj 6 29
N 6 29 -> obj 6 29
N
F
8 4 -> null 3 50
N 8 4 -> null 3 50
examples/simple-struct.expected
View file @
e736e42d
N
F
4 25 -> obj 4 25
N 4 25 -> obj 4 25
N
F
4 28 -> obj 4 28
N 4 28 -> obj 4 28
N
F
5 15 -> obj 5 15
N 5 15 -> obj 5 15
N
F
5 18 -> obj 5 18
N 5 18 -> obj 5 18
N 8 6 -> obj 4 17
N 8 6 -> obj 4 17
N 8 6 -> obj 5 7
N 8 6 -> obj 5 7
N 8 6 -> null 4 31
N 8 6 -> null 4 31
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment