Jim Dowling, DSG. Introduction to Reflection1 Reflection and the Metaobject Protocol paradigm by Jim Dowling.

Slides:



Advertisements
Similar presentations
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 12 Slide 1 Distributed Systems Design 2.
Advertisements

ECE 750 Topic 8 Meta-programming languages, systems, and applications Load-time structural reflection in Java – Shigeru Chiba, 2000 May 27, 2004 Shimin.
Common Object Request Broker Architecture (CORBA) By: Sunil Gopinath David Watkins.
Page 1 Building Reliable Component-based Systems Chapter 16 - Component based embedded systems Chapter 16 Component based embedded systems.
Introduction To System Analysis and Design
19/02/2004 Slide 1 Internal Presentation by : Sergio Maffioletti Pervasive and Artificial Intelligenge research group On : « The.
A brief look at CORBA. What is CORBA Common Object Request Broker Architecture developed by OMG Combine benefits of OO and distributed computing Distributed.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
1 Objectives To introduces the concept of software Design. To introduce the concept of Object- Oriented Design (OOD). To Define various aspects about object.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented design 2.
1 CMSC 132: Object-Oriented Programming II Software Development IV Department of Computer Science University of Maryland, College Park.
Communication in Distributed Systems –Part 2
Object Based Operating Systems1 Learning Objectives Object Orientation and its benefits Controversy over object based operating systems Object based operating.
Institute of Computing Jaca: a Reflective Fault Injection Tool based on Patterns Eliane Martins Cecilia Rubira Nelson Leme Institute of Computing State.
.NET Mobile Application Development Remote Procedure Call.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
COMPUTER PROGRAMMING. Introduction to C++ History Merges notions from Smalltalk and notions from C The class concept was borrowed from Simular67 Developed.
Katanosh Morovat.   This concept is a formal approach for identifying the rules that encapsulate the structure, constraint, and control of the operation.
DBMS By Narinder Singh Computer Sc. Deptt. Topics What is DBMS What is DBMS File System Approach: its limitations File System Approach: its limitations.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Introduction to MDA (Model Driven Architecture) CYT.
Databases and Database Management Systems
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
Supporting Object Mobility Wouter Joosen, Frank Matthijs, Bert Robben, Eddy Truyen, Bart Vanhaute DistriNet Lab ~xenoops/CORRELATE.
Reflective- Adaptive Middleware Leila Jalali Distributed Systems Middleware – ICS 237 Prof. Venkatasubramanian Fall 2008.
Introduction To System Analysis and Design
Composing Adaptive Software Authors Philip K. McKinley, Seyed Masoud Sadjadi, Eric P. Kasten, Betty H.C. Cheng Presented by Ana Rodriguez June 21, 2006.
CSE 425: Object-Oriented Programming I Object-Oriented Programming A design method as well as a programming paradigm –For example, CRC cards, noun-verb.
 OOPLs  Help companies reduce complexity  Increase competition in open markets  Speeds up development  Improves maintenance, resusability, modifiability.
Computer Science 340 Software Design & Testing UML Sequence Diagrams.
Software Development. Software Developers Refresher A person or organization that designs software and writes the programs. Software development is the.
March 27, 2007HPC 07 - Norfolk, VA1 C++ Reflection for High Performance Problem Solving Environments Tharaka Devadithya 1, Kenneth Chiu 2, Wei Lu 1 1.
CORBA IS 8030 – Integrated Computing Environments Dr. Hoganson CORBA Common Object Request Broker Architecture Published by Object Management Group (OMG)
SCALABLE EVOLUTION OF HIGHLY AVAILABLE SYSTEMS BY ABHISHEK ASOKAN 8/6/2004.
TAL7011 – Lecture 4 UML for Architecture Modeling.
What is Object-Oriented?  Organization of software as a collection of discreet objects that incorporate both data structure and behavior.
Implementing Simple Replication Protocols using CORBA Portable Interceptors and Java Serialization T. Bennani, L. Blain, L. Courtes, J.-C. Fabre, M.-O.
Design Patterns -- Omkar. Introduction  When do we use design patterns  Uses of design patterns  Classification of design patterns  Creational design.
CIS/SUSL1 Fundamentals of DBMS S.V. Priyan Head/Department of Computing & Information Systems.
1 Chapter 1 Introduction to Databases Transparencies.
CS 501: Software Engineering Fall 1999 Lecture 12 System Architecture III Distributed Objects.
An Architecture to Support Context-Aware Applications
CSE 303 – Software Design and Architecture
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
GYTE - Bilgisayar Mühendisliği Bölümü Bilgisayar Mühendisliği Bölümü GYTE - Bilgisayar Mühendisliği Bölümü AN ARCHITECTURE FOR NEXT GENERATION MIDDLEWARE.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
04 - OOD Intro.CSC4071 Software Design ‘Requirements’ defines –The goals the system needs to satisfy. ‘Specification’ defines –The externally-observable.
Software Architecture for Multimodal Interactive Systems : Voice-enabled Graphical Notebook.
Creating Telecommunication Services based on Object- Oriented Frameworks and SDL Dr Richard Sinnott GMD Fokus Berlin, Germany.
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 15 System Architecture III.
1 Case Study: Meta Classes  Class representation in memory  Class variables and class methods  Meta Classes  3 Level System  4 Level System  5 Level.
Smalltalk Meta-Programming Programming Languages HUJI 2010 Yardena Meymann.
Object Oriented Systems Design
A Meta-Object Protocol for Environmental Adaptation in a Grid
The Role of Reflection in Next Generation Middleware
Physical Data Model – step-by-step instructions and template
CORBA Alegria Baquero.
Types of Programming Languages
Demeter Aspects Who We Are Aspectual Collaborations
#01 Client/Server Computing
Ch > 28.4.
Data Base System Lecture 2: Introduction to Database
CORBA Alegria Baquero.
University of Houston-Clear Lake
Inventory of Distributed Computing Concepts
Component--based development
Introduction to Data Structure
#01 Client/Server Computing
Presentation transcript:

