In the compiler, after lexical analysis and grammar analysis, the syntax tree is generated, and in the further processing of the syntax tree, a data structure called a "direction-free graph" is used.
What is a forward-free loop diagram
1, first it is a graph, and then it is a direction graph, followed by any vertex of this direction graph does not go back to the path of this vertex, is to have to the ring-free
2,dag may not necessarily translate into trees, but a tree must be a dag,
3,dag can perform topological sorting, related to topological ordering, and refer to another article blog:http://blog.csdn.net/yejing_utopia/article/details/40681191
How to judge a graph as having a direction without ring:
Because Dag can perform topological sorting, it is possible to use topological sort-related algorithms to push a graph to see if it is dag.