Location names in ToString() representation of states (T: struct)
When trying to step through a compiled network of states (state struct T
) by printing the visited states using ToString()
, I noticed that the variables are named as specified in the input model (e.g. in the Jani
-file), such that the variable-value-mapping can be easily identified (e.g. counter = 0
for a variable named counter
introduced in the Jani
-model). But the locations of the automata are numbered in the order they are specified in the input file and their names are not used in the state representation, such that they can not be recognized directly. For example a declaration of locations:
"locations": [ { "name": "loc10", "transient-values": [] }, ... { "name": "loc0", "transient-values": [] },
will in the end result in states, where automaton.location = 0
in the ToString()
representation indicates that the location is loc10
, because loc10
is the first declaration of a location. It would be much more intuitive if the current location in each automaton would be indicated by the location's name (e.g. automaton.location = loc0
), like it is done for variables.