239 Pages
English
Gain access to the library to view online
Learn more

Intentional meaning of programs [Elektronische Ressource] / Daniel Raţiu

Gain access to the library to view online
Learn more
239 Pages
English

Informations

Published by
Published 01 January 2009
Reads 24
Language English
Document size 3 MB

Exrait

TECHNISCHE UNIVERSITÄT MÜNCHEN
FAKULTÄT FÜR INFORMATIK
Software & Systems Engineering
Prof. Dr. Dr. h.c. Manfred Broy
Intentional Meaning of Programs
Daniel Rat¸iu
9 July 2009¨Institut fur Informatik
der Technischen Universitat¨ Munchen¨
Intentional Meaning of Programs
DanielRat¸iu
¨ ¨ ¨ ¨Vollstandiger Abdruck der von der Fakultat fur Informatik der Technischen Universitat
Munchen¨ zur Erlangung des akademischen Grades eines
Doktors der Naturwissenschaften (Dr. rer. nat.)
genehmigten Dissertation.
Vorsitzender: Univ.-Prof. Bernd Brugge,¨ Ph.D.
Prufer¨ der Dissertation:
1. Univ.-Prof. Dr. Dr. h.c. Manfred Broy
2. Univ.-Prof. Dr. Rainer Koschke,
Universitat¨ Bremen
Die Dissertation wurde am 12.02.2009 bei der Technischen Universitat¨ Munchen¨
eingereicht und durch die Fakultat¨ fur¨ Informatik am 22.06.2009 angenommen.4To my family.6Acknowledgments
I would like to thank Prof. Manfred Broy for giving me the opportunity to work in a challenging
and competitive research environment. I am grateful for his support and critical comments
that made this work much better. I was in one of the few situations of PhD students doing
a dissertation in the field of program understanding while being member in a group focused
mostly on formal methods. This heterogeneity was very stimulating for me and gave me the
opportunity to see beyond typical reverse engineering problems and the possibility to explore a
broader research direction.
I would like to thank Prof. Rainer Koschke for being part of my thesis committee and for his
support and friendliness during my visit in Bremen. His requirements and advices on performing
good evaluations substantially improved the validation part of this dissertation.
During my research work, I had good collaborations with some of my colleagues at TUM
with whom I published several research papers in the direction of this dissertation. Firstly, I
would like to thank Florian Deißenbock¨ for the work we did together in my early times at the
chair. His target oriented, pragmatic and sharp approach to describe research problems and give
feedback was very helpful and stimulated my research. I am also thankful to Jan Jurjens,¨ who
gave me useful insights about how to do research and how to write papers, and helped me with
the formal parts of my dissertation. Special thanks go also to Martin Feilkas for the work we did
together, for the hours of constructive discussions, for being a good friend, and last but not least
for the excellent time we had at ICPC’08 in Amsterdam.
There are several persons that read (parts of) my dissertation and provided me very useful
comments: Markus Herrmannsdorfer¨ , Martin Feilkas, Jewgenij Botaschanjan, Florian Holzl,¨
Maria Spichkova, Christian Urban from TUM, Diana Rat ¸iu and Stefan Schimanski from LMU,
and Tudor Gˆırba and Adrian Lienhard from SCG (Bern). Tudor also helped me during my
research work at TUM, by acting several times as my postdoc. I am very grateful for your
invested energy. Thank you!
I would like to thank Prof. Radu Marinescu and his group for making their reverse engineering
infrastructures iPlasma and inCode available to me. While programming and performing differ-
ent experiments, I interacted with several people that I would like to thank: Fei Xie, Yongming
Li (TUM), Ioana Verebi, George Ganea, and Calin Drˆımbau (Timisoara).
The experiments on extracting domain knowledge from domain-specific APIs were possible
to perform due to the help of the following people that implemented exporters for different
languages: Martin Feilkas (C#), Adrian Lienhard (Smalltalk), and Petru Mihancea (C++).
My work at TUM was made more enjoyable (and much easier) by: Silke Muller¨ , Maria
¨Spichkova, Mario Gleirscher, Martin Feilkas, Jan Romberg, Florian Holzl, and Martin Fritzsche.
My student period in Romania was deeply marked by Prof. Radu Marinescu. Being my
professor, diploma thesis supervisor, and a close friend in the same time, Radu was for me a
model to follow, and I owe him my research background I had when I started my PhD. Tudor
Gˆırba helped me very much during my diploma thesis and I learned many things about doing
research from him. I originally came to Munich due to the impulse Prof. Marius Minea gave me
to attend the Marktoberdorf Summer School and to his support during my application.
Last but not least, I would like to thank my family, and especially my wife, for their continuous
and unconditioned support, while I was struggling to do my research.8Abstract
Software engineering is a quest for appropriate modeling and abstraction. Writing programs
that simulate parts of the real world requires programmers to fill the conceptual gap between the
domain knowledge and computer languages. As a consequence of the distance be-
tween the business domain and the general purpose programming languages, clearly identifiable
concepts at the domain level are implemented delocalized in the code and interleaved with each
other and with a myriad of implementation details. This results in the loss of abstract information
in programs. Once the code is written, it needs to be understood and this requires programmers
to go the inverse way and to bridge the source code to the domain knowledge that it imple-
ments. Without doing this, the programs are meaningless for humans and are merely content
interpretable only by machines. The recovery of domain specific information from programs is
in the focus of the reverse engineering and program comprehension research efforts.
In this dissertation we develop a method for bridging the gap between domain knowledge
and programs, by defining explicit mappings between program entities and domain concepts
shared within domain ontologies. We call these mappings the intentional interpretation and they
define the intentional meaning of a program. We use the intentional meaning to characterize the
degree in which programs reflect the domain knowledge along four directions: the coverage of
the domain in the code, the level of homomorphism between parts of the modeled domain and
the code (distortion of knowledge), the distinguishability of domain concepts at the code level
(diffusion of knowledge), and the logical redundancy in the implementation of domain concepts
in the code. We investigate the measure in which the mismatches between the programs and the
domain knowledge affect different quality attributes of programs such as: the extensibility of
programs with new domain concepts, the conciseness and consistency in the implementation of
domain concepts in the code and the protection against logical errors. By investigating different
implementation strategies of concepts from the IEEE Suggested Upper Merged Ontology in
Java programs, we show that many times mismatches originate in the limited conceptualization
covered by the Java constructs and thereby they cannot be avoided at all.
In order to automate the conceptual analyses, we present a technique for automatic recov-
ery of the intentional meaning based on the similarities between the names of concepts and the
program identifiers. We discuss the limitations of the usage of identifiers for recovering the in-
tentional meaning, with focus on their meaningfulness and ambiguity. Further, we investigate
possible sources of domain ontologies that contain knowledge suitable for analyzing programs.
We develop a method for extracting fragments of domain ontologies by similarities
of domain specific APIs that implement the same domain. We present our experience with
extracting fragments of domain ontologies from well-known APIs from Java, C++, .NET, and
Smalltalk. Based on several case-studies, we show that a part of the intentional meaning can
be automatically recovered, that it is feasible to automate the intentional analyses, and that they
are useful for characterizing the conceptual coverage of APIs, the level of logical redundancy,
and the level of diffusion. We show examples of mismatches between several domain ontolo-
gies fragments and parts of the Java standard API, and present our experience with performing
intentional analyses of the Java systems JHotDraw and JEdit.10