Jim Dowling, DSG. Introduction to Reflection1 Reflection and the Metaobject Protocol paradigm by Jim Dowling

Jim Dowling, DSG. Introduction to Reflection2 Reflection Basics Definition: “Computational reflection is the activity of performed by a computational system when doing computation about its own computation [1]” Different reflective approaches - logical, monadic Common notion of access to a “meta” level. Reflection allows programmer to manipulate representations to achieve gains in performance and maintainability [2]

Jim Dowling, DSG. Introduction to Reflection3 Some Reflection History Computational reflection generally involves object models –Statically typed object models (C++), dynamically typed object models (Smalltalk) Types categorise objects according to their usage and behaviour In non-reflective object models, these categories (representations) are fixed by programming language designer

Jim Dowling, DSG. Introduction to Reflection4 Building Meta-level Architectures Meta-level typing = Meta-type of an object characterises the type of its object model - i.e. the way in which it is implemented [3].

Jim Dowling, DSG. Introduction to Reflection5 1. Untyped universe 2. Monomorphic 3. Polymorphic 4. Meta-level types

Jim Dowling, DSG. Introduction to Reflection6 Application 1Application n Object model (C++, Smalltalk) Object subsystem (operating system, VM) Hardware Subsystem level Application level The Mile-High Systems View

Jim Dowling, DSG. Introduction to Reflection7 Black-box Programming Model Restricted to object model implemented by the language Possibility of application mismatch - applications requirements aren’t met by underlying object subsystem Limited flexibility

Jim Dowling, DSG. Introduction to Reflection8 White-box Programming Model Language implementation “opened up” Features of object model implementation can be modified by application programmer Structured interface for making changes Re-categorise objects w.r.t. their usage and behaviour.

Jim Dowling, DSG. Introduction to Reflection9 Meta-level Architecture for OOPLs

Jim Dowling, DSG. Introduction to Reflection10 Meta-level features of CORBA Extension to OOPL Meta-level information stored in Interface Repository, Implementation Repository A black-box object model ORB is not reflective Ad-hoc additions to add reflective features, e.g. IONA smart stubs - method_before() Trade-offs in implementation. Dynamic invocation 40 times slower than static [4].

Jim Dowling, DSG. Introduction to Reflection11 Base-level Meta-level BLO Interface MOP Interface MOPsMLOs BLOs Application Programmer

Jim Dowling, DSG. Introduction to Reflection12 Metaobject Protocols (MOPs) Base-level objects (BLOs) Meta-level Objects (MLOs) MOP = collection of MLOs Compile-time MOPs Run-time MOPs Intercessory run-time MOPs Structural run-time MOPs Introspective run-time MOPs Dynamic run-time MOPs [5]

Jim Dowling, DSG. Introduction to Reflection13 MOPs as an enabling technology To build a meta-level architecture White-box programming model Behavioural Reflection Structural Reflection Reification of object model features

Jim Dowling, DSG. Introduction to Reflection14 Behavioural Reflection Allows program to modify semantics of programming language. Allows program to modify own code. Ability to do this at run-time. Techniques include polymorphism, reflective programming languages, MOPs. Reification of language features Intercession - e.g. method invocation Dynamic Adaption of object model

Jim Dowling, DSG. Introduction to Reflection15 Structural Reflection State and/or methods are added or deleted from an object Long life, stable applications Separation of concerns between meta-level and base-level and their implementations

Jim Dowling, DSG. Introduction to Reflection16 Reification Every object system contains implementations of the object features supported by it These object features include object creation, message passing, state access, etc. Reification allows these implementations to be modified by the application programmer Essentially making objects first-class data types

Jim Dowling, DSG. Introduction to Reflection17 Sample Reification Identify object feature Design event-based model of object model feature to be reified Establish flow of control in actual object model Decide on which events to reify Implement a MOP reifying the object feature.

Jim Dowling, DSG. Introduction to Reflection18 Iguana MOP for method invocation

Jim Dowling, DSG. Introduction to Reflection19

Jim Dowling, DSG. Introduction to Reflection20 History of reflection in DSG Meta-level Architectures Brendan Gowing - Iguana, a Meta-object Protocol for C++ Coyote –Iguana Reflective Programming Model –Focus on building Reflective Middleware / Systems Software

Jim Dowling, DSG. Introduction to Reflection21 Conclusion Reflection can make traditionally orthogonal objectives in OO language design compatible: –Flexibility vs. Efficiency –Transparency vs. Level of integration with subsystem Metaobject protocols and reflection blur the distinction between language designer and language user.

Jim Dowling, DSG. Introduction to Reflection22 References [1] Maes, Patttie. Concepts and Experiments in Computational Reflection. Sigplan notices, Dec 87, OOPSLA. [2] Friedman, Daniel P. An Exploration of Relationships between Reflective Theories. Proceedings of Reflection ‘96. [3] Cahill Vinny, Iguana Reflective Programming Model, March 98, Draft. [4] Campell Roy et. Al., Reflective ORBs, Dec. 97, ICDS 98. [5] Gowing Brendan, PhD thesis, 1997 [6] Kiczales, Gregor, Art of the MOP, 1991, MIT Press