1. A computerized method for manipulating a directed graph, the directed graph comprising a plurality of vertices and a plurality of edges, wherein each vertex of the plurality of vertices is connected to at least one other vertex of the plurality of vertices with an edge to form an ordered pair of a source vertex and a target vertex, the method comprising: assigning a low-level code to each vertex of the plurality of vertices, wherein for each ordered pair, the low-level code of the target vertex is greater than the low-level code of the source vertex; adding a new edge connecting a first vertex and a second vertex from the plurality of vertices in a new ordered pair, the first vertex being a source vertex and the second vertex being a target vertex of the new ordered pair, wherein a low-level code of the second vertex is not greater than a low-level code of the first vertex; sorting topologically a subgraph comprising the new ordered pair and all ordered pairs that are direct or indirect successors of the second vertex of the new ordered pair; and during the sorting, for each ordered pair in the subgraph, assigning a new low-level code to a target vertex when an old low-level code of the target vertex is not greater than a low-level code of a corresponding source vertex, the new low level code is greater than the low-level code of the corresponding source vertex.