ifuel 0 breaks unfolding
- Dominant language
- No language data
- Stars
- 36
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
The below file works if you comment out the `--ifuel 0`. This seems to be another instance of Pulse gratuitously re-typechecking things plus an unclear dependency on ifuel--the regular F* definition checks just fine with the same options (?!).
```fstar
module UnfoldTc
open Pulse.Nolib
#lang-pulse
#push-options "--ifuel 0"
assume val foo (n: nat) : bool & s:Seq.seq bool { Seq.length s == n }
let bar (n: nat) : slprop =
pure (Seq.index (snd (foo (n + 1))) n == false)
fn baz (n: nat)
requires bar n
{
unfold bar
// Expected term of type slprop
// got term pure (Seq.Base.index (snd (foo (n + 1))) n == false)
}
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the `UnfoldTc` example using `#lang-pulse` and `--ifuel 0`, then trace the unfolding and type-checking path for `bar` and `baz`. Done means the shown `baz` function accepts the unfolded `bar` definition with `--ifuel 0`, matching the behavior without that option.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100