1 / 20

Generative programming & Middleware

Generative programming & Middleware. Farid Hosseini Reza Azimi Feb 6,2003 University of Toronto. Agenda,. Part 1 (by Farid Hosseini) What is Generative Programming (GP) How GP Helps middleware Q/A Part 2 (by Reza Azimi) How Middleware Helps GP Q/A.

Download Presentation

Generative programming & Middleware

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Generative programming & Middleware Farid Hosseini Reza Azimi Feb 6,2003 University of Toronto

  2. Agenda, • Part 1 (by Farid Hosseini) • What is Generative Programming (GP) • How GP Helps middleware • Q/A • Part 2 (by Reza Azimi) • How Middleware Helps GP • Q/A

  3. What is Generative Programming?

  4. Status of Generative Programming (GP) • GP requires skills that are not mainstream. • GP is not user-friendly. • GP is not widely used. Most Developers do not use GP as a design or implementation strategy. (” ECOOP’2002 Workshop on Generative Programming”)

  5. What’s new in Generative Programming? • The current practice: • Manually Searching for components • Manually adapting components • Manual assembly • Generative Programming, • automatic selection and assembly of components on demand. (Definition provided by K. Czarnecky )

  6. What does the Programmer do in GP? • The programmer states what s/he wants • Modelling • The generator produces the desired system or component. • Code generation (K. Czarnecky )

  7. Aspects of Generative Programming • representation of the problem domain • implementation of the solution domain (” ECOOP’2002 Workshop on Generative Programming”)

  8. Domain-Modelling & Code Generation Three things are required: • A modelling tool • To define what you want • A code generator • To close the gap between the domain and the code worlds • A component library. • To facilitate the code generation (”Application Development Advisor” Magazine)

  9. Model Templates Aaa() Bbb() Ccc() . Yyy() Zzz() Modelling Elements How is it possible? Model+ Generator + Library of components Code GENERATOR Code

  10. How is it possible? • By direct mapping from each modeling element to the generation of a set of intentionally equivalent source code statements. • When a library of components is available, the model interpreter can leverage a larger granularity of reuse by generating configurations of the available components. (“Generating Aspect Code from Models” paper)

  11. Templates and Generators Templates are a user-friendly way to specify an implementation. A templating component can be used by the code generator to emit source code. This approach is language and domain model neutral. (” ECOOP’2002 Workshop on Generative Programming”)

  12. A Pretty Template public class Person { //-for-each-field-// private String mField = ""; public String getField() { return mField; } public void setField( String pField ) { mField = pField; } //-end-// }

  13. How Middleware Helps Generative Programming?

  14. Introduction • Our methodology of pursuing the interoperability of different models is established on the idea of Generative Programming (GP): • The generative automation of middleware for building the interoperability. (Wei Zhao)

  15. How is it possible? What are the Modelling Elements for a Middleware? Model GENERATOR Modelling Elements

  16. Middleware Elements Scheduling Service Standard Synchronizers Thread Pools Protocol Properties Explicit Binding Portable Priorities www.cs.wustl.edu/~schmidt/TAO.html

  17. Intel x86 & Power PC chipsets • TCP/IP, ATM • POSIX & JVMs • CORBA ORBs & components • Ada, C, C++, RT Java Component Of The Shelf (COTS) Many hardware & software APIs and protocols are now standardized, e.g.: (Douglas C. Schmith)

  18. Middleware Generator (Douglas C. Schmith)

  19. Application Requirements 3. Generate middleware that is customized for a particular platform & application use-case 2. Analyze the optimization rules & opportunities Middleware Generator Plat1 Plat2 Plat3 Plat1 .pd Plat2 .pd Plat3 .pd 1. Read the target platform description & application requirements Middleware Generator at work CORBA/Java/COM+ Applications • A Generated Middleware needs: • A common internal representation (ideally auto-generated) for each middleware specification • Based on generalizing the middleware semantics Common ORB + Assorted Tools • A generated implementation that is optimized automatically for each target platform & application use-case • Based on reflective assessment of platform descriptions & application use-case Common Semantic Representation Plat1 Impl Plat2 Impl Plat3 Impl (Douglas C. Schmith)

  20. Q/A

More Related