Upload
denis-charles
View
215
Download
2
Tags:
Embed Size (px)
Citation preview
Thesis statement
Building on basic primitives of classic category theory and human cognition—commonality and variation—multi-paradigm design provides a uniform and formal basis for the definition of common programming paradigms, and a common basis for analysis of the application and solution domains, and the translation between them.
Thesis Claims
Abstraction and Intentionality: First Principles of Abstraction
Meta-Design: Paradigm selection as a design activity A formal, domain-based model for paradigm
Commonality Categories Application Domain and Solution Domain Analyses
Multiple paradigms within a domain Dependencies between domains: Limits to
Modularity Theory of Negative Variability: Generalizing
cancellation Regularization of Ad-Hoc Design Patterns
The Purpose of Design
To solve a problem Design for change and all else follows
Partitioning the Work Domains that follow business structure
Shaping modular structure Choose a paradigm according to a basis
Attentiveness to Aesthetics Solution domain analysis
Commonality and Variability Analysis
The basis of abstraction (classic model)Families: commonalities and regularity in
variabilitiesClaim: Abstraction and Intentionality
Commonality Analysis
The essence of abstraction Commonalities define families from family members We allow partitioning criteria to arise from the abstractions, not
vice versa! Many axes of commonality:
Behavior Data structure Name Code structure
We define these as commonality categories Claims: Meta-design
Variability Analysis
Same dimensions as commonalityA commonality dimension + a variability
dimension form a paradigm Objects: common structure and behavior,
variable structure and algorithm Overloading: common semantics, variable
interface and semantics …
Claims: A basis for paradigm
The place of paradigm
A way of organizing thingsWe organize by abstractingAbstracting focuses on what is commonWe treat variations separately
A “Universal Paradigm”
Define a software family (by grouping according to commonalities)
Find the commonalitiesEstablish the parameters of variation
OO As a Special Case
Arrange by commonalities Collect similar objects into classes Organize classes together using inheritance Establishes a base class interface
Establish parameters of variation Each family member has its own internal data
structure Each family member may implement a behavior
with a different algorithm
Domain Analysis
Traditional domain analysis: study of a subject area, the building of families
Frequently based on commonality and variability analysis
There are many domains: Many application domains Solution domain
A problem: Negative Variation
In OO, inheritance with cancellationBUT: it is more general
Template specialization: cancels structure Argument defaulting and overriding Many design patterns
Negative variation formalises these exceptions
Solution Domain CV Table
Commonality Variability Binding Instantation C++ Feature
Anything otherthan algorithmstructure
Source N/a Template
Fine algorithm Compile N/a #ifdef
FunctionName andSemantics
Fine or grossalgorithm
Compile N/a Overloading
Value of State Run Time Yes Struct, simpletypes
A small set ofvalues
Run time Yes Enum
DataStructure
Types, valuesand state
Source Yes Template
Value of State Source No Module
Value of State Source Yes struct, class
Data Structureand State
Compile Optional Inheritance
Compile Optional Inheritance
RelatedOperationsand SomeStructure
Algorithm,Data Structureand State Run Optional Virtual
Functions
Negative Variability Table
Kind of Commonality Kind of Variability
C++ Featurefor PositiveVariability
C++ Feature forCorresponding
Negative VariabilityName and Behavior Gross Structure or
algorithm(parametric)
Templates TemplateSpecialization
Structure, algorithm,name, behavior
Fine structure, valueor type
Templates Template argumentdefaulting
Enclosing datastructure
Fine structure and"type"
Inheritance union
Semantics and Name(of function)
Default value in aformula or algorithm
Argumentdefaulting
Overloading
Supply explicitparameter
OverloadingCommonality in some
data structure,perhaps in algorithm
Membership in DataStructure
Inheritance,adding datamembers
Re-factor usingpointers to alternative
implementationsSome commonality in
structure andalgorithm
Behavior Inheritance,overriding oradding virtual
functions
Private Inheritance
Most source code Fine algorithm #ifdef #ifdef
Most GOF patterns… aren’t...
Commonality Variability Binding Instantiation Pattern
Finealgorithm
Run time N/A Template Method
Algorithm Run timewithcompile-timedefault
N/A Unification +Template Method
Functionname andsemantics
Algorithm:Parmeter ofvariation issome state
Run time Yes State
Grossalgorithm
Run time N/A Strategy
Value ofstate
Source time Once Singleton
Relatedoperationsand somestructure
GrossAlgorithm
Source time(or compiletime)
N/A Strategy(templates) orUnification
Relatedoperationsbut notstructure
Incompat-ible datastructure
Any Yes Bridge orEnvelope/Letter
Patterns of Negative Variability
Kind ofCommonality
Kind ofVariability
Binding Instantiation Pattern
Somestructure andalgorithm
Functionname andsemantics
Compileor runtime
Optional Adapter
Relatedoperationsbut notstructure
Cancellationof classmembership
Any Yes Bridge
TextBuffer Transformational Analysis
Parameters ofVariability Meaning Domain Binding
Default /Technique
Output Type
Character Set
Working SetManagement
Debugging Code
The formatting oftext lines is sensi-tive to the outputmedium
Different buffertypes supportdifferent charactersets
Different applicationsneed to cache dif-ferent amounts ofmemory
Debug in-houseonly, but keep testsin source code
Database,RCS, TTY,UNIX file
ASCII,EBCDIC,FIELDATA
Whole file,whole page,LRU fixed
Debug,production
Run
Compile
Compile
Compile
UNIX File
ASCII
Whole file
None
TextBuffer: Common Structure and Algorithm
TextBuffer Transformational Analysis
Parameters ofVariability Meaning Domain Binding
Default /Technique
Output TypeStructure,Algorithm
Character Set
Type
Working SetManagementAlgorithm
Debugging CodeCodeFragments
The formatting oftext lines is sensi-tive to the outputmedium
Different buffertypes supportdifferent charactersets
Different applicationsneed to cache dif-ferent amounts ofmemory
Debug in-houseonly, but keep testsin source code
Database,RCS, TTY,UNIX file
ASCII,EBCDIC,FIELDATA
Whole file,whole page,LRU fixed
Debug,production
Run
Compile
Compile
Compile
UNIX FileVirtualFunctions
ASCIITemplates
Whole fileInheritance
None#ifdef (fromNegative variabilityTable)
TextBuffer: Common Structure and Algorithm
Text Buffer Dependency Graph
Text Buffer:Common Structure
And Algorithm
Output Type:Structure and
Algorithm
Working SetManagement:
Algorithm
DebuggingCode: FineAlgorithm
Character Set:Type
The File Domain
Record TypeStructure and
Algorithm
DebuggingCode: FineAlgorithm
AlgorithmCharacter Set:
Parametric
Output Media
Encryption:
BufferType:Structure and
Algorithm
The unified design
Text Buffer
Common Structure
and Algorithm
Output Media
Working Setmanagement:
AlgorithmDebuggingCode: Fine
Algorithm
Character Set:Type
Encryption:Algorithm
Debugging Code:Algorithmic Frags
Claim: domain dependencies
Recap of Claims
Abstraction and Intentionality: The code is the design Meta-Design: Doing objects honestly, or using other
techniques when they apply A formal, domain-based model for paradigm
Commonality Categories Application Domain and Solution Domain Analyses
Multiple paradigms within a domain Dependencies between domains: Limits to Modularity Theory of Negative Variability: Generalizing
cancellation Regularization of Ad-Hoc Design Patterns
Aposition
Pattern theory can be used as a formal basis for organizational models based on social network theory. In particular, current role-based models can be extended to build on the hypothesis that human organizational structures follow the same symmetries and patterns of symmetry-breaking observed in other biological populations, a phenomenon that has deeper roots in more general laws of natural systems in the domains of crystallography, astrophysics, mathematics, subatomic particle physics, and other domains.
Two Architectures
The thesis is about architecturePer Conway, architecture is about
organizationHere we talk of software patterns…… but there are organizational patterns,
too [Kroeber]
A curious pattern
Patterns in anthropology…Patterns in other natural sciences...Software organizational patterns...Patterns as symmetry breaking…Alexander’s theory of patterns based on
geometry……it’s all related
Aposition
Seek organizational formalisms based on symmetric relationships Individials Instrumental organizations
Establish common patternsTie to cultural invariants and breaking of
those invariants in symmetric configurations
Seek drivers for symmetry-breaking
Building Blocks
Organizational Patterns [Coplien et al.]Group theory and symmetry theoryPrior art in ethnography and social
network theory and researchDiadic psychology (family therapy,
distance relationships literature, etc.)