Comparison of Abstract Data Type and Abstract State Encapsulation Detection Techniques for Architectural Understanding

Size: px
Start display at page:

Download "Comparison of Abstract Data Type and Abstract State Encapsulation Detection Techniques for Architectural Understanding"

Transcription

1 Copyright by IEEE. Published i Proceedigs of the Workig Coferece o Reverse Egieerig, pp , IEEE Computer Society. Compariso of Abstract Data Type ad Abstract State Ecapsulatio Detectio Techiques for Architectural Uderstadig Jea-Fraçois Girard Frauhofer Istitute for Experimetal Software Egieerig Sauerwiese 6 D Kaiserslauter, Germay girard@iese.fhg.de Abstract I the cotext of the authors research o architectural features recovery, abstract data type (ADT) ad abstract state ecapsulatio (ASE, also called abstract object) have bee idetified as two of the smallest compoets which are useful to build a sigificat architectural overview of the system. The authors have amed these the atomic compoets of a architecture. This paper compares five published techiques which extract ADT ad ASE from source code. A prototype tool implemetig each techique has bee developed ad applied to three medium-size systems writte i C (each over 30 Kloc). The results from each approach are compared with the atomic compoets idetified by had by a group of software egieers. These people did ot kow the automatic techiques which were goig to be applied to the systems. 1. Itroductio The Bauhaus project aims at recoverig multiple views of the software architecture of a system as it is implemeted. That is, a overview would idicate the mai compoets of the system, their coectors (how they commuicate), ad the costraits o these coectors ad compoets. More complex compoets ad coectors ca be decomposed ito simpler compoets ad coectors. For example, a scaer ad a parser are compoets of a compiler, whereas the scaer might have as a subcompoet a iput buffer. We have called atomic compoets the smallest compoets that are sigificat at the architectural level. While performig a c study [Gira97a], we have observed that abstract data types ad abstract state ecapsulatios (also called abstract objects) are two istaces of these atomic Raier Koschke, Georg Schied Uiversity of Stuttgart Breitwiesestr D Stuttgart, Germay {koschke, schied}@iformatik.ui-stuttgart.de compoets. Accordig to Sommerville [Somm92] a abstract data type (ADT) is a abstractio of a type which ecapsulates all the type s valid operatios ad hides the details of the implemetatio of those operatios by providig access to the types exclusively through a well-defied set of operatios. A abstract state ecapsulatio (ASE) is a group of global variables together with the routies which access them. These clusters are also called abstract objects or object istaces. I real systems, these atomic compoets ofte correspod to implemetatio of well-uderstood cocepts which are a good startig poit to look for more complex compoets. Such a startig poit is crucial i architectural descriptio recovery. I additio, ADT s ad ASE s are importat parts of a system eve outside the architectural poit of view. Their role has bee recogized to provide iformatio hidig ad to support maitaiability [Ghez91] ad reuse [Somm92]. The questio is, how to detect such atomic compoets whe facig a laguage which does ot have a mechaism to express them directly or whe programmers do break the ecapsulatio ad directly access the iteral data. There is rich literature i reverse egieerig o their detectio. I this paper, five techiques have bee selected ad implemeted, to be empirically studied. The results of each approach are compared with atomic compoets idetified by software egieers, i order to idetify the approach or combiatio of techiques which could help recover ADT ad ASE closest to those idetified by software egieers ad which hece would be able to best support architecture recovery. Paper Overview The remaider of the article is orgaized as follows: Sectio 2 gives a brief overview of each of the five

2 techiques compared. The followig sectio describes the systems studied, shows the istructios which were give to the software egieers who idetified atomic compoets maually, ad explais how the results are compared. Sectio 4 discusses the results. The last sectio presets the coclusios ad proposes further research. 2. Techiques to Detect Atomic Compoets This sectio itroduces five existig techiques to extract abstract state ecapsulatios or abstract data types. These techiques have bee implemeted i Refie [Rea90] o top of the Refie/C [Rea95]. The termiology used i the descriptio of the method will be defied first. Operatioal Defiitios Some programmig laguages, such as C, do ot provide cocepts for ecapsulatio of abstract data types. Ad eve i high-level programmig laguages we fid examples where programmers break the ecapsulatio priciple. Therefore, we wide the defiitio of idealized abstract state ecapsulatios ad abstract data types preseted i the itroductio to clusters of types respectively variables with their accessor routies. The iteral represetatio of abstract data types ad state ecapsulatios ca be public. This paper uses the followig defiitios: A routie is either a procedure or a fuctio. A abstract state ecapsulatio (ASE) is a group of global variables together with the routies which access them. A abstract data type (ADT) is a abstractio of a data structure ad all the type s valid operatios o that data structure. The key differece betwee ADT ad ASE is that a ADT is built aroud a type ad a ASE aroud a set of global variables. A hybrid atomic compoet (ADT/ASE) is a abstract data type that uses global variables to save state iformatio. For example, a implemetatio ca cout i a global variable how may lists have bee created. A atomic compoet is the smallest compoet which is sigificat at the architectural level. I this paper, it is either a abstract state ecapsulatio, a abstract data type, or a hybrid atomic compoet Routie Sigatures ad Refiemets This subsectio presets three techiques of extractig ADT. Their commo b is preseted first, the the variatios are explaied. At a higher level of abstractio, a abstract data type cosists of a domai of values for the type ad some allowed operatios o that type [Somm92]. I a implemetatio of a abstract data type, the domai of values is implemeted by a data structure which is read ad set by routies - its operatios. The user of a abstract data type ca declare objects of that type ad pass them as actual parameters to the operatios. Cosequetly, it is a ecessary prerequisite for operatios of a abstract data type to metio the data type i their sigature, i.e. their parameter list or their retur type i c of fuctios. That is, all routies with a data type T i their sigature are cadidates for a operatio of the abstract data type T. However, this prerequisite is ecessary but ot sufficiet. Some routies simply pass a value of T to other routies ad are o true operatios of T. May routies have more tha oe parameter type, makig it ecessary to decide which oe they belog to. For all sorts of routies which covert oe type to aother type this ca be very hard to judge. Sometimes - especially i programmig laguages that do ot provide record types such as Fortra77 - we eve have to look at several types i a parameter list to form oe abstract data type. For example, we ca have a stack implemetatio that passes the stack cotets realized by a array ad the stack poiter give as a iteger as two distict parameters. I order to distiguish betwee operatios of a abstract data type ad routies that do ot really belog to the abstract data type, several heuristics have bee proposed: Same Module heuristic: It groups together oly those routies, global variables, ad types that are declared i the same module. We used this heuristic i [Gira97a]. Part Type heuristic: It filters types i a parameter list that are part of aother type i the list. Liu ad Wilde proposed this heuristic i [Oga94, Liu90]. Access heuristic: It cosiders oly those routies as operatios of a abstract data type that access compoets of that type. Yeh et al. preseted this heuristic i [Yeh95]. Same Module Heuristic. Oe simple heuristic that follows programmig covetios ad is easy to apply is to group together oly those routies, data types, ad global variables which are declared i the same module. I c of Ada, a package body ad its specificatio would form a module. I C, modules do ot exist, but programmers simulate the lackig cocept by a header file f.h for the specificatio ad a C file f.c for the body. The Same Module heuristic assumes that programmers

