08448380779 Call Girls In Civil Lines Women Seeking Men
Smalltalk implementation of EXIL, a Component-based Programming Language
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. What we are doing? Component-based programming Scl Exil Summarize
W 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. What we are doing? Component-based programming Scl Exil Summarize
W 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. What we are doing? Component-based programming Scl Exil Summarize
I 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. What we are doing? Component-based programming Scl Exil Summarize
S 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. What we are doing? Component-based programming Scl Exil Summarize
S 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. What we are doing? Component-based programming Scl Exil Summarize
E 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. What we are doing? Component-based programming Scl Exil Summarize
E XIL - N EW F EATURES
to 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. What we are doing? Component-based programming Scl Exil Summarize
E 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. What we are doing? Component-based programming Scl Exil Summarize
E 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. What we are doing? Component-based programming Scl Exil Summarize
E 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. What we are doing? Component-based programming Scl Exil Summarize
E XIL - F UTURE WORK
Reflexivity level - goal = write model analysis and
transformations in E XIL
Architecture constrains
Visual development
13. What we are doing? Component-based programming Scl Exil Summarize
S UMMARIZE
E XIL
is a component-oriented language
which merges modeling and programming
and brings component-paradigm closer to the Smalltalk
users
14. What we are doing? Component-based programming Scl Exil Summarize
S UMMARIZE
E XIL
is a component-oriented language
which merges modeling and programming
and brings component-paradigm closer to the Smalltalk
users
Thank you