US2011239188A1PendingUtilityA1

Type interface system and method

Assignee: LINDSEY KEVIN EDWARDPriority: Jan 20, 2006Filed: Jun 6, 2011Published: Sep 29, 2011
Est. expiryJan 20, 2026(expired)· nominal 20-yr term from priority
G06F 8/72G06F 8/437
44
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

Systems and methods of representing and extracting type information from typeless and dynamically-typed programming languages are provided. These systems and methods can be immune to source file edits and the order in which those edits are executed. Deriving type information from these languages allows tools to perform operations, for example, refactoring, intellisense, recognition of semantic errors, etc. These systems and methods can be implemented using processes that, implicitly or explicitly, gather type information for the program, and can also accept user input as well.

Claims

exact text as granted — not AI-modified
1 . A method for determining type information from a dynamically-typed programming language, the method comprising the steps of:
 parsing source code by a processing device to generate a tree data structure defining a plurality of nodes, wherein the source code comprises a plurality of symbols and each symbol corresponds with at least one node of the tree data structure;   identifying one of the symbols of the source code and a position of the one symbol in the source code;   locating by the processing device the at least one node of the tree data structure that corresponds to the one symbol and the position of the one symbol; and   determining a type of the one symbol by the processing device based on an analysis of the at least one node and any children nodes of the at least one node in the tree data structure.   
     
     
         2 . The method of  claim 1  wherein the tree data structure comprises an abstract syntax tree. 
     
     
         3 . The method of  claim 1  wherein the at least one node of the tree data structure comprises a plurality of nodes that correspond to the one symbol and the position of the one symbol and the step of determining a type of the one symbol by the processing device is based on an analysis of the plurality of nodes that correspond to the one symbol and the position of the one symbol and any children nodes of the plurality of nodes that correspond to the one symbol in the tree data structure. 
     
     
         4 . The method of  claim 1  wherein the dynamically-types programming language is JavaScript. 
     
     
         5 . The method of  claim 1  wherein the step of identifying one of the symbols of the source code and a position of the one symbol in the source code is accomplished by an integrated development environment. 
     
     
         6 . The method of  claim 5  further comprises providing the type to the integrated development environment. 
     
     
         7 . The method of  claim 1  wherein the step of determining a type of the one symbol by the processing device is further based on an analysis of a current state of an environment. 
     
     
         8 . The method of  claim 7  wherein the step of determining a type of the one symbol by the processing device is performed at runtime. 
     
     
         9 . The method of  claim 1  wherein the step of determining a type of the one symbol by the processing device is performed during editing of the source code. 
     
     
         10 . The method of  claim 1  further comprising converting the source code by the processing device into a stream of lexemes and wherein the step of parsing source code comprises parsing the stream of lexemes. 
     
     
         11 . The method of  claim 10  wherein the step of determining a type of the one symbol comprises determining patters in the stream of lexemes associated with the one symbol. 
     
     
         12 . The method of  claim 1  further comprising storing the tree data structure in metadata. 
     
     
         13 . The method of  claim 1  further comprising using a tree walker to analyze the tree data structure. 
     
     
         14 . The method of  claim 13  further comprising determining type information for the plurality of symbols of the source code. 
     
     
         15 . The method of  claim 13  wherein the step of using a tree walker to analyze the tree data structure generates a hash table. 
     
     
         16 . The method of  claim 15  wherein the hash table comprises a count representative of a number of times the one symbol appears in the source code. 
     
     
         17 . The method of  claim 16  wherein the hash table comprises data representative of one or more values the one symbol may include at a given point in the source code. 
     
     
         18 . The method of  claim 14  further comprising populating a type environment with the type information. 
     
     
         19 . The method of  claim 1  further comprising determining and storing type information for the plurality of symbols of the source code. 
     
     
         20 . The method of  claim 19  further comprising requesting from the processing device the type information of the one symbol from the stored type information based on the one symbol and the position of the one symbol in the source code.

Join the waitlist — get patent alerts

Track US2011239188A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.