Derivation of Feature Component Maps by means of Concept Analysis

Similar documents
Feature-Driven Program Understanding Using Concept Analysis of Execution Traces

Application of Execution Pattern Mining and Concept Lattice Analysis on Software Structure Evaluation

Software Architecture Recovery based on Dynamic Analysis

Evaluating the Evolution of a C Application

Dynamic Analysis and Design Pattern Detection in Java Programs

Analyzing the Product Line Adequacy of Existing Components

Impact of Dependency Graph in Software Testing

An Approach for Mapping Features to Code Based on Static and Dynamic Analysis

Requirements Engineering for Enterprise Systems

SILVACO. An Intuitive Front-End to Effective and Efficient Schematic Capture Design INSIDE. Introduction. Concepts of Scholar Schematic Capture

Automated Improvement for Component Reuse

Configuration Management for Component-based Systems

Migration of Legacy Systems to Software Product Lines

A Top-Down Visual Approach to GUI development

IMPACT OF DEPENDENCY GRAPH IN SOFTWARE TESTING

A Prototype for Guideline Checking and Model Transformation in Matlab/Simulink

3.4 Data-Centric workflow

Petri-net-based Workflow Management Software

A Framework for Experimental Evaluation of Clustering Techniques

XRay Views: Understanding the Internals of Classes

A Case Study of Unanticipated Incremental Change

Rubicon: Scalable Bounded Verification of Web Applications

Fine-grained Software Version Control Based on a Program s Abstract Syntax Tree

Programming in C++ Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Recovering Traceability Links between Code and Documentation

EXTRACTION OF REUSABLE COMPONENTS FROM LEGACY SYSTEMS

CE4031 and CZ4031 Database System Principles

Digital Archives: Extending the 5S model through NESTOR

A Framework for Enforcing Constrained RBAC Policies

International Journal of Software Engineering and Knowledge Engineering c World Scientific Publishing Company

A Meta-Model for Composition Techniques in Object-Oriented Software Development

Proposal of a Supporting Method for Diagrams Generation with the Transformation Rules in UML

Barrier Slicing and Chopping

Empirical Study on Impact of Developer Collaboration on Source Code

Static Safety Analysis of UML Action Semantics for Critical Systems Development

CE4031 and CZ4031 Database System Principles

Efficient Regression Test Model for Object Oriented Software

The Galileo Fault Tree Analysis Tool

Introduction. Chapter 1. What Is Visual Modeling? The Triangle for Success. The Role of Notation. History of the UML. The Role of Process

ait: WORST-CASE EXECUTION TIME PREDICTION BY STATIC PROGRAM ANALYSIS

RINGS : A Technique for Visualizing Large Hierarchies

Software Engineering

Eliminating Annotations by Automatic Flow Analysis of Real-Time Programs

Visualizing Feature Interaction in 3-D

Managing Open Bug Repositories through Bug Report Prioritization Using SVMs

Abstractions in Multimedia Authoring: The MAVA Approach

Contemporary Design. Traditional Hardware Design. Traditional Hardware Design. HDL Based Hardware Design User Inputs. Requirements.

Conceptual Model for a Software Maintenance Environment

Drawing Graphs Within Graphs

PORTAL RESOURCES INFORMATION SYSTEM: THE DESIGN AND DEVELOPMENT OF AN ONLINE DATABASE FOR TRACKING WEB RESOURCES.

Combining Different Business Rules Technologies:A Rationalization

MOPBox: A Library Approach to Runtime Verification

License.

Component-Based Software Engineering TIP

Towards a Search-based Interactive Configuration of Cyber Physical. System Product Lines 1

is easing the creation of new ontologies by promoting the reuse of existing ones and automating, as much as possible, the entire ontology

Utilizing Static Analysis for Programmable Logic Controllers

The Relationships between Domain Specific and General- Purpose Languages

A Matlab/Simulink Simulation Approach for Early Field-Programmable Gate Array Hardware Evaluation

LOGICAL OPERATOR USAGE IN STRUCTURAL MODELLING

Introduction. A Brief Description of Our Journey

Advanced Slicing of Sequential and Concurrent Programs

Concepts for Model Compilation in Hardware/Software Codesign

Caching video contents in IPTV systems with hierarchical architecture

BPM optimization Part 1: Introduction to BPM code optimization

