Browse Source
Re-tidy csma.
Re-tidy csma.
git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@889 bbc10eb1-c90d-0410-af57-cb519fbb1720master
16 changed files with 99 additions and 228 deletions
-
13prism-examples/csma/.autopp
-
11prism-examples/csma/.csmaN_K.nm.pp
-
18prism-examples/csma/auto
-
22prism-examples/csma/csma.pctl
-
26prism-examples/csma/csma2.pctl
-
9prism-examples/csma/csma2_2.nm
-
31prism-examples/csma/csma2_4.nm
-
17prism-examples/csma/csma2_6.nm
-
9prism-examples/csma/csma3_2.nm
-
13prism-examples/csma/csma3_4.nm
-
17prism-examples/csma/csma3_6.nm
-
34prism-examples/csma/csma4.pctl
-
35prism-examples/csma/csma4_2.nm
-
13prism-examples/csma/csma4_4.nm
-
17prism-examples/csma/csma4_6.nm
-
42prism-examples/csma/csma6.pctl
@ -1,10 +1,9 @@ |
|||||
#!/bin/csh |
#!/bin/csh |
||||
|
|
||||
foreach K ( 2 4 6 ) |
|
||||
echo "Generating for K=$K" |
|
||||
prismpp .csmaK.pctl.pp $K >! csma$K.pctl |
|
||||
foreach N ( 2 3 4 ) |
|
||||
echo " and N=$N" |
|
||||
prismpp .csmaK_N.nm.pp $N $K >! csma$K"_"$N.nm |
|
||||
end |
|
||||
|
foreach N ( 2 3 4 ) |
||||
|
foreach K ( 2 4 6 ) |
||||
|
echo "Generating for N=$N and K=$K" |
||||
|
prismpp .csmaN_K.nm.pp $N $K >! csma$N"_"$K.nm |
||||
|
end |
||||
end |
end |
||||
|
|
||||
@ -1,12 +1,12 @@ |
|||||
#!/bin/csh |
#!/bin/csh |
||||
|
|
||||
prism csma2_2.nm csma2.pctl -s |
|
||||
prism csma2_3.nm csma2.pctl -s |
|
||||
prism csma2_4.nm csma2.pctl -s |
|
||||
prism csma4_2.nm csma4.pctl -s |
|
||||
prism csma4_3.nm csma4.pctl -s |
|
||||
#prism csma4_4.nm csma4.pctl -s |
|
||||
prism csma6_2.nm csma6.pctl -s |
|
||||
prism csma6_3.nm csma6.pctl -s |
|
||||
#prism csma6_4.nm csma6.pctl -s |
|
||||
|
prism csma2_2.nm csma.pctl -s |
||||
|
prism csma2_4.nm csma.pctl -s |
||||
|
prism csma2_6.nm csma.pctl -s |
||||
|
prism csma3_2.nm csma.pctl -s |
||||
|
prism csma3_4.nm csma.pctl -s |
||||
|
prism csma3_6.nm csma.pctl -s |
||||
|
prism csma4_2.nm csma.pctl -s |
||||
|
#prism csma4_4.nm csma.pctl -s |
||||
|
#prism csma4_6.nm csma.pctl -s |
||||
|
|
||||
@ -0,0 +1,22 @@ |
|||||
|
const int k; |
||||
|
|
||||
|
// expected time for all messages to be sent |
||||
|
R{"time"}min=?[ F "all_delivered" ] |
||||
|
R{"time"}max=?[ F "all_delivered" ] |
||||
|
|
||||
|
// expected time for one message to be sent |
||||
|
Rmin=?[ F "one_delivered" ] |
||||
|
Rmax=?[ F "one_delivered" ] |
||||
|
|
||||
|
// message of any station eventually delivered before k backoffs |
||||
|
Pmin=?[ F min_backoff_after_success<=k ] |
||||
|
Pmax=?[ F min_backoff_after_success<=k ] |
||||
|
|
||||
|
// probability all sent successfully before a collision with max backoff |
||||
|
Pmin=?[ !"collision_max_backoff" U "all_delivered" ] |
||||
|
Pmax=?[ !"collision_max_backoff" U "all_delivered" ] |
||||
|
|
||||
|
// probability some station suffers at least k collisions |
||||
|
Pmin=?[ F max_collisions>=k ] |
||||
|
Pmax=?[ F max_collisions>=k ] |
||||
|
|
||||
@ -1,26 +0,0 @@ |
|||||
|
|
||||
// expected time for all messages to be sent |
|
||||
R{"time"}min=?[ F "all_delivered" ] |
|
||||
R{"time"}max=?[ F "all_delivered" ] |
|
||||
|
|
||||
// expected time for one message to be sent |
|
||||
Rmin=?[ F "one_delivered" ] |
|
||||
Rmax=?[ F "one_delivered" ] |
|
||||
|
|
||||
// message of any station eventually delivered before i backoffs |
|
||||
Pmin=?[ F "success_with_backoff_under_1" ] |
|
||||
Pmax=?[ F "success_with_backoff_under_1" ] |
|
||||
Pmin=?[ F "success_with_backoff_under_2" ] |
|
||||
Pmax=?[ F "success_with_backoff_under_2" ] |
|
||||
|
|
||||
// probability all sent successfully before a collision with max backoff |
|
||||
Pmin=?[ !"collision_max_backoff" U "all_delivered" ] |
|
||||
Pmax=?[ !"collision_max_backoff" U "all_delivered" ] |
|
||||
|
|
||||
// probability a station suffers i collisions |
|
||||
Pmin=?[ F "collisions_equal_1" ] |
|
||||
Pmax=?[ F "collisions_equal_1" ] |
|
||||
Pmin=?[ F "collisions_equal_2" ] |
|
||||
Pmax=?[ F "collisions_equal_2" ] |
|
||||
|
|
||||
|
|
||||
@ -1,34 +0,0 @@ |
|||||
|
|
||||
// expected time for all messages to be sent |
|
||||
R{"time"}min=?[ F "all_delivered" ] |
|
||||
R{"time"}max=?[ F "all_delivered" ] |
|
||||
|
|
||||
// expected time for one message to be sent |
|
||||
Rmin=?[ F "one_delivered" ] |
|
||||
Rmax=?[ F "one_delivered" ] |
|
||||
|
|
||||
// message of any station eventually delivered before i backoffs |
|
||||
Pmin=?[ F "success_with_backoff_under_1" ] |
|
||||
Pmax=?[ F "success_with_backoff_under_1" ] |
|
||||
Pmin=?[ F "success_with_backoff_under_2" ] |
|
||||
Pmax=?[ F "success_with_backoff_under_2" ] |
|
||||
Pmin=?[ F "success_with_backoff_under_3" ] |
|
||||
Pmax=?[ F "success_with_backoff_under_3" ] |
|
||||
Pmin=?[ F "success_with_backoff_under_4" ] |
|
||||
Pmax=?[ F "success_with_backoff_under_4" ] |
|
||||
|
|
||||
// probability all sent successfully before a collision with max backoff |
|
||||
Pmin=?[ !"collision_max_backoff" U "all_delivered" ] |
|
||||
Pmax=?[ !"collision_max_backoff" U "all_delivered" ] |
|
||||
|
|
||||
// probability a station suffers i collisions |
|
||||
Pmin=?[ F "collisions_equal_1" ] |
|
||||
Pmax=?[ F "collisions_equal_1" ] |
|
||||
Pmin=?[ F "collisions_equal_2" ] |
|
||||
Pmax=?[ F "collisions_equal_2" ] |
|
||||
Pmin=?[ F "collisions_equal_3" ] |
|
||||
Pmax=?[ F "collisions_equal_3" ] |
|
||||
Pmin=?[ F "collisions_equal_4" ] |
|
||||
Pmax=?[ F "collisions_equal_4" ] |
|
||||
|
|
||||
|
|
||||
@ -1,42 +0,0 @@ |
|||||
|
|
||||
// expected time for all messages to be sent |
|
||||
R{"time"}min=?[ F "all_delivered" ] |
|
||||
R{"time"}max=?[ F "all_delivered" ] |
|
||||
|
|
||||
// expected time for one message to be sent |
|
||||
Rmin=?[ F "one_delivered" ] |
|
||||
Rmax=?[ F "one_delivered" ] |
|
||||
|
|
||||
// message of any station eventually delivered before i backoffs |
|
||||
Pmin=?[ F "success_with_backoff_under_1" ] |
|
||||
Pmax=?[ F "success_with_backoff_under_1" ] |
|
||||
Pmin=?[ F "success_with_backoff_under_2" ] |
|
||||
Pmax=?[ F "success_with_backoff_under_2" ] |
|
||||
Pmin=?[ F "success_with_backoff_under_3" ] |
|
||||
Pmax=?[ F "success_with_backoff_under_3" ] |
|
||||
Pmin=?[ F "success_with_backoff_under_4" ] |
|
||||
Pmax=?[ F "success_with_backoff_under_4" ] |
|
||||
Pmin=?[ F "success_with_backoff_under_5" ] |
|
||||
Pmax=?[ F "success_with_backoff_under_5" ] |
|
||||
Pmin=?[ F "success_with_backoff_under_6" ] |
|
||||
Pmax=?[ F "success_with_backoff_under_6" ] |
|
||||
|
|
||||
// probability all sent successfully before a collision with max backoff |
|
||||
Pmin=?[ !"collision_max_backoff" U "all_delivered" ] |
|
||||
Pmax=?[ !"collision_max_backoff" U "all_delivered" ] |
|
||||
|
|
||||
// probability a station suffers i collisions |
|
||||
Pmin=?[ F "collisions_equal_1" ] |
|
||||
Pmax=?[ F "collisions_equal_1" ] |
|
||||
Pmin=?[ F "collisions_equal_2" ] |
|
||||
Pmax=?[ F "collisions_equal_2" ] |
|
||||
Pmin=?[ F "collisions_equal_3" ] |
|
||||
Pmax=?[ F "collisions_equal_3" ] |
|
||||
Pmin=?[ F "collisions_equal_4" ] |
|
||||
Pmax=?[ F "collisions_equal_4" ] |
|
||||
Pmin=?[ F "collisions_equal_5" ] |
|
||||
Pmax=?[ F "collisions_equal_5" ] |
|
||||
Pmin=?[ F "collisions_equal_6" ] |
|
||||
Pmax=?[ F "collisions_equal_6" ] |
|
||||
|
|
||||
|
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue