13.07.2015 Views

LASER: A Lexical Approach to Analogy in Software ... - FLOSShub

LASER: A Lexical Approach to Analogy in Software ... - FLOSShub

LASER: A Lexical Approach to Analogy in Software ... - FLOSShub

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>LASER</strong>: A <strong>Lexical</strong> <strong>Approach</strong> <strong>to</strong> <strong>Analogy</strong> <strong>in</strong> <strong>Software</strong> ReuseRushikesh Am<strong>in</strong>, Mel Ó C<strong>in</strong>néide and Tony VealeDepartment of Computer Science,University College Dubl<strong>in</strong>,Belfield, Dubl<strong>in</strong> 4,Ireland.{rushikesh.am<strong>in</strong>,mel.oc<strong>in</strong>neide,<strong>to</strong>ny.veale}@ucd.ieAbstract<strong>Software</strong> reuse is the process of creat<strong>in</strong>g a software systemfrom exist<strong>in</strong>g software components, rather than creat<strong>in</strong>git from scratch. With the <strong>in</strong>crease <strong>in</strong> size and complexityof exist<strong>in</strong>g software reposi<strong>to</strong>ries, the need <strong>to</strong> provide <strong>in</strong>telligentsupport <strong>to</strong> the programmer becomes more press<strong>in</strong>g.An analogy is a comparison of certa<strong>in</strong> similaritiesbetween th<strong>in</strong>gs which are otherwise unlike. This concepthas shown <strong>to</strong> be valuable <strong>in</strong> develop<strong>in</strong>g UML-level reusetechniques. In the <strong>LASER</strong> project we apply lexically-driven<strong>Analogy</strong> at the code level, rather than at the UML-level,<strong>in</strong> order <strong>to</strong> retrieve match<strong>in</strong>g components from a reposi<strong>to</strong>ryof exist<strong>in</strong>g components. Us<strong>in</strong>g the lexical on<strong>to</strong>logy Word-Net, we have conducted a case study <strong>to</strong> assess if class andmethod names <strong>in</strong> open source applications are used <strong>in</strong> a semanticallymean<strong>in</strong>gful way. Our results demonstrate thatboth hierarchical reuse and parallel reuse can be enhancedthrough the use of lexically-driven <strong>Analogy</strong>.1. Introduction<strong>Software</strong> reuse, <strong>in</strong> its broadest terms, has been viewed asthe reapplication of knowledge from one software system<strong>to</strong> another [4]. <strong>Software</strong> reuse reduces development timeand cost while improv<strong>in</strong>g quality. Most eng<strong>in</strong>eer<strong>in</strong>g discipl<strong>in</strong>esare based on the reuse concept, from components <strong>to</strong>formulas and ideas themselves [9]. Nonetheless, <strong>in</strong> termsof reliability and ma<strong>in</strong>tenance effort, software eng<strong>in</strong>eer<strong>in</strong>gcompares badly <strong>to</strong> other, more physical forms of eng<strong>in</strong>eer<strong>in</strong>gsuch as chip design, which ultimately employ the samelogical concepts.In general, a reuse environment comprises a reposi<strong>to</strong>ryof reusable components, <strong>to</strong>gether with a mechanism fortheir retrieval, adaptation and <strong>in</strong>tegration. One model ofsoftware reuse is the so-called 3C model, <strong>in</strong>volv<strong>in</strong>g the notionsof concept, content, and context [10]. In this model,the software eng<strong>in</strong>eer must specify the conceptual requirementsof the component they are seek<strong>in</strong>g. Componentsare described <strong>in</strong> terms of their content (data structure used,etc.). In the description of both content and concept, itmay also be necessary <strong>to</strong> provide contextual <strong>in</strong>formation.Such an approach has the disadvantage that it <strong>in</strong>volves considerablework <strong>in</strong> specify<strong>in</strong>g this additional <strong>in</strong>formation.Also, the reposi<strong>to</strong>ry of reusable components will cont<strong>in</strong>ue<strong>to</strong> grow, thus mak<strong>in</strong>g the task of f<strong>in</strong>d<strong>in</strong>g and choos<strong>in</strong>g anappropriate component more difficult [6].<strong>Analogy</strong> <strong>in</strong>volves a structural comparison of two conceptsthat appear substantially different on the surface butwhich exhibit important causal or semantic symmetries.Computational models of analogy have shown themselves<strong>to</strong> be valuable <strong>in</strong> the development of UML level reuse techniques;examples <strong>in</strong>clude ReBuilder [2, 3]. <strong>Analogy</strong> typicallyhas both a l<strong>in</strong>guistic and a conceptual dimension, thelatter communicated by the former. Words and their mean<strong>in</strong>gsthus play an important role <strong>in</strong> the effectiveness andcomprehension of analogies. In this research we exam<strong>in</strong>ewhether software artifacts like Java programs exhibit thesame reliance on lexical expression for their mean<strong>in</strong>g. Itseems clear that good developers choose class, method andvariable names that are lexically expressive about the goalsof the code. If this is true, we can apply lexical analogytechniques at code level rather than UML-level <strong>in</strong> order <strong>to</strong>retrieve match<strong>in</strong>g components from the reuse environment.The object-oriented paradigm facilitates reuse of codeby packag<strong>in</strong>g the most reusable structure and behaviours<strong>in</strong><strong>to</strong> dist<strong>in</strong>ct classes. The programmer can extend the basicfunctionality of these classes and/or modify it <strong>to</strong> get the desiredfunctionality. Our research currently focuses on softwarewritten <strong>in</strong> the Java programm<strong>in</strong>g language for a numberof reasons. Firstly, Java provides an elegant means ofencourag<strong>in</strong>g class creation, extension, composition and abstraction.Secondly, various conventions for Java code suggestthat the l<strong>in</strong>guistic elements of Java programs, such asmethod, class and variable names, are more likely <strong>to</strong> cor-112


espond <strong>to</strong> mean<strong>in</strong>gful words or phrases <strong>in</strong> a natural languagelike English. As such, the <strong>in</strong>novative core of this researchproject is the belief that natural language techniquescan be productively applied <strong>to</strong> artificial language constructslike software code <strong>to</strong> yield a mean<strong>in</strong>gful conceptual representation.By focus<strong>in</strong>g on the actual code level of a newsoftware design rather than the abstract component level,we can exploit a rich ve<strong>in</strong> of lexical-driven opportunities forreason<strong>in</strong>g about a developer’s goal and requirements. Whileit is true that the general structure of software code doesnot conform <strong>to</strong> a natural-language grammar, most modernprogrammers do employ many of the pr<strong>in</strong>ciples of naturallanguage expression <strong>in</strong> the nam<strong>in</strong>g of classes and methods.In this paper we present our ongo<strong>in</strong>g work on the applicationof <strong>Analogy</strong> <strong>to</strong> the software reuse doma<strong>in</strong>. We havecompleted a prelim<strong>in</strong>ary study by pars<strong>in</strong>g JRefac<strong>to</strong>ry [1], anopen source refac<strong>to</strong>ry <strong>to</strong>ol, <strong>to</strong> determ<strong>in</strong>e if class names andmethod names follow the natural language technique. Wealso researched how hierarchical reuse and parallel reusecan be enhanced us<strong>in</strong>g a lexically-driven analogical approach.As a basis for our work we are us<strong>in</strong>g WordNet,a broad coverage knowledge-base of the English lexicon.In the next section we <strong>in</strong>troduce related work, while <strong>in</strong> section3 a brief description of WordNet is given. Section 4describes analogical reason<strong>in</strong>g as it is used <strong>in</strong> <strong>LASER</strong>. Acase study is presented <strong>in</strong> section 5 and f<strong>in</strong>ally, directionsfor future research and conclusions are discussed <strong>in</strong> section6.2. Related WorkReBuilder [2, 3], a software <strong>to</strong>ol be<strong>in</strong>g developed <strong>in</strong> theAI Lab of the University of Coimbra, is <strong>in</strong>novative <strong>in</strong> theway it uses WordNet <strong>to</strong> <strong>in</strong>dex and retrieve software cases.ReBuilder allows analogical retrieval and mapp<strong>in</strong>g betweenUML descriptions of software systems, and uses analogicaltransfer <strong>to</strong> flesh out a new software design based on structuralparallels with a pre-exist<strong>in</strong>g design. Developers explicitlyassociate software designs with one or more nodes<strong>in</strong> the taxonomy, so when the new development project is<strong>in</strong>itiated, the taxonomy can be searched for similar precedents.However, the benefits of this reuse scheme can onlybe reaped by those developers who take the time <strong>to</strong> tell Re-Builder how <strong>to</strong> appropriately annotate and <strong>in</strong>dex their softwarefor future retrieval. We also exploit WordNet, but at amuch f<strong>in</strong>er level of analysis. By pry<strong>in</strong>g <strong>in</strong><strong>to</strong> the <strong>in</strong>ternal lexicalstructure of software components, <strong>to</strong> analyse the namesgiven <strong>to</strong> the methods and classes and relate these <strong>to</strong> concepts<strong>in</strong> the WordNet taxonomy, we create a whole spectrum ofnew possibilities.CodeF<strong>in</strong>der, <strong>to</strong>gether with PEEL (Parse and ExtractEmacs Lisp), is a software <strong>to</strong>ol that supports the process off<strong>in</strong>d<strong>in</strong>g components for reuse [5]. Reposi<strong>to</strong>ries are <strong>in</strong>itiallyseeded semi-au<strong>to</strong>matically with structure and <strong>in</strong>dex termsby PEEL. These retrieval structures are used by CodeF<strong>in</strong>der<strong>to</strong> allow the user <strong>to</strong> f<strong>in</strong>d semantically-related components.The <strong>in</strong>itial retrieval structures are likely <strong>to</strong> be <strong>in</strong>complete,but CodeF<strong>in</strong>der also enables the user <strong>to</strong> add new structureand <strong>in</strong>dex terms <strong>to</strong> the reposi<strong>to</strong>ry <strong>to</strong> improve future componentretrieval. In this way, CodeF<strong>in</strong>der supports the user <strong>in</strong>f<strong>in</strong>d<strong>in</strong>g reusable components <strong>in</strong> less-than-perfect reposi<strong>to</strong>rystructures.3. WordNetWordNet, a broad coverage knowledge base of the Englishlexicon from Pr<strong>in</strong>ce<strong>to</strong>n University [8], is the l<strong>in</strong>guisticcore underp<strong>in</strong>n<strong>in</strong>g <strong>LASER</strong>. Language is <strong>in</strong>herently ambiguous,especially at the lexical level, and so WordNet is builtaround the notion of a synset. A synset is an <strong>in</strong>direct meansof denot<strong>in</strong>g a concept or specific word sense, by provid<strong>in</strong>ga set of synonyms that can each denote that sense. For our<strong>in</strong>itial experiments with <strong>LASER</strong> we exploit the large numberof synsets def<strong>in</strong>ed by WordNet, as well as two semanticrelations, is-a and part-of, thatWordNetuses<strong>to</strong>connectthese synsets. For example, Student is-a Personand Classroom is part-of School. WordNet will serveas the knowledge-base component <strong>in</strong> <strong>LASER</strong>, allow<strong>in</strong>gthe system <strong>to</strong> predict potential parent classes us<strong>in</strong>g lexicoconceptualknowledge. For example WordNet can be used<strong>to</strong> lookup all synsets conta<strong>in</strong><strong>in</strong>g the word client <strong>to</strong> f<strong>in</strong>dsynonyms and hypernyms like Cus<strong>to</strong>mer and Person, aswell as neighbours like Patient. This will allow <strong>LASER</strong><strong>to</strong> establish reuse connections between a new class calledClient and exist<strong>in</strong>g classes called Cus<strong>to</strong>mer, Personor Patient.4. Analogical Reason<strong>in</strong>g <strong>in</strong> <strong>LASER</strong><strong>Analogy</strong> <strong>in</strong> its simplest form can be def<strong>in</strong>ed as a comparisonbetween pairs and is widely used as a problem solv<strong>in</strong>gmethod. The “Structure Mapp<strong>in</strong>g” approach <strong>in</strong> ReBuilderviews analogy as a suggestion of a class diagram based onthe query diagram [2, 3]. As its name suggests, structuremapp<strong>in</strong>g does not consider the lexical labels assigned <strong>to</strong> elements<strong>in</strong> the each structure, assum<strong>in</strong>g <strong>in</strong>stead that the mean<strong>in</strong>gof these elements derives not from names but from theirstructural relationships with other elements. However, <strong>in</strong>object-oriented code, class structures are usually annotatedwith mean<strong>in</strong>gful lexical labels for a reason: <strong>to</strong> allow humancomprehension and <strong>in</strong>sight [7]. Analogical reason<strong>in</strong>g canbe used <strong>in</strong> two of the most useful reuse techniques <strong>in</strong> objec<strong>to</strong>riented programm<strong>in</strong>g, hierarchical reuse and parallelreuse. The first, hierarchical reuse, occurs when one classis an extension of another class. For example, consider a113


