Pruning Compilation Dependency Graphs for Software Build Efficiency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In software development, managing complex dependencies between source artifacts is challenging, leading to unnecessary compilation of parts that have not been directly modified, which wastes computing resources and prolongs the development cycle.

Innovation Solution

A method involving a dependency graph representation where source artifacts are grouped into strongly connected components associated with compilers, allowing for the identification and pruning of unnecessary artifacts to avoid compilation, thereby optimizing the compilation process.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If dependency tracking is implemented to manage complex dependencies between source artifacts, then the ability to identify affected parts is improved, but the complexity of the development tooling increases

Engineering Contradiction:
Improvedependency tracking accuracyVSAvoidtooling complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The dependency graph is segmented into strongly connected components (SCCs), where each SCC represents a group of source artifacts that can be compiled together by a single compiler. This segmentation allows the complex dependency tracking system to be broken down into manageable units that can be processed and compiled independently, reducing the overall complexity while maintaining accurate dependency tracking.

Inventive Principle:
Principle #1Segmentation

2Reliability

If all source artifacts are compiled whenever changes are detected, then ensuring all dependencies are updated is simplified, but computing resources are wasted and compilation time increases

Engineering Contradiction:
Improvedependency update completenessVSAvoidcomputing resource waste
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The system extracts and removes source artifact nodes from the dependency graph when they are determined to be unnecessary for compilation. This is achieved by identifying SCCs that can be completely removed without affecting the compilation of remaining artifacts, thereby avoiding wasted computing resources on artifacts that do not need to be recompiled while maintaining reliable dependency updates.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

Instead of compiling all source artifacts whenever changes are detected, the system performs partial compilation by only compiling the necessary SCCs and their dependencies. This partial action approach ensures that compilation resources are allocated efficiently to only those artifacts that actually need to be updated, reducing overall computing resource consumption while maintaining update completeness.

Inventive Principle:
Principle #16Partial or excessive action

3Productivity

If the dependency graph is pruned to remove unnecessary source artifacts, then compilation efficiency is improved, but the complexity of managing the graph structure increases

Engineering Contradiction:
Improvecompilation efficiencyVSAvoidgraph management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system performs preliminary analysis of the dependency graph to identify and remove unnecessary source artifact nodes before compilation begins. By pre-pruning the graph to remove artifacts that do not need to be compiled, the system reduces the compilation workload and improves efficiency while managing graph complexity through systematic pre-processing.

Inventive Principle:
Principle #10Preliminary action

4Ease of manufacture

If source artifacts are grouped into strongly connected components, then compiler assignment is simplified, but the graph processing complexity increases

Engineering Contradiction:
Improvecompiler assignment easeVSAvoidgraph processing complexity
Core Design Contradiction:
Ease of manufactureVSDevice complexity

Solution Approach 1:

The dependency graph is segmented into strongly connected components (SCCs), where each SCC represents a group of source artifacts that can be compiled together by a single compiler. This segmentation simplifies compiler assignment by providing clear, discrete groups that can be systematically assigned to compilers, while the graph processing complexity is managed through efficient SCC algorithms that process the graph in a systematic manner.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS8978010B1Pruning compilation dependency graphs
Publication Date: 2015.03.10 SAP SE
  • US8978010B1 patent drawing
  • US8978010B1 patent drawing
  • US8978010B1 patent drawing

AI summary

Technologies are disclosed for pruning a dependency graph representing source artifacts compilable by a plurality of compilers. The dependency graph can include strongly connected components represented as a directed acyclic graph. During compilation of the source artifacts, it can be discovered that some source artifacts did not need to be compiled, and associated nodes in the dependency graph can be pruned. Pruning can result in removal of nodes for source artifacts that are yet to be compiled, and compilation for source artifacts associated with such nodes in the dependency graph can be avoided.