CN105739993B - A kind of framework static state maturity measure - Google Patents

A kind of framework static state maturity measure Download PDF

Info

Publication number
CN105739993B
CN105739993B CN201610112423.1A CN201610112423A CN105739993B CN 105739993 B CN105739993 B CN 105739993B CN 201610112423 A CN201610112423 A CN 201610112423A CN 105739993 B CN105739993 B CN 105739993B
Authority
CN
China
Prior art keywords
component
framework
degree
maturity
static state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201610112423.1A
Other languages
Chinese (zh)
Other versions
CN105739993A (en
Inventor
李必信
姜雨晴
廖力
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Southeast University
Original Assignee
Huawei Technologies Co Ltd
Southeast University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd, Southeast University filed Critical Huawei Technologies Co Ltd
Priority to CN201610112423.1A priority Critical patent/CN105739993B/en
Publication of CN105739993A publication Critical patent/CN105739993A/en
Application granted granted Critical
Publication of CN105739993B publication Critical patent/CN105739993B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/77Software metrics

Abstract

The invention proposes a kind of framework static state maturity measures, the software evaluation method of traditional object-oriented is applied to architecture level, using the component diagram of framework as measure object, obtain the cyclomatic complexity in high-rise secondary design, fan-in is fanned out to, the response of the intermodule degree of coupling, module, cohesion degree, above- mentioned information are further processed to obtain the static maturity of framework, it can help user to find problem present on framework static tissue structure and logic dependencies, improve framework quality.

Description

A kind of framework static state maturity measure
Technical field
The present invention relates to a kind of methods for measuring framework static state maturity, belong to software architecture measurement field.
Background technique
The appearance of software architecture preferably improves software development efficiency, ensures software quality, raising software and component Reusability is just widely used from after occurring.The ununified definition of software architecture at present generally believes that software architecture includes structure Three big elements of part, connector and constraint, are one of the levels in software design procedure, which surmounts the algorithm in calculating process Design and Data Structure Design.Component can be one group of code, be also possible to independent program.Connector can be process tune With, pipeline and message etc., for indicating the correlation between component.Constraint is generally condition when component connection.Software frame The meaning of structure runs through each stage of software life-cycle, is vital factor during software is smoothly realized.Component diagram In contain component and connector, thus play the role of in software architecture very important, it defines the static tissue of framework Structure and logic dependencies, then how to judge the static tissue structure an of framework and the quality of logic dependencies?
The present invention proposes the appraisal procedure of software development early stage a kind of, this method from the component diagram of framework It is a kind of framework static state maturity measure for the static nature of software architecture.
Software architecture static state maturity, i.e. SSAM refer to the degree of software architecture close maturation framework in static structure, In order to make problem be unlikely to too complicated and controllable, the static attribute paid close attention to here includes cyclomatic complexity, fan-in degree of being fanned out to, intermodule The degree of coupling, corresponding, loose cohesion, the tight cohesion of module.One mature framework refers to when architectural evolution to certain phase, maturity Acute variation will not occur for index, only fluctuate in a certain range, framework at this time reaches maturity state.To mature framework again into If row modification, its some (or certain) static nature (for example, degree of coupling) can be become very poor, so that the framework has been discontented with The current demand of foot.
Summary of the invention
Technical problem: the present invention provide it is a kind of can software development early stage, Software Architecture Design is measured, helps to use Family finds design problem, and time update reduces the framework static state maturity measure of risk and software development maintenance cost.
Technical solution: framework static state maturity measure of the invention comprising the steps of:
Step 1) qualification inspection: check that the framework describes in document whether to be .xml or .xmi comprising suffix Component diagram, component diagram otherwise, terminate this method process, it includes component that the framework, which describes document, if so, then entering step 2) Figure, deployment diagram, Use Case Map, precedence diagram, system sequence diagrams and constraint document.
Step 2) obtain metadata: the component diagram in document is described to framework and is parsed, count component diagram in component, Incidence relation information between component, including component map number L, external component number totalN, the connection relationship between external component The dependence of totalE and each component goes out number of edges mesh E, relies on into number of edges mesh X, provides number of ports W, using number of ports R, sub- structure The adjacency matrix AdjMatrix of number of packages mesh S and sub- Component Dependency relationship.
Step 3) calculates separately acquisition intermediate data according to following each formula, and the intermediate data includes cyclomatic complexity, fan Enter degree of being fanned out to, the intermodule degree of coupling, intermodule response, tight cohesion degree and loose cohesion degree:
Cyclomatic complexity CCN:
CCN=(totalE-totalN)+2 × L
Fan-in degree of being fanned out to FFC:
FFC=CCN × (E+W × (X+R))2
Intermodule degree of coupling CBO:
Intermodule responds RFC:
RFC=S+E+R
Tight cohesion degree TCC and loose cohesion degree LCC:
Wherein,Indicate the directly related relationship number of all submodules;NIC (S) indicates son The transitive closure that dependence between component is formed.
Step 4) computing architecture static state maturity according to the following formula:
Further, in the method for the present invention, in step 4), when tight cohesion degree and loose cohesion degree, any one is 0, according to Following formula computing architecture static state maturity:
When tight cohesion degree and loose cohesion degree product are greater than 1, computing architecture static state maturity according to the following formula:
The present invention realizes framework static state maturity (SSAM, Static Software using framework attribute measure Architecture Maturity) measurement data collection, further calculate SSAM according to the data of collection.
The utility model has the advantages that the present invention compared with art methods, has the advantage that
Framework represents the high-level design of software development, and often uses expert's assessment, column for the measure of design It lifts design principle and checks that meeting the methods of situation carries out qualitative measure, and the design documentation paid close attention to is mostly detailed design phase Product, on the time rearward, such as class figure, prevent developer is from having found the defect of architecture design in time, at the same can existing for Measurement results are unilateral, excessively dependence expertise, rule the problems such as, thus the present invention is compared with art methods, exist with Lower advantage:
(1) the method for the present invention describes document and is measured for the framework of software development early stage, further instructs frame Structure improves, so as to which the maintenance cost of software is effectively reduced;
(2) present invention describes to obtain Elementary Measures data in the component diagram of document from software architecture, independent of expert and Rule detection, measurement results are more objective;
(3) present invention provides framework static state maturity with quantitative terms, to user with direct feel.
Detailed description of the invention
Fig. 1 SSAM measures process
Fig. 2 component diagram
Specific embodiment
Below with reference to embodiment and Figure of description, the present invention is further illustrated.
For the convenience of description, component diagram is as shown in Figure 2 it is assumed that there is an examples of architectures.
Step 1) qualification inspection: checking whether the framework includes component diagram, and check component diagram suffix whether be .xml or .xmi, if so, then entering step 2), otherwise, terminate this method process, it includes component that the framework, which describes document, Figure, deployment diagram, Use Case Map, precedence diagram, system sequence diagrams and constraint document.On inspection, change framework qualification, can enter step 2)。
Step 2) obtains metadata:
The overall metadata information obtained from component diagram is as shown in the table:
L totalE totalN
Component Digram 1 19 13
Wherein, L, totalN and totalE are the external component number for respectively indicating component map number, including in component diagram And the connection relationship (not including the connection side between the sub- component and sub- component of component inside) between external component.
Following table illustrates, the essential information of each component:
S E X R W
sub2 0 0 0 1 1
sub1 0 0 1 1 1
RemoteDB 0 0 1 0 1
RSApplication 0 1 1 1 1
RSInterface 0 1 0 1 1
RemoteApplication 0 0 1 1 1
RemoteInterface 0 1 0 1 1
DB 0 0 1 0 1
WebApplication 0 1 1 1 1
WebInterface 0 1 0 1 1
Browser 0 0 0 2 1
LocalDB 0 0 1 0 1
ClientApplication 2 1 0 1 1
MainInterface 0 1 0 2 1
User 0 0 0 1 0
Wherein, sub- number of components S, rely on out number of edges mesh E, rely on into number of edges mesh X, use interface number R and interface be provided Number W.
Due to only having component ClientApplication that there is sub- component, need to obtain the dependence of its internal component The adjacency matrix of formation measures the cohesion degree of the module.There was only interface relationship between sub1 and sub2 herein, does not rely on pass System, thus its adjacency matrix is one 2 × 2 null matrix.
Step 3) obtains intermediate data:
We analyze the calculation method of each sub- Measure Indexes by taking component ClientApplication as an example.
Cyclomatic complexity (CCN, Cyclomatic Complexity Number):
According to graph theory and program structure control theory, using the component diagram of framework to be measured as measure object, component diagram is indicated In the quantity of dependence control path that is made of module dependencies, formula below is cyclomatic complexity calculation method.Circle is complicated Spending high program is often the program for being easiest to occur mistake, practice have shown that cyclomatic complexity CCN≤10 are advisable.
CCN=(totalE-totalN)+2 × L=(19-13)+2 × 1=8
Fan-in degree of being fanned out to (FFC, Fan-in Fan-out Complexity):
Fan-in refers to the number for calling directly the higher level's module of the module, and the multiplexing procedure of the big representation module of fan-in is high.It is fanned out to Refer to the number for the Subordinate module that the module calls directly.It is fanned out to bigger, it is more to design problem in need of consideration when the module, multiple Polygamy is higher.For designing good software configuration, usual top layer is fanned out to bigger, and centre is fanned out to small, and bottom module then has greatly Fan-in.Following formula is the calculation method of framework fan-in degree of being fanned out to.
FFC=CCN × (E+W × (X+R))2
The intermodule degree of coupling (CBO, Coupling Between Object):
The frequent degree that CBO metric module is interacted with other modules, calculation method are as follows.CBO bigger module, Easier to be influenced by modification in other modules and mistake thus maintainable poorer, risk is higher.
Intermodule responds (RFC, Response For Component):
For RFC metric module by other module call numbers, calculation formula is as follows.The value is bigger, illustrates the module Modification and mistake can produce bigger effect remaining module, not convenient for safeguarding.
RFC=S+E+R=2+1+1=4
Tight cohesion degree (TCC, Tight Component Cohesion) and loose cohesion degree (LCC, Loose Component Cohesion):
When a module can provide, a single function and element therein are closely linked, then the module has very high Cohesion degree, module cohesion degree more higher easier exploitation and a maintenance.Direct-coupling relationship between tight cohesion degree measurement submodule, And loose cohesion degree further comprises the transitive closure called between submodule on the basis of tight cohesion degree.
The measure of other components is as ClientApplication, but since other components are without sub- structure Part can not calculate the construction part module so that the calculated result of P (s) is that denominator is 0 in the calculation formula of 0, TCC and LCC at this time Cohesion degree indicates that the intermediate data information of each component is as shown in the table with " not applied ".
FFC RFC CBO LCC TCC
RSInterface 32 2 0.231 not applied not applied
RemoteApplication 32 1 0.231 not applied not applied
RemoteInterface 32 2 0.231 not applied not applied
RemoteDB 8 0 0.154 not applied not applied
LocalDB 8 0 0.154 not applied not applied
RSApplication 128 2 0.308 not applied not applied
ClientApplication 32 4 0.231 3 3
WebApplication 128 2 0.308 not applied not applied
WebInterface 32 2 0.231 not applied not applied
MainInterface 128 3 0.308 not applied not applied
user 0 1 0.077 not applied not applied
DB 8 0 0.154 not applied not applied
Browser 32 2 0.231 not applied not applied
After successively calculating the index of correlation measurement results of each module, out outside CCN, remaining framework maintainability metrics The final result of index is the average value of the measurement results of modules, as shown in the table.
Step 4) computing architecture static state maturity SSAM:
The value of cyclomatic complexity CCN is bigger, indicates that the complexity of the framework is higher;Fan-in degree of being fanned out to FFC is higher, indicates Call relation between module is more complicated;Intermodule degree of coupling CBO is bigger, indicates that the association between the structure module is bigger;Mould It is bigger that RFC is responded between block, the modification of representation module is influenced bigger modification is generated, this four indices is bigger, will so that this The static maturity of structure is smaller, more deviation maturity framework.It is interior inside tight cohesion TCC and the pine bigger representation module of cohesion LCC Poly- property is higher, and corresponding framework static state maturity is bigger.
SSAM measurement results are bigger, show more to be easy to later maintenance and evolution using the software that the framework is developed;On the contrary such as The measurement results of fruit SSAM are smaller, then illustrate that the software logic complexity developed using the framework is higher, maintenance difficulties are got over Greatly.
The intermediate data in step 3) is brought into according to formula, the SSAM for obtaining the framework is 0.891555.This value table The maturity that the static tissue structure and logic of the bright framework rely on is 0.891555, in contrast, the framework already close at Ripe framework.
Above-described embodiment is only the preferred embodiment of the present invention, it should be pointed out that: for the ordinary skill of the art For personnel, without departing from the principle of the present invention, several improvement and equivalent replacement can also be made, these are to the present invention Claim improve with the technical solution after equivalent replacement, each fall within protection scope of the present invention.

