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 for interfaces with Pulse #49

Open
nikswamy opened this issue Aug 1, 2023 · 0 comments
Open

Support for interfaces with Pulse #49

nikswamy opened this issue Aug 1, 2023 · 0 comments
Labels
pulse Issues related to the Pulse separation logic DSL

Comments

@nikswamy
Copy link
Collaborator

nikswamy commented Aug 1, 2023

Interfaces and Pulse

Currently, a Pulse definition cannot be hidden in a module and only its signature visible in an interface. This is not specific to Pulse: The DSL mechanism doesn't yet allow this.

As we start building more useful Pulse libraries, we need a way to have them work with interfaces.

One possibility:

The current implementation of splice_t doesn't check anything: it simply takes the well-typed program produced by the DSL checker and slaps it into the module.

Instead, when splicing in a let f : t' = e into the program, it could check if a val f : t exists, and if so, check that t' <: t

@mtzguido mentioned that instead of this, there could be a new tactic primitive for splicing in well-typed solutions to goals, which could handle this scenario smoothly.

We should also add syntax for writing Pulse signatures, for use mainly in interfaces, i.e., you could write

fn f (...) 
 requires ..
 returns ...
 ensures ...

i.e., a fn without a body, where it gets elaborated to a val f ...

@tahina-pro tahina-pro added the pulse Issues related to the Pulse separation logic DSL label Sep 25, 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

2 participants