{'fraction_non_alphanumeric': 0.01734906315058987, 'fraction_numerical': 0.0, 'mean_word_length': 5.524886877828054, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A unified theory of software metrics

The science of software metrics is a broad one touching on software engineering, structured programming and the mathematical discipline of measure theory. The third emphasizes what space is measurable or not; the second, what characteristics are to be measured; and the first, the potential feedback effects of measurement. By a careful exploration of these three fields we shall here demonstrate that a significant advancement can be made in software metrics by adopting a unified “field” theory — viz., there is a fundamental common ground on which to define formal software metric models independent of programming languages, programming methodologies and programming environments. Consequently, a combination of effective structured programming theory and the mathematical postulates of measure theory is a necessary starting point for the validation of software metric models. Structured programming advocates tree-like designs; and the mathematics of the tree structure indicates that the language of structured programming is metrication. With this realization, we here propose some standardized metrics that can be easily applicable by both researchers and practitioners. Others may also be defined on the same space. The notion of “UNIFIED” here means there exists a mathematical space on which to formally define different software metrics as well as validate metrics of software measurements.