FStarLang / FStarLang/pulse

Using values returned by ghost fun

Open
#332 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
36
Forks
11
PR merge metrics
No merged PRs in 30d

Description

```fstar
ghost
fn ghostpair ()
requires emp
returns r : int & int
ensures emp
{
admit();
}

fn use_ghost ()
requires emp
ensures emp
{
let Mktuple2 x y = ghostpair();
()
}
```
Fails with
```
- Expected a term with a non-informative (e.g., erased) type.
- Got: int & int
```
It would be nice if instead of failing to reveal the tuple, we would bind `x` and `y` to erased values.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with the shown F* snippet, focusing on ghostpair and the let Mktuple2 binding in use_ghost. Trace where the non-informative-type check rejects the int & int result; done means the tuple pattern binds x and y as erased values instead of raising the current error.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.