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
open util/ordering[Time] | |
sig Time {} | |
abstract sig Event { | |
pre, post : Time, | |
} { | |
post = pre.next | |
} |
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
/* | |
* Leader Election by Chang-Roberts Algorithm | |
*/ | |
byte leader = 0; /* number of leaders */ | |
proctype Node(chan ch_in, ch_out) { | |
byte tok; | |
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
/* | |
* Impossibility of the 8-Puzzle | |
* | |
* NOTICE: For full statespace search, run-time option -m230000 needed, e.g. | |
* $ spin -a promela_8puzzle.pml | |
* $ gcc -o pan pan.c | |
* $ ./pan -m230000 | |
*/ | |
#define SPACE 0 |
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
// ************************************************** | |
// 通信チャネルとしてキューを用いたモデル | |
// ************************************************** | |
open util/ordering[Time] | |
open alloy_queue[Request] | |
sig Time {} // 時刻パラメータ | |
sig Client, Server {} // 通信に参加するクライアントとサーバ | |
sig Request {} // クライアントがサーバに送るメッセージ |
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
// ************************************ | |
// 連結リストを用いたキューのモデル | |
// ************************************ | |
module alloy_queue[Value] | |
// ------------------------------------ | |
// 各要素の定義 | |
// ------------------------------------ |
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
// ************************************ | |
// 排他制御のモデル | |
// ************************************ | |
// Time シグネチャに全順序構造を導入 | |
open util/ordering [Time] | |
// 時刻を表すシグネチャ | |
sig Time {} |
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
// ************************************ | |
// 群のモデル | |
// ************************************ | |
// ------------------------------------ | |
// 群の公理 | |
// ------------------------------------ | |
// 群の元 | |
sig Element { |