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

Very strange behavior of default effects #623

Closed
jkzinzindohoue opened this issue Aug 16, 2016 · 2 comments
Closed

Very strange behavior of default effects #623

jkzinzindohoue opened this issue Aug 16, 2016 · 2 comments
Labels

Comments

@jkzinzindohoue
Copy link
Contributor

I was trying to push forward the tutorial with universes but I do not understand the following behaviors, which I believe is a bug, maybe related to #517:

module Test

val null: unit -> All unit
  (requires (fun h -> True))
  (ensures  (fun h r h' -> True))
let null () = ()

(* Fails *)
(* let test0 = assert(false); null () *)

(* Succeeds *)
let test1 () = assert(false); null ()

(* Succeeds *)
let test2 (u:unit) = assert(false); null ()

(* Fails *)
(* let test3 (u:unit) : All unit (requires (fun h -> True)) (ensures (fun h r h' -> True)) = assert(false); null() *)

(* Succeeds *)
let test3' () : All unit (requires (fun h -> True)) (ensures (fun h r h' -> True)) = assert(false); null()

(* Succeeds *)
let test4 (u:unit) : ML unit = assert(false); null()

(* Fails *)
(* let test5 (u:unit) : ML unit = assert(false) *)

val null2: unit -> Div unit
  (requires (True))
  (ensures  (fun r -> True))
let null2 () = ()

(* Succeeds *)
let test6 (u:unit) : ML unit = assert(false); null2()

val null3: unit -> Pure unit
  (requires (True))
  (ensures  (fun r -> True))
let null3 () = ()

(* Fails *)
(* let test7 (u:unit) : ML unit = assert(false); null3() *)

It goes through in many cases, although the call is after the assert(false). And All and ML seem to have different behaviours. And the presence/absence of the binder has some importance too.

jkzinzindohoue added a commit that referenced this issue Aug 16, 2016
@s-zanella
Copy link
Contributor

See also #581 for a discussion on default effects

@catalin-hritcu
Copy link
Member

@nikswamy just fixed this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants