Download presentation
Presentation is loading. Please wait.
Published byYuliana Robert Modified over 10 years ago
1
Generative Programming and Active Libraries Krzysztof Czarnecki DaimlerChrysler Research and Technology Software Engineering Lab Ulm, Germany www.generative-programming.org
2
The Vision zThink & program è“one of a kind” programming zSurvey & assembly ècomponent-based programming zOrder & generate ègenerative programming
3
Component-Based Programming zExample: Standard Template Library (STL) zAs set of basic, carefully factored data container and algorithm components (minimum redundancy, maximum combinability and reuse) ystack > zProblem of manual assembly in STL yextensive knowledge of implementation detail needed ximplementation components, illegal & optimal configurations ypoor error reporting
4
Example of an STL Usage Error stl_algo.h: In function ‘void __merge_sort_loop<_List_iterator, foo *, int>(_List_iterator, _List_iterator, foo *, int)’: stl_algo.h:1448: instantiated from ‘__merge_sort_with_buffer, foo *, int>( _List_iterator, foo *, int *)’ stl_algo.h:1485: instantiated from ‘__stable_sort_adaptive< _List_iterator, foo *, int>(_List_iterator, _List_iterator, foo *, int)’ stl_algo.h:1524: instantiated from here stl_algo.h:1377: no match for ‘_List_iterator & -_...
5
Generative Programming The programmer states what she needs... LIST_GENERATOR ::RET ACCOUNT_GENERATOR ::RET MATRIX_GENERATOR,speed >::RET and gets the desired component!
6
Active Libraries zThe idea of putting compile-time metacode into domain-specific libraries zActive libraries – in addition to classes and functions – also contain metacode for configuration, generation, optimization, error reporting, debugging and profiling, editing and visualization of code, code refactoring, versioning,... zExtensible programming environments ye.g. Intentional Programming (Microsoft Research)
7
Extensible Programming Environments L1L1 L2L2 L4L4 L6L6 L5L5 L3L3 EPE 2 EPE 1 EPE = Extensible Programming Environment L = Active Library ( compilation, debugging, rendering, type-in & editing, refactoring...) L1L1 L3L3 L2L2 L2L2 L3L3 L5L5 L4L4 L6L6
8
Active Library for Matrix Computation
9
Generative Domain Model Problem Space Domain-specific concepts and Features Solution Space Elementary components Maximum combinability Minimum redundancy Configuration Knowledge Illegal feature combinations Default settings Default dependencies Construction rules Optimizations Domain Specific Languages (DSLs) Generators Components + System Family Architecture
10
System Family Approach zDomain Engineering yanalysis: scoping, common and variable features, feature dependencies (FODA feature diagrams) ydesign: common architecture for the system family domain-specific languages, configuration generators yimplementation: reusable components, domain- specific languages, configuration generators zApplication Engineering yproduction of concrete, highly customized systems and components using the above-mentioned results
11
Further Information zCzarnecki, Eisenecker: Generative Programming - Methods, Tools, and Applications, Addison- Wesley, 2000 zwww.generative-programming.org zGenerative and Component-Based Software Development (GCSE 2000), October 10 - 12, 2000, Erfurt, Germany, www.netobjectdays.org/gcse
12
Industrial Revolution 1826 interchangeable parts successfully introduced by John Hall (after 25 years of unsuccessful attempts!) 1901 assembly lines introduced by Ransom Olds; popularized and refined by Henry Ford in 1913 1980s automated assembly lines first industrial robot installed in 1961 at General Motors; 1970’s advance of microchips
13
Industrializing Software Production Current practice Searching for and adapting components and manual assembly Generating the needed components and automatic assembly Generative Programming Better composition technologies AOP, SOP, APPC, CFs, etc. Better composition automation active libs, extendible programming environments (e.g. IP), etc. Product-Line Engineering FODA, ODM, etc.
14
Issues to discuss... zDSL design zcomposability of DSLs
15
Workshop Issues zIndustrial Experiences: experiences with generative techniques for product lines in industrial settings hard problems in industrial settings that research needs to address organizational and other problems in industrial settings (how to install and successfully run generative technology projects) zProperties and Design of Domain-Specific Languages DSLs: composability of DSLs adaptability and parameterization of DSLs textual vs. GUI DSLs wizards vs. more complex modeling languages zApproaches to generation: classification of different approaches to generation properties of a generator architecture pros and cons of different generative technologies and when to apply which zApproaches to developing generative models: Domain Engineering Jargons experiences and managing the process in industrial settings
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.