250 likes | 504 Views
Software Engineering Research. Devon M. Simmonds Computer Science Department University of North Carolina, Wilmington simmondsd@uncw.edu August 19, 2008. Motivation. Computer science/Information Systems - solving problems with the aid of a computer Artificial intelligence
E N D
Software Engineering Research Devon M. Simmonds Computer Science Department University of North Carolina, Wilmington simmondsd@uncw.edu August 19, 2008
© Devon M.Simmonds, 2007 Motivation • Computer science/Information Systems - solving problems with the aid of a computer • Artificial intelligence • Database management systems • Distributed systems • Computer graphics • Operating systems • Software engineering
Software Development Simple Tools International Space Station Power Tools International Airport Baggage Handling System Blueprints
Models in Engineering • Benefits of models • Help us understand and manage complex systems • Communicate understanding • Drive implementation • Save resources Need to improve the use of models in software development!
CreateModel Model of the Program A C B Binary instructions Code-centric Development Model-Driven Development (MDD) CompileModel Manually Create Code • Realizing the dream – MDD challenges • Model Specification • Model Transformation • Code Generation • Managing technologies • Model Analysis Code CompileCode
The World of Software Africa Space network Distributed Systems Asia • Distributed systems are normative • Complex, critical systems are pervasive! • Consequences of errors are far-reaching Europe USA
Application program Middleware Transaction management Fault tolerance Security Application program Application program Naming Concurrency Operating System Operating System Replication Query Computer Hardware Computer Hardware Event Quality of service Distributed Systems Context • Many middleware technologies • .Net, EJB, SOAP, COM, CORBA, Jini, • Software require many middleware technologies • Middleware technologies evolve • Changing middleware in code is difficult
Model Driven Architecture (MDA) • An initiative to address pervasive middleware features [From OMG website]
CSC592 Distributed Systems • Overview • A practical introduction to the development of Distributed Systems • Important theoretical underpinnings • Use of middleware technologies: • SOAP, EJB, Java RMI, CORBA, Jini • Introduction to aspect-oriented software development and AspectJ language. • Course web page: http://people.uncw.edu/simmondsd/courses/Fall08/csc592.htm
Design of Application Design of Middleware Concerns Integration CompleteApplication Using aspect to support the migration of application across middleware. Project #1 • Decouple technology from application code. Code
logging in org.apache.tomcat red shows lines of code that handle logging not in just one place not even in a small number of places The Problem Crosscutting functionality logging is not modularized
AOSD 2003 Tyranny of the dominant decomposition : System.out.println("foo called"); Helper.foo(n/3); : : System.out.println("foo called"); Helper.foo(i+j+k); : : System.out.println("foo called"); Helper.foo(x); : Can we modularize this crosscutting concern? every call to foois preceded by a log call class Helper { : public static void foo(int n) { … } : }
AOSD 2003 Tyranny of the dominant decomposition : System.out.println("foo called"); Helper.foo(…); : : Helper.foo(n/3); : class Helper { : public static void foo(int n) { System.out.println("foo called."); … } : } : System.out.println("foo called"); Helper.foo(…); : : Helper.foo(i+j+k); : : System.out.println("foo called"); Helper.foo(…); : : Helper.foo(x); : Yes! procedures canmodularize this case class Helper { : public static void foo(int n) { … } : } unless logs use calling context, we don’t control source of Helper…
AOSD 2003 Tyranny of the dominant decomposition Can we modularize this crosscutting concern? FigureElement moveBy(int, int) Point Line 2 getX()getY()setX(int)setY(int)moveBy(int, int)draw()refresh() getP1()getP2()setP1(Point)setP2(Point)moveBy(int, int)draw()refresh() all subclasses have an identical method
AOSD 2003 Tyranny of the dominant decomposition FigureElement FigureElement moveBy(int, int) refresh() moveBy(int, int) Point Point Line Line 2 2 getX()getY()setX(int)setY(int)moveBy(int, int)draw()refresh() getX()getY()setX(int)setY(int)moveBy(int, int)draw() getP1()getP2()setP1(Point)setP2(Point)moveBy(int, int)draw()refresh() getP1()getP2()setP1(Point)setP2(Point)moveBy(int, int)draw() Yes! inheritance canmodularize this
AOSD 2003 Tyranny of the dominant decomposition FigureElement moveBy(int, int) refresh() Point Line 2 getX()getY()setX(int)setY(int)moveBy(int, int)draw() getP1()getP2()setP1(Point)setP2(Point)moveBy(int, int)draw() Can we modularize this crosscutting concern? these methods all end withcall to: Display.update();
AOSD 2003 Tyranny of the dominant decomposition FigureElement moveBy(int, int) refresh() Point Line 2 getX()getY()setX(int)setY(int)moveBy(int, int)draw() getP1()getP2()setP1(Point)setP2(Point)moveBy(int, int)draw() DisplayUpdating NO! not with Java, C++ etc. Need new modular structure after(): call(void FigureElement+.set*(..)) || call(void FigureElement.moveBy(int, int)){ Display.update();}
AOSD 2003 Tyranny of the dominant decomposition FigureElement moveBy(int, int) refresh() Point Line 2 getX()getY()setX(int)setY(int)moveBy(int, int)draw() getP1()getP2()setP1(Point)setP2(Point)moveBy(int, int)draw() DisplayUpdating YES! – with AspectJ after(): call(void FigureElement+.set*(..)) || call(void FigureElement.moveBy(int, int)){ Display.update();} after(): call(void FigureElement+.set*(..)) || call(void FigureElement.moveBy(int, int)){ Display.update();}
Project #2 Program A A B2 A1 C C A2 B D B1 Aspect-based refactoring of components Program B
Project #3 Aspect-oriented Testing, Monitoring & Policy Enforcement
Project #4 M A C K B P Transformation languages for aspect-oriented model driven development. Model B • To be done • Compare language • Extend language • Implement language
Project #5 :Department :Student takeCourse() takeCourse() graduate() Generating code from aspect-oriented design models class Department { private: char name[40]; Student csc[100]; public: void manageStudents(){ csc[i]->register(); csc[i]->grade(); csc[i]->graduate(); }}
Devon M. Simmonds, Computer Science Department, University of North Carolina Wilmington Q u e s t i o n s ? The End