Download Paper - STS
Transcript
7 Conclusion and Future Work The main purpose of this bachelor thesis was to introduce control flow blocks, a new method for visualizing the control flow between the basic blocks of a program. It is based on regular expressions defined over the basic blocks that serve as means for capturing the control flow information contained in the control flow graphs. The set of regular expression operators that are used, achieve the abstraction of the linkage into explicit structures. These execution structures are then represented in the visualization by using the visual property of containment. The result is an overlay of the execution paths, each a sequence of basic blocks, where the execution structures around the basic blocks allow to switch between the different paths. A prototype of the envisioned program visualization tool was implemented that takes the textual specification of a control flow graph in Graph Description Language as input and produces the control flow blocks visualization as output to the screen. The process of generating the visualization makes use of the equivalence of deterministic finite automata to regular expressions in formal language theory and of the similarity of a control flow graph to a deterministic finite automaton: The deserialized control flow graph is first transformed into a deterministic finite automaton, after which an equivalent regular expression is computed by means of either the transitive closure method or Brzozowski’s method. However, it turned out that these computational methods not only tend to create very large regular expressions, but they also result in different regular expressions to be computed for the same deterministic finite automaton due to the difference in the order, in which states are eliminated in the process. In order to prevent this from affecting the produced control flow blocks visualizations negatively, a normal form for the regular expressions as well as a strategy to bring them into this normal form were defined. Also, control flow graphs, where nodes are associable to more than two control flow graph patterns, were found giving rise to regular expressions with basic block duplication. For the sake of reducing basic block duplication and hence rendering the control flow blocks visualizations more compact, transformations were allowed for weakening the accuracy of regular expressions to an extent, which makes it possible to shorten them more. All in all, a transformation process was implemented in the tool, in which normalization and weakening are performed on the regular expressions in three phases. The evaluation of the tool showed that the specified approach to normalizing the regular expressions obtained with the two different methods is not really effective for control flow graphs with strongly connected components. It was found that the inherent difference in how they accomplish the task of deriving the regular expressions cannot be overcome by one universal approach for such control flow graphs and that different approaches geared to the inner workings of the respective method might yield better results. Apart from the problems that cropped up in relation to how the control flow blocks visualizations are generated, there were also certain issues concerning the usability of 63