GO-V.ORG
As seen in

ABC Software Metric

The ABC software metric was introduced by Jerry Fitzpatrick in 1997 to overcome the drawbacks of the LOC. The metric defines an ABC score as a triplet of values that represent the size of a set of source code statements. An ABC score is calculated by counting the number of assignments (A), number of branches (B), and number of conditionals (C) in a program. ABC score can be applied to individual methods, functions, classes, modules or files within a program. ABC score is represented by a 3-D vector . It can also be represented as a scalar value, which is the magnitude of the vector , and is calculated as follows: ::. Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

The ABC software metric was introduced by Jerry Fitzpatrick in 1997 to overcome the drawbacks of the LOC. The metric defines an ABC score as a triplet of values that represent the size of a set of source code statements. An ABC score is calculated by counting the number of assignments (A), number of branches (B), and number of conditionals (C) in a program. ABC score can be applied to individual methods, functions, classes, modules or files within a program. ABC score is represented by a 3-D vector . It can also be represented as a scalar value, which is the magnitude of the vector , and is calculated as follows: | | = \sqrt{A^2 + B^2 + C^2} By convention, an ABC magnitude value is rounded to the nearest tenth. Occurrence of an assignment operator (=, *=, /=, %=, +=, -=, >=, &=, !=, ^=). Occurrence of an increment or a decrement operator (++, --). Add one to branch count when: Occurrence of a function call. Occurrence of any goto statement which has a target at a deeper level of nesting than the level to the goto. Add one to condition count when: Occurrence of a conditional operator ( , =, ==, !=). Occurrence of the following keywords (‘else’, ‘case’, ‘default’, ‘?’). Occurrence of a unary conditional operator. Occurrence of an assignment operator (exclude constant declarations and default parameter assignments) (=, *=, /=, %=, +=, -=, >=, &=, !=, ^=). Occurrence of an increment or a decrement operator (prefix or postfix) (++, --). Initialization of a variable or a nonconstant class member. Add one to branch count when: Occurrence of a function call or a class method call. Occurrence of any goto statement which has a target at a deeper level of nesting than the level to the goto. Occurrence of ‘new’ or ‘delete’ operators. Add one to condition count when: Occurrence of a conditional operator ( , =, ==, !=). Occurrence of the following keywords (‘else’, ‘case’, ‘default’, ‘?’, ‘try’, ‘catch’). Occurrence of a unary conditional operator. Occurrence of an assignment operator (exclude constant declarations and default parameter assignments) (=, *=, /=, %=, +=, -=, >=, &=, !=, ^=, >>>=). Occurrence of an increment or a decrement operator (prefix or postfix) (++, --). Add one to branch count when Occurrence of a function call or a class method call. Occurrence of a ‘new’ operator. Add one to condition count when: Occurrence of a conditional operator ( , =, ==, !=). Occurrence of the following keywords (‘else’, ‘case’, ‘default’, ‘?’, ‘try’, ‘catch’). Occurrence of a unary conditional operator.

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"ABC Software Metric". 1772406542. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1341197301

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·