Product-Line Architectures
description
Transcript of Product-Line Architectures
![Page 1: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/1.jpg)
1
Product-Line Architectures
Don BatoryDepartment of Computer SciencesUniversity of Texas at Austin
![Page 2: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/2.jpg)
2
IntroductionIn 1500s, accepted “truth” that the
Earth was the center of the Universe
Geocentricity was obvious and largely accurate lunar eclipses positions of “fixed” stars but planetary motion caused problems...
![Page 3: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/3.jpg)
3
Retrograde Motions... complex models (spheres inside
spheres) ultimately failed to predict planetary positions accurately
![Page 4: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/4.jpg)
4
A Revolution In 1543, Copernicus proposed a radically
different explanation of our universe• heliocentricity elegantly explains retrogrades,
forms basis of today’s understanding of planetary systems
(Extreme) example of how science evolves
• negating commonly held “truths” yields models of the universe that not only are consistent with known facts, but are more powerful and lead to deeper understandings
• more common examples lead to incremental advances
![Page 5: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/5.jpg)
5
Universe of Software
class foo { int a; int b; …}
class bar { …}
...
Classes!
Today we elegantly express software as hierarchies of classes and webs of interconnected objects
Global varsand functions
int global;
int func( ) { ... }
void main( ) { global = func( ); …}
...
![Page 6: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/6.jpg)
6
Looking Ahead...What software design and
construction technologies lie in the future?
How will we understand software? What will be our “unit” of
encapsulation? How will we produce & specify
software?
try negating obvious “truths” and see if a consistent explanation of software remains
![Page 7: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/7.jpg)
7
Some Changeable “Truths”
Today
one-of-a-kind applications
design expressed in objects and classes
code our implementations
product-line architectures PLAsdesigns expressed in components
codeless programming(software plug-and-play)
Tomorrow
---------------refinements
![Page 8: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/8.jpg)
8
Product Line Architecturesblue-print for creating families of related
applications
acknowledges companies don’t build individual products, but rather product families
importance: amortize costs of software design and development over multiple products
• most innovative work on software design next 10 years
• motivation not new: McIlroy ‘69, Parnas “families” ‘76• now! Jacobsson and Griss variation points
![Page 9: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/9.jpg)
9
From Components to Refinements
Newest OO methodologies not based purely on objects/classes but on components
components are encapsulated suites of classes; scaling unit of design to packages/frameworks
ex: Catalysis, Rational advocating “component-based software designs”
OO, COM, Corba, Java Beans...
![Page 10: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/10.jpg)
10
Perspective I’ve been working on component-based
PLA design methodologies for 15 years• encountered domains where components cannot
be implemented as OO packages, COM, Corba, …• because performance would be horrendous
Doesn’t mean that components can’t exist for these domains
• rather, components must be implemented differently
• ex: metaprograms, rule sets of program transformation systems
![Page 11: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/11.jpg)
11
Generalization...Today’s notion of components is too
implementation oriented or implementation-specific
Key idea: separate component abstraction from its implementation
• OO, COM, …, metaprograms, program transformation systems are implementation technologies
Abstraction that unifies the spectrum of component implementations is:Refinement
![Page 12: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/12.jpg)
12
What are Refinements? Changes to an application (when adding
a feature) are not localized
Refinements are central to a general theory of Product-Line Architectures
• abstracts away “component” implementation details yielding common set of abstractions for all domains/PLAs
application
![Page 13: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/13.jpg)
13
Benefit of Refinements... Significant conceptual economy
one way in which to conceptualize PLAs
many ways in which refinements can be implemented
– choice is often domain-specific
conceptualbuilding-blocks
of PLAs
![Page 14: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/14.jpg)
14
Towards Software Plug-and-Play...Programming with today’s
components is analogous to (old-fashioned) wire-wrapping hardware chips
traditional library paradigm
very successful, largely manual process
![Page 15: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/15.jpg)
15
Plug-and-Play Software construction allows for much
greater degrees of automation
• want “intelligent” components to know how to “wire-wrap” themselves
• don’t manually specify myriad connections
Hardware Plug-and-Play
• standardized (hardware) interfaces• novices can do tasks of high-paid experts
![Page 16: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/16.jpg)
16
Software Plug-and-Play Do the same for software
• standardized (software) interfaces• applications of PLA are specified/assembled as
compositions of components
• enable “average” programmers the ability to code like experts
Application#4 =
![Page 17: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/17.jpg)
17
Motivations ...Need for:
Product-Line Architectures Refinements Software Plug-and-Play
are clear...
![Page 18: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/18.jpg)
18
Many Relevant Results... extensible systems, open systems
domain-specific software architectures
aspect-oriented programming
subject-oriented programming
feature-oriented programming
generative programming
Note: approaches are NOT identical, essential problems they solve are similar
![Page 19: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/19.jpg)
19
Common to Models of PLAsdefine set of features that arise in a
family of applications
each feature has 1+ implementations
an application specified by its set of features w. implementations
![Page 20: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/20.jpg)
20
Classic Example of PLA
Booch Components 400+ data structure templates 18 varieties of dequeues = 3 x 3 x 2
Feature Implementation
concurrency (sequential, guarded, synchronized)
memory allocation (bounded, unbounded, dynamic)
ordering (unordered, ordered)
(and how not to implement PLAs)
![Page 21: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/21.jpg)
21
Oops... Problems...What happens when new feature
added? ex: persistence
No conventional library could encompass enormous spectrum of data structures (or PLAs) that are encountered in practice
Library doubles in size!
![Page 22: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/22.jpg)
22
Library Scalability Problem
n features ® product line of 2n applications
n features with m implementations ®
(1+m)n applications
Libraries of PLAs shouldn’t contain components that implement combinations of features
![Page 23: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/23.jpg)
23
How to Implement PLAsLibraries should contain components
that implement individual, largely orthogonal features
component libraries are small O(n*m)
exponential numbers O((1+m)n) applications constructed from component compositions
ex: Singhal’s Components
![Page 24: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/24.jpg)
24
Singhal Components Reengineered Booch Components V1.47
Singhal Components• 1/4 size, larger product line• more efficient• easy to extend
Booch Singhal# of Components 82 22Lines of Code 11,067 2,760Domain Cardinality 169 208
![Page 25: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/25.jpg)
25
P3 Generator Generator of Java Container structures
• 9 primitive data structures that can be composed
• ex: can generate a data structure where – elements stored in ascending order on field A,
and– hash-accessable on field B, and– key-accessable via red-black tree on field C…
• P3 equivalent to product-line or library of tens of thousands of containers
• generated software typically has faster execution times– optimize where static libraries cannot
![Page 26: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/26.jpg)
26
What About Other Domains?Lots of success stories
mostly independent
common set of ideas that are being reinvented
spend a few minutes explaining them...
Database Systems ProtocolsCompilers Radio SoftwareAvionics Audio Signal Processing
+ others
![Page 27: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/27.jpg)
27
GenVocaSimple, powerful, and abstract model
of PLAs• name derived from first PLAs based on this
approach “Genesis” and “Avoca”
Takes idea of components that export and import “standardized” interfaces to its logical conclusion
![Page 28: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/28.jpg)
28
GenVocaDomain of applications = Product
Line
has fundamental abstractions
define “standardized” interfaces (virtual machines) to abstractions
• may have multiple, interrelated classes• “virtual” because clients of interface don’t know
how interface is implemented
![Page 29: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/29.jpg)
29
RealmsSet of components that implement
the same virtual machine is realm• is library of plug-compatible, interchangeable
components
• lots of parameters - look only at realm parameters
S = { y, z, w }
R = { g[ x:S ], h[ x:S ], i[ x:S ] }
![Page 30: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/30.jpg)
30
ParametersConsider g[x:S] : R
parameters define imported interfaces
g defines a refinement of R into S• refinement doesn’t depend on specific
implementation of S
interface R
interface Sg
![Page 31: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/31.jpg)
31
Type EquationsApplication is a named composition
of components called a type equationS = { y, z, w }R = { g[ x:S ], h[ x:S ], i[ x:S ] }
A1 = g[ y ];A2 = g[ w ];A3 = h[ w ];
![Page 32: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/32.jpg)
32
Grammars and Product LinesRealms define grammars whose sentences
are applications
Set of all sentences = product line
S = { y, z, w }R = { g[ x:S ], h[ x:S ], i[ x:S ] }
S := y | z | wR := g S | h S | i S
![Page 33: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/33.jpg)
33
Recursion and Symmetry Symmetric components
export & import same interfacecomposable in virtually arbitrary ordersof realm W have parameters of type W
ex: m[n[p]], n[m[p]], m[m[p]] ...
W = { m[ x:W ], n[ x:W ], p }
W := m W | n W | p
![Page 34: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/34.jpg)
34
Why is Symmetry Important?Applications can have open-ended
sets of features
symmetric components are the way additional features are added to an application
not changing fundamental abstractions, only enriching them
![Page 35: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/35.jpg)
35
Design RulesAlthough equations may be type
correct, there are always combinations of components that don’t make sense
semantic correctness of compositions
domain-specific constraints called design rules that preclude illegal component compositions
![Page 36: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/36.jpg)
36
Product-Line (Domain) ModelIs an attribute grammar
realms of components define grammardesign rules are semantic constraints per rule
Generatorconfiguration-tool or compiler that implements
PL model
Type equation ApplicationGenerator
![Page 37: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/37.jpg)
37
Model Says Nothing About...When to compose refinements?
dynamic (run-time)static (compile-time)
How to implement refinements?Mixins, OO packages, COM, Corba, …metaprogramsprogram transformation systems
![Page 38: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/38.jpg)
38
Examples...
PLAs
OO…
MetaProgramming
Transformation Syst
Static
databasesavionicscompilers
data structures
protocols
Dynamic
protocols
audio signalprocessing
??
radio software
![Page 39: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/39.jpg)
39
What does this mean?
class foo { int a; int b; …}
class bar { …}
...
Classes!
Conceptualize software designs in layered/component-based refinements
Refinements!
TypeEquation
A1 = A[ B[ C ] ];
...
Designers who wanted to create product-line architectures by assembling customized applications via plug-and-play...
![Page 40: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/40.jpg)
40
What is Gained? PLAs of complexity and diversity that
can’t be built in any other way• handful of applications ® tens of thousands of
apps• performance of synthesized applications
comparable to (usually better than) expert-coded software
• improved productivity: x 4 or more• 8-fold reduction in errors reported
Possible to build tools that automatically optimize equations (software designs)
• so novices can design and code like experts
![Page 41: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/41.jpg)
41
But.... Problems and limitations with every
approach
lots of technical problems, no “show stoppers”
hardest problems are non-technical
• typical of technology transfer
![Page 42: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/42.jpg)
42
Non-Technical Problems Legacy code
• companies have legacy code that they want to reuse in product-line applications
• willing to accept penalty of hacking source code• reasonable for domains with little variation
Corporate politics• demonstrating PLA capabilities necessary but not
sufficient• egos, pre-existing methods, insecure funding …
can obscure technical goals• adoption decisions made for non-technical reasons;
results are often confused for technical reasons
![Page 43: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/43.jpg)
43
Non-Technical Problems... Think in terms of “layered” refinements
and/or standardized interfaces• greatest strength may be greatest weakness• architects may not be open to new approaches
Catch 22• “we won’t use it until they use it”
Terminology Arms Race• ex#1: “software architecture”• ex#2: Rational Software
![Page 44: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/44.jpg)
44
Non-Technical Problems... Not ready for prime time
“That’s not possible!”
“My software is too complicated to be built that way!”
![Page 45: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/45.jpg)
45
Technical ProblemsOpen problem: testing
can synthesize applications quicklystill have to test applicationsnot clear how to reduce tests to reduce
product release time
Incompatible World ViewsBoston Gas Station Storyex: how to express refinements in OO?
![Page 46: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/46.jpg)
46
OO Realizations of Refinements
A small-scale refinement adds new data members, methods, and/or overrides existing methods to a class
class
subclass
subclassing relationship
![Page 47: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/47.jpg)
47
Large Scale Refinement Adds new data members and methods
simultaneously to several classes
class class class
subclass subclass subclass
![Page 48: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/48.jpg)
48
Relationship to GenVoca GenVoca components are consistent
refinements of multiple classes
application classes
![Page 49: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/49.jpg)
49
Scalability
application classes
Jak = blue[ black[ orange[ yellow ]]];
corresponds to over 500 classes, 26K lines of code
![Page 50: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/50.jpg)
50
Technical ProblemsCan express these ideas as mixins
• I.e. a class whose superclass is specified by a parameter
Want clean implementation in Java• neither Java nor Pizza supports parameterized
inheritance• need extensible Java (to add features to implement
refinements)
Jakarta Tool Suite (JTS)• PLA for Java dialects• GenVoca “generator” by which domain-specific
dialects of Java are assembled from components
![Page 51: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/51.jpg)
51
JTS(optional) features added to Java
Lisp backquote/comma (to specify and manipulate code fragments)
hygienic macrosparameterized inheritanceP3 generator of container data structures…bootstrapped!
Free!Visit web site in paper...
![Page 52: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/52.jpg)
52
Concluding Remarks Heliocentricity was advanced in 1543,
yet 60 years later it made no impact
people didn’t care about retrograde motions
Jean Bodin “No one in his senses or imbued with the slightest knowledge of physics will ever think that the earth staggers up and down around its own center and that of the sun… For if the earth were to be moved, we would see cities, fortresses, mountains thrown down… Arrows shot straight up or stones dropped from towers would not fall perpendicularly, but either ahead or behind…”
![Page 53: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/53.jpg)
53
Concluding RemarksHow did heliocentricity take hold?
telescope invented in early 1600s• consistent with telescopic observations
provided simple explanation consistent with other disparate results• ex: earth tides
able to solve problems that were difficult or impossible otherwise
![Page 54: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/54.jpg)
54
Concluding RemarksThis presentation motivated
directions for future software development
product-line architecturesrefinements as generalizations of
componentscodeless programming of software plug-
and-play
GenVoca is one approach that has achieved all 3...
![Page 55: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/55.jpg)
55
Concluding RemarksWhen & how will “GenVoca” ideas take
hold?ideas constantly reinvented
– plug-compatible components isn’t rocket science;– refinements aren’t new
lots of experimental evidence of power & capabilities
– much more in the future
reducing software complexity– standardizing abstractions of a domain/PLA is a
powerful way of managing and controlling the complexity of software in a family of applications
![Page 56: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/56.jpg)
56
![Page 57: Product-Line Architectures](https://reader033.fdocuments.in/reader033/viewer/2022051219/5681642f550346895dd5f912/html5/thumbnails/57.jpg)
57
Timing 4:40 up to PLA 12:20 past how to achieve *14
min 20:20 up to GenVoca (20 min)
*22.5 min 29:30 up to interesting (10 min gen) 34:00 up to problems (17 finish)
*34 min
total: 47 min