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

Support universe polymorphism #72

Open
mtzguido opened this issue Aug 15, 2023 · 2 comments
Open

Support universe polymorphism #72

mtzguido opened this issue Aug 15, 2023 · 2 comments
Assignees
Labels
pulse Issues related to the Pulse separation logic DSL

Comments

@mtzguido
Copy link
Member

mtzguido commented Aug 15, 2023

This:

assume val ty : Type

```pulse
fn test (x : ty)
  requires emp
  returns x:int
  ensures emp
{
  1
}

Fails with

Could not infer implicit arguments in x: ty -> stt int emp (fun _ -> emp) (in file <dummy>)
@nikswamy nikswamy self-assigned this Aug 15, 2023
@mtzguido
Copy link
Member Author

mtzguido commented Aug 15, 2023

Running in the CLI also shows this:

(Error 339) Internal error: unexpected unresolved (universe) uvar in deep_compress: 7
<dummy>(0,0-0,0): (Error) Could not infer implicit arguments in x: Bug.ty -> Pulse.Lib.Core.stt Prims.int Pulse.Lib.Core.emp (fun _ -> Pulse.Lib.Core.emp)

and specializing to Type0 makes it work.

@tahina-pro tahina-pro added the pulse Issues related to the Pulse separation logic DSL label Sep 25, 2023
@nikswamy
Copy link
Collaborator

The issue here is that Pulse does not support universe polymorphic definitions. We should at least provide a better error.

@nikswamy nikswamy changed the title Cannot used assumed types? Support universe polymorphism Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pulse Issues related to the Pulse separation logic DSL
Projects
None yet
Development

No branches or pull requests

3 participants