DOC PREVIEW
Toronto ECE 450 - Lecture 10 - Topics in Configuration Managements

This preview shows page 1-2-15-16-31-32 out of 32 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 32 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Spring 2005 ECE450H1S Software Engineering IILecture 10Topics in Configuration Managements1. Componentization2. Product-line familySpring 2005 ECE450H1S Software Engineering II1. Sign a contract2. Design by contractThree kinds of design contracts3. Programming by contractThree kinds of programming practices by contractLast lecture …Spring 2005 ECE450H1S Software Engineering II1. Problems in legacy software development2. Componentization1. Redundancy removal2. Header Restructuring3. Clustering (repackaging)3. Feature oriented programming4. SummaryToday …Spring 2005 ECE450H1S Software Engineering II1. Problems facing SE• Software are getting more complex– Code size getting larger, more dependencies– More developers are involved– More users and stakeholders– Understandability, productivity are dropping• Thus,______________ is the central theme of software engineering• How to improve so that people can develop in parallel and incrementally? Sync-and-Stabilize or “Daily build” approach• Componentization and Software Product-line family are good solutions to the problemSpring 2005 ECE450H1S Software Engineering II2. Components• Modules have high _____ and low ______ • To support parallel development, ideally, components can be _________ compiled and tested• A component has an ________ (set of operations) through which other components can interact• A web service is a component that has a __________ interface and __________ regardless of programming languagesSpring 2005 ECE450H1S Software Engineering IILegacy software• Legacy software typically contains large set of program files, but not well modularized• Redundancy: the interfaces of “components” in legacy software are bloated– A prolonged fresh build time• False dependencies: including unnecessary program units for the component– Too complex to be understood– A prolonged incremental build time• We will show C/C++ as an example, but the problem exists for other PL as wellSpring 2005 ECE450H1S Software Engineering IIExample 1. Hello world#include <stdio.h>void main () {printf (‘’Hello, world!’’);}• How many LOC after inclusion? _______gcc -E -P hello.c -o hello.owc hello.o• How many LOC is needed? 4gcc -E -P -fdump-program-unit hello.c• The #include shall expand to a single line:int __attribute__((__cdecl__)) printf( const char*,...);Spring 2005 ECE450H1S Software Engineering II2.1 Componentization• Restructuring by removing unnecessary units in the program• A restructuring unit is a statement declaring, or a defining of the user-defined symbols, such as ___________________________________, etc.• _____________________________________ are not considered as a restructuring unit because removing them may affect the semantic of the program• What is the difference between declaration and definition? Throughout the program ___________ can occur multiple times, ___________ can only occur once.• Preserving semantics: (1) maintain the ___________ such that compiler won’t complain about undefined symbols; (2) make sure ________________ are kept in the compilation unitsSpring 2005 ECE450H1S Software Engineering II2.2 Redundancy removal• As shown in previous example, redundancy happens when some program declaration are unnecessary• How to tell this? • In GCC 3.4.0, we change its parser such that a symbol ___________ dependent by the definitions will be kept in the precompiled program• Very efficient and beneficial compilation time + precompilation time < original compilation timeSpring 2005 ECE450H1S Software Engineering IIExample 2. Removing redundancies along parsing1. typedef int NUMBER; //PU@12. struct node; //PU@2 forward:node@23. typedef struct node { //PU@3 type:list@3 4. float value; // struct:node@3 5. struct node* next; // <- PU@3, PU@26. } *list; //7. struct A { //PU@4 struct:A8. union { //9. NUMBER value; // <- PU@110. } u; //11. }; //12. extern int //13. printf(char *format,...); //PU@5 funcdcl:printf@514. enum { //PU@6 enum:<anonymous>@615. Satisfied, // enumerator:Satisfied@616. Denied, // enumerator:Denied@617. }; //18. int main(argc, argv) //PU@7 funcdef:main@719. int argc; char **argv; //20. { //21. list l, n; // <- PU@322. for (n = l; n; n=n->next) //23. printf("f", n->value); // <- PU@524. return (int) Satisfied; // <- PU@625. } //Spring 2005 ECE450H1S Software Engineering II2.3 Header restructuring• Configuration management: to maintain the software when changes happensFor example: CVS• Removing redundancies in the preprocessedprogram does not solve the problem for ____________ changes• A compilation unit does not need to ___________ when its dependent symbols are not changed at all• Such unnecessary recompilations are caused by ____________________Spring 2005 ECE450H1S Software Engineering IIExample 3. False dependencySpring 2005 ECE450H1S Software Engineering IIThe removal of false dependencies• Identify dependencies• Partition the definition and declaration units into separate files, replacing dependencies with “#include”• Grouping the declarations into larger headers, if __________________________________________________• The code generation process can be done efficientlySpring 2005 ECE450H1S Software Engineering IIh2C1C2C3h4h3{C1, C2}h1{C1, C2}{C3}{C1, C2, C3}{C1,C2,C3}{C1, C2} {C3}{ }H0= <h3>H1=<h1,h2> H2=<h4>H0H1C1H0H1C2H0H2C3(a) Program unit sequences after redundancy removal where hiis the i-th global declaration and Cjis the sequence of definitions in the j-th compilation unit(b) The implicit light-weight PUDG(c) The partitioning lattice(d) Generating ordered header inclusionsh1h3h2C1h3h1h2C2h3h4C3Spring 2005 ECE450H1S Software Engineering II2.4 Clustering• Problem: too many headers are generated, because we get rid of all false dependencies• Tradeoff: Can we tolerate some false dependency for smaller number of headers, that is, to group them further into larger files?• Clustering is to group related things together, the technique is often used in data mining and machine learning • We want to cluster generated headers use the hints of dependenciesSpring 2005 ECE450H1S Software Engineering IILIMBO clustering• LIMBO is a clustering technique to minimizing information loss in dependency graphs• Group A, B into a cluster does not have


View Full Document
Download Lecture 10 - Topics in Configuration Managements
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 10 - Topics in Configuration Managements and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 10 - Topics in Configuration Managements 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?