Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The specifications for deref-exp and setref-exp are not quite correct #30

Open
dwayne opened this issue Jul 29, 2022 · 1 comment
Open

Comments

@dwayne
Copy link

dwayne commented Jul 29, 2022

See page 109.

I'll just explain the issue with the deref-exp specification since the issue is the same for the setref-exp specification.

Take (value-of exp ρ σ_0) = (l, σ_1). l is an ExpVal. This means to get the reference we have to do (expval->ref l). The specification as written doesn't do that.

Suggestion 1:

      (value-of exp ρ σ_0) = ((ref-val l), σ_1)
---------------------------------------------------------------
(value-of (deref-exp exp) ρ σ_0) = (σ_1(l), σ_1)

Suggestion 2:

                  (value-of exp ρ σ_0) = (val, σ_1)
------------------------------------------------------------------------------------
(value-of (deref-exp exp) ρ σ_0) = (σ_1((expval->ref val)), σ_1)
@mwand
Copy link
Owner

mwand commented Aug 4, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants