There is clearly a major horizontal alignment problem, and a minor vertical alignment problem. What is a better way to do it? I found the dirtree package, but it doesn't allow to display arrows.
Provide a minimal working example (MWE) that produces the output as shown in the picture. Attach the according log file. And please upload attachments to the forum server.
Basically, I guess it's a usage issue (knowing how to use XY-Pic package). The problem is that arrows are drawn from the middle of the bottom of the "from" entry, which is why I use \phantom{XX} entries for the source and destination of the arrows as "placeholders" for the actual text stored in the subsequent entry on the same row, and shifted to the left, except it's not quite working...
If I incorporate the text lines in the diagram not as separate entries but rather between \save and \restore and tweak their position via +<x,y> as follows
except that it cannot be centered as a figure, because apparently the text between the \save and \restore is not taken into account when computing the dimensions of the enclosing box for purposes of centering.
Also note that {\phantom{p}} is necessary for consistent vertical alignment of the second entry because it doesn't have any letter (such as g, j, p, q, y) that extends below the baseline.