FStarLang / FStarLang/FStar

Simple expression if fails

Open
#4,263 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
F*
Stars
3.1k
Forks
267
Avg merge
21h 1m
Merged PRs (30d)
54

Description

```fstar
fn bug (b : bool)
(i2 i3 : unit -> fn returns UInt32.t)
returns UInt32.t
{
let y = (if b then i2 () else i3 ());
y;
}
```
```
- Tactic failed
- Cannot prove:
match b with
| true ->
exists* (__anf0: UInt32.t). with_pure (_posth == __anf0) (fun _ -> emp)
| false ->
with_pure (b == false)
(fun _ ->
exists* (__anf0: UInt32.t).
with_pure (_posth == __anf0) (fun _ -> emp))
- In the context:

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the provided F* function `bug` and inspect the tactic failure and generated proof obligation. Trace the simple `if` expression through the relevant tactic or verification entry point. Done means this example verifies without the reported unprovable obligation.

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
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.