java -jar SpanTools.jar [filename]
Note that to generate output diagram SpanTools program needs that Graphviz tool is installed, available at: www.graphviz.org/Download.php
Component definition
span(l,r){
s1, s2, s3
s4 s5 s6,
s7, s8 …...
s1->s2 : x1,x2,..xl/x1,x2,...,xr (transition with interface definition)
}
Expression definition
all expression using: assigned variables, and constants(IDENTITY, DIAGONAL, CODIAGONAL, PROJETION, COPROJECTION, UNIT, COUNIT), or respective short form (ID, D, CD, P, CP, U, CU) as term, and composition (;), tensor (*) as operations.
Variable Assignment
x = Component definition | Expression definition
Command
DrawSpanGraph(var, jpg_file)
draw state/transitions graph of single component (var) into jpg_file path
DrawGraph(var, jpg_file)
draw graph of an expression (var) into jpg_file path
DrawGraph(var, dot_file, jpg_file)
same but write dot file (used by graphviz) too
ProceedToNextState(var, [s1, s2 , … , sn])
print a random next state of var, starting from given state
ProceedToNextStateDrawingGraph(var, [s1, s2 , … , sn], jpg_dir)
same but draw image in jpg_dir
ProceedToNextStateDrawingGraph(var, [s1, s2 , … , sn], dot_dir, jpg_dir)
same but draw image and write dot
Following some simple examples for basic commands, for other examples about network with state definition and the random execution, see section [Examples].
Example of usage:
a=span(2,2){}
DrawGraph(a,a.dot,a.jpg)

b=span(2,1){}
DrawGraph(b,b.dot,b.jpg)

c=a;b
DrawGraph(c,c.dot,c.jpg)

d=c*c
DrawGraph(d,d.dot,d.jpg)

e=d;a
DrawGraph(e,e.dot,e.jpg)
