Rapid Code Compilation via Dependency Graph Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional code compilation systems require recompilation of the entire code base even for small changes, leading to inefficiencies in time and resource usage.

Innovation Solution

A rapid code compilation system that identifies and compiles only the modified code and its dependent code, allowing for selective compilation and reuse of unchanged parts, with features like binary code scans to ensure safety during code deletion and a REST API-based compiling server for incremental compilation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the entire code base is re-compiled every time an update is pushed, then compilation reliability is ensured, but compilation time and computing resource usage increase significantly

Engineering Contradiction:
Improvecompilation reliabilityVSAvoidcompilation time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the code base into individual files and identifies only the modified files and their dependent files for compilation. Instead of compiling the entire code base, the system divides the compilation task into smaller units (modified files + dependencies) while maintaining reliability through dependency tracking and cycle detection mechanisms.

Inventive Principle:
Principle #1Segmentation

2Reliability

If the entire code base is re-compiled every time an update is pushed, then completeness of compilation is ensured, but computing resource usage increases

Engineering Contradiction:
Improvecompilation completenessVSAvoidcomputing resource usage
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent extracts only the necessary portion of the code base (modified files and their dependencies) from the entire code base for compilation. This extraction is achieved through file modification detection and dependency graph analysis, allowing the system to compile only what is necessary while maintaining completeness for the changed portions.

Inventive Principle:
Principle #2Taking out (Extraction)

3Productivity

If selective compilation of only modified code is performed, then compilation speed improves, but risk of missing dependencies increases

Engineering Contradiction:
Improvecompilation speedVSAvoiddependency completeness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent performs preliminary action by building and storing a dependency graph of the entire code base before selective compilation. This pre-computed dependency information allows the system to quickly identify all files that depend on modified files, ensuring that no dependencies are missed during selective compilation while maintaining high speed.

Inventive Principle:
Principle #10Preliminary action

4Reliability

If the entire code base is re-compiled, then all code is validated, but feedback time to continuous integration systems increases

Engineering Contradiction:
Improvecode validation coverageVSAvoidfeedback time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies partial action by validating only the modified files and their dependent files rather than the entire code base. This partial validation is sufficient to detect errors introduced by recent changes while significantly reducing feedback time to continuous integration systems, maintaining reliability for the changed portions.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS11301221B2Rapid code compiling system
Publication Date: 2022.04.12 SAP SE
  • US11301221B2 patent drawing
  • US11301221B2 patent drawing
  • US11301221B2 patent drawing

AI summary

Compilation is initiated of previously-compiled code in which only a subset of the previously-compiled code was modified since a previous compilation. Thereafter, modified code corresponding to the subset of the previously-compiled code that was modified since the previous compilation is identified. Further, dependent code within the previously-compiled code that is dependent on the modified code is also identified. Using this information, only the identified modified code and the dependent code can be compiled. In some variations, at least a portion of the other parts of the previously-compiled code can be reused. Related apparatus, systems, techniques and articles are also described.