3 are disciplied ad follow this covetio. Moreover, for modules with several distict abstract data types with coversio routies betwee each other this heuristic groups all those routies ad data types together. Part Type Heuristic. Ofte, we fid abstract data types that represet some sort of cotaier of other abstract data types. For example, queues are cotaiers of processes, or a accout cotais data about its ower ad the deposited moey. For such sorts of abstract data types we will have a operatio that takes a elemet ad puts it ito the cotaier. For the process queue, for example, there will be a isert routie with two argumets: the process that has to be iserted ad the queue itself. We would ot cosider isert to be a operatio for processes but for queues. The Part Type heuristic reflects that: a type PT which is used i the declaratio of aother type T is called a part type of T deoted PT < T the part type relatioship is trasitive; i.e. if PT < T1 ad T1 < T the PT < T holds a routie R belogs to a type T if T is cotaied i R s sigature ad there is o other type T i R s sigature with T < T As opposed to the Same Module heuristic, the Part Type heuristic is ivariat agaist a programmer s distributio of routies ito modules. But it assumes that a part type is actually used to put it ito its cotaier or to retrieve it from it, respectively. Sice it does ot further aalyze the actual usage, it is goig to fail if the assumptio is false. For example, if the part type relatioship is oly by accidet, or if the routie just passes the two argumets to a real operatio of the abstract data types, it will cosider the routie to be a operatio of the abstract data type. Access Heuristic. Accordig to Sommerville, a abstract data type is a abstractio of a type which ecapsulates all the type s valid operatios ad hides the details of the implemetatio of those operatios by providig access to the types exclusively through a well-defied set of operatios. From this idealized defiitio it follows that all routies that access iteral compoets of the abstract data type are cosidered to be the data type s operatios which is exactly the attitude of the Access heuristic. access for a type T meas (Yeh et. al. origially oly proposed to cosider iteral access to record types, but the same ca be applied to arrays ad poiters as well): if T is a array the ay idex subscript is a iteral access; if T is a record the ay field selectio is a iteral access; if T is a poiter the ay dereferece is a iteral access. As opposed to the Part Type heuristic, the Access heuristic really checks how the parameter type is used. However, i real programs we ofte fid Sommerville s rule broke. This ofte happes for reasos of efficiecy or coveiece i c of data types of which the programmer is coviced that their represetatio will ever chage. For example, a abstract data type for complex umbers will always have a imagiary ad a real part. However, eve the all routies which access iteral compoets of a type have to be chaged whe the represetatio of this type chages. This idicates a high couplig Global Variable Refereces Two of the techiques preseted i the last subsectio have bee exteded by their authors to idetify ASE. The Same Module heuristic produces ASE cadidates by groupig global variables ad routies which access them, oly if they are declared i the same module. Yeh et al. add a similar strategy to their Access heuristic to idetify ASE. It groups global variables ad all the routies which access them, regardless of where they are declared. We will refer to this strategy as global access. A alterative to exted iteral access heuristic to detect ASE is to keep oly the routies which access the iteral parts of a variable. We will refer to this strategy as pure iteral access. Each approach merges the results of ASE ad ADT detectio ito a hybrid cadidate if there is a routie that belogs to both a ADT ad a ASE Itercoectivity Metric The approach proposed by Cafora et al. [Caf93, Caf96] uses a heuristic to geerate ASE cadidates. These cadidates are the raked accordig to a idex which measures the variatio iteral coectivity of the system due to the itroductio of these ASE. The method selects cadidates with a value of iteral coectivity above a threshold obtaied by statistical samplig. The heuristic ad the evaluatio metric are defied o a bipartite graph which describes the usage of global variables by fuctios. They ca be explaied more easily i terms of the followig defiitios, give a fuctio f ad a global variable v: the cotext of f is the set of all variables it sets or uses fuctios related to f are all fuctios which set or use variables i the cotext of f closely-related fuctios of f are all fuctios which set or use oly variables i the cotext of f

4 fuctios referecig v are the set of all fuctios which set or use v The cadidates geerated aroud fuctio f cosist of: the cotext of f closely-related fuctios of f The iteral coectivity measure (IC) ad improvemet i iteral coectivity ( IC) are defied respectively as: closely related fuctios of F IC(F) = fuctios related to F { f ' cotext of f ' = { v} } IC(F) = IC(F) fuctios referecig v v i cotext of F The origial approach preseted i [Caf96] uses the followig algorithm: repeat build type-variable-referece graph create cluster cadidates usig a heuristic for each cadidate compute improvemet i cohesio metric ( IC) itroducig these cadidates if improvemet >= threshold the select cadidate else slice remaiig fuctios usig differet clusters variables util graph cotais oly isolated subgraphs cosistig of oe variable groupig with oe or more fuctios I this paper, the reported thresholds were established by ruig the prototype with all threshold values betwee 0.1 ad 0.9 by icremets of 0.1; idetifyig the threshold which produced the best results; ad performig more rus i itervals of 0.1 cetered o this threshold usig icremets of The threshold correspodig to the best results is reported. The curret paper leaves out the slicig step (removig the slicig step reduces this approach to cosiderig oly oe iteratio), because this would modify the fuctios of the resultig system, hece makig the compariso with maual results ad results from other techiques more ambiguous Clusterig Bd o proposed a clusterig of routies ito modules bd o a similarity metric [Schw91]. His work was aimed at detectig subsystems ad therefore, he oly cosidered routies. This approach was exteded to detect atomic compoets i [Gira97b]. It cosiders routies, types, global variables, ad relatioships amog them. The clusterig algorithm used i this approach works as follows: place each routie i a group by itself repeat idetify the most similar groups combie them util the existig groups are satisfactory I each iteratio, the most similar groups are combied. This group similarity is bd o a similarity betwee simple etities, so it is explaied first. These simple etities are routies, global variables, ad types. Give two simple etities A ad B, the similarity metric used durig clusterig is defied as follows: Commo( A, B) + k Liked( A, B) Sim( A, B) = Commo( A, B) + d Distict( A, B) wherei Commo (A,B) reflects the umber of commo attributes of A ad B ad Distict (A,B) reflects the umber of distict attributes. Attributes of A are all programmig laguage etities (preseted i figure 1) that have a edge to or from A. 1 m calls retur-type routie parameter-of-type m user-defied type is-part-of-type m Figure 1. Programmig Laguage Etities ad Relatioships. Liked (A,B) is 1 if A shares a edge with B, otherwise it is 0. The two parameters k 0 ad d 0 are weights give to Liked ad Distict i Sim. They have to be ascertaied by experimets o a sample of the subject system. The parameter 0 is used for ormalizatio purposes, i this paper it is set to 0. The similarity betwee compoets to merge is computed i each iteratio of the clusterig algorithm as Sim(A B, X) = (Sim(A,X) + Sim(B,X)) / Ivestigated Techiques of-type actual-parameter uses m sets m m etity global variable The previous sectios itroduced idividual techiques of detectig ADT ad ASE. Table 1 lists the combiatios 1 1 relatioship of cardiality 1:

5 of these techiques ivestigated i the experimet described i sectio 3. Note that ot all approaches detect both ASE ad ADT. Method Table 1. Ivestigated Approaches. 3. Experimet Setup I order to evaluate the proposed techiques, they were applied to three medium-size programs ad the results were compared to the atomic compoets idetified by software egieers. The compoets idetified by the approach are called the cadidate compoets. The atomic compoets idetified by software egieers will be called referece compoets. This sectio explais the experimetal setup ad the aalysis method used Systems Studied The aalyses described above were applied to the followig C programs (see Table 2 for their characteristics): Aero is a X-widow-bd simulator for rigid body systems [Kell95], bash is a Uix shell, ad CVS is a tool for cotrollig cocurret software developmet Huma Aalysts ADT detectio techique ASE detectio techique Same Module Same Module Same Module Global ad Access/ Pure Access Access Access Part Type Part Type --- Global Access Access Delta-IC --- Delta-IC System Name Table 2. Subject Systems i the Experimet. Versio Lies of Code # user defied types # global variables aero Kloc # user defied routies bash Kloc cvs Kloc Software egieers were give the task of idetifyig atomic compoets i each system. The systems were completely ukow to them. Table 3 summarizes their experiece ad how the task was divided amog them. There was o overlap of their work. They eeded about 20 hours for each system to gather the atomic compoets of the respective systems. software egieer Table 3. Huma Aalysts. Programmig Experiece se1 2 years research bash se2 2 years research bash se3 5 years research bash se4 5 years research cvs se5 > 5 years idustry; 1.5 years research aero System Aalyzed The software egieers were provided with the source code from each system, a summary of coectios betwee global variables, types, ad fuctios, ad the guidelies give i Figure 2. Idetify the existig atomic compoets preset i this system. These are ASE, ADT, or a combiatio of both. Here we gave the defiitios of abstract data type ad abstract state ecapsulatio that we already preseted i the itroductio (sectio 1) of this paper. The key differece of ADT ad ASE is that a ADT is built aroud a type ad a ASE aroud a set of simple global variables. This ca be decided automatically, so do ot waste time writig it dow. Just idetify the fuctios, variables, ad types which belog together because they are cohesive ad correspod to the idea of ASE ad/or ADT. I practice, programmers sometimes break the ecapsulatio priciple, therefore we wide the defiitio of abstract state ecapsulatios ad abstract data types to clusters of types or variables respectively with their accessor routies. The iteral represetatio of ADTs ad ASEs ca be public. NB ot all fuctios, variables or types have to be put ito ASE, ADT & ADT/ASE. I geeral, your experiece ad uderstadig has more value tha rules, you are the last judge of what costitutes a ASE/ ADT. Figure 2. Guidelies for Huma Aalysts. Table 4 shows the respective umbers of all forms of atomic compoets (abstract data types, abstract state ecapsulatio, hybrid atomic compoets) that were idetified by the group of software egieers for each studied system. Table 4. Referece Atomic Compoets. System #ADT #ASE #Hybrid Aero Bash CVS

