/
README
102 lines (78 loc) · 3.58 KB
/
README
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---------------------------------------------------------------------------
StoJ README
---------------------------------------------------------------------------
StoJ is a polyadic, asynchronous stochastic pi calculus with input
join and no summation. Rates are associated with a join, not with a
channel.
StoJ
Copyright (c) 2004, 2005 LShift Ltd.
Copyright (c) 2004, 2005, 2010 Tony Garnock-Jones
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Lexical structure:
---------------------------------------------------------------------------
- comments start with // and extend to the end of the line
- "new", "stop" and "rec" are keywords
- float syntax is [0-9]+(\.[0-9]+)?
- ints are just [0-9]+
- identifiers start with a letter and may contain letters, digits
and underscores
Syntax:
---------------------------------------------------------------------------
process :== process_atom "|" process
| process_atom
process_atom :== "rec" id "." process_atom
| "new" annotated_idlist "." process_atom
| id (* a process variable reference *)
| "stop"
| id "<" idlist ">"
| id "<" idlist ">" "*" int (* clone output *)
| branch
| "(" process ")"
branch :== prefix (suffix)?
prefix :== ID "(" idlist ")" "&" prefix (* join *)
| ID "(" idlist ")"
suffix :== "->" "[" float "]" process_atom
| "->" process_atom
idlist :== (* empty *)
| idlist_nonempty
idlist_nonempty :== id
| id "," idlist_nonempty
annotated_idlist :== ann_id
| ann_id "," annotated_idlist
ann_id :== "!" ID
| ID
---------------------------------------------------------------------------
"rec" binds a process variable. A naked identifier references a
process variable.
When using "new", prefixing a new channel name with "!" causes events
on that channel to be logged to stdout as part of the program
output. Use "!" to mark channels you wish to have timing and event
data for. The "row limit" in the CGI interface places a limit on the
number of logged data rows (time vs. per-channel counts) per run.
Suffixing an output with "*" and a count, as in
h<> * 50
causes a number of duplicates of the message to be placed atomically
on the channel. In the example just above, 50 copies of <> would be
placed on channel h, similar to:
(h<> | h<> | ... ... ... | h<>)
Annotating an input prefix with a rate,
h() & cl() ->[0.03] (hcl<> | ...)
causes that reaction to be processed via Gillespie's algorithm. Any
unrated arrow proceeds at an infinite rate - as soon as the join to
the left of the arrow is enabled, the comm takes place.