Foundations of Aspect-Oriented Languages (FOAL) Modularity 2015 Recent Developments in Context-oriented Programming (at HPI) Robert Hirschfeld Hasso Plattner Institute University of Potsdam Germany http://www.hpi.de/swa/ Colorado State University, Fort Collins, Colorado 2015-03-16
Recent Developments in Context-oriented Programming Some History… Software Architecture Distributed Processing Environments Dynamic Aspect-oriented Programming Reflective Designs Dynamic Service Adaptation Context-oriented Programming with Pascal Costanza and Oscar Nierstrasz Robert Hirschfeld (2015) 2
Recent Developments in Context-oriented Programming Context context ? = everything computationally accessible mood… location time of day age temperature preferences connectivity subscriptions bandwidth energy consumption battery level Robert Hirschfeld (2015) 3
Recent Developments in Context-oriented Programming COP Basics Overview introduce activate Class 1 Class 2 Class m deactivate remove Layer 1 context Layer 2 Layer n Behavioral variation Active layer Robert Hirschfeld (2015) 4
Recent Developments in Context-oriented Programming AOP, FOP, and COP AOP FOP COP Inverse dependencies 1:n relationships Layers Dynamic activation Scoping Robert Hirschfeld (2015) 5
Recent Developments in Context-oriented Programming COP Extensions (Some…) • ContextS • ContextL • ContextS2 • ContextScheme • ContextJS • ContextJ* • JCop (ContextJ) • ContextErlang • ContextPy • EventCJ • PyDCL • Lambic • UseCasePy • Ambience • PyContext • COP.JS • ContextR • delMDSCO/cj • ContextG • Phenomenal Gem • ContextAmber • Subjective-C • L 1…4 • Context Petri Nets Robert Hirschfeld (2015) 6
Recent Developments in Context-oriented Programming Recent COP Developments at HPI semantics ContextFJ layers only L 1...4 foundations tooling behavioral scoping Vivide Context* structural scoping ContextJS / Lively use-cases UseCasePy contracts event-based composition PyDCL JCop developers users reactive composition ContextJS / Babelsberg development layers ContextJS / Lively constraint-based composition ContextJS / Babelsberg constraint layers image/objects constraint solver meta-tracing JITs R/Squeak-VM / PyPy VM/runtime Robert Hirschfeld (2015) 7
Recent Developments in Context-oriented Programming Behavioral Variations behavioral scoping Context* • Behavioral (dynamic) scoping structural scoping – Dynamic extent of execution ContextJS / Lively – Almost all COP extensions development layers • Structural (topological) scoping ContextJS / Lively – ContextJS – Development layers • Open implementation for scoping strategies – Allows for domain-specific scoping – Mainly applied to UI framework structures • Lively: Morphic • Webwerkstatt : Parts Robert Hirschfeld (2015) 8
Recent Developments in Context-oriented Programming Development Support tooling Vivide • More applied à more useful • In PL work tool support often neglected use-cases UseCasePy – Usually too expensive, especially early… contracts PyDCL à Need for explorative tool building support • Vivide • Crosscutting nature of layers lends itself nicely to crosscutting software engineering concerns – Explicit use-cases representation • UseCasePy – Dynamic contract layers • PyDCL Robert Hirschfeld (2015) 9
Recent Developments in Context-oriented Programming Reactive Approaches event-based composition JCop ¡Framework ¡ reactive composition ContextJS / Babelsberg layer ¡composi3on ¡ constraint-based composition layer ¡composi3on ¡ ContextJS / Babelsberg constraint layers User ¡Code ¡ layer ¡composi3on ¡ layer ¡composi3on ¡ KeyboardListener ¡ En(tyUI ¡ En(ty ¡ GameWindow ¡ Character ¡ Region ¡ ImageProvider ¡ AiCharacter ¡ Hero ¡ World ¡ RegionUI ¡ WorldUI ¡ Knight ¡ Princess ¡ Robert Hirschfeld (2015) 10
Recent Developments in Context-oriented Programming Foundations semantics ContextFJ • Semantics and types layers only – ContextFJ L 1...4 • Symmetry meta-tracing JITs R/Squeak-VM / PyPy – No classes, only layers – No base system • L 1..4 • Sideways composition very expensive – Runtime support for optimizations – Meta-tracing JITs • R/Squeak-VM – Higher performance à more (meta-level) flexibility mbody ( m , C , L ′ , L ) = x.e in D , L ′′ PT ( m , C , L 0 ) undefined mbody ( m , C , ( L ′ ; L 0 ) , L ) = x.e in D , L ′′ Robert Hirschfeld (2015) 11
Recent Developments in Context-oriented Programming Acknowledgements Pascal Costanza, Hidehiko Masuhara, Atsushi Igarashi, Michael Haupt, Malte Appeltauer, Michael Perscheid, Bastian Steinert, Jens Lincke, Marcel Taeumel, Tobias Pape, Tim Felgentreff, Robert Krahn, Carl Friedrich Bolz, Marcel Weiher, Hans Schippers, Tim Molderez, Oscar Nierstrasz, Shigeru Chiba, Hiroaki Inoue, Tobias Rho, Stefan Udo Hanenberg, Dick Gabriel, Dave Thomas, Gilad Bracha, Alan Kay, Dan Ingalls, Alan Borning, Jeff Eastman, Christopher Schuster, Christian Schubert, Gregor Schmidt, Stefan Lehmann, Matthias Springer, … Robert Hirschfeld (2015) 12
Recommend
More recommend