A join-calculus-based programming language for exploring description, simulation, and visualization of biochemical systems modelled as concurrent, rate-limited processes.
Java OCaml Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
vis
.gitignore
Makefile
NOTES
README
examples.py
graphconc.ml
stoj.cgi.py
stoj.ml
stojlang.ml
stojlex.mll
stojout.ml
stojparse.mly
stojrun.ml
test-circadian.stoj
test-mobility.stoj
test-phillips+promoter.stoj
test-phillips-simplified.stoj
test-phillips.stoj
test-stochasticity.stoj
test.stoj
visdump.ml

README

---------------------------------------------------------------------------
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.