Towards Multi-Paradigm Software Development Valentino Vranić [email protected] Department of...
-
Upload
martin-jenkins -
Category
Documents
-
view
213 -
download
0
Transcript of Towards Multi-Paradigm Software Development Valentino Vranić [email protected] Department of...
Towards Multi-Paradigm Software Development
Valentino Vranić
Department of Computer Science and Engineering
Faculty of Electrical Engineering and Information Technology
Slovak University of Technology in Bratislava
2
Overview
• Several new approaches to software development have a multi-paradigm character
• Some are explicit with this (e.g. multi-paradigm design for C++)
• And some are implicit (e.g. aspect-oriented programming)
The main points of this presentation:Use of the term paradigm regarding software
developmentMulti-paradigm approaches to software
development
3
The Meaning of Paradigm
• Introduced in science by Thomas Kuhn:– a consistent collection of methods and techniques
accepted by the relevant scientific community as a prevailing methodology of the specific field
• Widely used (and abused) in computer science• Used at two levels:
– large-scale paradigms– small-scale paradigms
• Multi-paradigm– the application of multiple paradigms
• Metaparadigm– a paradigm of paradigms: shows how to select and
combine paradigms
4
Large-Scale Paradigms
• The essence of the software development process
• Refer to all the phases of the software development
• A change of paradigm: evolution or revolution• A change of a paradigm in science is taking
part through the scientific revolution• A paradigm is dominant in its field, i.e. there
can be only one
5
Large-Scale Paradigms (contd.)
• But there are several software development paradigms currently existing (imperative, procedural, object-oriented, functional, logic…)
• Some paradigms seem to evolve:
Imperative programming
Procedural programming
Object-oriented programming
6
Small-Scale Paradigms
• The other use of the term paradigm: to denote programming language mechanisms
• Scope, commonality and variability (SCV) analysis• Example: procedures
– S: a collection of similar code fragments– C: the code common to all fragments in S– V: the “uncommon” code in S; variabilities handled by
the procedure parameters and/or the code before or after the procedure call
• Some other small-scale paradigms: templates, objects, inheritance…
• Large-scale paradigms consist of the small-scale paradigms
7
Aspect-Oriented Programming
• Aims at modularization of the crosscutting concerns (resulting in the tangled code)
• Main AOP approaches (next slide) build upon the OOP
• AOP is not OOP bound — it is also applicable to procedural or functional programming
• Another paradigm is needed to which AOP is to be applied
8
Generative Programming
Composition Filters
Demeter/Adaptive Programming
Subject-Oriented Programming
Generic Programming
Domain-Specific Languages
Aspect-Oriented Programming
Generative Programming
• Aims at automatic software manufacture
• Has to be tailored to a particular domain yielding a paradigm GP is a metaparadigm
Xerox PARC Aspect-Oriented Programming
Object-Oriented Programming
9
Multi-Paradigm Programming in Leda
• Leda was created as a multi-paradigm language — in terms of the large-scale paradigms
• Enables combination of the procedural, object-oriented, functional and logic programming
• Problems:– extension to other paradigms– no support in selecting and combining paradigms
10
Multi-Paradigm Design for C++
• Intended for C++, but can be tailored to any richly expressive language
• Makes an explicit use of the small-scale paradigm concept
• Two analyses, commonality and variability, performed both on application and solution domain
• Lining up yields which paradigm is to be used for which feature
11
Intentional Programming
• Programming abstractions are limited by the fixed syntax programming languages
• IP: a program represented by the AST (called intentional tree)
• Requires special programming environment• Binary format for the program files• MPD would contribute to more regularized use
of the IP• IP enables creation of the new intentions —
small-scale paradigms
12
Conclusions
• The need to distinguish between large- and small-scale paradigms
• Multi-paradigm software development is a growing concept
• Widely present at implementation level• Has to be “legalized” at design level• MPD — a possible basis for future multi-
paradigm software development• MPD requires further improvement:– extended notation
– method incorporating traditional approaches into MPD
– the connection with design patterns