The present invention generally relates to information technology, and, more particularly, to software analysis.
In order to plan the development of a software application, practitioners have to estimate the amount of time, the number or personnel required, and the amount of other resources required. Existing approaches for estimating or calculating effort for a software project use parametric models pre-populated by past project data. Most parametric models require a metric reflecting the size of the software under development.
An existing approach for estimating the size of a software application includes measuring the application in terms of number of lines in a source code (SLOC). SLOC can be used, for example, for estimating, by way of analogy, projects with similar functionality and programming languages, as well as for post-partum analysis. However, the effectiveness of SLOC as a sizing measure for prediction models is lessened by the fact that the measure is available only very late in the software life cycle. Also, with the advent of software development paradigms that frequently re-use existing code and automatically generate source code, an approach using this kind of a measure requires substantial adjustment.
Other existing approaches for measuring software size include taking action when architectural and/or design decisions have been made. These metrics, however, are very difficult to measure, especially, for example, function points which require function point trained experts.
Changes in software development techniques have led to a need for a new sizing approach that aligns with existing approaches, tools and practices and can be used early in the life cycle.
Furthermore, a functional description of a software application is frequently captured using use cases that describe actor-system interaction descriptions.
Principles of the present invention provide techniques for characterizing a software application. An exemplary method (which can be computer-implemented) for calculating effort of a software application, according to one aspect of the invention, can include steps of obtaining a detailed use case model (DUCM) of the software application, computing a multi-dimensional metrics vector (MMV) based on the DUCM, using a size model for the MMV to estimate a size of the software application, and inputting the MMV and the size into an effort model, wherein the effort model is used to calculate the effort required to build the software application.
In an embodiment of the invention, an exemplary method for representing a detailed use case model (DUCM) of a software application can include obtaining a context model, wherein the context model describes one or more classes and one or more properties defining a domain of the software application, obtaining a behavior model, wherein the behavior model comprises one or more actors and a set of one or more use cases that the one or more actors can perform, and using the context model and the behavior model to represent a DUCM of the software application.
At least one embodiment of the invention can be implemented in the form of a computer product including a computer usable medium with computer usable program code for performing the method steps indicated. Furthermore, at least one embodiment of the invention can be implemented in the form of an apparatus including a memory and at least one processor that is coupled to the memory and operative to perform exemplary method steps.
These and other objects, features and advantages of the present invention will become apparent from the following detailed description of illustrative embodiments thereof, which is to be read in connection with the accompanying drawings.
Principles of the present invention include techniques for characterizing a software application on the basis of its detailed use case model. The level of detail of use case models varies across software projects, making their use in automated software engineering difficult. However, one or more embodiments of the invention define a canonical representation of use case models and refer to it as the detailed use case model (DUCM). Such a form will lead to machine-processable use cases and use of such artifacts for software engineering activities such as, for example, estimation and test case generation.
Principles of the present invention include estimating the effort for a software application using use cases that align with existing approaches, tools and practices, and can be used early in the software life cycle.
One or more embodiments of the invention include computing a multi-dimensional metrics vector (MMV) and estimating the size of a software project based on a detailed use case model (DUCM). A DUCM includes a set of use cases and data model to define concepts described in use cases. The use cases in a use DUCM describe scenarios of execution of a software application by a particular actor, for example, a chain of actor-system interactions in the form of an actor providing input to the system, a system providing output to the actor and/or a system updating state of the system.
Also, one or more embodiments of the present invention include computing a MMV of a system by using the information available in such actor-system interaction descriptions. Once a use case model of the software application is available, size and MMV computations can be automatically produced. The size and MMV computations can be used as inputs to a parametric model used for effort estimation. Consequently, an effort estimate of an application can be derived for developing the software application.
DUCMs can be used, for example, for describing functional requirements of a system. The information is available at a very early phase of the software development lifecycle, before the architectural and design decisions are made. As a result, DUCM based estimation can be used to plan projects at the very beginning of software life cycles.
DUCMs are also easy to capture and maintain. Therefore, if in any development cycle, DUCMs are not available, they can be produced easily for planning purposes, as described herein. The overhead involved is much less than performing measurements on the basis of, for example, function points or object points.
Also, in one or more embodiments of the present invention, the computation of MMV is automated and can be implemented as a tool. Therefore, the computations can be fast and repeatable.
The data model presented in
A data model can also have constraints defined on its classes and attributes. These constraints form the system invariants and can be used to define any enterprise rules that an application needs to satisfy. For example, in
The actors in
The use case in
Principles of the present invention include providing a standard form for capturing a use case model. In one or more embodiments of the present invention, part of the MMV of an application is computed automatically from a data model using at least one of the following indicators:
In one or more embodiments of the present invention, part of the MMV of an application is measured automatically from a behavioral model using at least one of the following indicators:
In one or more embodiments of the present invention, part of the MMV is measured automatically from various structures (for example, a cell graph, a data flow diagram and/or a control flow diagram) derived from a DUCM using at least one of the following indicators:
The size of an application is calculated by using a parametric model that is developed based on the past data. The development of the parametric model may, for example, include the following steps. The complexity of use cases is determined based on the MMV of a DUCM. Complexity may be indicated by a single use case complexity measure or by a function of multiple use case complexity indicators. The size of the application can be expressed (that is, calculated) as a function of one or more weighted complexities of the use cases. The function may account for other factors such as, for example, the number of actors, the number of use cases in an application model, etc.
In creating a size metric, use case measurements and actual size measurements of the application are collected as data that will be used to calibrate the estimation model. Through calibration, the weights of the use case complexities will be finalized. The size metric will be correlated with other size metrics such as, for example, source lines of code, function points, etc. This correlation will ensure that the developed size metric yields size measurements that are usable by other measurement models. The sizing model may also be further refined in order to account for any anomalies.
An effort calculation can be derived based on another parametric model. The development of this parametric model may, for example, include the following steps. The system is measured in terms of, for example, personnel characteristics, team distribution, amount of reuse, etc. These metrics are used to characterize the type of system whose effort is being predicted.
The effort for development is determined as a function of the size and system and/or application metrics. In order to calibrate the effort model, effort and other metrics data is collected. The calibration will help determine the weights and powers for system indicators in the effort model.
The sizing model is correlated with the effort model to develop a use case effort estimation model. The effort model may, for example, be further refined in order to account for any anomalies.
One or more embodiments of the present invention include deriving a DUCM of a software application by defining a model of the application domain and describing the application behavior using use cases. Defining a model of the application domain can include defining prominent domain types using, for example, UML class diagrams and/or ontologies. Defining a model of the application domain may also include defining enterprise rules for the domain of the application, defining object keys in UML classes and defining a multiplicity of object valued attributes.
Modeling an application may also include defining use case behavior in terms of input, output, pre-condition and effect, as well as defining the types of variables in input, output, pre-condition and effect in terms of domain model classes and primitive types. Also, use case pre-conditions may be defined via predicates defined on objects of type specified by the model of the application domain.
Additionally, parameters of the use case may be defined, wherein parameters are identified for input actions and output actions. Further use case effects may be specified, including use case effects in the form of creation of objects, updating attributes of created objects, adding links between created objects, deleting created objects and deleting the links created between existing objects.
A variety of techniques, utilizing dedicated hardware, general purpose processors, software, or a combination of the foregoing may be employed to implement the present invention. At least one embodiment of the invention can be implemented in the form of a computer product including a computer usable medium with computer usable program code for performing the method steps indicated. Furthermore, at least one embodiment of the invention can be implemented in the form of an apparatus including a memory and at least one processor that is coupled to the memory and operative to perform exemplary method steps.
At present, it is believed that the preferred implementation will make substantial use of software running on a general-purpose computer or workstation. With reference to
Accordingly, computer software including instructions or code for performing the methodologies of the invention, as described herein, may be stored in one or more of the associated memory devices (for example, ROM, fixed or removable memory) and, when ready to be utilized, loaded in part or in whole (for example, into RAM) and executed by a CPU. Such software could include, but is not limited to, firmware, resident software, microcode, and the like.
Furthermore, the invention can take the form of a computer program product accessible from a computer-usable or computer-readable medium (for example, media 418) providing program code for use by or in connection with a computer or any instruction execution system. For the purposes of this description, a computer usable or computer readable medium can be any apparatus for use by or in connection with the instruction execution system, apparatus, or device.
The medium can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. Examples of a computer-readable medium include a semiconductor or solid-state memory (for example, memory 404), magnetic tape, a removable computer diskette (for example, media 418), a random access memory (RAM), a read-only memory (ROM), a rigid magnetic disk and an optical disk. Current examples of optical disks include compact disk-read only memory (CD-ROM), compact disk-read and/or write (CD-R/W) and DVD.
A data processing system suitable for storing and/or executing program code will include at least one processor 402 coupled directly or indirectly to memory elements 404 through a system bus 410. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.
Input and/or output or I/O devices (including but not limited to keyboards 408, displays 406, pointing devices, and the like) can be coupled to the system either directly (such as via bus 410) or through intervening I/O controllers (omitted for clarity).
Network adapters such as network interface 414 may also be coupled to the system to enable the data processing system to become coupled to other data processing systems or remote printers or storage devices through intervening private or public networks. Modems, cable modem and Ethernet cards are just a few of the currently available types of network adapters.
In any case, it should be understood that the components illustrated herein may be implemented in various forms of hardware, software, or combinations thereof, for example, application specific integrated circuit(s) (ASICS), functional circuitry, one or more appropriately programmed general purpose digital computers with associated memory, and the like. Given the teachings of the invention provided herein, one of ordinary skill in the related art will be able to contemplate other implementations of the components of the invention.
Step 504 includes computing a multi-dimensional metrics vector (MMV) based on the DUCM. Computing a MMV can include measuring complexity of the software application from structures derived from a use case estimation model using indicators such as, for example, cyclomatic complexity, dataflow complexity and response for a class. Complexity of a software application is an objective measure of the software application that indicates the difficulty of producing the software application. The one or more indicators can also be, for example, derived on the basis of a use case model. A use case is a way of modeling a software application.
Step 506 includes using a size model for the MMV to estimate a size of the software application. Development of a size model can include, for example, determining complexity of use cases based on the MMV of the DUCM, wherein complexity is indicated by a single use case complexity measure and/o a function of multiple use case complexity indicators. Also, development of a size model can include expressing the size of a software application as a function of weighted complexities of the use cases, as well as collecting use case measurements and size measurements of the software application to create a size metric, wherein the use case measurements and size measurements are used to calibrate an estimation model. Further, the size model can be correlated with other size metrics, analogous source lines of code, and/or function points.
A use case model is a description of the software application in terms of actor-system interaction. Based on this, the complexity indicators can be calculated. As described above, the effort of producing the software application can be computed by using these complexity indicators as well as the size information. A formula can be produced in which one can estimate effort directly from use cases. Such a formula is identified as a use case effort estimation model.
Step 508 includes inputting the MMV and the size into an effort model, wherein the effort model is used to calculate the effort required to build the software application. Development of an effort model can include, for example, measuring the software application in terms of personnel characteristics, team distribution and/or amount of reuse to create application metrics. Inputting the complexity and size into an effort model can also include developing the effort model as a function of the size model and application metrics, and calibrating the effort model by collecting effort and/or other metrics data. Additionally, the techniques described herein may also include correlating a size model with the effort model to develop a use case effort estimation model.
Step 604 includes obtaining a behavior model, wherein the behavior model comprises one or more actors and a set of one or more use cases that the one or more actors can perform. Each use case can be, for example, a sequence of one or more statements defining an actor-system interaction. Also, each use case can have a set of one or more specifications describing one or more actions that the actor may perform within the use case. Additionally, each use case can have one or more output statements that define one or more observable outputs of the use case.
Step 606 includes using the context model and the behavior model to represent a DUCM of the software application. This step can be performed, for example, manually by the user modeling the use cases. The user, as illustrated above in
At least one embodiment of the invention may provide one or more beneficial effects, such as, for example, the ability to be effectively used early in the software life cycle.
It should be noted that the invention is not limited to the precise exemplary embodiments detailed above, and that various other changes and modifications may be made by one skilled in the art. For example, the description of a use case model does not preclude the use of use case models that may differ in form but may carry the same information. Existing use case models, for example, can be transformed to the one required as long as the necessary information is present.
Although illustrative embodiments of the present invention have been described herein with reference to the accompanying drawings, it is to be understood that the invention is not limited to those precise embodiments, and that various other changes and modifications may be made by one skilled in the art without departing from the scope or spirit of the invention.