Spinroot

A forum for Spin users

You are not logged in.

#1 2013-01-15 08:39:12

heinz
Member
Registered: 2011-04-29
Posts: 6

ispin problem in automata view: tcl/tk-script error

Hello,
I am using spin 6.2.3, ispin 1.1.0 with tcl/tk 8.5/8.5 on mac os 10.8.2. Before displaying the automata view of the init process of the standard example ex_1a.pml (after clicking on ""init") I get the following tcl/tk-script error:

invalid bareword "e"
in expression "50 * e=";
should be "$e" or "{e}" or "e(...)" or ...
invalid bareword "e"
in expression "50 * e=";
should be "$e" or "{e}" or "e(...)" or ...
    (parsing expression "50 * e=")
    invoked from within
"expr 50 * $mf"
    (procedure "find_field" line 10)
    invoked from within
"find_field "width="  $line"
    (procedure "display_graph" line 129)
    invoked from within
"display_graph init"
    (command bound to event)

The automata view is very useful in teaching, I appreciate any suggestions.
Many thanks,
Heinz

Offline

#2 2013-01-15 17:13:05

spinroot
forum
Registered: 2010-11-18
Posts: 678
Website

Re: ispin problem in automata view: tcl/tk-script error

That's odd -- I cannot reproduce this on my system.
(I use an Ubuntu system - with probably a different version of 'dot'.)
I suspect that the version of dot you're using produces a slightly different graph format?
the version of dot I have (dot -V) is: graphviz version 2.26.3 (20100126.1600)

Offline

#3 2013-01-15 18:09:57

heinz
Member
Registered: 2011-04-29
Posts: 6

Re: ispin problem in automata view: tcl/tk-script error

I used to have graphviz version 2.29 and just updated to:

dot - graphviz version 2.31.20130115.0545 (20130115.0545)

Would be interesting to see if you can reproduce the error with a version 2.29 or higher. For Ubuntu there is version 2.30 available.
Otherwise it's a specific problem of the macos-version. Older version-numbers for mountain lion are not available.

I will also try to find out if the format has changed and compare it with an example file from a different machine.

Offline

#4 2013-01-16 17:54:51

heinz
Member
Registered: 2011-04-29
Posts: 6

Re: ispin problem in automata view: tcl/tk-script error

Indeed, there seems to be a difference in the format of dot-files produced by actual dot-versions (2.29 and higher) compared to older versions:

* there are additional linebreaks in statements (not critical I guess), and
* there is no ordering of statements any more, i.e. there used to be all nodes first, then all edges listed in the dot file.

The grammar for the dot language does not specify a certain ordering. However, older versions of dot seemed to produce this ordering in their output files. If any parser implicitely relies on a certain ordering of the dot-statements, then it now may fail.

I did not look very deep in the spin script, but I interpret the error "invalid bareword e" while parsing the dot file as follows:

Nodes and transition have an attribute "pos=..." with a numeric value for nodes, while the value for transitions starts with "e,...". So parsing a transition while expecting a node gives a symbol that makes no sense in numerical calculations.

Maybe this helps to make ispin work with the actual dot-versions.

A workaround could be to sort the dot file before parsing.

Offline

#5 2014-02-23 03:06:56

spinroot
forum
Registered: 2010-11-18
Posts: 678
Website

Re: ispin problem in automata view: tcl/tk-script error

this long-standing problem has now been fixed, but using a method for displaying
the graphs that isn't sensitive to the precise format Dot uses (ispin version 1.1.1 from February 22, 2014
now uses Dot's own method for generating tk format that ispin can display directly)
see http://spinroot.com/spin/Src/

Offline

#6 2014-02-28 12:02:42

heinz
Member
Registered: 2011-04-29
Posts: 6

Re: ispin problem in automata view: tcl/tk-script error

works fine now, many thanks!

Just the version-string in the ispin script is still set to "1.1.0" which was a little confusing at first.

Offline

Board footer

Powered by FluxBB