The study of total-removal-volume (TRV) feature in handling the flexible machining shapes generation

Debugging Abstract State Machine Specifications: An Extension of CoreASM

Increazing interactivity in IPTV using MPEG-21 descriptors

Category Theory in Ontology Research: Concrete Gain from an Abstract Approach

Finding Components in a Hierarchy of Modules: a Step towards Architectural Understanding

Implementation Techniques

An Eclipse Plug-in for Model Checking

Analysis of Pointers and Structures

Study of Secondary and Approximate Authorizations Model (SAAM)

Simulating Task Models Using Concrete User Interface Components

Towards The Adoption of Modern Software Development Approach: Component Based Software Engineering

Process Mediation in Semantic Web Services

Module 10A Lecture - 20 What is a function? Why use functions Example: power (base, n)

Connectivity and Multi-Sheet Design. Contents

Quality Driven Software Migration of Procedural Code to Object-Oriented Design

A Framework for Converting Classical Design to Reusable Design

MACHINE LEARNING BASED METHODOLOGY FOR TESTING OBJECT ORIENTED APPLICATIONS

Taxonomy Dimensions of Complexity Metrics

VIFOR 2: A Tool for Browsing and Documentation

An Agent Modeling Language Implementing Protocols through Capabilities

CoE CENTRE of EXCELLENCE ON DATA WAREHOUSING

Extracting the Range of cps from Affine Typing

Characterizing the Functional Roles of Classes and Methods by Analyzing Feature Traces

Mathematics Curriculum

Formative Benchmark 1

A Catalog of Patterns for Concept Lattice Interpretation in Software Reengineering

Re-configurable VLIW processor for streaming data

Formalizing Fact Extraction

Eliminating False Loops Caused by Sharing in Control Path

Java-MOP: A Monitoring Oriented Programming Environment for Java

Support for Static Concept Location with sv3d

junit RV Adding Runtime Verification to junit

DFA&:OPT-METAFrame: A Tool Kit for Program Analysis and Optimization

Mathematics Scope & Sequence Grade 7 Revised: June 2015

Minsoo Ryu. College of Information and Communications Hanyang University.

Transcription:

Derivation of Feature Component Maps by means of Concept Analysis Thomas Eisenbarth, Rainer Koschke, Daniel Simon University of Stuttgart, Breitwiesenstr. 20-22, 70565 Stuttgart, Germany {eisenbts, koschke, simondl}@informatik.uni-stuttgart.de Abstract Feature component maps describe which components are needed to implement a particular feature and are used early in processes to develop a product line based on existing assets. This paper describes a new technique to derive the feature component map and additional dependencies utilizing dynamic information and concept analysis. The method is simple to apply, cost-effective, largely language independent, and can yield results quickly and very early in the process. 1. Introduction Developing similar products as members of a product line promises advantages, like higher potential for reuse, lesser costs and shorter time to market. There are many approaches to newly developing product lines from scratch [2, 10]. However, according to Martinez in [15], most successful examples of product lines at Motorola originated in a single separate product. Only in the course of time, a shared architecture for a product line evolved. Moreover, large investments impose a reluctance against introducing a product line approach that ignores existing assets. Hence, introducing a product line approach has generally to cope with existing code. Reverse engineering helps creating a product line from existing systems by identifying and analyzing the components and deriving the individual architectures. They can then be unified to a product line architecture which is populated by the derived components. As stated in Bayer et. al [1], early reverse engineering is needed to derive first coarse information on existing assets needed by a product line analyst to set up a suitable product line architecture. One important piece of information for a product line analysis that tries to integrate existing assets is the socalled feature component map that describes which components are needed to implement a particular feature. A feature is a realized (functional as well as non-functional) requirement (the term feature is intentionally weakly defined because its exact meaning depends on the specific context). Components are computational units of a software architecture. On the basis of the feature component map and additional economic reasons, a decision is made for particularly interesting and required components, and further expensive analyses can be aimed at selected components. This paper describes a quickly realizable technique to ascertain the feature component map based on dynamic information (gained from execution traces) and concept analysis. The technique is automatic to a great extent. The remainder of this article is organized as follows. Section 2 gives an overview, Section 3 explains how concept analysis can be used to derive the feature component map and Section 4 describes our experience with this technique in an example. Section 5 references related research, Section 6 concludes the paper. 2. Overview The technique described here is based on the execution traces generated by a profiler for different usage scenarios. One scenario represents the invocation of one single feature and yields all subprograms executed for this feature. These subprograms identify the components. The required components for all scenarios and the set of features are then subject to concept analysis. Concept analysis gives information on relationships between features and required components as well as feature-feature and component-component dependencies. Concept Analysis. Concept analysis is a mathematical technique that provides insights into binary relations. The mathematical foundation of concept analysis was laid by Birkhoff in 1940. The binary relation in our specific application of concept analysis to derive the feature component map states which components are required when a feature is invoked. The detailed mathematical background of concept analysis can be found in [7,13,14]. 3. Feature Component Map In order to derive the feature component map via concept analysis, one has to define the formal context (objects, attributes, relation) and to interpret the resulting concept lattice accordingly. 3.1. Context for Feature and Components The set of relevant features F will be determined by the product line experts. We consider all the system s subpro-

grams a set of components C. A component corresponds to an object of the formal context, whereas a feature will be considered an attribute. The relation R for the formal context necessary for concept analysis is defined as follows (where c C, f F): (c, f) R if and only if component c is required when feature f is invoked; a subprogram is required when it needs to be executed. R can be visualized using a relation table as shown in Figure 1: f 1 f 2 f 3 f 4 f 5 f 6 f 7 f 8 c 1 c 2 c 3 c 4 Figure 1. Relation Table The resulting concept lattice is shown in Figure 2. We use the sparse representation for visualization showing an attribute/feature at the uppermost concept in the lattice where it is required (so the attributes spread from this node down to the bottom). For a feature f, this node is denoted by µ(f). Analogously, a node is marked with an object/ component c C in the sparse representation if it represents the most special concept that has c in its extent. This unique node is denoted by γ(c). Hence, an object/component c spreads from the node γ(c), to which it is attached, up to the top. f 3, f f 4 5 applies to these concepts f 1, f 2 f5 f 6,f 7,f 8 c 1 c 2 c 3 c 4 < c3 applies to these concepts concept Figure 2. Concept Lattice In order to ascertain the relation table, a set of usage scenarios needs to be prepared where each scenario triggers exactly one relevant feature 1. Then the system is used according to the set of usage scenarios. For each usage scenario, the execution trace is recorded. An execution trace contains all called subprograms for a usage scenario or an invoked feature, respectively. Hence, each system run yields all required components for a single scenario that exploits one feature. A single column in the relation table can be obtained per system run. Applying all usage scenarios provides the relation table. 1. It is possible to combine multiple features into one scenario, making the interpretation of the resulting concept lattice more complicated. This is beyond the scope of this paper. 3.2. Interpretation of the Concept Lattice Concept analysis applied to the formal context described in the previous section gives a lattice, from which interesting relationships can be derived. These relationships can be fully automatically derived and presented to the analyst such that the complicated theoretical background can be hidden. The only thing an analyst has to know is how to interpret the derived relationships. The following base relationships can be derived from the sparse representation of the lattice: A component, c, is required for all features at and above γ(c) in the lattice. A feature, f, requires all components at and below µ(f)in the lattice. A component, c, is specific to exactly one feature, f, iff is the only feature on all paths from γ(c) to the top element. A feature, f, is specific to exactly one component, c, ifc is the only component on all paths from µ(f) to the bottom element (i.e, c is the only component required to implement feature f). Features to which two components, c 1 and c 2, jointly contribute can be identified by γ(c 1 ) γ(c 2 ); graphically depicted, one ascertains in the lattice the closest common node toward the top element starting at the nodes to which c 1 and c 2, respectively, are attached; all features at and above this common node are those jointly implemented by these components. Components jointly required for two features, f 1 and f 2, are described by µ(f 1 ) µ(f 2 ); graphically depicted, one ascertains in the lattice the closest common node toward the bottom element starting at the nodes to which f 1 and f 2, respectively, are attached; all components at and below this common node are those jointly required for these features. Components required for all features can be found at the bottom element. Features that require all components can be found at the top element. The information described above can be derived by a tool and fed back to the product line expert. As soon as a decision is made to re-use certain features, all components required for these features (easily derived from the concept lattice) form a starting point for further static analyses to investigate quality (like maintainability, extractability, and integrability) and to estimate effort for subsequent steps (wrapping, reengineering, or re-development from scratch).

3.3. Implementation The implementation of the described approach is surprisingly simple (if one already has a tool for concept analysis). Our prototype for a Unix environment is an opportunistic integration of the following parts: Gnu C compiler gcc to compile the system using a command line switch for generating profiling information, Gnu object code viewer nm, Gnu profiler prof, concept analysis tool concepts [8], graph editor Graphlet [3] to visualize the concept lattice, and a short Perl script to ascertain the executed functions in the execution trace and to convert the file formats of concepts and Graphlet (the script has just 225 LOC). The fact that the subprograms are extracted from the object code makes the implementation independent from the programming language to a great extent (as long as the language is compiled to object code) and has the advantage that no additional compiler front end is necessary. can be found at the lower level, specific components at the upper level. Moreover, the lattice showed dependencies among components. Figure 3 shows a partial view of the concept lattice generated for Xfig. Node #38 groups all components needed for drawing ellipses and circles (both by diameter and radius). Nodes #41, #44, #42, and #43 contain the components for the more specific shape types. 4. Example We analyzed the Xfig system [18] (version 3.2.1) consisting of about 76 KLOCs written in the programming language C. Xfig is a menu-driven tool that allows the user to draw and manipulate objects interactively under the X Window System. Objects can be lines, polygons, circles, rectangles, splines, text, and imported pictures. An interesting first task in our example was to define what constitutes a feature. Clearly, the capability to draw specific objects, like lines, splines, rectangles, etc., can be considered a feature of Xfig. Moreover, one can manipulate drawn objects in different edit modes (rotate, move, copy, scale, etc.) with Xfig. We conducted two experiments. In the first one, we investigated the ability to draw different shapes only. In the second one, we analyzed the ability to modify shapes. The second experiment exemplifies combined features composed by basic features. For the second experiment, a shape was drawn and then modified. Both draw and modify constitute a basic feature. Combined features add to the effort needed to derive the feature component map as there are many possible combinations. The lattice revealed dependencies among features for the Xfig implementation and the absence of such dependencies, respectively. Related features were grouped together in the concept lattice, which allowed us to compare our mental model of a drawing tool to the actual implementation. The lattice also classified components according to their abstraction level; general components Figure 3. Partial View of Xfig s concept lattice We made the experience that applying our method is easy in principle. However, running all scenarios by hand is time consuming. It may be facilitated by the presence of test cases that allow an automated replay of various scenarios 5. Related Research Snelting has recently introduced concept analysis to software engineering. Since then it has been used to evaluate class hierarchies [14], explore configuration structures of preprocessor statements [9, 13], and to recover components [4,6,7,11,12]. For feature localization, Chen and Rajlich [5] propose a semi-automatic method, in which an analyst browses the statically derived dependency graph; navigation on that graph is computer-aided. Since the analyst more or less takes on all the search, this method is less suited to quickly and cheaply derive the feature component map. In con-

