Created
April 2, 2014 09:07
-
-
Save kencoba/9930574 to your computer and use it in GitHub Desktop.
[SyncStitch]deadlock検査の実験 ref: http://qiita.com/kencoba/items/711fa72e4dd1224b5379
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
; [masaterukの日記](http://d.hatena.ne.jp/masateruk/20130813/1376398968) | |
; Definitions | |
(define-channel sch (x) '((0) (1))) | |
(define-channel rch (x) '((0) (1))) | |
; SYS | |
(define-process Sender | |
(! rch (0) | |
(? sch (x) (= x 0) | |
(! rch (1) | |
(? sch (x) (= x 1) Sender))))) | |
(define-process Receiver | |
(? rch (x) (= x 0) | |
(! sch (0) | |
(? rch (x) (= x 1) | |
(! sch (1) Receiver))))) | |
(define-process SYS | |
(par (list sch rch) Sender Receiver)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment