Last week, I was working on creating links between different layers of states. Since we have system state in different levels, sometimes, it will be usefull to see what is the containing states of a particular high-level state. 

For having links between states, we need a link data structure. In this data structure, each state has an entry in the link data structure. The entry contains addresses of all of the children states.

Also at each entry, we have some infromation about the state such as its complete name, its arguments, its size, ...

For each entry, we have fixed number of pointers (say n). If a state needs more than n pointers then two of these pointers, will be indirect pointers, means that they points to another entry that conitains more pointers for this entry...

In this phase I am working on the parent to child relationship and in the next phase, back link will be added.