Multi-Paradigm Design with Feature Modeling

Multi-Paradigm Design with Feature Modeling

Slovak University of Technology in Bratislava Faculty of Informatics and Information Technologies Valentino Vranić Multi-Paradigm Design with Feature Modeling Školiteľ: doc. Ing. Mária Bieliková, PhD. Dizertačná práca na získanie vedecko-akademickej hodnosti philosophiae doctor v odbore doktorandského štúdia: 25-31-9 Programové a informačné systémy April 2004 To Brana and Sandra Abstract Based on the analysis of multi-paradigm software development and the con- cept of paradigm, a new method of multi-paradigm design with feature mod- eling is proposed in this thesis. The method enables an explicit reasoning about paradigms, viewed as solution domain concepts, and their appropri- ateness for given application domain concepts. Both application and so- lution domain are modeled using a conceptual modeling technique known as feature modeling adapted to the needs of multi-paradigm design. The process of paradigm selection is de¯ned also in terms of feature modeling as a bottom-up paradigm instantiation over application domain concepts. Its output is a set of paradigm instances annotated with the information about corresponding application domain concepts and features. Accord- ing to these paradigm instances, the code skeleton is being designed. The method is demonstrated and evaluated on the solution domain of AspectJ programming language and the application domain of feature modeling. Acknowledgments I would like to thank Pavol N¶avratfor directing me to the exciting ¯elds of multi-paradigm design and aspect-oriented programming. His advices helped me crisp my ideas into the early versions of this thesis. I am deeply thankful to M¶ariaBielikov¶afor her valuable suggestions which helped me putting the thesis into its ¯nal form. I am also very thankful to Peter Dolog for the numerous discussions we had during the early stages of this work. Contents 1 Introduction 1 1.1 Thesis Objectives ......................... 1 1.2 Thesis Structure ......................... 2 2 The Concept of Paradigm in Software Development 5 2.1 The Meaning of Paradigm .................... 5 2.2 Large-Scale Paradigms ...................... 6 2.3 Small-Scale Paradigms ...................... 7 3 Towards Multi-Paradigm Software Development 11 3.1 Beyond Object-Oriented Programming . 11 3.2 Aspect-Oriented Approaches . 12 3.2.1 Aspect-Oriented Programming . 13 3.2.2 Adaptive Programming . 13 3.2.3 Composition Filters ................... 15 3.2.4 Subject-Oriented Programming . 15 3.3 Generative Programming .................... 17 3.4 Multi-Paradigm Programming in Leda . 18 3.4.1 Leda Programming Language . 19 3.4.2 A Multi-Paradigm Design Method for Leda . 19 3.4.3 Leda Approach Evaluation . 20 3.5 Multi-Paradigm Design ..................... 21 3.5.1 Application Domain SCVR Analysis . 21 3.5.2 Solution Domain SCVR Analysis . 22 3.5.3 Transformational Analysis and Code Design . 22 3.5.4 Multi-Paradigm Design Evaluation . 23 3.6 Intentional Programming .................... 24 3.7 Summary ............................. 25 4 Feature Modeling for Multi-Paradigm Design 27 4.1 Basic Notions ........................... 28 4.2 Feature Diagrams ......................... 29 4.3 Concept References ........................ 31 ii Contents 4.4 Information Associated with Concepts and Features . 32 4.4.1 Binding Time/Mode ................... 32 4.4.2 Associated Information Applicability . 33 4.5 Constraints and Default Dependency Rules . 34 4.5.1 Constraints ........................ 35 4.5.2 Default Dependency Rules . 36 4.6 Parameterization in Feature Models . 36 4.6.1 Parameterized Feature and Concept Names . 37 4.6.2 Parameterized Concepts . 37 4.6.3 Representing Cardinality in Feature Models . 38 4.7 Concept Instantiation ...................... 39 4.8 Equivalent and Normalized Feature Diagrams . 40 4.9 Applying Feature Modeling ................... 41 4.10 Feature Modeling Tool Support . 44 4.10.1 ASADAL ......................... 44 4.10.2 AmiEddi ......................... 45 4.10.3 Captain Feature ..................... 45 5 Multi-Paradigm Design with Feature Modeling 47 5.1 The Process of Multi-Paradigm Design with Feature Modeling 47 5.2 Solution Domain Feature Modeling . 49 5.2.1 Identifying Paradigms . 50 5.2.2 Identifying Binding Times . 50 5.2.3 First-Level Paradigm Model . 51 5.2.4 Modeling Individual Paradigms . 52 5.3 Transformational Analysis .................... 56 5.3.1 Paradigm Instantiation . 57 5.3.2 The Process of Transformational Analysis . 58 5.4 Code Skeleton Design ...................... 60 5.5 Method Evaluation ........................ 61 5.5.1 Application Domain Feature Modeling . 62 5.5.2 Solution Domain Feature Modeling . 62 5.5.3 Transformational Analysis and Code Skeleton Design . 63 6 Related Approaches 65 6.1 Feature Modeling Techniques . 65 6.1.1 Concept Instantiation . 66 6.1.2 Concept Instances Represented by Feature Diagrams . 66 6.1.3 Concept References .................... 67 6.1.4 Parameterization in Feature Models . 67 6.1.5 Constraints and Default Dependency Rules as Logical Expressions ........................ 67 6.1.6 Referring to Concepts and Features . 68 6.1.7 Representing Cardinalities . 68 Contents iii 6.1.8 Information Associated with Concepts and Features . 69 6.2 Multi-Paradigm Approaches ................... 70 6.2.1 Multi-Paradigm Design . 70 6.2.2 Multi-Paradigm Programming in Leda . 73 6.2.3 Generative Programming . 73 7 Conclusions 75 7.1 Summary of Contributions .................... 76 7.2 Further Work ........................... 77 Bibliography 79 A Domain of Feature Modeling A-1 A.1 Domain De¯nition and Scope . A-1 A.2 Feature Model . A-2 A.2.1 Feature Model . A-3 A.2.2 Feature Diagram . A-4 A.2.3 Node ............................A-7 A.2.4 Feature . A-8 A.2.5 Partition . A-10 A.2.6 Associated Information . A-11 A.2.7 AI Item . A-12 A.2.8 AI Value . A-13 A.2.9 Constraint . A-14 A.2.10 Default Dependency Rule . A-14 A.2.11 Link . A-15 A.2.12 <Plural Form> . A-16 B MPDFM for AspectJ B-1 B.1 AspectJ Paradigm Identi¯cation . B-1 B.2 AspectJ Binding Times . B-2 B.3 AspectJ Paradigms . B-3 B.3.1 AspectJ Program . B-3 B.3.2 Class ............................B-4 B.3.3 Interface . B-7 B.3.4 Aspect . B-9 B.3.5 Inheritance . B-12 B.3.6 Method . B-13 B.3.7 Overloading . B-16 B.3.8 Pointcut . B-17 B.3.9 Inter-Type Declaration . B-19 B.3.10 Advice . B-21 B.4 Auxiliary Concepts . B-23 B.4.1 Access . B-23 iv Contents B.4.2 Inheritance Line . B-24 B.4.3 Type . B-26 B.4.4 <Plural Form> . B-27 C Applying MPDFM for AspectJ C-1 C.1 Transformational Analysis . C-1 C.1.1 Feature Model . C-1 C.1.2 Feature Diagram . C-2 C.1.3 Node ............................C-3 C.1.4 Feature . C-5 C.1.5 Partition . C-6 C.1.6 Associated Information . C-7 C.1.7 AI Item . C-8 C.1.8 AI Value . C-8 C.1.9 Constraint . C-9 C.1.10 Default Dependency Rule . C-10 C.1.11 Link . C-10 C.1.12 Plural Forms . C-11 C.1.13 Normalization . C-11 C.1.14 Linking . C-12 C.2 Code Skeleton Design . C-12 Chapter 1 Introduction A quarter of a century since the Robert W. Floyd's Turing Award Lecture on paradigms of programming [Flo79], there is no common agreement on the precise meaning of the term paradigm in the ¯eld of software develop- ment. In spite of that, it has been widely used to denote any distinctive enough approach to programming or software development in general. As such, it has spread to the whole software development process. However, as software has ¯nally to be expressed in the form of a program written in one of the programming languages, it is not surprising that the term paradigm is related mostly to programming languages as such. Programming languages are often categorized according to paradigms they support. This is being done especially according to some of the more widely accepted paradigms, namely procedural, functional, logical, and object- oriented programming. Having several paradigms, each of which has some advantages over the other ones, has naturally lead to the idea of integrating or combining several programming languages, each of which supports some paradigm, into one, multi-paradigm programming language. It is important to note that advantages of a paradigm are relative to the problem being solved. A multi-paradigm programming language itself does not help in multi-paradigm design, which involves deciding which paradigm is appropriate for the problem being solved. This issue has not been as popular research subject as creating multi-paradigm languages. The reasons may lay in already mentioned insu±cient understanding of the paradigm in software development, in which, in most cases, the term paradigm is taken for given. 1.1 Thesis Objectives This thesis is devoted to the improvement of multi-paradigm design by em- ploying the technique of conceptual modeling known as feature modeling. 2 Introduction As already stated, to be able to deal with the issue of multi-paradigm de- sign, the concept of paradigm would be analyzed as such, as well as in the context of employing multiple paradigms simultaneously in contemporary approaches to software development. Based on this analysis, the appropriate paradigm representation would be proposed. For this, feature modeling would be adapted to the speci¯c needs of paradigm modeling. Subsequently, the entire method of multi- paradigm design, which consists of modeling both the application domain (which is being solved) and the programming language, and the process of ¯nding the correspondence between the application domain concepts and paradigms, would be de¯ned in terms of feature modeling. The newly established method of feature modeling based multi-paradigm design would be evaluated by applying it to the AspectJ programming lan- guage, resulting in a paradigm model of this language, and a subsequent application of this model in transformational analysis of the domain of fea- ture modeling, which constitutes an application domain of a considerable size.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    158 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us