-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphilosophers2.csp
31 lines (25 loc) · 1.6 KB
/
philosophers2.csp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
let αPhil1 = sit1, stand1, fork1up1, fork1down1, fork2up1, fork2down1
let αPhil2 = sit2, stand2, fork2up2, fork2down2, fork3up2, fork3down2
let αPhil3 = sit3, stand3, fork3up3, fork3down3, fork4up3, fork4down3
let αPhil4 = sit4, stand4, fork4up4, fork4down4, fork5up4, fork5down4
let αPhil5 = sit5, stand5, fork5up5, fork5down5, fork1up5, fork1down5
let αFork1 = fork1up1, fork1down1, fork1up2, fork1down2
let αFork2 = fork2up2, fork2down2, fork2up3, fork2down3
let αFork3 = fork3up3, fork3down3, fork3up4, fork3down4
let αFork4 = fork4up4, fork4down4, fork4up5, fork4down5
let αFork5 = fork5up5, fork5down5, fork5up1, fork5down1
let Phil1 = sit1->fork1up1->fork2up1->fork1down1->fork2down1->stand1->Phil1
let Phil2 = sit2->fork2up2->fork3up2->fork2down2->fork3down2->stand2->Phil2
let Phil3 = sit3->fork3up3->fork4up3->fork3down3->fork4down3->stand3->Phil3
let Phil4 = sit4->fork4up4->fork5up4->fork4down4->fork5down4->stand4->Phil4
let Phil5 = sit5->fork5up5->fork1up5->fork5down5->fork1down5->stand5->Phil5
let Fork1 = (fork1up1->fork1down1->Fork1)|(fork1up2->fork1down2->Fork1)
let Fork2 = (fork2up2->fork2down2->Fork2)|(fork2up3->fork2down3->Fork2)
let Fork3 = (fork3up3->fork3down3->Fork3)|(fork3up4->fork3down4->Fork3)
let Fork4 = (fork4up4->fork4down4->Fork4)|(fork4up5->fork4down5->Fork4)
let Fork5 = (fork5up5->fork5down5->Fork5)|(fork5up1->fork5down1->Fork5)
let Philosophers = Phil1||Phil2||Phil3||Phil4||Phil5
let Forks = Fork1||Fork2||Fork3||Fork4||Fork5
let College = Philosophers||Forks
College
tracedef sit1 fork1up1 sit2 fork2up1 fork3up2 fork1down1 fork2down1 fork4up2 fork3down2 fork4down2 stand2 stand1