Script Canonical Form Graphs for Semantic Comparison

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for comparing computer scripts are limited in determining semantic similarities, as they rely on syntactical comparisons that fail to identify scripts performing the same function despite subtle differences, leading to redundant scripts and increased development costs.

Innovation Solution

A computer script analysis system generates script canonical form (SCF) representations, which are stored in a database, allowing for semantic comparison and similarity scoring, as well as searching based on script metadata conditions, thereby reducing duplication and improving development efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If syntactical comparison methods are used to compare computer scripts, then the comparison process is simple and fast, but the ability to identify semantically identical scripts is poor, leading to redundant scripts

Engineering Contradiction:
Improvesemantic similarity detection accuracyVSAvoidcomparison system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments scripts into functional units and represents them as graphs where nodes represent operations and edges represent data flow. This segmentation enables semantic comparison by breaking down complex scripts into comparable atomic elements, resolving the contradiction between detection accuracy and system complexity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary representation layer (script graphs with canonical forms) between the original scripts and the comparison process. This intermediary structure enables semantic equivalence detection while maintaining manageable system complexity by providing a standardized comparison interface.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If syntactical comparison is used, then the comparison method is easy to implement, but subtle differences such as whitespace and comments cause scripts to be incorrectly identified as different

Engineering Contradiction:
Improvescript equivalence determination reliabilityVSAvoidcomparison method implementation ease
Core Design Contradiction:
ReliabilityVSEase of manufacture

Solution Approach 1:

The patent extracts and removes non-functional elements such as whitespace and comments during the graph generation process. This extraction ensures that scripts are compared based on their functional content only, improving reliability while keeping the implementation straightforward by filtering out noise during preprocessing.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent changes the parameter representation from exact syntactical matching to semantic equivalence based on graph structure. By transforming scripts into canonical graph forms where only functional elements matter, the system achieves reliable equivalence determination while maintaining ease of implementation through standardized transformation rules.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If semantic comparison methods are implemented to accurately identify script functionality, then script duplication is reduced, but the processing time and computational resources increase

Engineering Contradiction:
Improvedevelopment efficiencyVSAvoidscript comparison processing time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent performs preliminary transformation of scripts into canonical graph forms and pre-computes their representations. This preliminary action enables faster subsequent comparisons by having the comparison-ready structure prepared in advance, thus improving productivity while minimizing additional processing time during actual comparison operations.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10996934B2Systems and methods for comparing computer scripts
Publication Date: 2021.05.04 SERVICENOW INC
  • US10996934B2 patent drawing
  • US10996934B2 patent drawing
  • US10996934B2 patent drawing

AI summary

The present disclosure relates generally to analyzing and comparing computer scripts, and more specifically, to determining semantic similarities between syntactically different scripts. An example computing system includes a memory configured to store a database, wherein the database is configured to store script canonical form (SCF) representations of scripts, and wherein each SCF representation is a topologically-sorted, labeled, directed graph that includes tables and datasets as nodes, actions as edges, and predicates as labels. The system includes a processor configured to execute instructions stored in the memory to cause the computing system to perform actions including: generating a first SCF representation of a first script, and storing the first SCF representation of the first script in the database.