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

Disallows impure non-ghost calls in ghost code #755

Merged
merged 7 commits into from
May 24, 2024

Conversation

ArquintL
Copy link
Member

@ArquintL ArquintL commented Mar 28, 2024

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

@ArquintL ArquintL requested a review from Felalolf March 28, 2024 14:51
@ArquintL ArquintL mentioned this pull request May 6, 2024
@ArquintL ArquintL changed the base branch from master to impure-calls-in-ghost-code-target-branch May 14, 2024 09:02
@ArquintL ArquintL requested a review from jcp19 May 14, 2024 09:07
Copy link
Contributor

@jcp19 jcp19 left a 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

ArquintL and others added 3 commits May 15, 2024 11:59
…/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>
Copy link
Contributor

@jcp19 jcp19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@Felalolf Felalolf left a 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.

ArquintL and others added 2 commits May 23, 2024 09:41
Co-authored-by: Felix Wolf <60103963+Felalolf@users.noreply.github.com>
@ArquintL ArquintL changed the base branch from impure-calls-in-ghost-code-target-branch to tmp-branch-for-#747-#755-#766 May 23, 2024 15:06
@ArquintL ArquintL merged commit 6fb2981 into tmp-branch-for-#747-#755-#766 May 24, 2024
3 checks passed
@ArquintL ArquintL deleted the impure-calls-in-ghost-code branch May 24, 2024 06:59
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

Successfully merging this pull request may close these issues.

non ghost assignment in ghost if-else block
3 participants