Need spurious bind to make function check
- Dominant language
- No language data
- Stars
- 36
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
```fstar
assume val p : int
assume val q : int
assume val foo : int -> slprop
assume val lem () : Lemma (foo p == foo q)
ghost
fn test ()
requires foo p
ensures foo q
{
lem();
// ()
}
```
This function fails to check:
```
- Cannot prove:
foo q
- In the context:
foo p
```
But uncommenting the extra `()`, or doing anything, will make it work. I think without it, the lemma is not eliminated into the context and so is not in scope for the query `foo p == foo q`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the minimal Pulse/F* reproducer in the issue and compare checking it with and without the trailing `()`. Investigate why `lem();` is not available for the `foo p == foo q` query until another expression is added; done means the original body checks without a spurious bind and the behavior has a regression test.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100