context <strong>in</strong> which a programmer is about <strong>to</strong> extend a superclass for a class called Client.public class Client extendsBy us<strong>in</strong>g analogical reason<strong>in</strong>g we can implement differentstrategies <strong>to</strong> suggest new superclass for the class Client.Us<strong>in</strong>g WordNet as a knowledge base, we can suggest a superclassthat has similar mean<strong>in</strong>g as Client, for examplePerson, Cus<strong>to</strong>mer etc.Analogical reason<strong>in</strong>g also facilitates the second, and themost ambitious, form of reuse, parallel reuse, <strong>in</strong> which thesystem recognizes that a developer is about <strong>to</strong> implementa component that already exists <strong>in</strong> a similar form. For example,analogical reason<strong>in</strong>g can be used <strong>to</strong> determ<strong>in</strong>e that anew class, Client, is structurally similar <strong>to</strong> another classcalled Patient, from another application. This recognitionof this similarity is both lexical and structural: lexical<strong>in</strong> the sense that Client and Patient are taxonomicallysimilar terms <strong>in</strong> WordNet, occupy<strong>in</strong>g neighbor<strong>in</strong>g area ofthe taxonomy under a common parent class called Person;and structural <strong>in</strong> the sense that similarity can be measuredby recogniz<strong>in</strong>g common class members (such as variableswith lexically similar names and types) and by recogniz<strong>in</strong>gthe lexically similar names of any superclasses.A major use of analogical reason<strong>in</strong>g is <strong>to</strong> perform analogicaltransfer (also called candidate <strong>in</strong>ference), <strong>in</strong> whicha target structure is enriched with structure that is mappedfrom a more elaborate source. In most structure-mapp<strong>in</strong>gsystems, transfer is performed us<strong>in</strong>g structural criteria only,which can lead <strong>to</strong> <strong>in</strong>congruous completion patterns. We <strong>in</strong>tend<strong>to</strong> conceptually ground the transfer process by mak<strong>in</strong>git lexically-driven: a comb<strong>in</strong>ation of lexical and structuralevidence will be required <strong>to</strong> motivate any transfer of structurefrom a past design <strong>to</strong> the current development context.In order <strong>to</strong> expla<strong>in</strong> the potential of analogical reason<strong>in</strong>g<strong>in</strong> software reuse, we present an example of how such reason<strong>in</strong>gmight be performed. Consider a context, <strong>in</strong> whicha developer beg<strong>in</strong>s <strong>to</strong> create an application for a School,start<strong>in</strong>g with the creation of a class called Student. Thisnascent basis may allow for an exist<strong>in</strong>g software design fora Hospital <strong>to</strong> be retrieved, based on the similarity (<strong>in</strong> lexicaland structural terms) of the Student and Patientclasses. Structure-mapp<strong>in</strong>g between the nascent elementsof the school system and the exist<strong>in</strong>g case for a hospitalmight then suggest that the school system needs classesfor Desk, Room, Class, Teacher, Pr<strong>in</strong>cipaland Teach<strong>in</strong>gAssistant. <strong>LASER</strong> may create stubsfor these classes au<strong>to</strong>matically and add them <strong>to</strong> the currentproject specification. However, while there is lexicalevidence for the utility of a Room class <strong>in</strong> the School doma<strong>in</strong>,there is no such evidence for the necessity of a Desk,Class, Nurse or even Doc<strong>to</strong>r class. Therefore, <strong>LASER</strong>may also suggest <strong>to</strong> the developer <strong>to</strong> create a Room classonly.The structural evidence for a Nurse, Doc<strong>to</strong>r and Bedclass is not entirely discarded, however: it is merely put<strong>to</strong> one side <strong>to</strong> await a more appropriate reuse opportunity.For example, should the developer beg<strong>in</strong> <strong>to</strong> create a classfor Teacher, lexical analysis us<strong>in</strong>g WordNet will revealthat this class corresponds <strong>to</strong> a known taxonomic subord<strong>in</strong>ateof Professional, as does Doc<strong>to</strong>r. At this po<strong>in</strong>tit becomes sensible for <strong>LASER</strong> <strong>to</strong> suggest <strong>to</strong> the developerthat the Doc<strong>to</strong>r class be reused. S<strong>in</strong>ce this is an exampleof parallel reuse (Teachers are like Doc<strong>to</strong>rs, butnot a k<strong>in</strong>d of Doc<strong>to</strong>r), <strong>LASER</strong> can suggest two alternativestrategies: first, a new generic class Professional canbe created, and the bulk of the Doc<strong>to</strong>r class can be lifted <strong>to</strong>this new parent class, so that it can be reused via class extensionby the new class Teacher; orsecondly,thestructureof the Doc<strong>to</strong>r class can be directly imported <strong>to</strong> provide acode skele<strong>to</strong>n around which <strong>to</strong> create the Teacher class.In a similar way, the class for Bed can be reused as the basisfor a new class Desk, and if the conceptual structure isavailable <strong>to</strong> make such a suggestion, Nurse can be reusedas the basis for Teach<strong>in</strong>gAssistant.5. Case StudyIn this section we demonstrate that hierarchical reuseand parallel reuse <strong>in</strong> object oriented code can be enhancedthrough lexically-driven analogy. Our fundamental assumptionis the belief that most programmers follow natural languageconventions <strong>in</strong> nam<strong>in</strong>g classes and methods. As a pilotstudy, the JRefac<strong>to</strong>ry package [1], which conta<strong>in</strong>s 1259classes, was parsed for the purpose of collect<strong>in</strong>g and s<strong>to</strong>r<strong>in</strong>gclass and method names. We used WordNet <strong>to</strong> lexicallyground class names and method names used by theprogrammer. The dist<strong>in</strong>ction between names that are l<strong>in</strong>guisticallysensible and those that are not is a fuzzy one:many names conta<strong>in</strong> a l<strong>in</strong>guistic root that can be extractedwith some basic language heuristics. To calculate the accuracyof such a heuristic WordNet match with a particularclass or method name, we <strong>in</strong>itially decompose the name us<strong>in</strong>gthe capitalisation convention used as standard <strong>in</strong> JavaWe have also <strong>in</strong>cluded some common Java words <strong>in</strong> our experimentthat are not part of standard WordNet database:AST, <strong>in</strong>t, etc. An example of how we <strong>in</strong>terpret a class nameis as follow:Class Name Match after decomposition Average matchMyBeerCase My=100% Beer=100% Case=100% 100%MyBeerPZK My=100% Beer=100% PZK=0% 66.66%Table 1: Average accuracy match for each class withWordNet114


