API Feature Segmentation for Binary Size Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Object-oriented frameworks often result in poor functional layering, leading to large dependency sets and large binary image sizes due to poor granular control over binary size reduction, with existing techniques lacking explicit information about API usage and interdependencies.

Innovation Solution

The implementation of API features that are orthogonal to object-oriented boundaries, allowing for explicit identification and exclusion of APIs during compilation, using a dependency management mechanism to create, remove, or discover dependencies among API features, and providing reusable binary artifacts with information about API usage, sizes, and interdependencies.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If object-oriented frameworks are used to provide comprehensive functionality, then the application's functional capability is improved, but the binary image size increases and granular control over code inclusion is lost

Engineering Contradiction:
Improvefunctional capabilityVSAvoidbinary image size
Core Design Contradiction:
Adaptability or versatilityVSWeight of stationary object

Solution Approach 1:

The patent segments the framework's API surface into distinct feature sets, where each feature represents a coherent functional unit. This allows the compilation system to selectively include or exclude entire feature sets based on actual usage, rather than including all APIs in the framework. The segmentation enables granular control over binary size while preserving needed functionality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts unused API implementations from the binary image through a two-phase process: first identifying which feature sets are actually used by the application, then excluding the implementations of unused features. This extraction reduces binary size by removing unnecessary code while maintaining the application's functional requirements.

Inventive Principle:
Principle #2Taking out (Extraction)

2Adaptability or versatility

If comprehensive framework APIs are included to ensure all functionality is available, then the application's versatility is improved, but the compilation complexity and dependency management difficulty increase

Engineering Contradiction:
Improvefunctionality availabilityVSAvoiddependency management complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent performs preliminary analysis during compilation to automatically identify which feature sets are actually used by the application. This preliminary action eliminates the need for manual dependency management, as the system autonomously determines the minimal required feature set and excludes unnecessary dependencies, simplifying the overall process.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The compilation system serves itself by automatically analyzing API usage patterns and making intelligent decisions about which feature implementations to include or exclude. This self-service approach reduces complexity by eliminating manual intervention in dependency management while ensuring optimal binary composition.

Inventive Principle:
Principle #25Self-service

3Weight of stationary object

If code is excluded from the binary to reduce size, then the binary image size is reduced, but the risk of impairing application functionality increases

Engineering Contradiction:
Improvebinary image sizeVSAvoidfunctionality integrity
Core Design Contradiction:
Weight of stationary objectVSReliability

Solution Approach 1:

The patent implements feedback mechanisms that track API usage throughout the compilation process. The system monitors which APIs are actually called by the application and uses this feedback to make informed decisions about feature inclusion. This feedback loop ensures that excluded code would not be needed for correct application execution, maintaining functionality integrity while reducing binary size.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system performs preliminary analysis before finalizing the binary to identify all APIs that are actually used by the application. This preliminary action creates a reliable basis for excluding unused feature implementations, ensuring that functionality integrity is maintained while achieving binary size reduction.

Inventive Principle:
Principle #10Preliminary action

4Ease of manufacture

If traditional compilation approaches are used without feature-based organization, then the compilation process is simpler, but the ability to perform granular binary size optimization is lost

Engineering Contradiction:
Improvecompilation simplicityVSAvoidbinary size optimization capability
Core Design Contradiction:
Ease of manufactureVSProductivity

Solution Approach 1:

The patent segments the API surface into organized feature sets without significantly complicating the compilation process. Each feature set is treated as a manageable unit that can be independently included or excluded, providing granular optimization capability while maintaining a systematic and relatively simple compilation workflow.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS10152309B2Cross-library framework architecture feature sets
Publication Date: 2018.12.11 MICROSOFT TECHNOLOGY LICENSING LLC
  • US10152309B2 patent drawing
  • US10152309B2 patent drawing
  • US10152309B2 patent drawing

AI summary

API (application program interface) features defined by a set of APIs provide a different cross-sectional view of an application or framework than the view provided by sectioning along class or library boundaries, or binding units, for example. An API feature includes a proper subset of a library of a framework used by an application, and/or APIs which collectively reside in different libraries. A functionality feature API set provides an exposed surface area of a functionality feature of an application. Upon receiving a compilation request and determining that an API feature is to be excluded, an attempt is made to produce a compiled version of the application without the feature's APIs. In some cases, the functionality feature is independent of a baseline functionality of the application. Developers can obtain smaller but fully functional binaries. Framework architects can identify dependencies between API implementations when creating or modifying a software framework's architecture.