300 likes | 461 Views
Modularity vs. Virtual Separation of Concerns. Christian Kästner. Annotation. Composition. Modularity for FOSD. OPEN PROBLEMS AHEAD. Cohesion. Interfaces Information Hiding Separate Compilation. Separation of Concerns. AHEAD, AspectJ. Modularity. goto #ifdef.
E N D
Modularity vs. Virtual Separation of Concerns Christian Kästner
Annotation Composition
OPEN PROBLEMS AHEAD
Cohesion Interfaces Information Hiding Separate Compilation Separation of Concerns AHEAD, AspectJ Modularity goto #ifdef
Modular Reasoning (monotone; open world)
Variability? Optional Features Alternative Features
Database Problem Space Transact. Index Write Index Transactions Write Solution Space
Modularity + Crosscutting = Complex Interfaces
Modularity Costs Design effort Architectural overhead What to hide? commit on decision fix interfaces Evolution
Feature Interactions Optional Feature Problem
Call Waiting Call Forwarding Feature Interaction
Glue Code Module LifterDerivative Index Write (read-only) (Write Support for Index) Optional Feature Problem
Database Index Write RW-Index Index Write
Write Scale
Expression Problem + - * eval print simplify
+ - * open world? eval print simplify
memory mgmt. insert statistics transactions fsync logging
Scale? Feature Interactions Optional Feature Problem Modular Reasoning (Monotone) Modular Reasoning?
#ifdef SESSION … #endif
View on a Feature: closedworldassumption On-demand remodularization Effective views Version editor Emergent interfaces
Index Write class Write { … } class Index { get() = … #if WRITE put(v) = … #endif }
interface Index config: WRITE provides: get put if WRITE requires: tree.get tree.set if WRITE Index module Index { get() = … #if WRITE put(v) = … #endif } Modularity with Variability
+ - * #if PLUS class Plus { #if MINUS class Min{ #if POWER class Pow{ #if EVAL inteval() #endif #if EVAL inteval() #endif #if EVAL inteval() #endif eval #if PRINT void prt() #endif #if PRINT void prt() #endif #if PRINT void prt() #endif print #if SIMPL Expr s() #endif #if SIMPL Expr s() #endif #if SIMPL Expr s() #endif simplify } #endif } #endif } #endif
It doesn’t have to be #ifdef language support for variability variability-aware error checking (closed world)
Index Modular Reasoning (Monotone) module Index { get() = … #if WRITE put(v) = … #endif } closedworldacceptable?
Modularity for FOSD Is it possible? Does it scale? Does it make sense? Are there alternatives?