User Tools

Site Tools


This is an old revision of the document!

Humaira, R.; Sakamoto, K.; Ohashi, A.; Washizaki, H. & Fukazawa, Y. Towards a Unified Source Code Measurement Framework Supporting Multiple Programming Languages. Proceedings of the 24th International Conference on Software Engineering and Knowledge Engineering, Knowledge Systems Institute Graduate School, 2012, 480-485


Software metrics measure various attributes of a piece of software and are becoming essential for a variety of purposes, including software quality evaluation. One type of measurement is based on source code evaluation. Many tools have been developed to perform source code analysis or to measure various metrics, but most use different metrics definitions, leading to inconsistencies in measurement results. The metrics measured by these tools also vary by programming language. We propose a unified framework for measuring source code that supports multiple programming languages. In this paper, we present commonalities of measurable elements from various programming languages as the foundation for developing the framework. We then describe the approach used within the framework and also its preliminary development. We believe that our approach can solve the problems with existing measurement tools.


Yann-Gaël Guéhéneuc, 2014/02/03

This paper make explicit the problem of having consistent measurements across programming languages. It starts by observing three problems with the state-of-the-art and state-of-the-practice:

  1. the inconsistent metric definitions across different programming languages;
  2. which is aggravated by the inconsistent metrics definitions for the same languages across different tools;
  3. the lack of tool support to analyse in the same, consistent framework components written in different languages.

The paper then recalls that several tools exist and name a few of them (but not PADL…) and justifies the lack of multi-language support in these tools by the cost of developing analysers and metrics for different languages. It then proposes a new framework that should have a “lower-cost” although it is not clear how different is the proposed framework from that of the previous tools. The paper implicitly states the need for a unified meta-model, which is then describes in the form of the Unified Code Model (UCM).

The UCM is the result of a thorough and systematic study of 20 popular programming languages and of their measurable elements. Table III in the paper is very interesting because it provides a global view of the elements common and different across programming languages. However, I feel that the elements “method”, “procedure”, and “function” could have been considered together wrt. the measurements. Also, it is not clear why the Ruby programming language is marked as having no modules.

The paper then describes a tool, UNICOEN, that can parse components in various programming languages and generate UCM models. Using UCM, UNICOEN, and a study of some major metrics, focusing “on size and complexity because they are the most important measurements” (McCabe, Halstead's, CK…), the paper shows the metrics values can be computed on components in Java and JavaScript.

However, the paper does not raise the problem of dealing with the dependencies among heterogeneous components, i.e., components written in different programming languages.

towards_a_unified_source_code_measurement_framework_supporting_multiple_programming_languages.1391522059.txt.gz · Last modified: 2017/09/06 01:54 (external edit)