![Page 1: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/1.jpg)
Invasive Software Composition
Uwe AßmannResearch Center for Integrational Software Engineering (RISE)
PELAB IDA
Linköpings Universitet
Invited Talk at British Computer Society (BCS)April 9, 2003, London
![Page 2: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/2.jpg)
2
Contents
A little history of software composition Comparison criteria for composition
How it is realized for Invasive Software Composition Future software composition systems
![Page 3: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/3.jpg)
3
Software Composition
Component Model Composition Technique
Composition Language
![Page 4: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/4.jpg)
4
Historical Approaches to Components
![Page 5: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/5.jpg)
5
Compositionrecipe
Connectors
Components
Component-basedapplications
Blackbox Composition
![Page 6: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/6.jpg)
Classical Component Systems
Architecture Systems
Aspect Systems View Systems
DarwinACME
Aspect/J Invasive CompositionMetaclass Composition
Piccola
Standard Components
Architecture as Aspect
Aspect SeparationCompositionOperators
CompositionLanguage
Object-Oriented Systems C++ JavaObjects asRun-Time Components
Modular Systems Modula Ada-85Modules as Compile-Time Components
Composition FiltersHyperslices
SoftwareComposition Systems
.NET CORBABeans EJB
![Page 7: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/7.jpg)
7
Component
ConnectorComponent
Port
Interface
Role
Most Advanced:Software Architecture Systems
![Page 8: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/8.jpg)
8
Reuse of components and architectures is fundamentally improved
Architecture can be exchangedindependently of components
Port 2
Port 1
PortPort Component
Component
Component
![Page 9: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/9.jpg)
9
Architecture Systems
ACME (Garlan, CMU) Darwin (Kramer, Magee, Imperial College) Unicon (Shaw, CMU) CoSy (ACE b.V., Amsterdam, commercialized for compilers of
embedded systems, http://www.ace.nl)
![Page 10: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/10.jpg)
10
Architecture Systems as CompositionSystems
Component Model Composition Technique
Composition Language
Source or binary components
Binding points: ports
Adaptation and glue code by connectors
Scaling by exchange of connectors
Architectural language
![Page 11: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/11.jpg)
Classical Component Systems
Architecture Systems
Aspect Systems View Systems
DarwinACME
Aspect/J Invasive CompositionMetaclass Composition
Piccola
Standard Components
Architecture as Aspect
Aspect SeparationCompositionOperators
CompositionLanguage
Object-Oriented Systems C++ JavaObjects asRun-Time Components
Modular Systems Modula Ada-85Modules as Compile-Time Components
Composition FiltersHyperslices
SoftwareComposition Systems
.NET CORBABeans EJB
![Page 12: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/12.jpg)
12
Graybox Component Models
![Page 13: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/13.jpg)
13
The Essence of the Last 5 Years
Aspect-oriented Programming View-based Programming
Component Integration
![Page 14: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/14.jpg)
StructureInterfaces
Light Plan Pipe Plan
Integrated House
![Page 15: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/15.jpg)
Debugging aspect
PersistenceaspectAlgorithm
Debugging aspect
Persistence aspect
PersistenceaspectDebugging aspect
Weaver-Tool
Debugging aspect
![Page 16: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/16.jpg)
16
Aspect Systems
Aspect languages Every aspect in a separate language Domain specific Weaver must be build (is a compiler, much effort)
Script based Weavers The weaver interprets a specific script or aspect program This introduces the aspect into the core
![Page 17: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/17.jpg)
17
Example: Inject/J injectj.fzi.de
Script based weaver (T. Genssler) More powerful composition language than Aspect/J
Based on explicit static metaprogramming Navigations on classes and methods of the core Pattern matching Weaving in code at arbitrary places
Builds on Java RECODER http://recoder.sf.net Useful for
Automated refactorings Compositions Generative Programming
![Page 18: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/18.jpg)
18
Inject/J
script BeforeAfterExample { // Only visit classes in package Testpackage foreach class 'Testpackage.*' <=c> do { // In this class, visit all methods with no parameters foreach method '*()' <=m> do { // Now insert in some debug code in the method body... before ${ System.out.println("Entering <m.signature> in class <c.name>"); }$; after ${ System.out.println("Leaving .."); }$; } }}
![Page 19: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/19.jpg)
19
Aspect Systems As CompositionSystems
Component Model Composition Technique
Composition Language
Core- and aspect components
Aspects are relative andcrosscutting
Bindung points: join pointsAdaptation and glue code by weaving
Weaving Language
![Page 20: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/20.jpg)
20
Invasive Software Composition - A Fragment-Based CompositionTechnique
![Page 21: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/21.jpg)
21
Invasive Composition
Component Model Composition Technique
Composition Language
Fragment Components TransformationOf Hooks
Standard Language
![Page 22: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/22.jpg)
22
Invasive Composition
Invasive composition adapts and extends
componentsat hooks
by transformation
![Page 23: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/23.jpg)
23
The Component Model of InvasiveComposition
The component is a fragment container (fragment box) a set of fragments/tag elements
Uniform representation of a software component a class, a package, a method an aspect a meta description a composition program
![Page 24: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/24.jpg)
24
Software variation points Method entries/exits Generic parameters
Fragment Components Have Hooks
Hooks are variation points of a component:fragments or positions,
which are subject to change
![Page 25: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/25.jpg)
25
Implicit Hooks In Software
Example Method Entry/Exit
m (){
abc.. cde..
}
Method.entry
Method.exit
Given by the programming language
![Page 26: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/26.jpg)
26
Declared Hooks
Declarations
Declared Hooks are declared by the box writer asvariables in the hook’s tags.
![Page 27: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/27.jpg)
27
XSuperClass
<superclasshook> X </superclasshook>
class Set extends genericXSuperClass { }
class Set /* @superClass */
Declaration of Hooks
Language extensions with new keywords Markup Tags Standardized Names (Hungarian Notation) Comment Tags
![Page 28: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/28.jpg)
28
Generic Modifiers
/* @hook Modifier MY */ public print() { System.out.println(“Hello World”);}
Component methodComponent = cs.createMethodBox(); Hook modif = methodComponent.findHook(“MY”);if (parallelVersion) { modif.bind(“synchronized”);} else { modif.bind(“ ”);
Component methodComponent = cs.createMethodBox(); Hook modif = methodComponent.findHook(“MY”);if (parallelVersion) { modif.bind(“synchronized”);} else { modif.bind(“ ”);
synchronized public print () { System.out.println(“Hello
World”);}
public print () { System.out.println(“Hello
World”);}
![Page 29: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/29.jpg)
29
Generic Statements
public print() { @hook Statement MY;}
Component methodComponent = cs.createMethodBox(); Hook statement = methodComponent.findHook(“MY”);if (StdoutVersion) { statement.bind(“System.out.println(“Hello World”);”);} else { statement.bind(“FileWriter.println(“no way”);”);
Component methodComponent = cs.createMethodBox(); Hook statement = methodComponent.findHook(“MY”);if (StdoutVersion) { statement.bind(“System.out.println(“Hello World”);”);} else { statement.bind(“FileWriter.println(“no way”);”);
synchronized public print () { System.out.println(“Hello
World”);}
public print () { FileWriter.println(“no way”);}
![Page 30: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/30.jpg)
30
When Do you Need InvasiveComposition
When static relations have to be adapted inheritance relationship import relationship
Delegation pointers have to be inserted
![Page 31: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/31.jpg)
31
The Composition Technique ofInvasive Composition
A composer transforms unbound to bound hooks
composer: box with hooks --> box with tags
Invasive Composition adapts and extends
componentsat hooks
by transformation
![Page 32: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/32.jpg)
32
Composer
Invasively transformed code
The Composition Technique ofInvasive Composition
StaticMetaprogram
TransformerGenerator
Uniform fordeclared andimplicit hooks
![Page 33: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/33.jpg)
MethodEntry MethodEntry
MethodExitMethodExit
m (){
abc.. cde..
}
m (){ print(“enter m”); abc.. cde.. print(“exit m”);}
component.findHook(„MethodEntry“).extend(“print(\”enter m\”);”);
component.findHook(„MethodExit“).extend(“print(\”exit m\”);”);
![Page 34: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/34.jpg)
34
On the Difference of Declaredand Implicit Hooks
/* @genericMYModifier */ public print() { <<prologue>> if (1 == 2) System.out.println(“Hello World”); <<epilogue>> return; else System.out.println(“Bye World”); <<epilogue>> return;}
if (parallel) Hook h = methodComponent.findHook(“MY”);if (h instanceof MethodExit) h.bind(“synchronized”);elsemethodComponent.findHook(“MY”).bind(“ ”);
synchronized public print () {}
![Page 35: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/35.jpg)
35
The Composition Language ofInvasive Composition
For combination of the basic composition operations Composition programs result Using standard languages
XML itself Java
Enables us to describe large systems
Composition program size 1System size 10
![Page 36: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/36.jpg)
36
What Can You Do With Invasive Composition?
![Page 37: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/37.jpg)
37
Atomic and CompoundComposition Operators
bind hook (parameterization)■ generalized generic program
elements rename component, rename
hook remove value from hook
(unbind) extend
extend in different semanticversions
Inheritance view-based programming intrusive data functors
connect (bind hook 1 and 2) distribute
■ aspect weaving
Basic Composition Algebra
![Page 38: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/38.jpg)
38
Composers Generalize Connectors(ADL Component Model)
boxes + composers + declared hooks
boxes + connectors + ports
![Page 39: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/39.jpg)
39
Can be declared by calls to standard methods (as in Linda)
Hooks for Communications (Ports)
m (){
out(d); in(e);
}
Output port
Input port
m (){ // call e = p(d);}
m (){ // event communication notifyObservers(d); e = listen_to();}
![Page 40: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/40.jpg)
40
Client Library
Client Library
Black boxconnectionwith glue code
Client Library
Invasiveconnection
Black box composition
Invasivecomposition
Subsystem
[TOOLS 2000]
![Page 41: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/41.jpg)
41
Composers Can Be Used ForSkeletons (Coordinator)
coordinator
Instead of functions ormodules, skeletons can bedefined over fragmentcomponents
CoSy coordination schemes(ACE compiler componentframework www.ace.nl)
Compose basic componentswith coordinating operators
![Page 42: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/42.jpg)
42
Composers Generalize InheritanceOperators (Classes as Components)
boxes + composers + declared hooks
boxes + mixin + feature lists
![Page 43: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/43.jpg)
43
inherit
■ Extension can be usedfor inheritance (mixins)
■ inheritance :=■ copy first super
document■ extend with second
super document
Composers Can Be Used ForInheritance
![Page 44: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/44.jpg)
44
Sound Extensions (Views That Do NotDestroy Contracts)
Invasive Composition works ifdependencies are
Absent Forward flow
Core components don'tchange
Can be checked with slicingor analysis, or regressiontesting
![Page 45: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/45.jpg)
45
Composers can be Used for AOP(Core and Aspect Components)
Distributor
Complex composersdistribute aspect fragmentsover core fragments
Distributors extend the core Distributors are more
complex operators, definedfrom basic ones
Aspect
Core
![Page 46: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/46.jpg)
46
Debugging aspectDebugging aspect
PersistencyPersistencyAlgorithmAlgorithm
PersistencyDebugging
OpOp
Debugging
OpOp
OpOp
OpOp
OpOp
OpOp
Persistency
Distributor
Weavers As Distributors
![Page 47: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/47.jpg)
47
Invasively transformed tags
Sound Aspects (Aspects That Do NotDestroy Contracts)
Invasive Aspect Weavingworks if dependencies are
Absent Forward flow
Core components don'tchange
Can be checked with slicingor analysis, or regressiontesting
Invasively transformed tags
![Page 48: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/48.jpg)
48
Simple Weavers
distributeOverMethods Weave a prologue and an epilogue into a class or package tree implemented as a navigator over the tree applies simple hook extensions on entry and exit hook
Hungarian aspect boxes Carry an aspect with Hungarian notation Weavers weave with naming conventions
![Page 49: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/49.jpg)
49
A Simple Weaver
// Initialize composition systemJavaCompositionSystem cs = new JavaCompositionSystem(outputPath);
// Loading components.
// The core componentCompilationUnitBox cuToBeExtended = cs.createCompilationUnitBox("DemoClass");// The aspectClassBox aspectClass = cs.createClassBox("BeforeAfterAspect.java");
// Now distribute the aspect over the corecuToBeExtended.distributeMethods(aspectClass);
// Exportcs.printAll();
![Page 50: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/50.jpg)
50
Weaving with Modular Join PointAdressing
M. Karlsson's masters thesisJoinPoint Adressing
Expression
JoinPoint AdressingExpression
AspectAspectAlgorithmAlgorithm
Aspect
OpOp
OpOp
OpOp
OpOp
OpOp
OpOp
Aspect
Distributor
![Page 51: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/51.jpg)
51
The COMPOsition SysTemCOMPOST
COMPOST is the first system to support invasive compositionfor Java
Library of static meta-programs Composition language Java Reifies concepts Boxes, Hooks, Composers
and many other things
![Page 52: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/52.jpg)
52
COMPOST for Everybody
0.78 is out (Uni Karlsruhe/Uni Linköping) http://www.the-compost-system.org We expect a new major version in April 2004
Contains refactoring engine RECODER as transformationsubsystem
http://recoder.sf.net Invasive Software Composition, U. Aßmann, Springer. Developed within the EASYCOMP project
EU FET Basic Research “Easy Composition in Future GenerationComponent Systems”
New component models for XML, COTS, runtime components(Uniform composition)
We are refactoring towards a uniform XML version
![Page 53: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/53.jpg)
53
Invasive Software Compositionas Composition Technique
![Page 54: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/54.jpg)
54
Invasive Composition:Component Model
Graybox components instead of black box ones Composition interfaces with declared hooks Implicit composition interfaces with implicit hooks The composition programs produce the functional interfaces
Resulting in efficient systems, because superfluous functionalinterfaces are removed from the system
Content: source code binary components also possible, poorer metamodel
Aspects are just a new type of component Fragment-based Parameterisation a la BETA slots
Type-safe parameterization on all kinds of fragments
![Page 55: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/55.jpg)
55
Invasive Composition:Composition Technique
Adaptation and glue code: good, composers are programtransformers and generators
Aspect weaving Parties may write their own weavers No special languages
Extensions: Hooks can be extended Soundness criteria of lambdaN still apply Metamodelling employed
Not yet scalable to run time
![Page 56: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/56.jpg)
56
Composition Language
Various languages can be used Product quality improved by metamodel-based typing of
compositions Metacomposition possible
Architectures can be described in a standard object-orientedlanguage and reused
An assembler for composition Other, more adequate composition languages can be compiled
![Page 57: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/57.jpg)
57
Invasive Composition asComposition System
Component model Composition technique
Composition language
Source or binary components
Greybox components
Composition interfaces with declared an implicit hooks
Algebra of composition operators
Uniform on declared and implicit hooks
Standard Language
![Page 58: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/58.jpg)
58
Unification of DevelopmentTechniques
With the uniform treatment of declared and implicit hooks,several technologies can be unified:
Generic programming Inheritance-based programming Connector-based programming View-based programming Aspect-based programming
![Page 59: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/59.jpg)
59
Conclusions for ISC
Fragment-based composition technology Graybox components Producing tightly integrated systems
Components have composition interface From the composition interface, the functional interface is derived Composition interface is different from functional interface Overlaying of classes (role model composition)
![Page 60: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/60.jpg)
60
Different Forms of Greyboxes
![Page 61: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/61.jpg)
61
RefactoringsTransformations
Refactoring as WhiteboxOperation
Refactoring works directly on the AST/ASG Attaching/removing/replacing fragments Whitebox reuse
![Page 62: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/62.jpg)
62
Compositionwith implicithooks
RefactoringsTransformations
Weaving as Light-Grey Operation
Aspect weaving and view composition works on implicit hooks (join points)
Implicit composition interface
![Page 63: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/63.jpg)
63
RefactoringsTransformations
Parameterization as Darker-GreyOperation
Templates work on declared hooks Declared composition interface
Compositionwith declaredhooks
![Page 64: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/64.jpg)
64
Compositionwith declaredhooks
Compositionwith implicithooks
RefactoringsTransformations
Systematization Towards GreyboxComponent Models
![Page 65: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/65.jpg)
65
RefactoringRefactoring
Refactoring Builds On TransformationOf Abstract Syntax
![Page 66: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/66.jpg)
66
ComposerComposer
Invasively transformed codeInvasively transformed code
Invasive Composition Builds OnTransformation Of Implicit Hooks
![Page 67: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/67.jpg)
67
ComposerComposer
Invasively transformed codeInvasively transformed code
Invasive Composition Builds OnTransformation on Declared Hooks
![Page 68: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/68.jpg)
68
Future Composition Systems
![Page 69: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/69.jpg)
69
What Is A Component?
Cannot be stated in general Component models must be defined
We must investigate composition techniques And languages
Domain-specific ones (composition-oriented compositionlanguages)
General ones We should build frameworks for all component models
Generic component models Generic composition technique Scalability!
![Page 70: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/70.jpg)
70
Types of Composition Systems
Software Composition Systems Blackbox Composition Systems Graybox Composition Systems (Integrational Systems) Turing-complete composition languages [Invasive Software Composition, Aßmann, Springer 2003]
Uniform Composition Systems Supporting multiple languages Supporting XML Active documents Uniform treatment of software and data Based on software composition systems
![Page 71: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/71.jpg)
71
Compositionrecipe
Invasive composition
operations
ComponentsSoftware
composition
Uniformcomposition
Integrated system
Integrational Software Engineering
![Page 72: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/72.jpg)
Classical Component Systems
Architecture Systems
Aspect Systems View Systems
DarwinACME
Aspect/J Invasive CompositionMetaclass Composition
Piccola
Standard Components
Architecture as Aspect
Aspect SeparationCompositionOperators
CompositionLanguage
Object-Oriented Systems C++ JavaObjects asRun-Time Components
Modular Systems Modula Ada-85Modules as Compile-Time Components
Composition FiltersHyperslices
SoftwareComposition Systems
.NET CORBABeans EJB
Integrational SystemsUniform on XML
CompositionLanguage
Many integration techiques
![Page 73: Invasive Software Composition - TU Dresdenua1/Talks/2004/... · Invasive Software Composition Uwe Aßmann Research Center for Integrational Software Engineering (RISE) ... C++ Java](https://reader034.vdocuments.site/reader034/viewer/2022042212/5eb54c2a26cfaa487f23862f/html5/thumbnails/73.jpg)
73
The End
http://www.easycomp.org http://www.the-compost-system.org http://recoder.sf.net http://injectj.fzi.de
Invasive Software Composition, U. Aßmann, Springer.