FStarLang / FStarLang/FStar

A regression on a simple subtyping check on functions

Open
#1,069 3 comments 0 reactions 1 assignee Claimed by @nikswamy View on GitHub
component/typechecker kind/bug
Dominant language
F*
Stars
3.1k
Forks
266
Avg merge
21h 1m
Merged PRs (30d)
54

Description

```
module Test
assume val dec : x:int -> Pure int
(requires True)
(ensures (fun y -> y = x - 1))
assume val inc : x:int -> Pure int
(requires True)
(ensures (fun y -> y = x + 1))

let compose (f:'b -> 'c) (g:'a -> 'b) (x:'a) = f (g x)

let ex3 : i:int -> Pure int
(requires (0 <= i))
(ensures (fun j -> 0 <= j))
= compose inc dec
```

This program successfully verified with commit 65fe240; but it fails with 46ce23b (the current master).

Haven't tried to bisect yet to find what caused the regression.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.