trast, our method treats the system as a black box. Wilde and Scully [16] also use dynamic analysis to localize features. They focus on localizing rather than deriving required components. Our technique goes beyond Wilde and Scully s technique in that it also allows to derive relevant relationships between components and features by means of concept analysis, whereas Wilde and Scully s technique only localizes a feature. The derived relationships are an import information to product line experts and represent additional dependencies that need to be considered in a decision for certain features and components. 6. Conclusions and Future Work A feature component map describes which components are required to implement a particular feature and is needed at an early stage within a process toward a product line platform to weigh alternative platform architectures, to aim further tasks like quality assessment to only those existing components that are needed to populate the platform architecture, and to decide on further steps, like reengineering or wrapping. The technique presented in this paper yields the feature component map automatically using the execution traces for different usage scenarios. The technique is based on concept analysis, a mathematical sound technique to analyze binary relations, which has the additional benefits to reveal not only correspondences between features and components, but also commonalities and variabilities between features and components. The success of the described approach heavily depends on the clever choice of usage scenarios and the combination of them. Scenarios that cover too much functionality in one step or the clumsy combination of scenarios will result in huge and complex lattices that are unreadable for humans. As future work, we want to explore how results obtained by the method described in this paper may be combined with results of additional static analyses. For example, we want to investigate the relation between the concept lattice based on dynamic information and static software architecture recovery techniques. Our experiments suggest that investigating automatic analyses of the lattice we described here is worth further effort. Dealing with scenarios covering multiple features should be investigated in more depth. References [1] Bayer, J., Girard, J.-F., Würthner, M., Apel, M., and DeBaud, J.-M., Transitioning Legacy Assets a Product Line Approach, Proceedings of the SIGSOFT Foundations of Software Engineering, pp. 446-463, September 1999. [2] Bosch, J., Product-Line Architectures in Industry: A Case Study, Proc. of the 21st International Conference on Software Engineering (ICSE 99), pp. 544-554, May 1999. [3] Brandenburg, F.J., Graphlet, Universität Passau, http://www.infosun.fmi.uni-passau.de/graphlet/. [4] Canfora, G., Cimitile, A., De Lucia, A., and Di Lucca, G.A., A Case Study of Applying an Eclectic Approach to Identify Objects in Code, Workshop on Program Comprehension, pp. 136-143, May 1999. [5] Chen, K. und Rajlich, V., Case Study of Feature Location Using Dependence Graph, Proc. of the 8th Int. Workshop on Program Comprehension, pp. 241-249, June 2000. [6] Graudejus, H., Implementing a Concept Analysis Tool for Identifying Abstract Data Types in C Code, master thesis, University of Kaiserslautern, Germany, 1998. [7] Lindig, C. and Snelting, G., Assessing Modular Structure of Legacy Code Based on Mathematical Concept Analysis, Proceedings of the International Conference on Software Engineering, pp. 349-359, May 1997. [8] Lindig, C., Concepts, ftp://ftp.ips.cs.tu-bs.de/pub/local/softech/misc. [9] Krone, M. and Snelting, G., On the Inference of Configuration Structures From Source Code, Proceedings of the International Conference on Software Engineering, pp. 49-57, May 1994. [10]Perry, D., Generic Architecture Descriptions for Product Lines, Proceedings of the Second International ESPRIT ARES Workshop, Lecture Notes in Computer Science 1429, pp. 51-56, Springer, 1998. [11]Sahraoui, H., Melo., W, and Lounis, H., and Dumont, F., Applying Concept Formation Methods to Object Identification in Procedural Code, Proceedings of the Conference on Automated Software Engineering, pp. 210-218, November 1997. [12]Siff, M. and Reps, T., Identifying Modules via Concept Analysis, Proceedings of the International Conference on Software Maintenance, pp. 170-179, October 1997. [13]Snelting, G., Reengineering of Configurations Based on Mathematical Concept Analysis, ACM Transactions on Software Engineering and Methodology 5, 2, pp. 146-189, April 1997. [14]Snelting, G. and Tip, F., Reengineering Class Hierarchies Using Concept Analysis, Proc. of the ACM SIGSOFT Symposium on the Foundations of Software Engineering, pp. 99-110, November 1994. [15]Staudenmayer, N.S. and Perry, D.E., Session 5: Key Techniques and Process Aspects for Product Line Development, Proceedings of the 10th International Software Process Workshop, June 1996. [16]Wilde, N. and Scully, M.C., Software Reconnaissance: Mapping Program Features to Code, Software Maintenance: Research and Practice, vol. 7, pp. 49-62, 1995. [17]Xfig system, http://www.xfig.org.

