What we are doing?    Component-based programming         Scl   Exil   Summarize           A Smalltalk implementation of E...
What we are doing?                                              Component-based programming                               ...
What we are doing?             Component-based programming                  Scl             Exil             SummarizeW HA...
What we are doing?                        Component-based programming                                       Scl           ...
What we are doing?         Component-based programming   Scl     Exil   SummarizeS CL - O VERVIEW 1              Scl - Sim...
What we are doing?          Component-based programming    Scl            Exil   SummarizeS CL - O VERVIEW 2              ...
What we are doing?         Component-based programming   Scl   Exil   SummarizeE XIL - O VERVIEW       Component = instanc...
What we are doing?         Component-based programming   Scl   Exil   SummarizeE XIL - N EW F EATURESto support modeling  ...
What we are doing?                                 Component-based programming                                            ...
What we are doing?        Component-based programming   Scl   Exil     SummarizeE XIL - I MPLEMENTATION              E XIL...
What we are doing?                      Component-based programming                                      Scl              ...
What we are doing?      Component-based programming   Scl   Exil   SummarizeE XIL - F UTURE WORK              Reflexivity l...
What we are doing?     Component-based programming   Scl   Exil       SummarizeS UMMARIZE      E XIL              is a com...
What we are doing?     Component-based programming   Scl   Exil       SummarizeS UMMARIZE      E XIL              is a com...
Upcoming SlideShare
Loading in …5
×

Smalltalk implementation of EXIL, a Component-based Programming Language

970 views

Published on

ESUG 2011, Edinburgh

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

  • Be the first to like this

No Downloads
Views
Total views
970
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Smalltalk implementation of EXIL, a Component-based Programming Language

  1. 1. What we are doing? Component-based programming Scl Exil Summarize A Smalltalk implementation of E XIL, a Component-based Programming Language ˇ c Petr Spaˇ ek in cooperation with Christophe Dony, Chouki Tibermacine and Luc Fabresse LIRMM, University of Montpellier 2 petr.spacek@lirmm.fr 23rd of August, 2011
  2. 2. What we are doing? Component-based programming Scl Exil SummarizeW HAT WE ARE DOING ? - M OTIVATION public class CParser implements IAST, BindingController { private ITokenStream scanner; ICompile Compiler Token currentToken; // Fractal BindingController implementation main cSRC : Source ICharacterStream cScanner : Scanner // configuration concern public String[] listFc () { return new String[] {"scanner"}; } source public Object lookupFc (String itfName) { in access & if (itfName.equals("scanner")) {return scanner;} ISourceManager else return null; tokens } public void bindFc(String itfName, Object itfValue) { if (itfName.equals("scanner") { scanner = (ITokenStream)itfValue; } ICodeGen ITokenScanner } public void unbindFc(String itfName){ if (itfName.equals("scanner") { scanner = null; } cVG : CodeGenerator } IAST cParser : Parser // functional concern main ast scanner public AST-Node getRoot { return expression(); } ast ....... } Combine a modeling (architecture description) language and a programming language
  3. 3. What we are doing? Component-based programming Scl Exil SummarizeW HAT WE ARE DOING ? - A PPROACH Our approach: components Applying component-paradigm into a programming language With such a language: design components - design for reuse design applications using components - design by reuse “A software component is a unit of composition with contractually specified interfaces and explicit context dependencies only. A software component can be deployed independently and is subject to composition by third parties” Szyperski C. Component software: beyond object-oriented programming. 2nd ed., Reading, MA: Addison-Wesley; 2002
  4. 4. What we are doing? Component-based programming Scl Exil SummarizeI N GENERAL service hello() service hello() { cHellloer sayHello. ExilHelloerApp } service print(string) service clear() helloer cPrinter : ExilTranscriptPrinter cHelloer : ExilHelloer helloer printer printer service print(s) { service sayHello() { Transcript show: s; cr. printer print: #(Hello World). } } service clear() { service sayHello() Transcript clear. } Explicit external contract with an environment requirements - what is demanded from the environment provisions - what is offered to the environment Explicit architecture
  5. 5. What we are doing? Component-based programming Scl Exil SummarizeS CL - O VERVIEW 1 Scl - Simple Component-oriented language Invented by Luc Fabresse (presented in ESUG’06) E XIL extends Scl towards to a modeling language !"#$%&$()*+!"#$+,"#$-)$$.)* %&"()*+$+/"#$012345$)60-)$$.7.*$(/8 *",-.*"/0)*1$+,!,9*:;)*8< 2*)3./"/0)*1$+=!,-)$$.)*0>,!,63?-)$$.+88@
  6. 6. What we are doing? Component-based programming Scl Exil SummarizeS CL - O VERVIEW 2 Component Black box Ports described by interfaces Provides and requires services Port Unidirectional interaction point Plug Service Functionality Like a method or a set of methods Interface Describes the valid uses of a port Service signatures sets, protocols, contracts, ...
  7. 7. What we are doing? Component-based programming Scl Exil SummarizeE XIL - O VERVIEW Component = instance of descriptor Reusable interfaces Ports described by list of services or by interfaces roles provided required Connection Internal components
  8. 8. What we are doing? Component-based programming Scl Exil SummarizeE XIL - N EW F EATURESto support modeling Explicit architecture extracting architecture from the code Inheritance sub-descriptors: a descriptor may extend an another descriptor extension and specialization of: Ports Services Internal components & Connections
  9. 9. What we are doing? Component-based programming Scl Exil SummarizeE XIL - I NHERITANCE problem with additional requirements & substitution Person IPerson IAccommodation def service1 def service2 person IStudent accommodation Brain heart->Heart IControll IPump controller student pump muscles IPerson IControll memory IMemory brain->Brain friend controller IControll memory IMemory memory IMemory Person IPerson IAccommodation def service1 def service2 person ICoffein IStudent accommodation OverclockedBrain heart->Heart IControll IPump cafe student pump muscles IPerson ICoffein IMemory brain->Brain friend controller IControll cafe memory memory IMemory
  10. 10. What we are doing? Component-based programming Scl Exil SummarizeE XIL - I MPLEMENTATION E XIL parser uses PetitParser framework and PetitSmalltalk parser Compiler - visitor pattern Core ExilComponent class ExilInterface class image can be downloaded here: http://www.lirmm.fr/˜spacek/exil (source codes - SqueakSource download is coming)
  11. 11. What we are doing? Component-based programming Scl Exil SummarizeE XIL - L IVE EXAMPLE service hello() service hello() { cHellloer sayHello. ExilHelloerApp } service print(string) service clear() helloer cPrinter : ExilTranscriptPrinter cHelloer : ExilHelloer helloer printer printer service print(s) { service sayHello() { Transcript show: s; cr. printer print: #(Hello World). } } service clear() { service sayHello() Transcript clear. }
  12. 12. What we are doing? Component-based programming Scl Exil SummarizeE XIL - F UTURE WORK Reflexivity level - goal = write model analysis and transformations in E XIL Architecture constrains Visual development
  13. 13. What we are doing? Component-based programming Scl Exil SummarizeS UMMARIZE E XIL is a component-oriented language which merges modeling and programming and brings component-paradigm closer to the Smalltalk users
  14. 14. What we are doing? Component-based programming Scl Exil SummarizeS UMMARIZE E XIL is a component-oriented language which merges modeling and programming and brings component-paradigm closer to the Smalltalk users Thank you

×