FStarLang / FStarLang/pulse

rewrite each could match types on each side

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

Description

```fstar
let foo (x : list 'a) : slprop = emp

fn test ()
requires foo [1]
ensures emp
{
rewrite each [1] as [2];
drop_ (foo [2]);
}

fn test2 ()
requires foo [1]
ensures emp
{
rewrite each [1] as [];
drop_ (foo []);
}
```
The rewrite in `test2` fails to work as we cannot resolve the type of the Nil constructor in the RHS of the rewrite, but it should be `int`, to match the LHS.

Contributor guide

No contributing guide indexed for this repository

Research direction

No file or test is named. Reproduce the `test2` example with `rewrite each [1] as []` and compare it with `test`; trace type resolution for the RHS `Nil` constructor. Done means the RHS resolves to `int` and the rewrite succeeds.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.