Derivation of Feature Component Maps by means of Concept Analysis Thomas Eisenbarth, Rainer Koschke, Daniel Simon University of Stuttgart, Breitwiesenstr. 20-22, 70565 Stuttgart, Germany {eisenbts, koschke, simondl}@informatik.uni-stuttgart.de Abstract Feature component maps describe which components are needed to implement a particular feature and are used early in processes to develop a product line based on existing assets. This paper describes a new technique to derive the feature component map and additional dependencies utilizing dynamic information and concept analysis. The method is simple to apply, cost-effective, largely language independent, and can yield results quickly and very early in the process. 1. Introduction Developing similar products as members of a product line promises advantages, like higher potential for reuse, lesser costs and shorter time to market. There are many approaches to newly developing product lines from scratch [2, 10]. However, according to Martinez in [15], most successful examples of product lines at Motorola originated in a single separate product. Only in the course of time, a shared architecture for a product line evolved. Moreover, large investments impose a reluctance against introducing a product line approach that ignores existing assets. Hence, introducing a product line approach has generally to cope with existing code. Reverse engineering helps creating a product line from existing systems by identifying and analyzing the components and deriving the individual architectures. They can then be unified to a product line architecture which is populated by the derived components. As stated in Bayer et. al [1], early reverse engineering is needed to derive first coarse information on existing assets needed by a product line analyst to set up a suitable product line architecture. One important piece of information for a product line analysis that tries to integrate existing assets is the socalled feature component map that describes which components are needed to implement a particular feature. A feature is a realized (functional as well as non-functional) requirement (the term feature is intentionally weakly defined because its exact meaning depends on the specific context). Components are computational units of a software architecture. On the basis of the feature component map and additional economic reasons, a decision is made for particularly interesting and required components, and further expensive analyses can be aimed at selected components. This paper describes a quickly realizable technique to ascertain the feature component map based on dynamic information (gained from execution traces) and concept analysis. The technique is automatic to a great extent. The remainder of this article is organized as follows. Section 2 gives an overview, Section 3 explains how concept analysis can be used to derive the feature component map and Section 4 describes our experience with this technique in an example. Section 5 references related research, Section 6 concludes the paper. 2. Overview The technique described here is based on the execution traces generated by a profiler for different usage scenarios. One scenario represents the invocation of one single feature and yields all subprograms executed for this feature. These subprograms identify the components. The required components for all scenarios and the set of features are then subject to concept analysis. Concept analysis gives information on relationships between features and required components as well as feature-feature and component-component dependencies. Concept Analysis. Concept analysis is a mathematical technique that provides insights into binary relations. The mathematical foundation of concept analysis was laid by Birkhoff in 1940. The binary relation in our specific application of concept analysis to derive the feature component map states which components are required when a feature is invoked. The detailed mathematical background of concept analysis can be found in [7,13,14]. 3. Feature Component Map In order to derive the feature component map via concept analysis, one has to define the formal context (objects, attributes, relation) and to interpret the resulting concept lattice accordingly. 3.1. Context for Feature and Components The set of relevant features F will be determined by the product line experts. We consider all the system s subpro-

grams a set of components C. A component corresponds to an object of the formal context, whereas a feature will be considered an attribute. The relation R for the formal context necessary for concept analysis is defined as follows (where c C, f F): (c, f) R if and only if component c is required when feature f is invoked; a subprogram is required when it needs to be executed. R can be visualized using a relation table as shown in Figure 1: f 1 f 2 f 3 f 4 f 5 f 6 f 7 f 8 c 1 c 2 c 3 c 4 Figure 1. Relation Table The resulting concept lattice is shown in Figure 2. We use the sparse representation for visualization showing an attribute/feature at the uppermost concept in the lattice where it is required (so the attributes spread from this node down to the bottom). For a feature f, this node is denoted by µ(f). Analogously, a node is marked with an object/ component c C in the sparse representation if it represents the most special concept that has c in its extent. This unique node is denoted by γ(c). Hence, an object/component c spreads from the node γ(c), to which it is attached, up to the top. f 3, f f 4 5 applies to these concepts f 1, f 2 f5 f 6,f 7,f 8 c 1 c 2 c 3 c 4 < c3 applies to these concepts concept Figure 2. Concept Lattice In order to ascertain the relation table, a set of usage scenarios needs to be prepared where each scenario triggers exactly one relevant feature 1. Then the system is used according to the set of usage scenarios. For each usage scenario, the execution trace is recorded. An execution trace contains all called subprograms for a usage scenario or an invoked feature, respectively. Hence, each system run yields all required components for a single scenario that exploits one feature. A single column in the relation table can be obtained per system run. Applying all usage scenarios provides the relation table. 1. It is possible to combine multiple features into one scenario, making the interpretation of the resulting concept lattice more complicated. This is beyond the scope of this paper. 3.2. Interpretation of the Concept Lattice Concept analysis applied to the formal context described in the previous section gives a lattice, from which interesting relationships can be derived. These relationships can be fully automatically derived and presented to the analyst such that the complicated theoretical background can be hidden. The only thing an analyst has to know is how to interpret the derived relationships. The following base relationships can be derived from the sparse representation of the lattice: A component, c, is required for all features at and above γ(c) in the lattice. A feature, f, requires all components at and below µ(f)in the lattice. A component, c, is specific to exactly one feature, f, iff is the only feature on all paths from γ(c) to the top element. A feature, f, is specific to exactly one component, c, ifc is the only component on all paths from µ(f) to the bottom element (i.e, c is the only component required to implement feature f). Features to which two components, c 1 and c 2, jointly contribute can be identified by γ(c 1 ) γ(c 2 ); graphically depicted, one ascertains in the lattice the closest common node toward the top element starting at the nodes to which c 1 and c 2, respectively, are attached; all features at and above this common node are those jointly implemented by these components. Components jointly required for two features, f 1 and f 2, are described by µ(f 1 ) µ(f 2 ); graphically depicted, one ascertains in the lattice the closest common node toward the bottom element starting at the nodes to which f 1 and f 2, respectively, are attached; all components at and below this common node are those jointly required for these features. Components required for all features can be found at the bottom element. Features that require all components can be found at the top element. The information described above can be derived by a tool and fed back to the product line expert. As soon as a decision is made to re-use certain features, all components required for these features (easily derived from the concept lattice) form a starting point for further static analyses to investigate quality (like maintainability, extractability, and integrability) and to estimate effort for subsequent steps (wrapping, reengineering, or re-development from scratch).