Once names have been decomposed follow<strong>in</strong>g the capitalisationconvention, we then compare each componentword aga<strong>in</strong>st the WordNet synset <strong>in</strong>dex and calculate anaverage accuracy for each name as follows:P avg =N∑(f e /N ) (1)i=1Where P avg is Accuracy of match per class, f e is accuracyof match with WordNet for each Word and it could beeither 0 or 100 and N=Number of Words.For MyBeerCase it is (100+100+100)/3=100%.For MyBeerPZK it is, (100+100+0)/3= 66.66%. The f<strong>in</strong>alresult is calculated as follows.R avg =N∑(P avg /N ) (2)i=1Where R avg is the average accuracy of percentage matchwith WordNet.P avg is Accuracy of match per class and N is Total numberof class,1259 <strong>in</strong> this case.The follow<strong>in</strong>g graphs depict the result of these techniquesapplied <strong>to</strong> JRefac<strong>to</strong>ry as a whole:Figure 1. Class Name match with WordNetThe graph above displays the percentage of class namesthat correspond <strong>to</strong> WordNet lexical entries. Encourag<strong>in</strong>gly,out of the <strong>to</strong>tal number of 1259 classes, an average matchof 84.96% with WordNet entries was calculated. We groupclass name matches <strong>in</strong><strong>to</strong> four categories as shown <strong>in</strong> figure1. 65.66%, of the classes had a 100% match with WordNet.This was significantly greater than the 0.6% of classes thathad no match at all with WordNet.Figure 2 shows the percentage of method names thatcorrespond <strong>to</strong> WordNet entries. JRefac<strong>to</strong>ry conta<strong>in</strong>s 6966methods, and of these, 74.33% match with WordNet entries.The vast majority (60.70%) achieves a 100% matchFigure 2. Method Name Match with WordNetwith WordNet; while very few (2.97%) has no discernablemapp<strong>in</strong>g <strong>to</strong> WordNet at all.Although this is as yet only a pilot study, the results arevery promis<strong>in</strong>g as regards the goals the <strong>LASER</strong> project.The vast majority of class names and their lexical components,and a strong majority of method name components,are amenable <strong>to</strong> conceptual annotation us<strong>in</strong>g l<strong>in</strong>guistic techniques.It is not enough that code-level names correspond <strong>to</strong>known words; these names must be used <strong>in</strong> ways consistentwith their mean<strong>in</strong>g so that the conceptual basis of thecode can be discerned. Ideally, when subclass and its superclasscan both be mapped <strong>to</strong> WordNet, we should expectthe correspond<strong>in</strong>g synsets <strong>to</strong> explicitly relate via an is-a relationship.To test this expectation, we performed another experiment<strong>to</strong> consider the hypernyms of the lexical labels associatedwith class names. Hypernym is l<strong>in</strong>guistic term for aword whose mean<strong>in</strong>g <strong>in</strong>cludes the mean<strong>in</strong>gs of other words,as the mean<strong>in</strong>g of Transportation <strong>in</strong>cludes the mean<strong>in</strong>gof Airplane, Tra<strong>in</strong> and Au<strong>to</strong>mobile.To conduct this experiment we parsed 1259 classes fromthe open source JRefac<strong>to</strong>ry [1] project. We completeda study <strong>to</strong> see if the subclass name and its superclassname have a hypernym relationship or not. We exploreWordNet <strong>to</strong> conduct this experiment. Results are calculatedas follows: Suppose subclass name is MySchool andsuperclass name is Organization. We developed atechnique <strong>to</strong> decompose the names us<strong>in</strong>g the capitalizationstandard used <strong>in</strong> Java. We use WordNet <strong>to</strong> search for thehypernym relationship between l<strong>in</strong>guistic-head of subclassname(School <strong>in</strong> this case) and those of superclassname(Organization <strong>in</strong> this case). If we f<strong>in</strong>d hypernymrelationship then we associate it with 100% match otherwisewith 0% match.In this case it is 100% match. Resultsare shown <strong>in</strong> Table 2.115