Claims (2)

1. a kind of framework static state maturity measure, which is characterized in that the method includes the steps of:
Step 1) qualification inspection: check that the framework describes in document whether to be .xml or the component of .xmi comprising suffix Figure otherwise, terminates this method process, it includes component diagram, deployment diagram, use that the framework, which describes document, if so, then entering step 2) Example diagram, precedence diagram, system sequence diagrams and constraint document;
Step 2) obtains metadata: describing the component diagram in document to framework and parses, counts component, the component in component diagram Between incidence relation information, including component map number L, external component number totalN, the connection relationship totalE between external component, And the dependence of each component goes out number of edges mesh E, relies on into number of edges mesh X, provides number of ports W, using number of ports R, sub- number of components S And the adjacency matrix AdjMatrix of sub- Component Dependency relationship;
Step 3) calculates separately acquisition intermediate data according to following each formula, and the intermediate data includes cyclomatic complexity, fan-in fan Out-degree, the intermodule degree of coupling, intermodule response, tight cohesion degree and loose cohesion degree:
Cyclomatic complexity CCN:
CCN=(totalE-totalN)+2 × L
Fan-in degree of being fanned out to FFC:
FFC=CCN × (E+W × (X+R))2
Intermodule degree of coupling CBO:
Intermodule responds RFC:
RFC=S+E+R
Tight cohesion degree TCC and loose cohesion degree LCC:
Wherein,Indicate the directly related relationship number of all submodules;NIC (S) is indicated between sub- component Dependence formed transitive closure;
Step 4) computing architecture static state maturity according to the following formula:
2. a kind of framework static state maturity measure according to claim 1, which is characterized in that in the step 4), When tight cohesion degree and loose cohesion degree, any one is 0, computing architecture static state maturity according to the following formula:
When tight cohesion degree and loose cohesion degree product are more than or equal to 1, computing architecture static state maturity according to the following formula:
CN201610112423.1A 2016-02-29 2016-02-29 A kind of framework static state maturity measure Expired - Fee Related CN105739993B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610112423.1A CN105739993B (en) 2016-02-29 2016-02-29 A kind of framework static state maturity measure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610112423.1A CN105739993B (en) 2016-02-29 2016-02-29 A kind of framework static state maturity measure

