Abstract

Functional programming languages are getting more popular nowadays, thus there is a high demand on new tools that may support the development process. There are two main types of such tools, one is operating with dynamic information by running the code, the other is performing static analysis on the source code of the program. Erlang is a functional programming language designed for developing real world applications. The RefactorErl tool is an extensive static analyzer framework developed for Erlang. The tool offers several refactorings and code comprehension support for developers. In general, the focus of my research was to develop new static analysis methods. These methods extract compound semantic information from the source code, and the result could be used for other analysis methods. My results are related to control flow, control dependence, impact analysis and communication model of Erlang programs. In my dissertation, I have presented formal control flow rules based on the semantics of the language. The rules are compositional and can be used for developing control flow graph of an expression, or a function. The results of the control flow graph have been used further analysis techniques, like discovering parallelable components in legacy source codes. The information available in the control flow graphs can be used in many ways. It can be used for parallelization, debugging or change impact analysis. The control dependence graph is a more compact representation compared to control flow graph. It includes only direct control dependencies, while the control flow graph contains every execution path of a program. I have presented and extended the control dependence graph with data dependencies, what we call Erlang dependence graph. I have presented an impact analysis method based on the dependence graph. This method can be used for relevant test case selection. It selects only those test cases that could be affected by a change. The presented method can not only be used for impact analysis of refactorings, but can be generalized for an arbitrary modification. I have also presented a method for extracting the communication model from Erlang source codes. I have described the algorithms that can be used to identify the processes and the possible communication between them. I have extended the model with the analysis results of hidden communication. The Erlang Term Storage (ets) tables can be used as shared memory between processes. Any reading or writing operation is taken as an interaction with other processes accessing the same table. I have added analysis of generic server behaviors as another extension to the process model. This introduces another type processes and the hidden communication. The results can be used in code comprehension techniques, but the results from the communication model could be used in impact analysis as well.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call