Modularity Assessment for C# Programs Using Encapsulation and Delegate Metrics

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing modularity metrics tools are inadequate for assessing programs written in object-oriented languages that support features like object encapsulation, partial classes, class extension, delegates, and static variables, as they primarily measure structural complexity and code dependencies based on standard object-oriented features of languages such as Java, failing to effectively evaluate modularity in languages like C#.

Innovation Solution

A system and method that assesses modularity by calculating object encapsulation metrics, partial type metrics, extension method metrics, delegates metrics, and static variable usage metrics, generating a report to evaluate the modularization of programs in object-oriented languages like C#, using a system comprising an information receiver, modularization assessor, and report generator.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If existing modularity metrics tools are used, then structural complexity and code dependencies can be measured, but they cannot adequately assess modularity in languages with advanced object-oriented features like encapsulation, partial classes, extension methods, delegates, and static variables

Engineering Contradiction:
Improvemodularity assessment accuracyVSAvoidlanguage feature coverage
Core Design Contradiction:
Measurement precisionVSAdaptability or versatility

Solution Approach 1:

The modularity assessment tool segments the analysis into five distinct metric components: object encapsulation metrics, partial type metrics, extension method metrics, delegates metrics, and static variable usage metrics. Each component specifically evaluates one aspect of the advanced object-oriented features, allowing comprehensive and precise measurement of modularity across all language features rather than treating them as a monolithic structure.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The invention extends the assessment from traditional structural complexity measurement to multiple dimensions by introducing five separate metric dimensions corresponding to different object-oriented features. This multi-dimensional approach enables the tool to capture nuances in modularity that single-dimension tools miss, particularly for languages like C# with rich object-oriented capabilities.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Reliability

If traditional modularity metrics are applied, then standard object-oriented features can be evaluated, but advanced features like object encapsulation, partial classes, extension methods, delegates, and static variables are not properly assessed

Engineering Contradiction:
Improveassessment completenessVSAvoidmetrics calculation complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The complex assessment task is segmented into five manageable metric calculations, each focusing on a specific object-oriented feature. This segmentation makes the overall complex task more tractable by breaking it down into smaller, specialized sub-tasks that can be independently calculated and then integrated for a comprehensive assessment.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The assessment tool is designed with multi-functionality to handle five different types of metrics within a unified framework. Each metric type serves a specific purpose but all contribute to the overall modularity assessment, making the tool universally applicable to programs utilizing any combination of these object-oriented features without requiring separate specialized tools.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Loss of information

If comprehensive metrics calculation is performed, then detailed modularity assessment can be provided, but the assessment process becomes more complex and resource-intensive

Engineering Contradiction:
Improvemodularization information completenessVSAvoidassessment time
Core Design Contradiction:
Loss of informationVSLoss of time

Solution Approach 1:

The tool performs preliminary analysis by systematically collecting and organizing information about object encapsulation, partial types, extension methods, delegates, and static variables before executing the five metric calculations. This preliminary action prepares the data in advance, reducing the actual computation time when the metrics are calculated and ensuring no information is missed during the assessment.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9760369B2Assessing modularity of a program written in object oriented language
Publication Date: 2017.09.12 INFOSYS LTD
  • US9760369B2 patent drawing
  • US9760369B2 patent drawing
  • US9760369B2 patent drawing

AI summary

The technique relates to a system and method for assessing modularity of a program written in an object oriented language. This technique involves receiving information related to modularization of the program written in the object oriented language. Then the modularization of the program is assessed by calculating object encapsulation metrics, partial types metrics, extension method metrics, delegates metrics and static variable usage metrics. Further, an assessment report of the modularization is generated with respect to the said metrics.