1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[SyncStitch]deadlock検査の実験

Posted at

状態遷移図をSchemeに手作業変換。

deadlock
; [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))

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?