120 likes | 340 Views
Towards Multi-Paradigm Software Development. Valentino Vrani ć vranic@elf.stuba.sk Department of Computer Science and Engineering Faculty of Electrical Engineering and Information Technology Slovak University of Technology in Bratislava. Overview.
E N D
Towards Multi-Paradigm Software Development Valentino Vranić vranic@elf.stuba.sk Department of Computer Science and Engineering Faculty of Electrical Engineering and Information Technology Slovak University of Technology in Bratislava
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 development • Multi-paradigm approaches to software development
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
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
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
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
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
Generative Programming • Aims at automatic software manufacture • Has to be tailored to a particular domain yielding a paradigm GP is a metaparadigm Object-Oriented Programming Xerox PARC Aspect-Oriented Programming Generic Programming Generative Programming Domain-Specific Languages Composition Filters Aspect-Oriented Programming Demeter/Adaptive Programming Subject-Oriented Programming
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
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
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
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