-
Notifications
You must be signed in to change notification settings - Fork 29
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
Disallows impure non-ghost calls in ghost code #755
Disallows impure non-ghost calls in ghost code #755
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just have a few minor comments
src/test/resources/regressions/features/closures/closures-fail5-proofs.gobra
Show resolved
Hide resolved
src/main/scala/viper/gobra/frontend/info/implementation/resolution/NameResolution.scala
Outdated
Show resolved
Hide resolved
src/main/scala/viper/gobra/frontend/info/implementation/typing/MiscTyping.scala
Show resolved
Hide resolved
src/main/scala/viper/gobra/frontend/info/implementation/typing/StmtTyping.scala
Outdated
Show resolved
Hide resolved
...in/scala/viper/gobra/frontend/info/implementation/typing/ghost/separation/GhostWellDef.scala
Outdated
Show resolved
Hide resolved
...in/scala/viper/gobra/frontend/info/implementation/typing/ghost/separation/GhostWellDef.scala
Outdated
Show resolved
Hide resolved
...in/scala/viper/gobra/frontend/info/implementation/typing/ghost/separation/GhostWellDef.scala
Show resolved
Hide resolved
…/ghost/separation/GhostWellDef.scala Co-authored-by: João Pereira <joaopereira.19@gmail.com>
…/StmtTyping.scala Co-authored-by: João Pereira <joaopereira.19@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have 1-2 questions. If these questions do not show some issue, then you can merge.
src/main/scala/viper/gobra/frontend/info/implementation/resolution/NameResolution.scala
Outdated
Show resolved
Hide resolved
src/main/scala/viper/gobra/frontend/info/implementation/resolution/NameResolution.scala
Outdated
Show resolved
Hide resolved
src/test/resources/regressions/features/ghost_pointer/ghost-pointer-receiver-fail01.gobra
Outdated
Show resolved
Hide resolved
...in/scala/viper/gobra/frontend/info/implementation/typing/ghost/separation/GhostWellDef.scala
Show resolved
Hide resolved
...in/scala/viper/gobra/frontend/info/implementation/typing/ghost/separation/GhostWellDef.scala
Outdated
Show resolved
Hide resolved
...in/scala/viper/gobra/frontend/info/implementation/typing/ghost/separation/GhostWellDef.scala
Show resolved
Hide resolved
Co-authored-by: Felix Wolf <60103963+Felalolf@users.noreply.github.com>
This PR depends on PR #747. Thus, this PR targets
impure-calls-in-ghost-code-target-branch
(which corresponds to the branch used in #747) for review-purposes.This PR checks that ghost code does not contain calls to non-ghost impure functions. Note that calling non-ghost pure functions is fine due to the absence of side effects.
To support implementation proofs, this PR makes interface & closure implementation proofs non-ghost. Technically, we would need to distinguish between implementation proofs for a ghost or non-ghost member but due to the syntax restrictions for implementation proofs, we do not have to make this distinction (e.g., assignments are disallowed).
Fixes #37, Fixes #420