-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
46 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
open Types | ||
|
||
let entailConstrains pi1 pi2 = | ||
let sat = not (Provers.askZ3 (Not (Or (Not pi1, pi2)))) in | ||
(* | ||
print_string (showPure pi1 ^" -> " ^ showPure pi2 ^" == "); | ||
print_string (string_of_bool (sat) ^ "\n"); | ||
*) | ||
sat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
effect Read : int | ||
effect Write : int -> unit | ||
|
||
let read () = | ||
let n = perform Read in | ||
perform (Write 2) | ||
(* perform Read *) | ||
|
||
let main () | ||
= match read () with | ||
| v -> | ||
Format.printf "normal %d@." v; | ||
v | ||
| effect Read k -> | ||
Format.printf "read handler@."; | ||
let v = continue k 1 in | ||
Format.printf "read %d@." v; | ||
v + 1 | ||
| effect (Write n) k -> | ||
Format.printf "write handler %d@." n; | ||
let v = continue k () in | ||
Format.printf "write %d@." v; | ||
v | ||
|
||
let () = ignore (main ()) |