Static analysis of fundamental computer science student programs

Date

1998-05

Journal Title

Journal ISSN

Volume Title

Publisher

Texas Tech University

Abstract

While there has been substantial work focused on dynamic metrics, much less work has been done with static metrics. This investigation explores the relationship between the values for a set of metrics collected from C++ programs done by students enrolled in an introductory programming course at Texas Tech University. Three groups of programs prepared in response to three programming assignments were evaluated. A variety of static metrics commonly used to assess style and complexity were used. In addition to those, the code coverage of sample input was measured dynamically. A readily available commercial software package was used to calculate the metric values. The values were then analyzed using linear regression to evaluate the extent of correlation between them. While some metrics showed no meaningful correlation, a strong correlation was observed between each of the number of statements, number of operators, number of operands, and the McCabe cyclomatic complexity value.

Description

Keywords

Computer software -- Development -- Study and teaching, Computational complexity, C++ (Computer program language) -- Study and teaching, Computer software -- Development -- Standards, Computer software -- Development -- Reliability

Citation