110 likes | 242 Views
Gregor Kiczales Professor and NSERC/Xerox/Sierra Systems Software Design Chair University of British Columbia Principal Scientist Xerox PARC. structured programming object-orientation <candidate for this space>. intuitive efficient profound and incremental
E N D
Gregor Kiczales Professor and NSERC/Xerox/Sierra Systems Software Design Chair University of British Columbia Principal Scientist Xerox PARC
structured programming object-orientation <candidate for this space> intuitive efficient profound and incremental separation of concern paradigms school of: organization design, separation of concerns, abstraction, information hiding… successful separation of concern paradigms approaches to a fundamental problem of software engineering and some of their key properties
vm_fault * Figure FigureElement vm_pager_getpages … Point Line vnode_pager_getpages VM module … 2 getX(): int getY(): int setX(int)setY(int) getX(): int getY(): int setX(int)setY(int) ffs_getpages ffs_valid ffs_calc_size ufs_bmap FFS module problem: separation of crosscutting concerns classic sources of complexity in embedded systems • synchronization, access control, accounting, scheduling, performance optimization, power management, distribution, replication, logging, context dependence… • crosscut blocks, layers, objects tracking when objects move in a simple figure editor 2 prefetching modes in Free BSD
m more detailed statics simple statics simple dynamics views differ in level of detail views crosscut each other multiple views enable separation of concerns
m Point Point 2 2 Line Line getX(): int getY(): int setX(int)setY(int) getX(): int getY(): int setX(int)setY(int) getX(): int getY(): int setX(int)setY(int) getX(): int getY(): int setX(int)setY(int) MoveTracking interface Point extends FigureElement { int getX(); int getY(); void setX(int x); void setY(int y); } class Point implements FigureElement { privateint _x = 0, _y = 0; int getX() { return _x; } int getY() { return _y; } void setX(int x) { _x = x; } void setY(int y) { _y = y; } } multiple views enable separation of concerns aspect MoveTracking { pointcut moves(): call(void Line.setP1(Point)) || call(void Line.setP2(Point)) || call(void Point.setX(int)) || call(void Point.setY(int))); after(): moves() { display.update(); } }
other ideas in “the AO space” SDP working group: Grady Booch, Ralph Johnson, Gregor Kiczales, Charles Simonyi, John Vlissides • programming • Intentional Programming, MDSOC, model-based, AO frameworks… • patterns • a pattern is a name for a non-modularized crosscutting concern • collaborative development environments • simultaneous crosscutting organizations of code
object-orientation • model world as objects • classify objects into inheritance hierarchy analysis design programming • trace-ability • separation of concerns • within each level • across the levels objects all the way through * Figure FigureElement Point Line 2 getX(): int getY(): int setX(int)setY(int) getX(): int getY(): int setX(int)setY(int) a simple figure editor
aspect-orientation • model world as objects/procedures/layers, and aspects are crosscutting units analysis design programming aspects (& objects & procedures) all the way through * Figure FigureElement when elements move aspect MoveTracking { ... 10 loc ... } Point Line 2 getX(): int getY(): int setX(int)setY(int) getX(): int getY(): int setX(int)setY(int) MoveTracking detect & optimize sequential access aspect SeqPrefetching { ... 40 loc ... }
Point 2 Line * Figure FigureElement getX(): int getY(): int setX(int)setY(int) getX(): int getY(): int setX(int)setY(int) Point Line MoveTracking 2 getX(): int getY(): int setX(int)setY(int) getX(): int getY(): int setX(int)setY(int) class Line { private Point _p1, _p2; Point getP1() { return _p1; } Point getP2() { return _p2; } void setP1(Point p1) { _p1 = p1; } void setP2(Point p2) { _p2 = p2; } } class Point { private int _x = 0, _y = 0; int getX() { return _x; } int getY() { return _y; } void setX(int x) { _x = x; } void setY(int y) { _y = y; } } class MoveTracking { private static Set _movees = new HashSet(); public static void collectOne(Object o) { _movees.add(o); } public static Set getmovees() { Set result = _movees; _movees = new HashSet(); return result; } } separation of concerns is foundational tangled mess good separation MB MA MA MB traceabilityevolution verificationmodel-based … class Line { private Point _p1, _p2; Point getP1() { return _p1; } Point getP2() { return _p2; } void setP1(Point p1) { _p1 = p1; MoveTracking.collectOne(this); } void setP2(Point p2) { _p2 = p2; MoveTracking.collectOne(this); } } class Point { private int _x = 0, _y = 0; int getX() { return _x; } int getY() { return _y; } void setX(int x) { _x = x; MoveTracking.collectOne(this); } void setY(int y) { _y = y; MoveTracking.collectOne(this); } }
activities in AO space • DARPA ITO PCES/NEST/MOBIES programs • workshops • affiliated: ICSE, ECOOP, OOPSLA… • stand-alone: Germany, France, England, Belgium… • CACM theme issue (October 01) • AOSD 2002 Conference • in cooperation with SIGPLAN and SIGSOFT • FOAL workshop (POPL community)… • recent papers on • semantics, verification, language design, UML integration… • Java technical press • JavaReport etc.
big steps in software development • not just technology • languages, tools • not just work practice • methods, books, management • synergistic combination of both intuitive, efficient, profound, incremental • structured programming • OO programming • aspect-orientation? ideas that bridge the whole process