Publications (2)

Publication Number Publication Date
CN105739993A CN105739993A (en) 2016-07-06
CN105739993B true CN105739993B (en) 2018-12-28

Family

ID=56249611

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610112423.1A Expired - Fee Related CN105739993B (en) 2016-02-29 2016-02-29 A kind of framework static state maturity measure

Country Status (1)

Country Link
CN (1) CN105739993B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107329737A (en) * 2017-05-22 2017-11-07 中南大学 The automated software measure and system of model-driven
CN107621957B (en) * 2017-10-17 2020-10-27 中汇信息技术(上海)有限公司 Component measurement method, server and computer readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104008059A (en) * 2014-06-17 2014-08-27 东南大学 Software architecture assessment method based on measurement and predication technology
CN104679650A (en) * 2015-02-03 2015-06-03 上海交通大学 Method for evaluating credibility of software architecture oriented models

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060191007A1 (en) * 2005-02-24 2006-08-24 Sanjiva Thielamay Security force automation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104008059A (en) * 2014-06-17 2014-08-27 东南大学 Software architecture assessment method based on measurement and predication technology
CN104679650A (en) * 2015-02-03 2015-06-03 上海交通大学 Method for evaluating credibility of software architecture oriented models

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《Assessing maintainability metrics in software architectures using COSMIC and UML》;dos Anjos E G et al.;《Computational Science and Its Applications-ICCSA 2012》;20120621;pp.132-146 *

