Moved files to 'reactics-bdd'
This commit is contained in:
1226
reactics-bdd/in/old_syntax/bc32.rs
Normal file
1226
reactics-bdd/in/old_syntax/bc32.rs
Normal file
File diff suppressed because it is too large
Load Diff
123
reactics-bdd/in/old_syntax/bc8.rs
Normal file
123
reactics-bdd/in/old_syntax/bc8.rs
Normal file
@@ -0,0 +1,123 @@
|
||||
reactions {
|
||||
# (1) no decrement, no increment
|
||||
{ { p0; },{ dec; inc; } -> { p0; } };
|
||||
{ { p1; },{ dec; inc; } -> { p1; } };
|
||||
{ { p2; },{ dec; inc; } -> { p2; } };
|
||||
{ { p3; },{ dec; inc; } -> { p3; } };
|
||||
{ { p4; },{ dec; inc; } -> { p4; } };
|
||||
{ { p5; },{ dec; inc; } -> { p5; } };
|
||||
{ { p6; },{ dec; inc; } -> { p6; } };
|
||||
{ { p7; },{ dec; inc; } -> { p7; } };
|
||||
|
||||
# (2) increment operation
|
||||
{ { inc; },{ dec; p0; } -> { p0; } };
|
||||
# the more significant bits remain (inc)
|
||||
{ { inc; p0; },{ dec; p0; } -> { p0; } };
|
||||
{ { inc; p1; },{ dec; p0; } -> { p1; } };
|
||||
{ { inc; p2; },{ dec; p0; } -> { p2; } };
|
||||
{ { inc; p3; },{ dec; p0; } -> { p3; } };
|
||||
{ { inc; p4; },{ dec; p0; } -> { p4; } };
|
||||
{ { inc; p5; },{ dec; p0; } -> { p5; } };
|
||||
{ { inc; p6; },{ dec; p0; } -> { p6; } };
|
||||
{ { inc; p7; },{ dec; p0; } -> { p7; } };
|
||||
{ { inc; p0; },{ dec; p1; } -> { p1; } };
|
||||
# the more significant bits remain (inc)
|
||||
{ { inc; p1; },{ dec; p1; } -> { p1; } };
|
||||
{ { inc; p2; },{ dec; p1; } -> { p2; } };
|
||||
{ { inc; p3; },{ dec; p1; } -> { p3; } };
|
||||
{ { inc; p4; },{ dec; p1; } -> { p4; } };
|
||||
{ { inc; p5; },{ dec; p1; } -> { p5; } };
|
||||
{ { inc; p6; },{ dec; p1; } -> { p6; } };
|
||||
{ { inc; p7; },{ dec; p1; } -> { p7; } };
|
||||
{ { inc; p0; p1; },{ dec; p2; } -> { p2; } };
|
||||
# the more significant bits remain (inc)
|
||||
{ { inc; p2; },{ dec; p2; } -> { p2; } };
|
||||
{ { inc; p3; },{ dec; p2; } -> { p3; } };
|
||||
{ { inc; p4; },{ dec; p2; } -> { p4; } };
|
||||
{ { inc; p5; },{ dec; p2; } -> { p5; } };
|
||||
{ { inc; p6; },{ dec; p2; } -> { p6; } };
|
||||
{ { inc; p7; },{ dec; p2; } -> { p7; } };
|
||||
{ { inc; p0; p1; p2; },{ dec; p3; } -> { p3; } };
|
||||
# the more significant bits remain (inc)
|
||||
{ { inc; p3; },{ dec; p3; } -> { p3; } };
|
||||
{ { inc; p4; },{ dec; p3; } -> { p4; } };
|
||||
{ { inc; p5; },{ dec; p3; } -> { p5; } };
|
||||
{ { inc; p6; },{ dec; p3; } -> { p6; } };
|
||||
{ { inc; p7; },{ dec; p3; } -> { p7; } };
|
||||
{ { inc; p0; p1; p2; p3; },{ dec; p4; } -> { p4; } };
|
||||
# the more significant bits remain (inc)
|
||||
{ { inc; p4; },{ dec; p4; } -> { p4; } };
|
||||
{ { inc; p5; },{ dec; p4; } -> { p5; } };
|
||||
{ { inc; p6; },{ dec; p4; } -> { p6; } };
|
||||
{ { inc; p7; },{ dec; p4; } -> { p7; } };
|
||||
{ { inc; p0; p1; p2; p3; p4; },{ dec; p5; } -> { p5; } };
|
||||
# the more significant bits remain (inc)
|
||||
{ { inc; p5; },{ dec; p5; } -> { p5; } };
|
||||
{ { inc; p6; },{ dec; p5; } -> { p6; } };
|
||||
{ { inc; p7; },{ dec; p5; } -> { p7; } };
|
||||
{ { inc; p0; p1; p2; p3; p4; p5; },{ dec; p6; } -> { p6; } };
|
||||
# the more significant bits remain (inc)
|
||||
{ { inc; p6; },{ dec; p6; } -> { p6; } };
|
||||
{ { inc; p7; },{ dec; p6; } -> { p7; } };
|
||||
{ { inc; p0; p1; p2; p3; p4; p5; p6; },{ dec; p7; } -> { p7; } };
|
||||
# the more significant bits remain (inc)
|
||||
{ { inc; p7; },{ dec; p7; } -> { p7; } };
|
||||
|
||||
# (3) decrement operation
|
||||
{ { dec; },{ inc; } -> { p0; } };
|
||||
# the more significant bits remain (dec)
|
||||
{ { dec; p0; p0; },{ inc; } -> { p0; } };
|
||||
{ { dec; p0; p1; },{ inc; } -> { p1; } };
|
||||
{ { dec; p0; p2; },{ inc; } -> { p2; } };
|
||||
{ { dec; p0; p3; },{ inc; } -> { p3; } };
|
||||
{ { dec; p0; p4; },{ inc; } -> { p4; } };
|
||||
{ { dec; p0; p5; },{ inc; } -> { p5; } };
|
||||
{ { dec; p0; p6; },{ inc; } -> { p6; } };
|
||||
{ { dec; p0; p7; },{ inc; } -> { p7; } };
|
||||
{ { dec; },{ inc; p0; } -> { p1; } };
|
||||
# the more significant bits remain (dec)
|
||||
{ { dec; p1; p1; },{ inc; } -> { p1; } };
|
||||
{ { dec; p1; p2; },{ inc; } -> { p2; } };
|
||||
{ { dec; p1; p3; },{ inc; } -> { p3; } };
|
||||
{ { dec; p1; p4; },{ inc; } -> { p4; } };
|
||||
{ { dec; p1; p5; },{ inc; } -> { p5; } };
|
||||
{ { dec; p1; p6; },{ inc; } -> { p6; } };
|
||||
{ { dec; p1; p7; },{ inc; } -> { p7; } };
|
||||
{ { dec; },{ inc; p0; p1; } -> { p2; } };
|
||||
# the more significant bits remain (dec)
|
||||
{ { dec; p2; p2; },{ inc; } -> { p2; } };
|
||||
{ { dec; p2; p3; },{ inc; } -> { p3; } };
|
||||
{ { dec; p2; p4; },{ inc; } -> { p4; } };
|
||||
{ { dec; p2; p5; },{ inc; } -> { p5; } };
|
||||
{ { dec; p2; p6; },{ inc; } -> { p6; } };
|
||||
{ { dec; p2; p7; },{ inc; } -> { p7; } };
|
||||
{ { dec; },{ inc; p0; p1; p2; } -> { p3; } };
|
||||
# the more significant bits remain (dec)
|
||||
{ { dec; p3; p3; },{ inc; } -> { p3; } };
|
||||
{ { dec; p3; p4; },{ inc; } -> { p4; } };
|
||||
{ { dec; p3; p5; },{ inc; } -> { p5; } };
|
||||
{ { dec; p3; p6; },{ inc; } -> { p6; } };
|
||||
{ { dec; p3; p7; },{ inc; } -> { p7; } };
|
||||
{ { dec; },{ inc; p0; p1; p2; p3; } -> { p4; } };
|
||||
# the more significant bits remain (dec)
|
||||
{ { dec; p4; p4; },{ inc; } -> { p4; } };
|
||||
{ { dec; p4; p5; },{ inc; } -> { p5; } };
|
||||
{ { dec; p4; p6; },{ inc; } -> { p6; } };
|
||||
{ { dec; p4; p7; },{ inc; } -> { p7; } };
|
||||
{ { dec; },{ inc; p0; p1; p2; p3; p4; } -> { p5; } };
|
||||
# the more significant bits remain (dec)
|
||||
{ { dec; p5; p5; },{ inc; } -> { p5; } };
|
||||
{ { dec; p5; p6; },{ inc; } -> { p6; } };
|
||||
{ { dec; p5; p7; },{ inc; } -> { p7; } };
|
||||
{ { dec; },{ inc; p0; p1; p2; p3; p4; p5; } -> { p6; } };
|
||||
# the more significant bits remain (dec)
|
||||
{ { dec; p6; p6; },{ inc; } -> { p6; } };
|
||||
{ { dec; p6; p7; },{ inc; } -> { p7; } };
|
||||
{ { dec; },{ inc; p0; p1; p2; p3; p4; p5; p6; } -> { p7; } };
|
||||
# the more significant bits remain (dec)
|
||||
{ { dec; p7; p7; },{ inc; } -> { p7; } };
|
||||
}
|
||||
action-atoms { inc; dec; }
|
||||
initial-state { }
|
||||
ctl-property { EF( p7 AND ~p4 ) }
|
||||
|
||||
33
reactics-bdd/in/old_syntax/coffee.rs
Normal file
33
reactics-bdd/in/old_syntax/coffee.rs
Normal file
@@ -0,0 +1,33 @@
|
||||
#
|
||||
# Coffee machine RS
|
||||
#
|
||||
|
||||
reactions {
|
||||
|
||||
{ { button_coffee; },{ failure; busy; button_water; } -> { coffee; make; busy; } };
|
||||
{ { button_water; },{ failure; busy; button_coffee; } -> { water; make; busy; } };
|
||||
{ { busy; },{ coffee_ready; water_ready; failure; release; } -> { busy; } };
|
||||
{ { warm_up; }, { failure; } -> { warm; } };
|
||||
{ { grind; },{ failure; } -> { ground; } };
|
||||
{ { chk_water; },{ failure; } -> { water_ok; } };
|
||||
{ { chk_water; failure; },{ } -> { more_water; } };
|
||||
{ { make; },{ failure; } -> { warm_up; chk_water; } };
|
||||
{ { make; },{ water; failure; } -> { grind; } };
|
||||
{ { warm; ground; water_ok; },{ water; failure; } -> { brew_coffee; release; } };
|
||||
{ { warm; water_ok; },{ ground; failure; } -> { fill_water; release; } };
|
||||
{ { brew_coffee; },{ failure; } -> { coffee_ready; } };
|
||||
{ { fill_water; },{ failure; } -> { water_ready; } };
|
||||
#{ { make; },{ coffe_ready; water_ready; } -> { make; } };
|
||||
#{ { coffee; },{ brew_coffee; } -> { coffee; } };
|
||||
#{ { water; },{ fill_water; failure; } -> { water; } };
|
||||
###{ { button_water; brew_coffe; },{ failure; } -> { failure; } };
|
||||
}
|
||||
|
||||
action-atoms { failure; button_coffee; button_water; }
|
||||
initial-states { { button_coffee; fill_water; }; { failure; }; }
|
||||
ctl-property { EF ( coffee_ready ) }
|
||||
#ctl-property { AG( coffee_ready IMPLIES ~water_ready ) }
|
||||
#ctl-property { AG( failure IMPLIES AX ~busy ) }
|
||||
#ctl-property { EG ( EF coffee_ready ) }
|
||||
|
||||
|
||||
31
reactics-bdd/in/old_syntax/expr.rs
Normal file
31
reactics-bdd/in/old_syntax/expr.rs
Normal file
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# x', and y' are denoted by xp, and yp, respectively
|
||||
#
|
||||
|
||||
|
||||
reactions {
|
||||
{ { x; },{ Ix; } -> { x; } };
|
||||
{ { x; },{ X; Z; } -> { xp; } };
|
||||
{ { x; xp; },{ Iex; } -> { X; } };
|
||||
{ { y; },{ Iy; } -> { y; } };
|
||||
{ { y; }, { Q; } -> { yp; } };
|
||||
{ { y; yp; },{ Iey; } -> { Y; } };
|
||||
{ { z; },{ Iz; } -> { z; } };
|
||||
{ { z; },{ X; } -> { zp; } };
|
||||
{ { z; zp; },{ Iez; } -> { Z; } };
|
||||
{ { U; X; },{ IQ; } -> { Q; } };
|
||||
}
|
||||
|
||||
action-atoms { U; }
|
||||
|
||||
initial-state { x; y; }
|
||||
|
||||
#ctl-property { EG ( EF Q ) }
|
||||
#ctl-property { AG ( Q IMPLIES AX ~yp ) }
|
||||
|
||||
#ctl-property { AG ( ( x AND xp AND U ) IMPLIES EF Q ) }
|
||||
|
||||
#ctl-property { EG ( ~Q ) }
|
||||
|
||||
ctl-property { AU ( ~yp , EX(EX(X)) ) }
|
||||
|
||||
23
reactics-bdd/in/old_syntax/f1.dat
Normal file
23
reactics-bdd/in/old_syntax/f1.dat
Normal file
@@ -0,0 +1,23 @@
|
||||
8 0.002 0.005 9.645 35.19 0.007
|
||||
10 0.002 0.013 9.641 35.5 0.015
|
||||
12 0.003 0.031 9.641 35.76 0.034
|
||||
14 0.002 0.068 9.793 35.98 0.07
|
||||
16 0.002 0.127 9.781 36.68 0.129
|
||||
18 0.005 0.236 9.898 37.41 0.241
|
||||
20 0.004 0.417 10.06 37.61 0.421
|
||||
22 0.003 0.775 9.906 38.34 0.778
|
||||
24 0.005 1.274 10.05 40.43 1.279
|
||||
26 0.004 2.059 10.3 41.08 2.063
|
||||
28 0.004 3.315 10.57 42.12 3.319
|
||||
30 0.006 5.269 10.58 55.02 5.275
|
||||
32 0.006 8.329 10.63 57.23 8.335
|
||||
34 0.008 12.84 10.99 61.07 12.85
|
||||
36 0.009 19.23 11.29 64.04 19.24
|
||||
38 0.009 30.27 11.37 65.03 30.28
|
||||
40 0.011 47.64 11.64 70.23 47.65
|
||||
42 0.014 63.36 11.94 75.08 63.37
|
||||
44 0.016 114.4 11.67 74.77 114.4
|
||||
46 0.018 229.5 12.23 79 229.5
|
||||
48 0.016 446.5 12.62 84.41 446.5
|
||||
50 0.019 730.4 12.98 84.12 730.4
|
||||
52 0.023 1013 13.25 83.62 1013
|
||||
48
reactics-bdd/in/old_syntax/gen_bc.py
Executable file
48
reactics-bdd/in/old_syntax/gen_bc.py
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from sys import argv,exit
|
||||
|
||||
if len(argv) < 2:
|
||||
print "Usage:", argv[0], "<number of bits>"
|
||||
exit(100)
|
||||
|
||||
n = int(argv[1])
|
||||
|
||||
print "reactions {"
|
||||
|
||||
# (1) no dec, no inc
|
||||
print "\t# (1) no decrement, no increment"
|
||||
for j in range(0,n):
|
||||
print "\t{ { p" + str(j) + "; },{ dec; inc; } -> { p" + str(j) + "; } };"
|
||||
|
||||
# (2) increment
|
||||
print "\n\t# (2) increment operation"
|
||||
for j in range(0,n):
|
||||
print "\t{ { inc;",
|
||||
for k in range(0,j):
|
||||
print "p" + str(k) + ";",
|
||||
print "},{ dec; p" + str(j) + "; } -> { p" + str(j) + "; } };"
|
||||
|
||||
print "\t# the more significant bits remain (inc)"
|
||||
for k in range(j,n):
|
||||
print "\t{ { inc; p" + str(k) + "; },{ dec; p" + str(j) + "; } -> { p" + str(k) + "; } };"
|
||||
print
|
||||
|
||||
print "\n\t# (3) decrement operation"
|
||||
for j in range(0,n):
|
||||
print "\t{ { dec; },{ inc;",
|
||||
for k in range(0,j):
|
||||
print "p" + str(k) + ";",
|
||||
print "} -> { p" + str(j) + "; } };"
|
||||
|
||||
print "\t# the more significant bits remain (dec)"
|
||||
for k in range(j,n):
|
||||
print "\t{ { dec; p" + str(j) + "; p" + str(k) + "; },{ inc; } -> { p" + str(k) + "; } };"
|
||||
print
|
||||
|
||||
print "}"
|
||||
|
||||
print "action-atoms { inc; dec; }"
|
||||
print "initial-state { }"
|
||||
|
||||
print "ctl-property { AG( p" + str(n-1) + " IMPLIES EF ~p" + str(n-1) + " ) }"
|
||||
19
reactics-bdd/in/old_syntax/simple_I1.rs
Normal file
19
reactics-bdd/in/old_syntax/simple_I1.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
#
|
||||
# Coffee machine RS
|
||||
#
|
||||
|
||||
reactions {
|
||||
{ { e1; e4; }, { e2; } -> { e1; e2; } };
|
||||
{ { e2; }, { e3; } -> { e1; e3; e4; } };
|
||||
{ { e1; e3; }, { e2; } -> { e1; e2; } };
|
||||
{ { e3; }, { e2; } -> { e1; } };
|
||||
}
|
||||
|
||||
action-atoms { e4; }
|
||||
initial-state { e1; e4; }
|
||||
ctl-property { EF ( coffee_ready ) }
|
||||
#ctl-property { AG( coffee_ready IMPLIES ~water_ready ) }
|
||||
#ctl-property { AG( failure IMPLIES AX ~busy ) }
|
||||
#ctl-property { EG ( EF coffee_ready ) }
|
||||
|
||||
|
||||
20
reactics-bdd/in/old_syntax/test.rs
Normal file
20
reactics-bdd/in/old_syntax/test.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# Testowy RS
|
||||
#
|
||||
|
||||
reactions {
|
||||
{ { a;b; },{ c;d; } -> { x;y;c; } };
|
||||
}
|
||||
|
||||
action-atoms {
|
||||
e;
|
||||
}
|
||||
|
||||
initial-state {
|
||||
a; b;
|
||||
}
|
||||
|
||||
ctl-property {
|
||||
( EF ( (x AND y) ) )
|
||||
}
|
||||
|
||||
24
reactics-bdd/in/old_syntax/u1.rs
Normal file
24
reactics-bdd/in/old_syntax/u1.rs
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# Coffee machine RS
|
||||
#
|
||||
|
||||
reactions {
|
||||
|
||||
{ { a1;a4; },{ a2; } -> { a1;a2; } };
|
||||
{ { a2; },{ a3; } -> { a1;a3;a4; } };
|
||||
{ { a1;a3; },{ a2; } -> {a1;a2;} };
|
||||
{ {a3;},{a2;} -> {a1;} };
|
||||
}
|
||||
|
||||
action-atoms { a4; }
|
||||
|
||||
initial-state { a1; a4; }
|
||||
|
||||
#ctl-property { EF ( coffee_ready ) }
|
||||
#ctl-property { AG( coffee_ready IMPLIES ~water_ready ) }
|
||||
|
||||
#ctl-property { AG( failure IMPLIES AX ~busy ) }
|
||||
|
||||
#ctl-property { EG ( EF coffee_ready ) }
|
||||
|
||||
|
||||
24
reactics-bdd/in/old_syntax/u2.rs
Normal file
24
reactics-bdd/in/old_syntax/u2.rs
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# Coffee machine RS
|
||||
#
|
||||
|
||||
reactions {
|
||||
|
||||
{ { a1;a4; },{ a2; } -> { a1;a2; } };
|
||||
{ { a2; },{ a3; } -> { a1;a3;a4; } };
|
||||
{ { a1;a3; },{ a2; } -> {a1;a2;} };
|
||||
{ {a3;},{a2;} -> {a1;} };
|
||||
}
|
||||
|
||||
action-atoms { a3; a4; }
|
||||
|
||||
initial-state { a1; a4; }
|
||||
|
||||
#ctl-property { EF ( coffee_ready ) }
|
||||
#ctl-property { AG( coffee_ready IMPLIES ~water_ready ) }
|
||||
|
||||
#ctl-property { AG( failure IMPLIES AX ~busy ) }
|
||||
|
||||
#ctl-property { EG ( EF coffee_ready ) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user