1. A computerized method for processing a graph containing a set of nodes processing a graph containing a set of nodes, said method comprising providing a forest of trees corresponding to a directed acyclic graph containing a set of nodes, each of said nodes having a type chosen from a set of types; determining a depth for each node in said forest of trees; in a breadth-first traversal manner, comparing the depth and type of each node in said forest of trees to a predefined matrix, said matrix defining for each depth and type combination one of the following actions to be carried out: no action, creating a new sub-tree, triggering exception handling.