Provenance Annotations for Generated Code

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Generated source code from high-level descriptions often lacks intuitive relationships with the original descriptions, leading to cumbersome development processes as programmers must frequently switch between documents, disrupting their focus and productivity.

Innovation Solution

The use of programming language annotations to establish provenance information between documents, enabling interactive tools to maintain context and relationships, such as through XMLBeans and JSR 175 annotations, facilitates intuitive navigation and integration of generated code within software development environments.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If source code is automatically generated from high-level descriptions, then programming productivity is improved, but the generated code becomes cryptic and difficult to understand

Engineering Contradiction:
Improveprogramming productivityVSAvoidcode readability
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The patent introduces comments as an intermediary element between the generated code and the high-level description. These comments serve as a bridge that connects the cryptic generated code back to its source, making the code understandable without requiring programmers to constantly switch between documents. The comments are automatically inserted at relevant locations in the generated code to explain its origin and purpose.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If programmers frequently examine both high-level descriptions and generated code, then code understanding is improved, but focus is lost and productivity decreases

Engineering Contradiction:
Improvecode understandingVSAvoidprogramming productivity
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent merges the information from the high-level description and the generated code into a single unified view by embedding comments directly within the generated code. This consolidation eliminates the need for programmers to switch between separate documents, as all necessary contextual information is now available in one place - the generated code itself with its embedded comments.

Inventive Principle:
Principle #5Merging (Combining)

3Ease of operation

If comments are automatically inserted in generated code, then code readability is improved, but the relationship between high-level description and generated code becomes less explicit

Engineering Contradiction:
Improvecode readabilityVSAvoidprovenance information
Core Design Contradiction:
Ease of operationVSLoss of information

Solution Approach 1:

The patent implements comments with dual functionality: they serve both as readability aids for understanding the generated code and as provenance markers that explicitly link the code back to its high-level description source. Each comment is designed to fulfill both purposes simultaneously, providing contextual explanation while maintaining traceability to the original specification.

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

Data Source

PatentUS7610545B2Annotations for tracking provenance
Publication Date: 2009.10.27 ORACLE INT CORP
  • US7610545B2 patent drawing
  • US7610545B2 patent drawing
  • US7610545B2 patent drawing

AI summary

A system, method and media for automatically relating documents, comprising selecting a first element in a first document; selecting a second element based on the first element; annotating the second element in a second document with an annotation and wherein the annotation refers to the first element. This abstract is not intended to be a complete description of, or limit the scope of, the invention. Other features, aspects and objects of the invention can be obtained from a review of the specification, the figures and the claims.