view Samples/p320.pml @ 2:a2dac3fa7383 draft default tip

add Makefile
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Fri, 29 Jun 2012 06:22:47 +0900
parents 86e67be8bc5f
children
line wrap: on
line source

#define true	1
#define false	0
#define Aturn	false
#define Bturn	true

bool x, y, t;
bool ain, bin;

proctype A()
{	x = true;
	t = Bturn;
	(y == false || t == Aturn);
	ain = true;
	assert(bin == false);	/* critical section */
	ain = false;
	x = false
}

proctype B()
{	y = true;
	t = Aturn;
	(x == false || t == Bturn);
	bin = true;
	assert(ain == false);	/* critical section */
	bin = false;
	y = false
}

init
{	run A(); run B()
}