L2CA Exemples : List Reversal

Program Source

pointer i,j,k;
while !(i == null) do
k = i.next ;
i.next = j;
j = i;
i = k;

Initial Heap

1 // nb of vertices (optional)
O x null (i); // id counterName nextVertice RootList

DOT Output

This is what L2CA generates when used on those program and heap. You can see the shape of the heap through the program execution.

The doted boxes are the automaton states and small ones the heap vertices, in which the first line is for the roots and the second for the counter.
[This is a guard] this is an action ;