Calculation Specification Code Synthesis for Enterprise Query Automation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Implementing mathematical and logical calculations in large enterprise software from Calculation Specification (CS) sheets is tedious and requires manual effort, involving database queries and code translation, especially when dealing with complex formulae and enterprise-size databases.
Innovation Solution
A processor-implemented method and system for automated code generation using Natural Language Processing (NLP) to synthesize queries from CS sheets, formulating Query Synthesis Specifications (QSS), and converting them into a target programming language, with database execution and ranking of queries based on heuristics.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If manual code generation from CS sheets is performed, then code can be implemented, but the process is tedious and effort-intensive
Solution Approach 1:
The system performs self-service by automatically generating code from CS sheets without requiring manual intervention. The automated code generation system extracts information from CS sheets, generates database queries, and produces executable code independently, eliminating the need for manual code writing and conversion processes
Solution Approach 2:
The patent introduces an intermediary automated code generation system that acts as a mediator between the CS sheets and the final executable code. This intermediary system processes the CS sheet information, generates appropriate database queries, and produces the target code, thereby eliminating the need for manual translation and significantly improving productivity
2Ease of manufacture
If manual conversion of complex mathematical formulae to code is performed, then calculations can be implemented, but the process requires significant effort
Solution Approach 1:
The patent replaces the mechanical process of manual formulae conversion with an automated computational system. The automated code generation system uses algorithms and programming to convert mathematical formulae from CS sheets into executable code, eliminating the need for manual translation and reducing both effort and complexity
Solution Approach 2:
The system performs self-service by automatically handling the conversion of complex mathematical formulae into executable code. The automated generation process extracts formulae from CS sheets and transforms them into target language code without requiring manual intervention, thereby improving ease of implementation
3Productivity
If automated code generation is implemented, then productivity is improved, but system complexity increases
Solution Approach 1:
The automated code generation system is divided into distinct functional modules: a CS sheet parser that extracts information, a query generator that creates database queries, and a code synthesizer that produces executable code. This segmentation allows each component to be independently developed and maintained, managing overall system complexity while maintaining high productivity
Data Source
AI summary
Enterprise software relies on numerous types and instances of mathematical and logical calculations for proper functioning, which are formally specified in spreadsheets, known as Calculation Specification (CS) sheets, that provide illustrations of the inputs and outputs of the calculation, and are expressed in inputs and formulae applied on them to get values for outputs. The values for such inputs are retrieved by executing ad hoc queries on respective application's database. Present disclosure provides systems/methods to synthesize code using CS sheets by formulating a Programming By Example (PBE) problem for each input involved in the calculation. A query synthesis technique is then implemented that uses natural language processing and enumerative program synthesis techniques to infer queries corresponding to the PBE problem. These queries are filtered based on whether their output is consistent with expected output in PBE. Finally, the synthesized queries and calculation formulae are translated into a desired target programming language.


