Skip to content

Instantly share code, notes, and snippets.

@lovasoa
Last active August 29, 2015 14:15
Show Gist options
  • Save lovasoa/2a631aa023661cd9b355 to your computer and use it in GitHub Desktop.
Save lovasoa/2a631aa023661cd9b355 to your computer and use it in GitHub Desktop.
New syntax for the description of process hitting
(*
New syntax, easier to read and to parse
Process definitions are optional (they can be inferred)
condition : bounce (params)
where
condition is a set of basic_conditions bound by "and" and "or" operators.
basic_condition can be of type (sortname comparisonOerator processNumber) or (sortname) which is a shortcut for (sortname>0)
and can be negated with "!"
comparisonOperator is one of ">", "=", "!="
bounce is defined by : (sortName processNbr -> processNbr) or (sign sortName)
where sign is "+" or "-"
params is a list of: paramName=paramValue
paramName is "rate" or "absorption"
*)
a=1 : +b # Replaces a 1 -> b 0 1
a=1 : b 2->3 (rate=4.5, absorption=6) # Replaces a 1 -> b 2 3 @ 4.5 ~ 6
(a and !b) or (b and !a) : +c # Replaces COOPERATIVITY([a;b] -> c 0 1, [[1;0];[0;1]])
a : -b # Replaces GRN([a 1 -> - b])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment