Generative Programming from a DSL Viewpoint Charles Consel Compose Research Group LaBRI  –  INRIA-Futurs 2004
Domain-Specific Languages: What Problem 1 Program 1 Problem 2 Program 2 Problem 3 Program 3 … Problem family Program famil...
Unconventional, Domain-Specific Languages (1) <ul><li>Domain-specific notations and abstractions </li></ul><ul><ul><li>Typ...
Unconventional, Domain-Specific Languages (2) <ul><li>Examples of DSLs </li></ul><ul><ul><li>Scripting languages </li></ul...
Domain-Specific Languages: How Problem 1 Program 1 Problem 2 Program 2 Problem 3 Program 3 … Problem family Program family...
Domain-Specific Languages: How Problem 1 Program 1 Problem 2 Program 2 Problem 3 Program 3 … Problem family Program family...
Domain-Specific Languages: How Problem 1 Program 1 Problem 2 Program 2 Problem 3 Program 3 … Problem family Program family...
From Program Family to Generative Programming: Declarations / AOP Declarations Generator Program <ul><li>DS info: declarat...
From Program Family to Generative Programming: Annotations Annotations Generator Program <ul><li>DS info: annotations </li...
From Program Family to Generative Programming: Meta-Programming Transformer Generator Program <ul><li>DS info: transformer...
From Program Family to Generative Programming DSL Program Generator Program <ul><li>Domain-specific information </li></ul>...
Disclaimers <ul><li>Not the panacea: need for a program family </li></ul><ul><li>Not fixed : need to evolve with the progr...
Conventional  vs.  Unconventional <ul><li>Unconventional today    conventional tomorrow </li></ul><ul><li>Unconventional ...
Upcoming SlideShare
Loading in …5
×

Generative Programming from a DSL Viewpoint

980
-1

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
980
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
15
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Generative Programming from a DSL Viewpoint

  1. 1. Generative Programming from a DSL Viewpoint Charles Consel Compose Research Group LaBRI – INRIA-Futurs 2004
  2. 2. Domain-Specific Languages: What Problem 1 Program 1 Problem 2 Program 2 Problem 3 Program 3 … Problem family Program family Problem Generator Program <ul><li>Application generator </li></ul><ul><li>Preprocessor </li></ul><ul><li>DSL compiler </li></ul><ul><li>Specification </li></ul><ul><li>Declaration </li></ul><ul><li>DSL program </li></ul>
  3. 3. Unconventional, Domain-Specific Languages (1) <ul><li>Domain-specific notations and abstractions </li></ul><ul><ul><li>Types (return value, SIP addr) </li></ul></ul><ul><ul><li>Exceptions (timers, resources…) </li></ul></ul><ul><li>Domain-specific verifications </li></ul><ul><ul><li>No call loss </li></ul></ul><ul><ul><li>Valid state transition </li></ul></ul><ul><li>Domain-specific optimizations </li></ul><ul><ul><li>Server state management </li></ul></ul><ul><li>Domain-specific code generation </li></ul><ul><ul><li>Exception handling (multiple platforms) </li></ul></ul><ul><li>Domain-specific development tools </li></ul><ul><ul><li>Textual tools </li></ul></ul><ul><ul><li>Graphical tools </li></ul></ul>
  4. 4. Unconventional, Domain-Specific Languages (2) <ul><li>Examples of DSLs </li></ul><ul><ul><li>Scripting languages </li></ul></ul><ul><ul><ul><li>Shell, AWK… (~) </li></ul></ul></ul><ul><ul><li>Layer-oriented DSL </li></ul></ul><ul><ul><ul><li>XDR [ SUN ], Devil </li></ul></ul></ul><ul><ul><li>Component-oriented DSL </li></ul></ul><ul><ul><ul><li>Plan-P, Bossa [ Muller & Lawall ], Call/C </li></ul></ul></ul><ul><li>Benefits </li></ul><ul><ul><li>Efficiency </li></ul></ul><ul><ul><li>Verification </li></ul></ul><ul><ul><li>Conciseness </li></ul></ul><ul><ul><li>Re-use </li></ul></ul><ul><ul><li>Productivity </li></ul></ul>
  5. 5. Domain-Specific Languages: How Problem 1 Program 1 Problem 2 Program 2 Problem 3 Program 3 … Problem family Program family DSL Program Generator Program <ul><li>Representation </li></ul><ul><li>Domain-specific information </li></ul><ul><li>Domain-specific abstractions </li></ul><ul><li>Exploitation </li></ul><ul><li>Factorize / re-use </li></ul><ul><li>Code/expertise/verification/treatment </li></ul>
  6. 6. Domain-Specific Languages: How Problem 1 Program 1 Problem 2 Program 2 Problem 3 Program 3 … Problem family Program family DSL Program Generator Program <ul><li>Representation </li></ul><ul><li>Domain-specific information </li></ul><ul><li>Domain-specific abstractions </li></ul><ul><li>Exploitation </li></ul><ul><li>Factorize / re-use </li></ul><ul><li>Code/expertise/verification/treatment </li></ul>Generative Programming
  7. 7. Domain-Specific Languages: How Problem 1 Program 1 Problem 2 Program 2 Problem 3 Program 3 … Problem family Program family DSL Program Generator Program <ul><li>Representation </li></ul><ul><li>Domain-specific information </li></ul><ul><li>Domain-specific abstractions </li></ul><ul><li>Exploitation </li></ul><ul><li>Factorize / re-use </li></ul><ul><li>Code/expertise/verification/treatment </li></ul>Encoding of expertise Generative Programming
  8. 8. From Program Family to Generative Programming: Declarations / AOP Declarations Generator Program <ul><li>DS info: declarations </li></ul><ul><ul><li>BT declarations </li></ul></ul><ul><ul><li>AOP (call pattern/history) </li></ul></ul>Program Processor <ul><li>Exploitation </li></ul><ul><ul><li>Verification </li></ul></ul><ul><ul><li>Optimization </li></ul></ul><ul><ul><li>Code generation </li></ul></ul>
  9. 9. From Program Family to Generative Programming: Annotations Annotations Generator Program <ul><li>DS info: annotations </li></ul><ul><ul><li>Assertions </li></ul></ul><ul><ul><li>Hints </li></ul></ul>Program Processor <ul><li>Exploitation </li></ul><ul><ul><li>Verification </li></ul></ul><ul><ul><li>Optimization </li></ul></ul><ul><ul><li>Code generation </li></ul></ul>
  10. 10. From Program Family to Generative Programming: Meta-Programming Transformer Generator Program <ul><li>DS info: transformer </li></ul><ul><ul><li>Extensions </li></ul></ul>Program <ul><li>Exploitation </li></ul><ul><ul><li>Verification </li></ul></ul><ul><ul><li>Optimization </li></ul></ul><ul><ul><li>Code generation </li></ul></ul>
  11. 11. From Program Family to Generative Programming DSL Program Generator Program <ul><li>Domain-specific information </li></ul><ul><li>Domain-specific abstractions </li></ul><ul><li>( Re-)use of GP tools </li></ul><ul><ul><li>Semantic independent </li></ul></ul><ul><ul><li>Restricted </li></ul></ul><ul><ul><li>Reliable </li></ul></ul><ul><ul><li>Predictable </li></ul></ul><ul><ul><li>Technology independent </li></ul></ul><ul><li>Traded for reduced flexibility </li></ul>Declarations Annotations Transformer Complementary
  12. 12. Disclaimers <ul><li>Not the panacea: need for a program family </li></ul><ul><li>Not fixed : need to evolve with the program family </li></ul><ul><li>Not GPL expressivity: </li></ul><ul><ul><li>Not embedded language: embedding rich run-time environment </li></ul></ul>
  13. 13. Conventional vs. Unconventional <ul><li>Unconventional today  conventional tomorrow </li></ul><ul><li>Unconventional today  gone tomorrow </li></ul><ul><li>Examples: </li></ul><ul><ul><li>Garbage collection </li></ul></ul><ul><ul><li>Objects </li></ul></ul><ul><li>Counter-examples </li></ul><ul><ul><li>Parallelizing compilers </li></ul></ul><ul><ul><li>Language-based machine architectures </li></ul></ul>

×