3.3. Implementation The implementation of the described approach is surprisingly simple (if one already has a tool for concept analysis). Our prototype for a Unix environment is an opportunistic integration of the following parts: Gnu C compiler gcc to compile the system using a command line switch for generating profiling information, Gnu object code viewer nm, Gnu profiler prof, concept analysis tool concepts [8], graph editor Graphlet [3] to visualize the concept lattice, and a short Perl script to ascertain the executed functions in the execution trace and to convert the file formats of concepts and Graphlet (the script has just 225 LOC). The fact that the subprograms are extracted from the object code makes the implementation independent from the programming language to a great extent (as long as the language is compiled to object code) and has the advantage that no additional compiler front end is necessary. can be found at the lower level, specific components at the upper level. Moreover, the lattice showed dependencies among components. Figure 3 shows a partial view of the concept lattice generated for Xfig. Node #38 groups all components needed for drawing ellipses and circles (both by diameter and radius). Nodes #41, #44, #42, and #43 contain the components for the more specific shape types. 4. Example We analyzed the Xfig system [18] (version 3.2.1) consisting of about 76 KLOCs written in the programming language C. Xfig is a menu-driven tool that allows the user to draw and manipulate objects interactively under the X Window System. Objects can be lines, polygons, circles, rectangles, splines, text, and imported pictures. An interesting first task in our example was to define what constitutes a feature. Clearly, the capability to draw specific objects, like lines, splines, rectangles, etc., can be considered a feature of Xfig. Moreover, one can manipulate drawn objects in different edit modes (rotate, move, copy, scale, etc.) with Xfig. We conducted two experiments. In the first one, we investigated the ability to draw different shapes only. In the second one, we analyzed the ability to modify shapes. The second experiment exemplifies combined features composed by basic features. For the second experiment, a shape was drawn and then modified. Both draw and modify constitute a basic feature. Combined features add to the effort needed to derive the feature component map as there are many possible combinations. The lattice revealed dependencies among features for the Xfig implementation and the absence of such dependencies, respectively. Related features were grouped together in the concept lattice, which allowed us to compare our mental model of a drawing tool to the actual implementation. The lattice also classified components according to their abstraction level; general components Figure 3. Partial View of Xfig s concept lattice We made the experience that applying our method is easy in principle. However, running all scenarios by hand is time consuming. It may be facilitated by the presence of test cases that allow an automated replay of various scenarios 5. Related Research Snelting has recently introduced concept analysis to software engineering. Since then it has been used to evaluate class hierarchies [14], explore configuration structures of preprocessor statements [9, 13], and to recover components [4,6,7,11,12]. For feature localization, Chen and Rajlich [5] propose a semi-automatic method, in which an analyst browses the statically derived dependency graph; navigation on that graph is computer-aided. Since the analyst more or less takes on all the search, this method is less suited to quickly and cheaply derive the feature component map. In con-

