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

Inference with nested refinements #223

Open
nikswamy opened this issue Oct 2, 2024 · 0 comments
Open

Inference with nested refinements #223

nikswamy opened this issue Oct 2, 2024 · 0 comments

Comments

@nikswamy
Copy link
Contributor

nikswamy commented Oct 2, 2024

Nested refinement types are not inferred correctly in Pulse, requiring additional annotation

module BugRealRefinement
#lang-pulse
open Pulse.Lib.Pervasives

assume
val p (#a:Type0) (_:(option perm & a)) : slprop

[@@expect_failure]
fn test (#a:Type0) (x:a)
requires emp
ensures p (Some 1.0R, x) //this fails
{
  admit()
}

fn test (#a:Type0) (x:a)
requires emp
ensures p (Some #perm 1.0R, x) //needs a #perm annotation
{
  admit()
}


let full #a (x:a) : (option perm & a) = (Some 1.0R, x)
fn test2 (#a:Type0) (x:a)
requires emp
ensures p (full x) //or an indirection
{
  admit()
}
nikswamy added a commit that referenced this issue Oct 2, 2024
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

1 participant