Analysis Device Parsing Context-Dependent Patterns

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Parsers for context-dependent patterns face significant time complexity issues, often requiring exponential time for data analysis, as seen in existing parsers using stateful packrat parsing.

Innovation Solution

The analysis device employs V-PEG (Parsing Expression Grammar with variable bindings) to perform parsing, where a variable is associated with a terminal symbol, and additional elements are added and extracted based on attributes, determining if they satisfy contextual conditions, thereby reducing parsing time.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If a parser uses stateful packrat parsing to analyze context-dependent patterns, then the parser can handle context-dependent grammar rules, but the analysis time increases exponentially with data size

Engineering Contradiction:
Improvecontext-dependent pattern handling capabilityVSAvoidparsing time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The parser divides the context-dependent pattern matching into separate phases: first performing standard PEG parsing to build a parse tree, then separately analyzing context-dependent relationships using the parsed structure. This segmentation allows each phase to operate independently with optimized algorithms, avoiding exponential time complexity while maintaining context-dependent pattern handling capability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The parser performs preliminary parsing using standard PEG rules before applying context-dependent analysis. By pre-processing the input data and establishing basic parse structures first, the system prepares the data in a form that enables efficient subsequent context-dependent analysis, preventing exponential time requirements.

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If a parser uses backtracking algorithm to handle complex patterns, then the parser can match complex grammar rules, but the processing time increases significantly

Engineering Contradiction:
Improvecomplex pattern matching capabilityVSAvoidprocessing speed
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The invention extracts the backtracking operation from the main parsing flow and replaces it with deterministic PEG parsing followed by separate context analysis. This extraction eliminates unnecessary backtracking overhead while preserving the ability to match complex patterns through the two-phase approach.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The parser changes the operational parameters of the matching algorithm by switching from backtracking-based exploration to deterministic PEG matching with explicit context checks. This parameter change transforms the time complexity from exponential to polynomial while maintaining pattern matching capability.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11947907B2Analysis device, analysis method, and analysis program
Publication Date: 2024.04.02 NIPPON TELEGRAPH & TELEPHONE CORP
  • US11947907B2 patent drawing
  • US11947907B2 patent drawing
  • US11947907B2 patent drawing

AI summary

An analysis device includes processing circuitry configured to perform parsing on a first character string based on a grammar described in a PEG in which a variable is associated with a predetermined terminal symbol, add, to the variable, an element in which a predetermined attribute is imparted to a part of the first character string, the part being a second character string analyzed as corresponding to the terminal symbol, extract an element that is latest from elements of each predetermined attribute from the variable, and determine whether the element extracted satisfies a predetermined condition regarding a context.