33
Reuse Technologies & Niches Ted J. Biggerstaff Ted J. Biggerstaff

Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Embed Size (px)

DESCRIPTION

Reuse Technologies n Concrete components F e.g., Functions, OOP, Frameworks, DCOM, …

Citation preview

Page 1: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Reuse Technologies & Niches

Ted J. BiggerstaffTed J. Biggerstaff

Page 2: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

The scaling plane

Vertical(Programming

leverage)

Horizontal (Optimality of fit)

Feature variabilityOne-sizefits all

Customized

Small, lowpayoff

Large, highpayoff

Reu

se P

ayof

f

Page 3: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Reuse Technologies Concrete componentsConcrete components

e.g., Functions, OOP, Frameworks, DCOM, …e.g., Functions, OOP, Frameworks, DCOM, …

Page 4: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Concrete Components Small components don’t work wellSmall components don’t work well

Assembly work per unit payoff is lowAssembly work per unit payoff is low Small components specialized niches OKSmall components specialized niches OK

Overhead masked by human response (e.g., UI)Overhead masked by human response (e.g., UI) Standards or domain narrowness mitigateStandards or domain narrowness mitigate

Big components work wellBig components work well Programs or subsystemsPrograms or subsystems High programming leverageHigh programming leverage Payoff dominates overhead costsPayoff dominates overhead costs

Page 5: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Example: UI Controls

Page 6: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Niches in the scaling plane

Vertical(Programming

leverage)

Horizontal (Optimality of fit)

SubsystemLevel

Components

ConventionalComponents

Page 7: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Essence of The Technology

ClassClass ElementsElements OperationsOperationsConcrete Reuse PL Struct. Concrete Reuse PL Struct. Hand Assem.Hand Assem.

Page 8: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Reuse Technologies Concrete componentsConcrete components

e.g., Functions, OOP, Frameworks, DCOM, …e.g., Functions, OOP, Frameworks, DCOM, … Compositionally Derived Components Compositionally Derived Components

e.g., Templates, GenVoca, …e.g., Templates, GenVoca, …

Page 9: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

GenVoca derives a container

deque_usm = deq_sync [ deque2c [ dlist [ avail [ heap [ transient ]]]]];

ContainerClass

ElementClass

dlist

heap

deq-sync

deque2c

avail

transient

Refinements

List elements from heap

Deque

Synchronized deque

Container

Doubly linked list

Managed linked list

Transient elements

TypeEquation

Page 10: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Compositional Derivation Example domain: Data structuresExample domain: Data structures Benefits:Benefits:

Improve reuse by raising level of abstractionImprove reuse by raising level of abstraction Combinatorial amplification of library (horz.)Combinatorial amplification of library (horz.) Generation is fastGeneration is fast

Shortcomings:Shortcomings: Level of abstraction still lowLevel of abstraction still low Large grain components mitigate horz. scalingLarge grain components mitigate horz. scaling Dependencies limit extensibilityDependencies limit extensibility Inter-component optimization difficultInter-component optimization difficult

Page 11: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Essence of The Technology

ClassClass ElementsElements OperationsOperationsConcrete Reuse PL Struct. Concrete Reuse PL Struct. Hand Assem.Hand Assem.CompositionComposition Abstract PL Abstract PL InliningInlining

Page 12: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Niches in the scaling plane

Vertical(Programming

leverage)

Horizontal (Optimality of fit)

SubsystemLevel

Components

DerivedComponents

ConventionalComponents

Page 13: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Reuse Technologies Concrete componentsConcrete components

e.g., Functions, OOP, Frameworks, DCOM, …e.g., Functions, OOP, Frameworks, DCOM, … Compositionally Derived Components Compositionally Derived Components

e.g., Templates, GenVoca, …e.g., Templates, GenVoca, … Pattern-directed transformation systemsPattern-directed transformation systems

e.g., Draco, CAPE, IP, DMS, ...e.g., Draco, CAPE, IP, DMS, ...

Page 14: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Draco Domains

Abstractions:

Keys,Relations,Attributes, …Operations:

Search, Delete,Add, Update,

Attach,Detach, ...

Abstractions:Cursor, Container,

Keys,Relations,Attributes, …Operations:

Search, Delete,Add, Update,