trast, our method treats the system as a black box. Wilde and Scully [16] also use dynamic analysis to localize features. They focus on localizing rather than deriving required components. Our technique goes beyond Wilde and Scully s technique in that it also allows to derive relevant relationships between components and features by means of concept analysis, whereas Wilde and Scully s technique only localizes a feature. The derived relationships are an import information to product line experts and represent additional dependencies that need to be considered in a decision for certain features and components. 6. Conclusions and Future Work A feature component map describes which components are required to implement a particular feature and is needed at an early stage within a process toward a product line platform to weigh alternative platform architectures, to aim further tasks like quality assessment to only those existing components that are needed to populate the platform architecture, and to decide on further steps, like reengineering or wrapping. The technique presented in this paper yields the feature component map automatically using the execution traces for different usage scenarios. The technique is based on concept analysis, a mathematical sound technique to analyze binary relations, which has the additional benefits to reveal not only correspondences between features and components, but also commonalities and variabilities between features and components. The success of the described approach heavily depends on the clever choice of usage scenarios and the combination of them. Scenarios that cover too much functionality in one step or the clumsy combination of scenarios will result in huge and complex lattices that are unreadable for humans. As future work, we want to explore how results obtained by the method described in this paper may be combined with results of additional static analyses. For example, we want to investigate the relation between the concept lattice based on dynamic information and static software architecture recovery techniques. Our experiments suggest that investigating automatic analyses of the lattice we described here is worth further effort. Dealing with scenarios covering multiple features should be investigated in more depth. References [1] Bayer, J., Girard, J.-F., Würthner, M., Apel, M., and DeBaud, J.-M., Transitioning Legacy Assets a Product Line Approach, Proceedings of the SIGSOFT Foundations of Software Engineering, pp. 446-463, September 1999. [2] Bosch, J., Product-Line Architectures in Industry: A Case Study, Proc. of the 21st International Conference on Software Engineering (ICSE 99), pp. 544-554, May 1999. [3] Brandenburg, F.J., Graphlet, Universität Passau, http://www.infosun.fmi.uni-passau.de/graphlet/. [4] Canfora, G., Cimitile, A., De Lucia, A., and Di Lucca, G.A., A Case Study of Applying an Eclectic Approach to Identify Objects in Code, Workshop on Program Comprehension, pp. 136-143, May 1999. [5] Chen, K. und Rajlich, V., Case Study of Feature Location Using Dependence Graph, Proc. of the 8th Int. Workshop on Program Comprehension, pp. 241-249, June 2000. [6] Graudejus, H., Implementing a Concept Analysis Tool for Identifying Abstract Data Types in C Code, master thesis, University of Kaiserslautern, Germany, 1998. [7] Lindig, C. and Snelting, G., Assessing Modular Structure of Legacy Code Based on Mathematical Concept Analysis, Proceedings of the International Conference on Software Engineering, pp. 349-359, May 1997. [8] Lindig, C., Concepts, ftp://ftp.ips.cs.tu-bs.de/pub/local/softech/misc. [9] Krone, M. and Snelting, G., On the Inference of Configuration Structures From Source Code, Proceedings of the International Conference on Software Engineering, pp. 49-57, May 1994. [10]Perry, D., Generic Architecture Descriptions for Product Lines, Proceedings of the Second International ESPRIT ARES Workshop, Lecture Notes in Computer Science 1429, pp. 51-56, Springer, 1998. [11]Sahraoui, H., Melo., W, and Lounis, H., and Dumont, F., Applying Concept Formation Methods to Object Identification in Procedural Code, Proceedings of the Conference on Automated Software Engineering, pp. 210-218, November 1997. [12]Siff, M. and Reps, T., Identifying Modules via Concept Analysis, Proceedings of the International Conference on Software Maintenance, pp. 170-179, October 1997. [13]Snelting, G., Reengineering of Configurations Based on Mathematical Concept Analysis, ACM Transactions on Software Engineering and Methodology 5, 2, pp. 146-189, April 1997. [14]Snelting, G. and Tip, F., Reengineering Class Hierarchies Using Concept Analysis, Proc. of the ACM SIGSOFT Symposium on the Foundations of Software Engineering, pp. 99-110, November 1994. [15]Staudenmayer, N.S. and Perry, D.E., Session 5: Key Techniques and Process Aspects for Product Line Development, Proceedings of the 10th International Software Process Workshop, June 1996. [16]Wilde, N. and Scully, M.C., Software Reconnaissance: Mapping Program Features to Code, Software Maintenance: Research and Practice, vol. 7, pp. 49-62, 1995. [17]Xfig system, http://www.xfig.org.