
arXiv: 1602.08653
We revisit a concept that has been central in some early stages of computer science, that of structured programming: a set of rules that an algorithm must follow in order to acquire a structure that is desirable in many aspects. While much has been written about structured programming, an important issue has been left unanswered: given an arbitrary, compiled program, describe an algorithm to decide whether or not it is structured, that is, whether it conforms to the stated principles of structured programming. We refer to the classical concept of structured programming, as described by Dijkstra. By employing a graph model and graph-theoretic techniques, we formulate an efficient algorithm for answering this question. To do so, we first introduce the class of graphs which correspond to structured programs, which we call Dijkstra Graphs. Our problem then becomes the recognition of such graphs, for which we present a greedy $O(n)$-time algorithm. Furthermore, we describe an isomorphism algorithm for Dijkstra graphs, whose complexity is also linear in the number of vertices of the graph. Both the recognition and isomorphism algorithms have potential important applications, such as in code similarity analysis.
20 pages, 9 figures
graph algorithms, graph isomorphism, FOS: Computer and information sciences, D.2.3, D.2.4, D.2.8, G.2.2, Discrete Mathematics (cs.DM), structured programming, reducibility, Graph algorithms (graph-theoretic aspects), Graph theory (including graph drawing) in computer science, Computer Science - Discrete Mathematics
graph algorithms, graph isomorphism, FOS: Computer and information sciences, D.2.3, D.2.4, D.2.8, G.2.2, Discrete Mathematics (cs.DM), structured programming, reducibility, Graph algorithms (graph-theoretic aspects), Graph theory (including graph drawing) in computer science, Computer Science - Discrete Mathematics
| selected citations These citations are derived from selected sources. This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | 13 | |
| popularity This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network. | Top 10% | |
| influence This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | Top 10% | |
| impulse This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network. | Top 10% |
