CS 686 Object Oriented Systems
Instructor: rkj
Jan-April 2006
Slot 1, Room 301 in Kresit Building
Mon 8:30, Tue 10:35, Fri 9:30 in Kresit Building
Arrive on time.
Evaluation Scheme: quizzes, midsem, endsem; program
contributions and term project. Refer to the contribution site maintained by
suman and aditya for programming
related discussions.
Quiz: 31.1.06 Tuesday, 10:30-11:30
Midsem: 24.2.06 Friday, 2:30-4:30, A2/A1
Quiz 2: Friday, 9:30-10:20, A2/A1
Lecture Notes for your Reference
- Introduction to the Course: Principles, Languages, Patterns & Processes
- Abstractions in Programming Languages: data and control abstractions
- The Object Abstraction: id, state, behavior
- Id related aspects: naming, applications that are interested only in 'id' component.
- State: state machines; stateless objects: collection of pure functions
- Behavior: Externally observable behavior,
Principle of hiding/encapsulation and the notion of Abstract data types,
member functions cause state transitions.
- Example of modeling of state machine of an object: a buffer object
- Separation between Interface and Implementation; between message and method
- Classes and Interfaces, Abstract classes
- Contracts: between 2 parties, syntactic contracts, behavioral contracts
- Assertions, Design by Contract method, benefits and obligations model,
use of assertions in specifying contracts,
preconditions, postconditions and class invariants, The Eiffel model, examples,
involving local states and external interactions in contract specifications.
- Inheritance relation, the difference with aggregation, difficulties of simulating
inheritance through explicit part-whole composition and delegation (discussion
on outside in, inside out messaging).
- Aspects of Inheritance: Pure extensions, member specialization by overriding,
abstract behavior specification, polymorphism
- subtyping induced by subclassing --> subsumption --> Polymorphism --> Reuse (noted
a difference between use and reuse)
- Connecting Inheritance with Reuse: reuse inside and outside inheritance hierarchies,
the notion of partially built frameworks and concrete application, hotspots.
- non-conceptual inheritance and a programming language feature to express the same
- conceptual inheritance: contractual refinements of Preconditions, postconditions through subclassing
- Interaction between encapsulation and inheritance concept spaces,
visibility rules in presence of inheritance, language dependent variations
- Method search Strategies -- from receiver's class, from immediate superclass of
defining class of the calling method, from class of the calling method; programming
language variabilities- comparing the smalltalk, C++ and Java models. yo-yo problem.
- Covariance, Contravariance and type safety issues: approaches adopted by different languages
- Multiple inheritance: conceptual multiple inheritance, non-conceptual
multiple inheritance-->explore alternative interobject relationships;
abstract classes vs. concrete classes in multiple inheritance,
interface inheritance in component
programming, the problems of multiple inheritance and solutions, diamond
inheritance, multiple repeated vs. multiple shared inheritance.
- shared vs. embedded implementation of member functions, the 'this' or the 'self'
reference, object's memory map, the case of inheritance (note that private members
from superclasses are present in an object's memory map--though the subclass's member
functions cannot access them--and you know the reason!), a low level implementation
of member function invocations and assignment statement.
- Implementing dynamic dispatch through dispatch table implementation:
the case of single inheritance; mention of possible optimizations; will the single inheritance implementation work
for multiple inheritance?
- QUIZ 1 Tuesday Jan 31.
- solution to the quiz - use of inheritance/multiple inheritance.
- A dynamic dispatch implementation for multiple inheritance - handling typecasts;
memory map alignment problem; 'this' pointer adjustment, and the structure of the
dispatch table.
- the 'instance-of' relationship; class-level modeling, class as an instance,
classes of classes
- class-less object orientation (prototype-based)
- Meta-patterns
- Part-whole relation, non-part-whole, non-inheritance Associations
- categorization of part-whole relations and its implications to oo
analysis and implementation.
- Object modeling in 3-tiered Architecture:
abstractions of objects in each layer, types of
interobject relations, interobject messaging
- Solution to midsem test
- Resue: code vs. design reuse; libraries vs. frameworks;
- Design patterns - what is a design pattern; classification;
pattern descriptions;
- examples of creational patterns: singleton, factory, prototype
- examples of structural patterns: adapter, proxy, composite, decorator, facade
- examples of behavioral patterns: strategy, state, observer, template
method, iterator
- superimposed occurances of patterns: examples
- An introduction to processes: product transformation flow;
waterfall, spiral, fountain models
- Seamlessness property in processes
- Analysis and design techniques of structured SEMs vs.
modeling techniques in OOAD processes
- Requirements and Use case modeling
- State machines for analysis;
major objects as state machines; refinement of use cases and use case
dependencies
- CRC analysis
- Object identification and structuring: relations (inheritance,
association, using, whole-part, instance-of)
- Class diagrams and object diagrams
- Objects in 3-tiered architectures
- Interaction Modeling
- Activities and Dependencies
- Problem solving sessions
References
- Bertrand Meyer: Applying Design by Contract, IEEE Computer, v 25, n 10, Oct 92, pp 40-51.
or you can also read the relevant chapter of Bertrand Meyer's book titled
Object Oriented Software Construction, chapter 11. or a few online
articles from http://archive.eiffel.com
- Chapter 12 from the above book for handling contract errors
- A. Taivalsaari, On the notion of Inheritance, article in ACM Computing Surveys, Sept 1996.
- Wolfgang Pree, Metapatterns: A Means for Capturing the Essentials of Object-Oriented Design.
ECOOP 94, 1994.
- Adele Goldberg, David Robson: Smalltalk-80: The Language and Its Implementation. Addison-Wesley 1983 --- for Smalltalk's metaclasses, instance-of hierarchy
- David Ungar and Randall Smith, Self: The power of simplicity: OOPSLA 87;
Ungar, Chambers, Chang and Holzle: Organizing programs without Classes,
Lisp and Symbolic Computation 4(3), Kluwer Academic Publishers, June, 1991..
- Motschnig-Pitrik, R. and J. Kaasboll: Part-Whole Relationship Categories and Their Application in Object-Oriented Analysis, IEEE TKDE, v. 11, 1999.
- Gamma et al, Design Patterns.
- Rumbaugh et al, Object Oriented Modeling and Design, Prentice Hall, 1991.
- Rumbaugh et al, UML Reference Manual, Addison-Wesley, 1999.
- Coad and Yourdon, Object Oriented Analysis, Yourdon Press.
- Kent Beck's paper on CRC