Attach,Detach, ...

Data Base

RelationalAlgebra

Abstract DataTypes

C Code

Tuple Index

Page 15: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Refinements

Data Base

Relational

Algebra

Abstract Data

TypesC Code

Tuple Index

Component: Insert(Value V, Container C){Refinement: Stack Condition: LIFO(C) Code: {Push(V,C)}}{Refinement: Sorted Container Condition: SortedOn(C, Value) Assertion: SortedOn(C, Value) Code: {Merge(V,C)}}

...}

Page 16: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Domain to self:Join(?Relation1, Empty_Relation, ?Attribute)=>Empty_RelationSelect(?Relation1,TRUE_expression)=>Relation1Select(?Relation1,FALSE_expression)=> Empty_Relation

Data Base

Relational

Algebra

Abstract Data

TypesC Code

Tuple Index

Optimizing Transforms

Page 17: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Pattern-Directed Transformations Example domain: communications protocols Example domain: communications protocols Benefits:Benefits:

Fine grain rules allow great horizontal scalingFine grain rules allow great horizontal scaling Mapping between language objectsMapping between language objects Powerful in-domain optimizationsPowerful in-domain optimizations

Shortcomings:Shortcomings: Cross domain optimizations (interweavings) can Cross domain optimizations (interweavings) can

explode search spaceexplode search space

Page 18: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Essence of The Technology

ClassClass ElementsElements OperationsOperationsConcrete Reuse PL Struct. Concrete Reuse PL Struct. Hand Assem.Hand Assem.CompositionComposition Abstract PL Abstract PL InliningInliningPD GeneratorPD Generator DSL Struct. DSL Struct. PD XformsPD Xforms

Page 19: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Niches in the scaling plane

Vertical(Programming

leverage)

Horizontal (Optimality of fit)

SubsystemLevel

Components

DerivedComponents

PatternDirected

ConventionalComponents

Page 20: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Reuse Technologies Concrete componentsConcrete components

e.g., Functions, OOP, Frameworks, DCOM, …e.g., Functions, OOP, Frameworks, DCOM, … Compositionally Derived Components Compositionally Derived Components

e.g., Templates, GenVoca, …e.g., Templates, GenVoca, … Pattern-directed transformation systemsPattern-directed transformation systems

e.g., Draco, CAPE, IP, DMS, ...e.g., Draco, CAPE, IP, DMS, ... Reorganizing generator systemsReorganizing generator systems

AO generator, AOP, ...AO generator, AOP, ...

Page 21: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Problem: Antagonistic Goals

High level operators and operands provide High level operators and operands provide programming leverage & variationsprogramming leverage & variations

E.g., (image E.g., (image neighborhood) convolution neighborhood) convolution But fracture and de-localize code piecesBut fracture and de-localize code pieces

b=((a b=((a s) s)22 + (a + (a s’) s’)22 ) )1/21/2

Needed optimizations: code sharing, re-org. & re-weavingNeeded optimizations: code sharing, re-org. & re-weaving Conventional Optimization approaches induce Conventional Optimization approaches induce

large search spaceslarge search spaces

Page 22: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

AOG Features Schema language foundationSchema language foundation Pattern-driven & tag-driven transformsPattern-driven & tag-driven transforms

Organized by inheritance type and by stageOrganized by inheritance type and by stage Tags capture non-pattern-driven knowledgeTags capture non-pattern-driven knowledge Tags act like AST-localized interrupts for performing Tags act like AST-localized interrupts for performing

optimizationsoptimizations

TD’s are large-grain programmatic transformsTD’s are large-grain programmatic transforms Specialists: Partial evaluator & inference engineSpecialists: Partial evaluator & inference engine No explicit loopsNo explicit loops PerformancePerformance with small search spaceswith small search spaces

Page 23: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Reorganizing Generators

Benefits:Benefits: Inter-component optimizations (reweavings)Inter-component optimizations (reweavings) Small search space = reasonably fastSmall search space = reasonably fast

Shortcomings:Shortcomings: Technology immatureTechnology immature Unclear how far it can be pushedUnclear how far it can be pushed

Page 24: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Essence of The Technology