Total class Hypernym relationship (%) No relationship (%)Classes 1259 84.51 15.49Table 2: Hypernym Relationship between subclass andsuperclassWe focused only on subclasses and their associated superclass.We discovered 1259 superclasses <strong>in</strong> the JRefac<strong>to</strong>ryproject; of these 84.51% had a hypernym relationshipwith their subclasses. Based on this impressive result, wecan argue that a subclass and its superclass are lexically similarand if also, future experiment prove structural similarity,as we suspect, then this presents as with a real opportunityfor future parallel reuse.[4] M. T. Harandi. The role of analogy <strong>in</strong> software reuse. ACMsymposium on applied comput<strong>in</strong>g states of the art and practice,1993.[5] S. Henn<strong>in</strong>ger. An evolutionary approach <strong>to</strong> construct<strong>in</strong>g effectivesoftware reuse reposi<strong>to</strong>ries. ACM Transactions on<strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>g and Methodology (TOSEM), 1997.[6] C. W. Krueger. <strong>Software</strong> reuse. ACM Comput<strong>in</strong>g Surveys(CSUR), Volume 24 Issue 2, 1992.[7] H. E. Letha and G. D. Carl. Au<strong>to</strong>matically identify<strong>in</strong>greusable oo legacy code, computer. 1997.[8] G. A. Miller. WordNet,Cognitive Science Labora<strong>to</strong>ry,Pr<strong>in</strong>ce<strong>to</strong>n University.[9] R. Prie<strong>to</strong>-Diaz. Status report- software reusability. IEEE<strong>Software</strong>, v10 n3, May 1993.[10] W. Tracz and S. Edwards. Implementation work<strong>in</strong>g groupreport. Reuse In Practice Workshop, <strong>Software</strong> Eng<strong>in</strong>eer<strong>in</strong>gInstitute, Pitt, Pa, 1989.6. Conclusion and Future WorkAnalogical Reason<strong>in</strong>g enables a software environment <strong>to</strong>provide au<strong>to</strong>mated support for software reuse. <strong>Lexical</strong>lydrivenanalogy at the code level can be used for better understand<strong>in</strong>gof the developer’s conceptual goals. In this paperwe presented ongo<strong>in</strong>g work on the concept of lexicallydrivenanalogy. We have shown that both hierarchical andparallel reuse can be enhanced us<strong>in</strong>g lexical similarities ofclass names.Future work on <strong>LASER</strong> will be focused on the implementationof techniques for suggest<strong>in</strong>g a super-class forthe current class under development us<strong>in</strong>g lexically-drivenanalogy. In our next case study we will consider variables,calculat<strong>in</strong>g the part-of relationship between a variablename and its class name. <strong>LASER</strong> will also facilitate<strong>in</strong>telligent refac<strong>to</strong>r<strong>in</strong>g, based on lexico-conceptual understand<strong>in</strong>gof the software be<strong>in</strong>g developed.7. AcknowledgementThe authors would like <strong>to</strong> acknowledge the f<strong>in</strong>ancial contributionof Faculty of Science, University College Dubl<strong>in</strong><strong>to</strong> this project.References[1] JRefac<strong>to</strong>ry, An Open Source Refac<strong>to</strong>r<strong>in</strong>g Tool for Java.http://jrefac<strong>to</strong>ry.sourceforge.net.[2] P. Gomes, F. Pereira, P. Paiva, J. Ferreira, and C. Ben<strong>to</strong>. Caseretrieval of software designs us<strong>in</strong>g wordnet. ECAI-2002,the Fifteenth European Conference on Artificial Intelligence,2002.[3] P. Gomes, F. Pereira, P. Paiva, N. Seco, J. Ferreira, andC. Ben<strong>to</strong>. Experiments on case-based retrieval of softwaredesigns. ECCBR-2002, the 2002 European Conference onCase-Based Reason<strong>in</strong>g, 2002.116

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!