Parse Chain Analyzer for CLI Syntax Extraction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems face difficulties in extracting and transforming Command Line Interface (CLI) syntax definitions from parse graphs into meaningful forms for applications such as CLI parsing and documentation, due to hard-coded syntax and limited runtime metadata extraction.

Innovation Solution

A method and system that utilize a parse chain analyzer to extract CLI command definitions from source codes, transform them into an AND/OR command tree, and further into a command data model, using XML representations to facilitate programmable manipulation and documentation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If CLI syntax definitions are hard-coded in various files, then the parser can validate syntax correctly, but it becomes difficult to extract and transform the syntax into meaningful forms for other applications

Engineering Contradiction:
Improvesyntax validation correctnessVSAvoidease of extracting and transforming syntax
Core Design Contradiction:
ReliabilityVSEase of manufacture

Solution Approach 1:

The patent extracts CLI syntax definitions from hard-coded parse graphs by analyzing the internal data structures and metadata. The system pulls out syntax information such as command patterns, parameter types, and validation rules, transforming them into reusable syntax definition objects that can be used across different applications without modifying the original hard-coded parser.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces an intermediary layer between the hard-coded parse graph and the applications that need syntax information. This intermediary extracts and transforms the syntax definitions into a standardized format, allowing multiple applications to access syntax information without directly interacting with the complex, hard-coded parser infrastructure.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If the compiler extracts only limited metadata at runtime, then the parsing process remains efficient, but sufficient information is not available for creating CLI parsers, documentation, and configuration data models

Engineering Contradiction:
Improveparsing efficiencyVSAvoidavailability of syntax information
Core Design Contradiction:
ProductivityVSLoss of information

Solution Approach 1:

The patent performs preliminary extraction of syntax information during the compilation or preprocessing phase, before the runtime parsing occurs. By analyzing the parse graph structure and extracting metadata about command patterns, parameters, and validation rules in advance, the system makes this information available for documentation generation and configuration model creation without impacting the efficiency of the actual parsing operation.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If the parse graph is transformed into different meaningful forms, then more applications can benefit from the syntax information, but the transformation process becomes complex and difficult to implement

Engineering Contradiction:
Improveapplicability of syntax informationVSAvoidcomplexity of transformation process
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments the transformation process into distinct, manageable stages: extracting syntax definitions from the parse graph, representing them in a standardized internal format, and then transforming into target formats for different applications. This segmentation allows each transformation step to be optimized independently, reducing the overall complexity while enabling multiple output formats.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS7779398B2Methods and systems for extracting information from computer code
Publication Date: 2010.08.17 CISCO TECHNOLOGY INC
  • US7779398B2 patent drawing
  • US7779398B2 patent drawing
  • US7779398B2 patent drawing

AI summary

Methods and systems for manipulating information represented by computer code are described. Macroinstructions that are used to analyze an input are accessed. The macroinstructions are written according to a first computer system language. The macroinstructions are rewritten as strings according to a second computer system language. The strings are included in an exportable representation.