US8555250B2

Static semantic analysis of dynamic languages

Summary by NHIP

Dynamic Code Static Analysis

The method parses dynamic source code to generate syntax trees and extracts identifier information for defined constructs. It augments knowledge via explicit inspection or implied references, then computes metrics from a resulting symbol table to indicate parameter count mismatches, duplicate members, and type conflicts.

Claim Score by NHIP

Read claim 1, the broadest

Abstract

Analyzing dynamic source code. A method includes accessing a specific metadata format data structure. The data structure was created by obtaining one or more first data structures defining constructs in a body of dynamic language source code. From the one or more first data structures, identifier information is extracted for one or more of the defined constructs. Knowledge about the constructs is augmented. The metadata format data structure is parsed to compute metrics about the metadata format data structure. The metrics about the metadata format data structure are provided to a user.

US8555250B2, drawing sheet 1
Sheet 1 of 5

Term

Projected expiry 23 December 2031.

  1. Priority and filed
  2. Granted
  3. Today
  4. Projected expiry

20 claims: 3 independent, 17 dependent

  1. 1
    Broadest claimClaim Score 42, average(NHIP)In a computing environment, a processor-implemented method of analyzing dynamic source code, the method comprising:parsing source code to generate one or more syntax trees defining constructs in a body of dynamic language source code;from the one or more syntax trees, extracting identifier information for one or more of the defined constructs;augmenting knowledge about the constructs by at least one of explicit inspection of the body of source code or implied references related to the source code;producing a correlation between identifiers and augmented knowledge;using the identifier information and augmented knowledge, generating metadata about the body of the dynamic language source code, the generated metadata being represented as a symbol table;parsing symbol table to compute metrics about the one or more syntax trees;and providing the metrics about the one or more syntax trees to a user, wherein the metrics provide code correctness analysis, and wherein the correctness analysis indicates parameter count mismatches.
  2. 17
    One or more computer readable memory comprising computer executable instructions that when executed by one or more processors cause one or more processors to perform the following:parsing source code to generate one or more syntax trees defining constructs in a body of dynamic language source code;from the one or more syntax trees, extracting identifier information for one or more of the defined constructs;augmenting knowledge about the constructs by at least one of explicit inspection of the body of source code or implied references related to the source code;producing a correlation between identifiers and augmented knowledge;using the identifier information and augmented knowledge, generating metadata about the body of the dynamic language source code, the generated metadata being represented as a symbol table;parsing symbol table to compute metrics about the one or more syntax trees;and providing the metrics about the one or more syntax trees to a user, wherein the metrics provide code correctness analysis, and wherein the correctness analysis indicates parameter count mismatches.
  3. 18
    In a computing environment, a system for analyzing dynamic code, the system comprising:one or more processors;one or more computer readable media coupled to the one or more processors, wherein the one or more computer readable media comprise computer executable instruction that when executed by one or more of the one or more processors cause one or more of the one or more processors to perform the following: parsing source code to generate one or more syntax trees defining constructs in a body of dynamic language source code;from the one or more syntax trees, extracting identifier information for one or more of the defined constructs;augmenting knowledge about the constructs by at least one of explicit inspection of the body of source code or implied references related to the source code;producing a correlation between identifiers and augmented knowledge;using the identifier information and augmented knowledge, generating metadata about the body of the dynamic language source code, the generated metadata being represented as a symbol table;parsing symbol table to compute metrics about the one or more syntax trees;and providing the metrics about the one or more syntax trees to a user wherein the metrics provide code correctness analysis, and wherein the correctness analysis indicates parameter count mismatches.