ClassClass ElementsElements OperationsOperationsConcrete Reuse PL Struct. Concrete Reuse PL Struct. Hand Assem.Hand Assem.CompositionComposition Abstract PL Abstract PL InliningInliningPD GeneratorPD Generator DSL Struct. DSL Struct. PD XformsPD XformsReorg Generator Tagged DSLReorg Generator Tagged DSL PDX & PDX &

TDXTDX

Page 25: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Niches in the scaling plane

Vertical(Programming

leverage)

Horizontal (Optimality of fit)

PatternDirected

ReorganizingSubsystem

LevelComponents

DerivedComponents

ConventionalComponents

Page 26: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Reuse Technologies Concrete componentsConcrete components

e.g., Functions, OOP, Frameworks, DCOM, …e.g., Functions, OOP, Frameworks, DCOM, … Compositionally Derived Components Compositionally Derived Components

e.g., Templates, GenVoca, …e.g., Templates, GenVoca, … Pattern-directed transformation systemsPattern-directed transformation systems

e.g., Draco, CAPE, IP, DMS, ...e.g., Draco, CAPE, IP, DMS, ... Reorganizing generator systemsReorganizing generator systems

AO generator, AOP, ...AO generator, AOP, ...

Inference-driven generator systemsInference-driven generator systems Kids, Synapse, ...Kids, Synapse, ...

Page 27: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Inference-Based Generators

Paradigm: Schema + rules of inferenceParadigm: Schema + rules of inference Example: Divide-and-conquer schemaExample: Divide-and-conquer schema

Broad framework for solutionBroad framework for solution User specification: Formal specification User specification: Formal specification

(e.g., predicate calculus)(e.g., predicate calculus)

Page 28: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Inference-Based Generators Example: Kids generatorExample: Kids generator Benefits:Benefits:

Highest levels of horizontal scalingHighest levels of horizontal scaling Shortcomings:Shortcomings:

Formal specifications require ultra-stable Formal specifications require ultra-stable applicationapplication

Requires well-understood domain with deep theoryRequires well-understood domain with deep theory Immaturity and narrow => low vertical scaling Immaturity and narrow => low vertical scaling

Page 29: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Essence of The Technology

ClassClass ElementsElements OperationsOperationsConcrete Reuse PL Struct. Concrete Reuse PL Struct. Hand Assem.Hand Assem.CompositionComposition Abstract PL Abstract PL InliningInliningPD GeneratorPD Generator DSL Struct. DSL Struct. PD XformsPD XformsReorg Generator Tagged DSLReorg Generator Tagged DSL PDX & PDX &

TDXTDXInfer GeneratorInfer Generator DSL+Logic DSL+Logic InferenceInference

Page 30: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Niches in the scaling plane

Vertical(Programming

leverage)

Horizontal (Optimality of fit)

SubsystemLevel

Components

DerivedComponents

PatternDirected

Reorganizing

InferenceBasedConventional

Components

Page 31: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

Reuse Technologies Concrete componentsConcrete components

Limited islands of successful reuseLimited islands of successful reuse Compositionally Derived Components Compositionally Derived Components

More horizontal scaling but no inter-part reweavingMore horizontal scaling but no inter-part reweaving Pattern-directed transformation systemsPattern-directed transformation systems

Extends both but big search space for reweavingExtends both but big search space for reweaving Reorganizing generator systemsReorganizing generator systems

Reweavings gain horiz. scaling but immature Reweavings gain horiz. scaling but immature

Inference-driven generator systemsInference-driven generator systems Greatest horiz. scaling but formality limits useGreatest horiz. scaling but formality limits use

Page 32: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

References Biggerstaff, A Perspective of Generative Reuse, Biggerstaff, A Perspective of Generative Reuse,

Annals of Software EngAnnals of Software Eng., 1998., 1998 Biggerstaff, Fixing Some Transformation Biggerstaff, Fixing Some Transformation

Problems, Problems, Proc. Of Automated Software Engineering, 1999.

Batory et al, Scalable Software Libraries, Foundations of SE, 1993

Neighbors, Draco: A Method for Engineering Reusable Software Systems, in Software Reusability, 1989.

Page 33: Reuse Technologies & Niches Ted J. Biggerstaff. The scaling plane Vertical (Programming leverage) Horizontal (Optimality of fit) Feature variability One-size

The End