Also Published As

Publication number Publication date
CN105739993A (en) 2016-07-06

Similar Documents

Publication Publication Date Title
CN105893257B (en) A kind of software architecture appraisal procedure based on evolution
Harman Making the case for MORTO: Multi objective regression test optimization
US6240329B1 (en) Method and apparatus for a semiconductor wafer inspection system using a knowledge-based system
Honglei et al. The research on software metrics and software complexity metrics
EP2333669B1 (en) Bridging code changes and testing
CN102110048B (en) Regression testing selection method and device for frame-based application program
US7810079B2 (en) System and method for determining execution path difference in program
Mei et al. Test case prioritization for regression testing of service-oriented business applications
US10013336B2 (en) Information technology testing and testing data management
CN105426309B (en) Automatic example generation method and device
US20080201612A1 (en) Defect Resolution Methodology and Data Defects Quality/Risk Metric Model Extension
Sneed Measuring web service interfaces
CN105739993B (en) A kind of framework static state maturity measure
CN103593291B (en) For comprising unit test method and the device of multiple function test module
Elish Exploring the relationships between design metrics and package understandability: A case study
Bandi et al. Empirical evidence of code decay: A systematic mapping study
Plöesch et al. On the validity of the it-cisq quality model for automatic measurement of maintainability
US10324829B2 (en) Application testing
CN102214141A (en) Real-time stack-based program slicing method
CN109582557A (en) Test method for evaluating quality and system based on cost
Gay et al. Maximum likelihood and quasi-likelihood for nonlinear exponential family regression models
CN101840372B (en) Software test method using symbolic analysis
Zoubi et al. Study the impact of improving source code on software metrics
Rostampour et al. Measures of structural complexity and service autonomy
Dash et al. Maintainability Measurement in Object Oriented Paradigm.

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20170112

Address after: 211189 Jiangsu Road, Jiangning District, Southeast University, No. 2, No.

Applicant after: Dongnan Univ.

Applicant after: Huawei Technology Co Ltd

Address before: 211189 Jiangsu Road, Jiangning District, Southeast University, No. 2, No.

Applicant before: Dongnan Univ.

GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181228

Termination date: 20200229