Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locally nameless failure #112

Open
mtzguido opened this issue Jun 24, 2024 · 0 comments
Open

Locally nameless failure #112

mtzguido opened this issue Jun 24, 2024 · 0 comments
Labels
crash/unsoundness A critical bug

Comments

@mtzguido
Copy link
Member

This fragment:

let is_list #t  (l:list t)
  : Tot vprop (decreases l)
  = match l with
    | [] -> emp
    | ns -> emp

```pulse
ghost
fn unfold_is_list_cons (#t:Type0) (xs : (list t))
  requires is_list xs
  returns  _:unit
  ensures  emp
{
  unfold (is_list xs);
  match xs {
    Cons hd tl -> {
      rewrite each xs as Cons hd tl;
      admit();
    }
    Nil -> {
      admit();
    }
  }
}
```

Fails (crashes, we could say) with:

* Error <unknown> at BBB.fst(7,8-9,19):
  - Failure: not locally nameless!
  - Aborting before calling rtb_core_check_term.e
  - term
    =
    match _ :: _ with
    | Prims.Nil #_ -> Pulse.Lib.Core.emp
    | _ -> Pulse.Lib.Core.emp

* Error <unknown> at BBB.fst(7,8-9,19):
  - Expected term of type vprop
    got term
      match _ :: _ with
      | Prims.Nil #_ -> Pulse.Lib.Core.emp
      | _ -> Pulse.Lib.Core.emp

* Error <unknown> at BBB.fst(11,4-29,7):
  - FStar_Tactics_Common.TacticFailure(_)

* Error 228 at BBB.fst(11,12-11,12):
  - Pulse checker failed
  - See also Pulse.Typing.Env.fst(406,2-406,31)

4 errors were reported (see above)

Locations are also bad. This happens even before the new matcher.

@mtzguido mtzguido added bug Something isn't working crash/unsoundness A critical bug and removed bug Something isn't working labels Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash/unsoundness A critical bug
Projects
None yet
Development

No branches or pull requests

1 participant