6 The variatio i experiece ad the umber of people workig o each system prevet compariso of differet techiques across systems util cross-validatio ad future studies characterize the importace of these factors. However, prelimiary ispectio of the atomic compoets idetified foud o aberrat compoets. Furthermore, the fact that oe of the software egieers kew the automatic to be applied to the systems, preveted bias toward a specific approach Compariso of Cadidate ad Referece Compoets This subsectio explais how imperfect matches betwee cadidate ad referece compoets are classified ad compared. The followig compariso defies a approximate matchig to accommodate the fact that the distributio of fuctios, global variables, ad types is sometimes subjective. That is, software egieers do sometimes come up with differet ADT s ad ASE s give the same program. We treat oe compoet S to be part of aother compoet T (deoted by S << T) if at least 70 percet of the elemets of S are also i T. The relatioship betwee the cadidates ad referece compoets ca be classified ito six differet cs: 1~1 is a relatioship betwee a cadidate C ad a referece compoet R; where C << R ad R << C. 1~ is a relatioship betwee a cadidate C ad referece compoets R i : R i << C ( i > 1 ). I other words, the cadidate was ot detailed eough. ~1 is a relatioship where several cadidates C i together built oe referece compoet R: C i << R ( i > 1 ). I this c the cadidate was too detailed. 1<~1 is a relatioship betwee a cadidate C ad a referece compoet R whe C<<R, but ot R<<C ad there is o C ( C C ) such that C <<R. 1>~1 is a relatioship betwee a cadidate C ad a referece compoet R whe R<<C, but ot C<<R ad there is o R ( R R ) such that C<<R. ~m is a relatioship where cadidates ad referece compoets have o recogizable coectio. The best result is a 1~1 relatioship, of course. But eve 1~, ~1, 1<~1, ad 1>~1 relatioships are useful. A software egieer, give these cadidates, could easily combie or split them ito atomic compoets. A ~m relatioship does ot provide useful iformatio to the users of the approach. These six cs ca be classified ito 3 categories accordig to their usefuless to a software egieer lookig for atomic compoets: good (1~1) - they require a quick verificatio to idetify the few elemets which should be removed or added to the atomic compoet; ok (1~, ~1, 1<~1, ad 1>~1) - they require more attetio to split, combie or refie a compoet. This category ca be further subdivided: - too detailed (~1, 1<~1) - eed to be combied to produce cadidate comparable to referece; - too large (1~, 1>~1) - eed to be split to produce cadidate comparable to referece. bad (~m) - they are ot close eough to the real compoets to guide the software egieer s work. This correspods to the false positives of a approach Accuracy I order to idicate the quality of imperfect matches of cadidate ad referece compoets, a accuracy factor has bee associated with each match. The accuracy betwee a cadidate C ad a referece R is computed by the followig formula: C R accuracy( C, R) = C R For matches betwee more tha two compoets (~1, ad 1~), the uio of all elemets of the compoets is used to compute the accuracy. The accuracy is ot defied for ~m matches, because the m refereces are ot always uique. 4. Results This sectio compares the atomic compoets recovered by the approaches to those idetified by software egieers, both at the quatitative ad qualitative level. Note that the huma itervetio suggested i Access ad Delta-IC methods was ot performed i order to make the compariso fair to the other techiques Quatitative Compariso The recovered umbers of ADT ad ASE compoets for each system by each method (see sectio 2.5) are reported i Tables 5, 6 ad 7. The recovered compoets are classified accordig to the categories: good, too detailed, ad too large. Each umber i the shaded area uder the good ad ok colum is the absolute umber (#) of recovered compoets ad the average accuracy (acc). As some techiques produce oly ADT or ASE, they are ot preseted i table where they do ot apply.

7 Method Same Module Table 5. Detected ADT. System Good ADT too large OK too detailed # acc. # acc # acc Aero Bash CVS Part Type Aero Pure Access Global & Access/ Method Same Module Pure Access Global & Access/ Bash CVS Aero Bash CVS Aero Bash CVS Aero Bash CVS Table 6. Detected ASE. System Good ADT/ASE too large OK too detailed # acc. # acc # acc. Aero Bash CVS Aero Bash CVS Aero Bash CVS Aero Bash CVS Method Same Module Pure Access Global & Access Table 7. Detected Hybrid ADT/ASE. System Good ASE too large These results ca be summarized i Table 8. The etries of this table are computed as the accuracy multiplied by the umber of compoets summed up for the good, too large, ad too detailed categories. The best results are shaded i this table. These results idicate that Same Module ad Part Type are overall better tha the other techiques, but the false positives of each approach have to be cosidered i the compariso. False Positives The accuracy is ot defied for the bad (~m) category. Table 9 shows the umber of compoets wrogly ideti- OK too detailed # acc. # acc # acc Aero Bash CVS Aero Bash CVS Aero Bash CVS Delta IC Aero Bash CVS Aero Bash CVS Table 8. Overall Compariso. Met aero bash cvs adt adt / adt adt / SM , PT , PIA GIA DIC adt adt/ SS

8 fied by each techique, i.e., the false positives. It is iterestig to ote that Same Module ad Part Type are both the techiques with the best results ad with the lowest umber of false positives. Table 9. Number of False Positives. Method aero bash cvs Same Module Pure Access Global & Access Part Type Delta IC Complemetarity of Techiques Before decidig to select oe approach ad exclude the others, oe has to cosider the additioal iformatio provided by the other techiques. As a first estimate of the cotributio of each approach, we cosidered the good cadidates from each techique. For each compoet idetified by our software egieers ad for each approach, we looked at the closest sigle cadidates with a accuracy of more tha 60%. The we looked at how may ew correct atomic compoets each approach foud which were ot idetified by the Same Module heuristic. This iformatio is preseted i Table 10. Table 10. New Correct Atomic Compoets. Method aero bash cvs Idetified by Software Egieers These data suggest that few ew cadidates that could ot be foud by Same Module aloe are foud by other techiques, except for bash, where Part Type foud may Qualitative Compariso Foud by ay approach Foud by more tha 1 approach Foud by Same Module Foud by Part Type aloe Foud by Delta IC aloe Foud by Global & Access aloe Foud by Pure Access aloe After the quatitative compariso described i the last sectio we aalyzed divergeces betwee cadidate ad referece compoets for the respective methods. Same Module. Same Module groups all coected routies, variables, ad types i the same module. The postulate is that the programmer structures files accordig to atomic compoets. Detectio of abstract data types with this heuristic did ot work well for all systems. Ofte, there was a header file with system-wide type declaratios. The routies, however, were implemeted i several other C files that icluded the type declaratios. Detectio of abstract state ecapsulatio succeeded better, sice global variables are ever declared i header files (they ca oly be declared there as exteral). Large files ca be a problem for the Same Module heuristic. I CVS, for example, we foud a type RCS ode which ecapsulates depedecies o the uderlyig revisio cotrol system (RCS) of CVS. This ode type was declared i oe huge file where may routies used it as a parameter. Cosequetly, Same Module created a very large atomic compoet cadidate. The group of software egieers has refied this cadidate ito differet aspects of the RCS subsystem. Part Type. The Part Type heuristic is a refiemet for detectig abstract data types to overcome erroeously large compoets. It attaches a routie to those types of its sigature that do ot have a cotaiig type that is listed i the routie s sigature. The assumptio is that the part type is put ito the cotaier or retrieved from it. Compared to the other techiques, Part Type revealed most abstract data types with the highest accuracy rate. However, it still detected oly a fractio of all referece compoets. Moreover, it does ot check how the parameters are actually used, ad therefore may routies which do ot directly use the value of a parameter, but oly pass this parameter to a routie they call (probably the true operator of the ADT) would be icluded ito ADT. I c of CVS this could be observed for the RCS ode type ad the hash table type already metioed. Access. The Access heuristic groups user-defied data types ad global variables with the routies that access their iteral parts. This aalysis goes beyod the Part Type heuristic i that it really checks how routies treat types ad variables. This heuristic did badly i the compariso for at least two reasos. First, if there is a global table, such as a array of error messages, all readers of this table are cosidered operators of this abstract state ecapsulatio which yields a erroeously large compoet. Secod, it does ot work for primitive types, such as a file descriptor i Uix which is represeted as a iteger type. It is a commo pheomeo for abstract state ecapsulatio to have separate global variables that together form a object. For example, stacks are ofte

9 declared as two distict variables, oe for the cotets ad oe for the stack poiter. The latter is declared as iteger ad used as a idex to the array implemetatio for the cotets. The the stack poiter will ot be recogized as part of the abstract state ecapsulatios, sice iteral access to a primitive data type is meaigless. Sice abstract state ecapsulatios have exactly oe istace (otherwise they would be abstract data types), programmers do ot make the effort to put them together i a record which would make their coectio more obvious. But eve if the routies are ot cosidered operators of the atomic compoet, this aalysis still recovers useful iformatio. All these routies might have to be updated whe the represetatio of the type chages.. similarity iteratively merges compoets with maximum similarity util the maximum similarity value falls short of a give threshold. After mergig two compoets we must compute the similarities of the ew compoet to all other compoets. We ivestigated two differet variats. Usig Sim(A B, X) = max(sim(a,x), Sim(B,X)) typically produced oe huge compoet cotaiig most of the system ad a large umber of very small compoets. Useful cluster sizes could be achieved usig the average istead of the maximum, i.e. Sim(A B, X) = (Sim(A,X) + Sim(B,X)) / 2. The similarities betwee the iitial compoets ad the clusterig process itself deped o several parameters. Oe fudametal problem was to fix these parameters i a sesible way. We did ot succeed i fidig (by trial ad error) a parameter combiatio that produces good results for ay of the three systems though we ra dozes of aalyses with various parameters. Fially, we used threshold (aero & bash =0.1, cvs= 0.2) for the clusterig loop. The factors k=1.0 ad d=3.0 tured out to be appropriate. Delta-IC. Delta-IC-bd clusterig uses a heuristic to geerate cadidates aroud each fuctio. For a fuctio F this cadidate is composed of all the variables set or used by F ad all the fuctios which oly access those variables. Oce these cadidates are geerated, the approach computes the improvemet i a iteral coectivity metric (delta-ic) due to the cadidate itroductio. Every cadidate with a threshold above delta-ic is kept. Due to the compariso betwee techiques, we could ot slice fuctios which beloged to more tha oe cadidate. As a result, we decided to merge overlappig cadidates before comparig them to the referece compoets i order to have o-overlappig cadidates for compariso. The major difficulty is establishig the right thresholds. They deped o the specificity of the system studied ad caot be directly reused (bash & aero = 0.18 cvs = 0.51). Oe practical solutio is to take a sample of the system ad perform maual recovery by applyig the approach o the sample ad adjustig the threshold accordigly. It is ecessary to compromise betwee the efforts required to aalyze a sample maually ad the quality of the results. With the metioed threshold, relatively iterestig results were obtaied. It is a topic of further research to establish the relatioship betwee sample size ad result quality. Factors to Cosider. The software egieers were ot always sure whether a routie belogs to oe atomic compoet or to aother. Examples for such debatable cs are trasformatio routies from oe atomic compoet ito aother. It is ot always clear whether they belog to the target type of the trasformatio, if there is a high couplig to the source type as well. Aother problem are closely-related types. For example, i CVS there is a hash table implemetatio that cotais two itertwied types, oe for lists ad oe for odes. The oe for odes has a poiter that deotes the ext elemet i the list. Nevertheless, the group of software egieers cosidered them as two distict abstract data types. That is, the cocepts of abstract data type ad state ecapsulatio are vague, ad therefore o approach will ever detect atomic compoets with absolute accuracy. However, they are the basic compoets of software architectures. They have to be uderstood to uderstad the whole system. 5. Coclusios A previous c study lead the authors to regard abstract data types ad abstract state ecapsulatios as atomic compoets which are useful i producig a architectural view of a system. I this paper we compared five existig techiques to detect atomic compoets by applyig them to three publicly available medium-size systems writte i C (bash, cvs, aero). Two groups of software egieers compiled a list of referece atomic compoets for each system. These lists were used to compare the results of the techiques with huma judgemet. Accordig to this compariso, the Same Module heuristic idetifies more abstract state ecapsulatios ad hybrid atomic compoets ad produces less false positives tha ay other approach. However, it relies o the assumptio that programmers usually declare distict atomic compoets i distict modules. This assumptio might be too strog for systems other tha those studied, especially for legacy systems. For the idetificatio of abstract data types (ADT), the Part Type heuristic performed slightly better tha the other techiques. I the c of bash, it showed that it ca complemet the Same Module approach well. However, it ca oly recover ADT s.

10 There are three alteratives to replace Same Module heuristic whe its assumptio does ot hold: Delta-IC, ad Access. Both ad Delta-IC have parameters which deped o the system studied ad have to be adjusted. This calibratio requires time, ad fidig the ideal parameter or a close approximatio quickly is ot likely. did ot perform well i this study. Delta-IC performed well for bash ad cvs, but it ca oly extract ASE. Access seems to offer a better compromise, it has reasoable results ad does ot require the adjustmet of parameters. This study hited at the level of support that tools could provide i idetifyig atomic compoets. The techiques ca quickly yield cadidates that ca be checked by software egieers withi miutes. However, all techiques could oly recover a small portio of the atomic compoets that were listed by software egieers. Ad may cadidates they provide correspod oly roughly to those atomic compoets; i.e., elemets of these atomic compoets were superfluous or lackig. Whereas the groups of software egieers eeded about 20 hours to compile the list of atomic compoets for each of our subject systems, each atomic compoet produced by the techiques ca be checked by software egieers withi miutes. Future Work This experimet will be exteded to a larger umber of systems to obtai more sigificat results ad to be able to evaluate how far these coclusios ca be geeralized. Studyig the behavior of automatic techiques to recover atomic compoets o a set of systems where they are idetified by humas ca help us see possibilities for improvig these techiques. Combiatios of techiques will be explored to try to obtai more complete results ad filter the false positives. However, it is already clear that ew techiques which could idetify more atomic compoets are eeded to obtai most of the atomic compoets which are useful to idetify the more complex compoets of the architecture of a system. Ackowledgmet We would like to thak Jea-Marc DeBaud ad Erhard Plödereder for their support of this project ad their isightful iputs to this research. We thak the reviewers for their valuable suggestios ad remarks. We would like to express special thaks to Joachim Bayer, Hiltrud Betz, Kristia Ludqvist, Mia Mäkäräie, ad Klaus Schmid for their maual aalysis of the three subject systems used i our compariso. Refereces [Caf93] G. Cafora, A. Cimitile, M. Muro, ad C. J. Taylor. Extractig abstract data type from c programs: A c study. I Iteratioal Coferece o Software Maiteace, pages IEEE Computer Society Press, September [Caf96] G. Cafora, A. Cimitile, ad M. Muro. A improved algorithm for idetifyig objects i code. Joural of Software Practice ad Experiece, 26(1):25 48, Jauary [Ghez91] C. Ghezzi, M. Jazayeri, ad D. Madrioli. Fudametal Software Egieerig. Pretice Hall Iteratioal, [Gira97a] J.F Girard ad R. Koschke. Fidig compoets i a hierarchy of modules: a step towards architectural uderstadig. I Iteratioal Coferece o Software Maiteace, [Gira97b] J.F Girard ad R. Koschke. A metric-bd approach to detect abstract data types ad abstract state ecapsulatio. submitted for publicatio, [Kell95] H. Keller, H. Stolz, A. Ziegler, ad T. Bräul. Virtual mechaics simulatio ad aimatio of rigid body systems with aero. Simulatio for Uderstadig, 65(1):74 79, July [Liu90] S.S. Liu ad N. Wilde. Idetifyig objects i a covetioal procedural laguage: A example of data desig recovery. I Coferece o Software Maiteace, pages IEEE Computer Society Press, November [Oga94] R.M. Ogado, S.S. Yau, ad N. Wilde. A object fider for program structure uderstadig i software maiteace. Joural of Software Maiteace, 6(5):261 83, September-October [Rea90] Reasoig Systems, Ic., 3260 Hillview Aveue, Palo Alto, CA Refie User s Guide, [Rea95] Reasoig Systems, Ic., 3260 Hillview Aveue, Palo Alto, CA Refie/C Programmer s Guide, [Schw91] R. W.. A itelliget tool for re-egieerig software modularity. I Iteratioal Coferece o Software Egieerig, pages 83 92, May [Somm92] I. Sommerville. Software Egieerig. Addiso Wesley, fourth editio, [Yeh95] A.S. Yeh, D.Harris, ad H. Reubestei. Recoverig abstract data types ad object istaces from a covetioal procedural laguage. I Proc. of. the Secod Workig Coferece o Reverse Egieerig, pages , July IEEE Computer Society Press.

A Metric-based Approach to Detect Abstract Data Types and State Encapsulations

A Metric-based Approach to Detect Abstract Data Types and State Encapsulations Copyright by IEEE. Published i Proceedigs of the Coferece o Automated Software Egieerig, 1997. IEEE Computer Society. A Metric-based Approach to Detect Abstract Data Types ad State Ecapsulatios Jea-Fraçois

More information

The Magma Database file formats

The Magma Database file formats The Magma Database file formats Adrew Gaylard, Bret Pikey, ad Mart-Mari Breedt Johaesburg, South Africa 15th May 2006 1 Summary Magma is a ope-source object database created by Chris Muller, of Kasas City,

More information

Chapter 10. Defining Classes. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 10. Defining Classes. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 10 Defiig Classes Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 10.1 Structures 10.2 Classes 10.3 Abstract Data Types 10.4 Itroductio to Iheritace Copyright 2015 Pearso Educatio,

More information

Chapter 1. Introduction to Computers and C++ Programming. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 1. Introduction to Computers and C++ Programming. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 1 Itroductio to Computers ad C++ Programmig Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 1.1 Computer Systems 1.2 Programmig ad Problem Solvig 1.3 Itroductio to C++ 1.4 Testig

More information

A SOFTWARE MODEL FOR THE MULTILAYER PERCEPTRON

A SOFTWARE MODEL FOR THE MULTILAYER PERCEPTRON A SOFTWARE MODEL FOR THE MULTILAYER PERCEPTRON Roberto Lopez ad Eugeio Oñate Iteratioal Ceter for Numerical Methods i Egieerig (CIMNE) Edificio C1, Gra Capitá s/, 08034 Barceloa, Spai ABSTRACT I this work

More information

Outline. Research Definition. Motivation. Foundation of Reverse Engineering. Dynamic Analysis and Design Pattern Detection in Java Programs

Outline. Research Definition. Motivation. Foundation of Reverse Engineering. Dynamic Analysis and Design Pattern Detection in Java Programs Dyamic Aalysis ad Desig Patter Detectio i Java Programs Outlie Lei Hu Kamra Sartipi {hul4, sartipi}@mcmasterca Departmet of Computig ad Software McMaster Uiversity Caada Motivatio Research Problem Defiitio

More information

Elementary Educational Computer

Elementary Educational Computer Chapter 5 Elemetary Educatioal Computer. Geeral structure of the Elemetary Educatioal Computer (EEC) The EEC coforms to the 5 uits structure defied by vo Neuma's model (.) All uits are preseted i a simplified

More information

A New Morphological 3D Shape Decomposition: Grayscale Interframe Interpolation Method

A New Morphological 3D Shape Decomposition: Grayscale Interframe Interpolation Method A ew Morphological 3D Shape Decompositio: Grayscale Iterframe Iterpolatio Method D.. Vizireau Politehica Uiversity Bucharest, Romaia ae@comm.pub.ro R. M. Udrea Politehica Uiversity Bucharest, Romaia mihea@comm.pub.ro

More information

3D Model Retrieval Method Based on Sample Prediction

3D Model Retrieval Method Based on Sample Prediction 20 Iteratioal Coferece o Computer Commuicatio ad Maagemet Proc.of CSIT vol.5 (20) (20) IACSIT Press, Sigapore 3D Model Retrieval Method Based o Sample Predictio Qigche Zhag, Ya Tag* School of Computer

More information

Chapter 5. Functions for All Subtasks. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 5. Functions for All Subtasks. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 5 Fuctios for All Subtasks Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 5.1 void Fuctios 5.2 Call-By-Referece Parameters 5.3 Usig Procedural Abstractio 5.4 Testig ad Debuggig

More information

Improving Template Based Spike Detection

Improving Template Based Spike Detection Improvig Template Based Spike Detectio Kirk Smith, Member - IEEE Portlad State Uiversity petra@ee.pdx.edu Abstract Template matchig algorithms like SSE, Covolutio ad Maximum Likelihood are well kow for

More information

CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design

CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design College of Computer ad Iformatio Scieces Departmet of Computer Sciece CSC 220: Computer Orgaizatio Uit 11 Basic Computer Orgaizatio ad Desig 1 For the rest of the semester, we ll focus o computer architecture:

More information

Ones Assignment Method for Solving Traveling Salesman Problem

Ones Assignment Method for Solving Traveling Salesman Problem Joural of mathematics ad computer sciece 0 (0), 58-65 Oes Assigmet Method for Solvig Travelig Salesma Problem Hadi Basirzadeh Departmet of Mathematics, Shahid Chamra Uiversity, Ahvaz, Ira Article history:

More information

Bayesian approach to reliability modelling for a probability of failure on demand parameter

Bayesian approach to reliability modelling for a probability of failure on demand parameter Bayesia approach to reliability modellig for a probability of failure o demad parameter BÖRCSÖK J., SCHAEFER S. Departmet of Computer Architecture ad System Programmig Uiversity Kassel, Wilhelmshöher Allee

More information

CIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13

CIS 121 Data Structures and Algorithms with Java Spring Stacks and Queues Monday, February 12 / Tuesday, February 13 CIS Data Structures ad Algorithms with Java Sprig 08 Stacks ad Queues Moday, February / Tuesday, February Learig Goals Durig this lab, you will: Review stacks ad queues. Lear amortized ruig time aalysis

More information

Lecture 5. Counting Sort / Radix Sort

Lecture 5. Counting Sort / Radix Sort Lecture 5. Coutig Sort / Radix Sort T. H. Corme, C. E. Leiserso ad R. L. Rivest Itroductio to Algorithms, 3rd Editio, MIT Press, 2009 Sugkyukwa Uiversity Hyuseug Choo choo@skku.edu Copyright 2000-2018

More information

Τεχνολογία Λογισμικού

Τεχνολογία Λογισμικού ΕΘΝΙΚΟ ΜΕΤΣΟΒΙΟ ΠΟΛΥΤΕΧΝΕΙΟ Σχολή Ηλεκτρολόγων Μηχανικών και Μηχανικών Υπολογιστών Τεχνολογία Λογισμικού, 7ο/9ο εξάμηνο 2018-2019 Τεχνολογία Λογισμικού Ν.Παπασπύρου, Αν.Καθ. ΣΗΜΜΥ, ickie@softlab.tua,gr

More information

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

Chapter 11. Friends, Overloaded Operators, and Arrays in Classes. Copyright 2014 Pearson Addison-Wesley. All rights reserved. Chapter 11 Frieds, Overloaded Operators, ad Arrays i Classes Copyright 2014 Pearso Addiso-Wesley. All rights reserved. Overview 11.1 Fried Fuctios 11.2 Overloadig Operators 11.3 Arrays ad Classes 11.4

More information

Task scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation

Task scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation 6-0-0 Kowledge Trasformatio from Task Scearios to View-based Desig Diagrams Nima Dezhkam Kamra Sartipi {dezhka, sartipi}@mcmaster.ca Departmet of Computig ad Software McMaster Uiversity CANADA SEKE 08

More information

CSC165H1 Worksheet: Tutorial 8 Algorithm analysis (SOLUTIONS)

CSC165H1 Worksheet: Tutorial 8 Algorithm analysis (SOLUTIONS) CSC165H1, Witer 018 Learig Objectives By the ed of this worksheet, you will: Aalyse the ruig time of fuctios cotaiig ested loops. 1. Nested loop variatios. Each of the followig fuctios takes as iput a

More information

How do we evaluate algorithms?

How do we evaluate algorithms? F2 Readig referece: chapter 2 + slides Algorithm complexity Big O ad big Ω To calculate ruig time Aalysis of recursive Algorithms Next time: Litterature: slides mostly The first Algorithm desig methods:

More information

Python Programming: An Introduction to Computer Science

Python Programming: An Introduction to Computer Science Pytho Programmig: A Itroductio to Computer Sciece Chapter 6 Defiig Fuctios Pytho Programmig, 2/e 1 Objectives To uderstad why programmers divide programs up ito sets of cooperatig fuctios. To be able to

More information

Evaluation scheme for Tracking in AMI

Evaluation scheme for Tracking in AMI A M I C o m m u i c a t i o A U G M E N T E D M U L T I - P A R T Y I N T E R A C T I O N http://www.amiproject.org/ Evaluatio scheme for Trackig i AMI S. Schreiber a D. Gatica-Perez b AMI WP4 Trackig:

More information

6.854J / J Advanced Algorithms Fall 2008

6.854J / J Advanced Algorithms Fall 2008 MIT OpeCourseWare http://ocw.mit.edu 6.854J / 18.415J Advaced Algorithms Fall 2008 For iformatio about citig these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. 18.415/6.854 Advaced Algorithms

More information

Lower Bounds for Sorting

Lower Bounds for Sorting Liear Sortig Topics Covered: Lower Bouds for Sortig Coutig Sort Radix Sort Bucket Sort Lower Bouds for Sortig Compariso vs. o-compariso sortig Decisio tree model Worst case lower boud Compariso Sortig

More information

. Written in factored form it is easy to see that the roots are 2, 2, i,

. Written in factored form it is easy to see that the roots are 2, 2, i, CMPS A Itroductio to Programmig Programmig Assigmet 4 I this assigmet you will write a java program that determies the real roots of a polyomial that lie withi a specified rage. Recall that the roots (or

More information

Lecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming

Lecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming Lecture Notes 6 Itroductio to algorithm aalysis CSS 501 Data Structures ad Object-Orieted Programmig Readig for this lecture: Carrao, Chapter 10 To be covered i this lecture: Itroductio to algorithm aalysis

More information

Computers and Scientific Thinking

Computers and Scientific Thinking Computers ad Scietific Thikig David Reed, Creighto Uiversity Chapter 15 JavaScript Strigs 1 Strigs as Objects so far, your iteractive Web pages have maipulated strigs i simple ways use text box to iput

More information

Sorting in Linear Time. Data Structures and Algorithms Andrei Bulatov

Sorting in Linear Time. Data Structures and Algorithms Andrei Bulatov Sortig i Liear Time Data Structures ad Algorithms Adrei Bulatov Algorithms Sortig i Liear Time 7-2 Compariso Sorts The oly test that all the algorithms we have cosidered so far is compariso The oly iformatio

More information

Chapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 9. Pointers and Dynamic Arrays. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 9 Poiters ad Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 9.1 Poiters 9.2 Dyamic Arrays Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Slide 9-3

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 19 Query Optimizatio Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio Query optimizatio Coducted by a query optimizer i a DBMS Goal:

More information

n Some thoughts on software development n The idea of a calculator n Using a grammar n Expression evaluation n Program organization n Analysis

n Some thoughts on software development n The idea of a calculator n Using a grammar n Expression evaluation n Program organization n Analysis Overview Chapter 6 Writig a Program Bjare Stroustrup Some thoughts o software developmet The idea of a calculator Usig a grammar Expressio evaluatio Program orgaizatio www.stroustrup.com/programmig 3 Buildig

More information

Data Structures and Algorithms. Analysis of Algorithms

Data Structures and Algorithms. Analysis of Algorithms Data Structures ad Algorithms Aalysis of Algorithms Outlie Ruig time Pseudo-code Big-oh otatio Big-theta otatio Big-omega otatio Asymptotic algorithm aalysis Aalysis of Algorithms Iput Algorithm Output

More information

Analysis Metrics. Intro to Algorithm Analysis. Slides. 12. Alg Analysis. 12. Alg Analysis

Analysis Metrics. Intro to Algorithm Analysis. Slides. 12. Alg Analysis. 12. Alg Analysis Itro to Algorithm Aalysis Aalysis Metrics Slides. Table of Cotets. Aalysis Metrics 3. Exact Aalysis Rules 4. Simple Summatio 5. Summatio Formulas 6. Order of Magitude 7. Big-O otatio 8. Big-O Theorems

More information

Chapter 4. Procedural Abstraction and Functions That Return a Value. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 4. Procedural Abstraction and Functions That Return a Value. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 4 Procedural Abstractio ad Fuctios That Retur a Value Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 4.1 Top-Dow Desig 4.2 Predefied Fuctios 4.3 Programmer-Defied Fuctios 4.4

More information

Chapter 3 Classification of FFT Processor Algorithms

Chapter 3 Classification of FFT Processor Algorithms Chapter Classificatio of FFT Processor Algorithms The computatioal complexity of the Discrete Fourier trasform (DFT) is very high. It requires () 2 complex multiplicatios ad () complex additios [5]. As

More information

What are we going to learn? CSC Data Structures Analysis of Algorithms. Overview. Algorithm, and Inputs

What are we going to learn? CSC Data Structures Analysis of Algorithms. Overview. Algorithm, and Inputs What are we goig to lear? CSC316-003 Data Structures Aalysis of Algorithms Computer Sciece North Carolia State Uiversity Need to say that some algorithms are better tha others Criteria for evaluatio Structure

More information

Image Segmentation EEE 508

Image Segmentation EEE 508 Image Segmetatio Objective: to determie (etract) object boudaries. It is a process of partitioig a image ito distict regios by groupig together eighborig piels based o some predefied similarity criterio.

More information

IMP: Superposer Integrated Morphometrics Package Superposition Tool

IMP: Superposer Integrated Morphometrics Package Superposition Tool IMP: Superposer Itegrated Morphometrics Package Superpositio Tool Programmig by: David Lieber ( 03) Caisius College 200 Mai St. Buffalo, NY 4208 Cocept by: H. David Sheets, Dept. of Physics, Caisius College

More information

CIS 121 Data Structures and Algorithms with Java Spring Stacks, Queues, and Heaps Monday, February 18 / Tuesday, February 19

CIS 121 Data Structures and Algorithms with Java Spring Stacks, Queues, and Heaps Monday, February 18 / Tuesday, February 19 CIS Data Structures ad Algorithms with Java Sprig 09 Stacks, Queues, ad Heaps Moday, February 8 / Tuesday, February 9 Stacks ad Queues Recall the stack ad queue ADTs (abstract data types from lecture.

More information

Data diverse software fault tolerance techniques

Data diverse software fault tolerance techniques Data diverse software fault tolerace techiques Complemets desig diversity by compesatig for desig diversity s s limitatios Ivolves obtaiig a related set of poits i the program data space, executig the

More information

Goals of this Lecture Activity Diagram Example

Goals of this Lecture Activity Diagram Example Goals of this Lecture Activity Diagram Example Object-Orieted Aalysis ad Desig - Fall 998 Preset a example activity diagram Ð Relate to requiremets, use cases, ad class diagrams Also, respod to a questio

More information

CS 683: Advanced Design and Analysis of Algorithms

CS 683: Advanced Design and Analysis of Algorithms CS 683: Advaced Desig ad Aalysis of Algorithms Lecture 6, February 1, 2008 Lecturer: Joh Hopcroft Scribes: Shaomei Wu, Etha Feldma February 7, 2008 1 Threshold for k CNF Satisfiability I the previous lecture,

More information

Alpha Individual Solutions MAΘ National Convention 2013

Alpha Individual Solutions MAΘ National Convention 2013 Alpha Idividual Solutios MAΘ Natioal Covetio 0 Aswers:. D. A. C 4. D 5. C 6. B 7. A 8. C 9. D 0. B. B. A. D 4. C 5. A 6. C 7. B 8. A 9. A 0. C. E. B. D 4. C 5. A 6. D 7. B 8. C 9. D 0. B TB. 570 TB. 5

More information

Outline and Reading. Analysis of Algorithms. Running Time. Experimental Studies. Limitations of Experiments. Theoretical Analysis

Outline and Reading. Analysis of Algorithms. Running Time. Experimental Studies. Limitations of Experiments. Theoretical Analysis Outlie ad Readig Aalysis of Algorithms Iput Algorithm Output Ruig time ( 3.) Pseudo-code ( 3.2) Coutig primitive operatios ( 3.3-3.) Asymptotic otatio ( 3.6) Asymptotic aalysis ( 3.7) Case study Aalysis

More information

SD vs. SD + One of the most important uses of sample statistics is to estimate the corresponding population parameters.

SD vs. SD + One of the most important uses of sample statistics is to estimate the corresponding population parameters. SD vs. SD + Oe of the most importat uses of sample statistics is to estimate the correspodig populatio parameters. The mea of a represetative sample is a good estimate of the mea of the populatio that

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe CHAPTER 18 Strategies for Query Processig Copyright 2016 Ramez Elmasri ad Shamkat B. Navathe Itroductio DBMS techiques to process a query Scaer idetifies

More information

Adaptive Resource Allocation for Electric Environmental Pollution through the Control Network

Adaptive Resource Allocation for Electric Environmental Pollution through the Control Network Available olie at www.sciecedirect.com Eergy Procedia 6 (202) 60 64 202 Iteratioal Coferece o Future Eergy, Eviromet, ad Materials Adaptive Resource Allocatio for Electric Evirometal Pollutio through the

More information

CIS 121 Data Structures and Algorithms with Java Fall Big-Oh Notation Tuesday, September 5 (Make-up Friday, September 8)

CIS 121 Data Structures and Algorithms with Java Fall Big-Oh Notation Tuesday, September 5 (Make-up Friday, September 8) CIS 11 Data Structures ad Algorithms with Java Fall 017 Big-Oh Notatio Tuesday, September 5 (Make-up Friday, September 8) Learig Goals Review Big-Oh ad lear big/small omega/theta otatios Practice solvig

More information

Harris Corner Detection Algorithm at Sub-pixel Level and Its Application Yuanfeng Han a, Peijiang Chen b * and Tian Meng c

Harris Corner Detection Algorithm at Sub-pixel Level and Its Application Yuanfeng Han a, Peijiang Chen b * and Tian Meng c Iteratioal Coferece o Computatioal Sciece ad Egieerig (ICCSE 015) Harris Corer Detectio Algorithm at Sub-pixel Level ad Its Applicatio Yuafeg Ha a, Peijiag Che b * ad Tia Meg c School of Automobile, Liyi

More information

condition w i B i S maximum u i

condition w i B i S maximum u i ecture 10 Dyamic Programmig 10.1 Kapsack Problem November 1, 2004 ecturer: Kamal Jai Notes: Tobias Holgers We are give a set of items U = {a 1, a 2,..., a }. Each item has a weight w i Z + ad a utility

More information

BOOLEAN MATHEMATICS: GENERAL THEORY

BOOLEAN MATHEMATICS: GENERAL THEORY CHAPTER 3 BOOLEAN MATHEMATICS: GENERAL THEORY 3.1 ISOMORPHIC PROPERTIES The ame Boolea Arithmetic was chose because it was discovered that literal Boolea Algebra could have a isomorphic umerical aspect.

More information

1.2 Binomial Coefficients and Subsets

1.2 Binomial Coefficients and Subsets 1.2. BINOMIAL COEFFICIENTS AND SUBSETS 13 1.2 Biomial Coefficiets ad Subsets 1.2-1 The loop below is part of a program to determie the umber of triagles formed by poits i the plae. for i =1 to for j =

More information

1 Enterprise Modeler

1 Enterprise Modeler 1 Eterprise Modeler Itroductio I BaaERP, a Busiess Cotrol Model ad a Eterprise Structure Model for multi-site cofiguratios are itroduced. Eterprise Structure Model Busiess Cotrol Models Busiess Fuctio

More information

APPLICATION NOTE PACE1750AE BUILT-IN FUNCTIONS

APPLICATION NOTE PACE1750AE BUILT-IN FUNCTIONS APPLICATION NOTE PACE175AE BUILT-IN UNCTIONS About This Note This applicatio brief is iteded to explai ad demostrate the use of the special fuctios that are built ito the PACE175AE processor. These powerful

More information

BAAN IVc/BaanERP. Conversion Guide Oracle7 to Oracle8

BAAN IVc/BaanERP. Conversion Guide Oracle7 to Oracle8 BAAN IVc/BaaERP A publicatio of: Baa Developmet B.V. P.O.Box 143 3770 AC Bareveld The Netherlads Prited i the Netherlads Baa Developmet B.V. 1999. All rights reserved. The iformatio i this documet is subject

More information

Basic allocator mechanisms The course that gives CMU its Zip! Memory Management II: Dynamic Storage Allocation Mar 6, 2000.

Basic allocator mechanisms The course that gives CMU its Zip! Memory Management II: Dynamic Storage Allocation Mar 6, 2000. 5-23 The course that gives CM its Zip Memory Maagemet II: Dyamic Storage Allocatio Mar 6, 2000 Topics Segregated lists Buddy system Garbage collectio Mark ad Sweep Copyig eferece coutig Basic allocator

More information

Appendix D. Controller Implementation

Appendix D. Controller Implementation COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Appedix D Cotroller Implemetatio Cotroller Implemetatios Combiatioal logic (sigle-cycle); Fiite state machie (multi-cycle, pipelied);

More information

On Infinite Groups that are Isomorphic to its Proper Infinite Subgroup. Jaymar Talledo Balihon. Abstract

On Infinite Groups that are Isomorphic to its Proper Infinite Subgroup. Jaymar Talledo Balihon. Abstract O Ifiite Groups that are Isomorphic to its Proper Ifiite Subgroup Jaymar Talledo Baliho Abstract Two groups are isomorphic if there exists a isomorphism betwee them Lagrage Theorem states that the order

More information

Running Time. Analysis of Algorithms. Experimental Studies. Limitations of Experiments

Running Time. Analysis of Algorithms. Experimental Studies. Limitations of Experiments Ruig Time Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Most algorithms trasform iput objects ito output objects. The

More information

One advantage that SONAR has over any other music-sequencing product I ve worked

One advantage that SONAR has over any other music-sequencing product I ve worked *gajedra* D:/Thomso_Learig_Projects/Garrigus_163132/z_productio/z_3B2_3D_files/Garrigus_163132_ch17.3d, 14/11/08/16:26:39, 16:26, page: 647 17 CAL 101 Oe advatage that SONAR has over ay other music-sequecig

More information

Big-O Analysis. Asymptotics

Big-O Analysis. Asymptotics Big-O Aalysis 1 Defiitio: Suppose that f() ad g() are oegative fuctios of. The we say that f() is O(g()) provided that there are costats C > 0 ad N > 0 such that for all > N, f() Cg(). Big-O expresses

More information

Pseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance

Pseudocode ( 1.1) Analysis of Algorithms. Primitive Operations. Pseudocode Details. Running Time ( 1.1) Estimating performance Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Pseudocode ( 1.1) High-level descriptio of a algorithm More structured

More information

Algorithms for Disk Covering Problems with the Most Points

Algorithms for Disk Covering Problems with the Most Points Algorithms for Disk Coverig Problems with the Most Poits Bi Xiao Departmet of Computig Hog Kog Polytechic Uiversity Hug Hom, Kowloo, Hog Kog csbxiao@comp.polyu.edu.hk Qigfeg Zhuge, Yi He, Zili Shao, Edwi

More information

Overview. Chapter 18 Vectors and Arrays. Reminder. vector. Bjarne Stroustrup

Overview. Chapter 18 Vectors and Arrays. Reminder. vector. Bjarne Stroustrup Chapter 18 Vectors ad Arrays Bjare Stroustrup Vector revisited How are they implemeted? Poiters ad free store Destructors Iitializatio Copy ad move Arrays Array ad poiter problems Chagig size Templates

More information

A Generalized Set Theoretic Approach for Time and Space Complexity Analysis of Algorithms and Functions

A Generalized Set Theoretic Approach for Time and Space Complexity Analysis of Algorithms and Functions Proceedigs of the 10th WSEAS Iteratioal Coferece o APPLIED MATHEMATICS, Dallas, Texas, USA, November 1-3, 2006 316 A Geeralized Set Theoretic Approach for Time ad Space Complexity Aalysis of Algorithms

More information

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies. Limitations of Experiments

Running Time ( 3.1) Analysis of Algorithms. Experimental Studies. Limitations of Experiments Ruig Time ( 3.1) Aalysis of Algorithms Iput Algorithm Output A algorithm is a step- by- step procedure for solvig a problem i a fiite amout of time. Most algorithms trasform iput objects ito output objects.

More information

Analysis of Algorithms

Analysis of Algorithms Aalysis of Algorithms Iput Algorithm Output A algorithm is a step-by-step procedure for solvig a problem i a fiite amout of time. Ruig Time Most algorithms trasform iput objects ito output objects. The

More information

Morgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5

Morgan Kaufmann Publishers 26 February, COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. Chapter 5 Morga Kaufma Publishers 26 February, 28 COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Iterface 5 th Editio Chapter 5 Set-Associative Cache Architecture Performace Summary Whe CPU performace icreases:

More information

Speeding-up dynamic programming in sequence alignment

Speeding-up dynamic programming in sequence alignment Departmet of Computer Sciece Aarhus Uiversity Demark Speedig-up dyamic programmig i sequece aligmet Master s Thesis Dug My Hoa - 443 December, Supervisor: Christia Nørgaard Storm Pederse Implemetatio code

More information

9.1. Sequences and Series. Sequences. What you should learn. Why you should learn it. Definition of Sequence

9.1. Sequences and Series. Sequences. What you should learn. Why you should learn it. Definition of Sequence _9.qxd // : AM Page Chapter 9 Sequeces, Series, ad Probability 9. Sequeces ad Series What you should lear Use sequece otatio to write the terms of sequeces. Use factorial otatio. Use summatio otatio to

More information

Chapter 8. Strings and Vectors. Copyright 2014 Pearson Addison-Wesley. All rights reserved.

Chapter 8. Strings and Vectors. Copyright 2014 Pearson Addison-Wesley. All rights reserved. Chapter 8 Strigs ad Vectors Overview 8.1 A Array Type for Strigs 8.2 The Stadard strig Class 8.3 Vectors Slide 8-3 8.1 A Array Type for Strigs A Array Type for Strigs C-strigs ca be used to represet strigs

More information

Octahedral Graph Scaling

Octahedral Graph Scaling Octahedral Graph Scalig Peter Russell Jauary 1, 2015 Abstract There is presetly o strog iterpretatio for the otio of -vertex graph scalig. This paper presets a ew defiitio for the term i the cotext of

More information

Exact Minimum Lower Bound Algorithm for Traveling Salesman Problem

Exact Minimum Lower Bound Algorithm for Traveling Salesman Problem Exact Miimum Lower Boud Algorithm for Travelig Salesma Problem Mohamed Eleiche GeoTiba Systems mohamed.eleiche@gmail.com Abstract The miimum-travel-cost algorithm is a dyamic programmig algorithm to compute

More information

Solution printed. Do not start the test until instructed to do so! CS 2604 Data Structures Midterm Spring, Instructions:

Solution printed. Do not start the test until instructed to do so! CS 2604 Data Structures Midterm Spring, Instructions: CS 604 Data Structures Midterm Sprig, 00 VIRG INIA POLYTECHNIC INSTITUTE AND STATE U T PROSI M UNI VERSI TY Istructios: Prit your ame i the space provided below. This examiatio is closed book ad closed

More information

Analysis of Class Design Coupling Based on Information Entropy Di Jiang 1,2, a, Hua Zhou 1,2,b and Xingping Sun 1,2,c

Analysis of Class Design Coupling Based on Information Entropy Di Jiang 1,2, a, Hua Zhou 1,2,b and Xingping Sun 1,2,c Advaced Materials Research Olie: 2013-01-25 IN: 1662-8985, Vol. 659, pp 196-201 doi:10.4028/www.scietific.et/amr.659.196 2013 Tras Tech Publicatios, witzerlad Aalysis of Class Desig Couplig Based o Iformatio

More information

An Improved Shuffled Frog-Leaping Algorithm for Knapsack Problem

An Improved Shuffled Frog-Leaping Algorithm for Knapsack Problem A Improved Shuffled Frog-Leapig Algorithm for Kapsack Problem Zhoufag Li, Ya Zhou, ad Peg Cheg School of Iformatio Sciece ad Egieerig Hea Uiversity of Techology ZhegZhou, Chia lzhf1978@126.com Abstract.

More information

In this chapter, you learn the concepts and terminology of databases and

In this chapter, you learn the concepts and terminology of databases and A Itroductio to Database Developmet I this chapter, you lear the cocepts ad termiology of databases ad how to desig the tables that your forms ad reports will use. Fially, you build the actual tables used

More information

Empirical Validate C&K Suite for Predict Fault-Proneness of Object-Oriented Classes Developed Using Fuzzy Logic.

Empirical Validate C&K Suite for Predict Fault-Proneness of Object-Oriented Classes Developed Using Fuzzy Logic. Empirical Validate C&K Suite for Predict Fault-Proeess of Object-Orieted Classes Developed Usig Fuzzy Logic. Mohammad Amro 1, Moataz Ahmed 1, Kaaa Faisal 2 1 Iformatio ad Computer Sciece Departmet, Kig

More information

Python Programming: An Introduction to Computer Science

Python Programming: An Introduction to Computer Science Pytho Programmig: A Itroductio to Computer Sciece Chapter 1 Computers ad Programs 1 Objectives To uderstad the respective roles of hardware ad software i a computig system. To lear what computer scietists

More information

CHAPTER IV: GRAPH THEORY. Section 1: Introduction to Graphs

CHAPTER IV: GRAPH THEORY. Section 1: Introduction to Graphs CHAPTER IV: GRAPH THEORY Sectio : Itroductio to Graphs Sice this class is called Number-Theoretic ad Discrete Structures, it would be a crime to oly focus o umber theory regardless how woderful those topics

More information

Pruning and Summarizing the Discovered Time Series Association Rules from Mechanical Sensor Data Qing YANG1,a,*, Shao-Yu WANG1,b, Ting-Ting ZHANG2,c

Pruning and Summarizing the Discovered Time Series Association Rules from Mechanical Sensor Data Qing YANG1,a,*, Shao-Yu WANG1,b, Ting-Ting ZHANG2,c Advaces i Egieerig Research (AER), volume 131 3rd Aual Iteratioal Coferece o Electroics, Electrical Egieerig ad Iformatio Sciece (EEEIS 2017) Pruig ad Summarizig the Discovered Time Series Associatio Rules

More information

Fast Fourier Transform (FFT) Algorithms

Fast Fourier Transform (FFT) Algorithms Fast Fourier Trasform FFT Algorithms Relatio to the z-trasform elsewhere, ozero, z x z X x [ ] 2 ~ elsewhere,, ~ e j x X x x π j e z z X X π 2 ~ The DFS X represets evely spaced samples of the z- trasform

More information

A Boolean Query Processing with a Result Cache in Mediator Systems

A Boolean Query Processing with a Result Cache in Mediator Systems A Boolea Query Processig with a Result Cache i Mediator Systems Jae-heo Cheog ad Sag-goo Lee * Departmet of Computer Sciece Seoul Natioal Uiversity Sa 56-1 Shillim-dog Kwaak-gu, Seoul Korea {cjh, sglee}cygus.su.ac.kr

More information

Chapter 8. Strings and Vectors. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

Chapter 8. Strings and Vectors. Copyright 2015 Pearson Education, Ltd.. All rights reserved. Chapter 8 Strigs ad Vectors Copyright 2015 Pearso Educatio, Ltd.. All rights reserved. Overview 8.1 A Array Type for Strigs 8.2 The Stadard strig Class 8.3 Vectors Copyright 2015 Pearso Educatio, Ltd..

More information

MAXIMUM MATCHINGS IN COMPLETE MULTIPARTITE GRAPHS

MAXIMUM MATCHINGS IN COMPLETE MULTIPARTITE GRAPHS Fura Uiversity Electroic Joural of Udergraduate Matheatics Volue 00, 1996 6-16 MAXIMUM MATCHINGS IN COMPLETE MULTIPARTITE GRAPHS DAVID SITTON Abstract. How ay edges ca there be i a axiu atchig i a coplete

More information

Improved Random Graph Isomorphism

Improved Random Graph Isomorphism Improved Radom Graph Isomorphism Tomek Czajka Gopal Paduraga Abstract Caoical labelig of a graph cosists of assigig a uique label to each vertex such that the labels are ivariat uder isomorphism. Such

More information

15-859E: Advanced Algorithms CMU, Spring 2015 Lecture #2: Randomized MST and MST Verification January 14, 2015

15-859E: Advanced Algorithms CMU, Spring 2015 Lecture #2: Randomized MST and MST Verification January 14, 2015 15-859E: Advaced Algorithms CMU, Sprig 2015 Lecture #2: Radomized MST ad MST Verificatio Jauary 14, 2015 Lecturer: Aupam Gupta Scribe: Yu Zhao 1 Prelimiaries I this lecture we are talkig about two cotets:

More information

Combination Labelings Of Graphs

Combination Labelings Of Graphs Applied Mathematics E-Notes, (0), - c ISSN 0-0 Available free at mirror sites of http://wwwmaththuedutw/ame/ Combiatio Labeligs Of Graphs Pak Chig Li y Received February 0 Abstract Suppose G = (V; E) is

More information

New Results on Energy of Graphs of Small Order

New Results on Energy of Graphs of Small Order Global Joural of Pure ad Applied Mathematics. ISSN 0973-1768 Volume 13, Number 7 (2017), pp. 2837-2848 Research Idia Publicatios http://www.ripublicatio.com New Results o Eergy of Graphs of Small Order

More information

Reversible Realization of Quaternary Decoder, Multiplexer, and Demultiplexer Circuits

Reversible Realization of Quaternary Decoder, Multiplexer, and Demultiplexer Circuits Egieerig Letters, :, EL Reversible Realizatio of Quaterary Decoder, Multiplexer, ad Demultiplexer Circuits Mozammel H.. Kha, Member, ENG bstract quaterary reversible circuit is more compact tha the correspodig

More information

Load balanced Parallel Prime Number Generator with Sieve of Eratosthenes on Cluster Computers *

Load balanced Parallel Prime Number Generator with Sieve of Eratosthenes on Cluster Computers * Load balaced Parallel Prime umber Geerator with Sieve of Eratosthees o luster omputers * Soowook Hwag*, Kyusik hug**, ad Dogseug Kim* *Departmet of Electrical Egieerig Korea Uiversity Seoul, -, Rep. of

More information

Xiaozhou (Steve) Li, Atri Rudra, Ram Swaminathan. HP Laboratories HPL Keyword(s): graph coloring; hardness of approximation

Xiaozhou (Steve) Li, Atri Rudra, Ram Swaminathan. HP Laboratories HPL Keyword(s): graph coloring; hardness of approximation Flexible Colorig Xiaozhou (Steve) Li, Atri Rudra, Ram Swamiatha HP Laboratories HPL-2010-177 Keyword(s): graph colorig; hardess of approximatio Abstract: Motivated b y reliability cosideratios i data deduplicatio

More information

Heaps. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015

Heaps. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015 Presetatio for use with the textbook Algorithm Desig ad Applicatios, by M. T. Goodrich ad R. Tamassia, Wiley, 201 Heaps 201 Goodrich ad Tamassia xkcd. http://xkcd.com/83/. Tree. Used with permissio uder

More information

FREQUENCY ESTIMATION OF INTERNET PACKET STREAMS WITH LIMITED SPACE: UPPER AND LOWER BOUNDS

FREQUENCY ESTIMATION OF INTERNET PACKET STREAMS WITH LIMITED SPACE: UPPER AND LOWER BOUNDS FREQUENCY ESTIMATION OF INTERNET PACKET STREAMS WITH LIMITED SPACE: UPPER AND LOWER BOUNDS Prosejit Bose Evagelos Kraakis Pat Mori Yihui Tag School of Computer Sciece, Carleto Uiversity {jit,kraakis,mori,y

More information

APPLICATION NOTE. Automated Gain Flattening. 1. Experimental Setup. Scope and Overview

APPLICATION NOTE. Automated Gain Flattening. 1. Experimental Setup. Scope and Overview APPLICATION NOTE Automated Gai Flatteig Scope ad Overview A flat optical power spectrum is essetial for optical telecommuicatio sigals. This stems from a eed to balace the chael powers across large distaces.

More information

Goals of the Lecture UML Implementation Diagrams

Goals of the Lecture UML Implementation Diagrams Goals of the Lecture UML Implemetatio Diagrams Object-Orieted Aalysis ad Desig - Fall 1998 Preset UML Diagrams useful for implemetatio Provide examples Next Lecture Ð A variety of topics o mappig from

More information

Counting the Number of Minimum Roman Dominating Functions of a Graph

Counting the Number of Minimum Roman Dominating Functions of a Graph Coutig the Number of Miimum Roma Domiatig Fuctios of a Graph SHI ZHENG ad KOH KHEE MENG, Natioal Uiversity of Sigapore We provide two algorithms coutig the umber of miimum Roma domiatig fuctios of a graph

More information

Improvement of the Orthogonal Code Convolution Capabilities Using FPGA Implementation

Improvement of the Orthogonal Code Convolution Capabilities Using FPGA Implementation Improvemet of the Orthogoal Code Covolutio Capabilities Usig FPGA Implemetatio Naima Kaabouch, Member, IEEE, Apara Dhirde, Member, IEEE, Saleh Faruque, Member, IEEE Departmet of Electrical Egieerig, Uiversity

More information

Pattern Recognition Systems Lab 1 Least Mean Squares

Pattern Recognition Systems Lab 1 Least Mean Squares Patter Recogitio Systems Lab 1 Least Mea Squares 1. Objectives This laboratory work itroduces the OpeCV-based framework used throughout the course. I this assigmet a lie is fitted to a set of poits usig

More information