US20110239188A1 - Type interface system and method - Google Patents

Type interface system and method Download PDF

Info

Publication number
US20110239188A1
US20110239188A1 US13154090 US201113154090A US2011239188A1 US 20110239188 A1 US20110239188 A1 US 20110239188A1 US 13154090 US13154090 US 13154090 US 201113154090 A US201113154090 A US 201113154090A US 2011239188 A1 US2011239188 A1 US 2011239188A1
Authority
US
Grant status
Application
Patent type
Prior art keywords
symbol
method
type
source code
example
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
US13154090
Inventor
Kevin Edward Lindsey
Paul Colton
Robin Sean Debreuil
Donald Arthur Washburn
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Appcelerator Inc
Colton Paul
Original Assignee
Kevin Edward Lindsey
Paul Colton
Robin Sean Debreuil
Donald Arthur Washburn
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/72Code refactoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/436Semantic checking
    • G06F8/437Type checking

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.

Description

    CROSS-REFERENCE TO RELATED APPLICATIONS
  • The present application is a continuation of U.S. patent application Ser. No. 11/655,729, filed on Jan. 19, 2007, which claims the benefit of the U.S. patent application Ser. No. 60/760,754, filed on Jan. 20, 2006. The entire disclosure of each of the foregoing applications is incorporated by reference as if set forth verbatim herein and relied upon for all purposes.
  • BACKGROUND OF THE INVENTION
  • In computer science, the phrase datatype, or type, is used to identify a set of values and operations that can be performed on that set of values. Many programming languages support one or more types, whether implicitly or explicitly. These types may act as a statically or dynamically checked constraint on the programs written in a given language. Types are usually associated with values in memory or with objects such as, for example, variables. Because a value is typically nothing more than a group of bits read by a processor, there is not usually any distinction in the hardware, even among memory addresses, instruction code, characters, integers and floating-point numbers. Therefore, types can be used to indicate how a given collection of bits should be treated.
  • Typically, values are associated with a given type, although a given type may have associated with it one or more subtypes. Other entities, including dependencies, objects, modules, etc. can be associated with a type. Additionally, a given type can be associated with another type. A type system can be implemented for a programming language to define rules by which the typed program's behavior is governed. Type checking can be used to verify conformance with the rules and to enforce constraints dictated by the type. Type checking can be performed during compilation or at runtime.
  • Thus, programming languages can be dynamically typed or statically typed. With dynamic typing, typing of variables can be performed on the basis of a given execution path. That is, the typing of a variable may be different. Therefore, dynamic typing is typically performed at runtime. Dynamic typing is often associated with languages such as scripting languages as well as with rapid application development environments. Static types, on the other hand, are often used with compiled languages.
  • Many scripting languages, for example JavaScript, do not require the developer to specify the type of their variables, fields, and parameters or the return types of their functions. Also, variable types can change throughout the lifetime of a script's execution. As a result, it is very difficult for a tool, such as an IDE (Integrated Development Environment), to assist the developer with contextual information while they are editing source files. These languages are not necessarily “typeless” in that they have no types, but more accurately the types are not static in that their application is not constrained as in a typed environment. Such languages tend to enable simplifying the task of connecting components, because they all look and behave the same and are therefore interchangeable. For example, a variable may be able to hold a string one moment and an integer the next. Because code and data may be interchangeable, a program can write another program and then execute it on the fly. With such dynamically-typed languages, variable types are typically identified at execution.
  • Additionally, a dynamically-typed language can facilitate component connections. This is because there are no type-based rules governing use of components and values, and all components and values can be uniformly represented. Thus a component or value can be used in multiple situations. For example, a component designed for one purpose by one designer can be used for a completely different purpose that may never have been envisioned by the original designer. Therefore, dynamically-typed programming languages may encourage reuse of components and values and minimize the uses of multiple, potentially incompatible interfaces. Because in a typed system, a given interface requires objects of specific types the compiler will prevent other types of objects from being used with the interface. With a dynamically-typed system, a new object can utilize an existing interface without the need for conversion code to be written to translate between the types. This can save recompiling part or all of the application.
  • Further features and advantages of the present invention, as well as the structure and operation of various embodiments of the present invention, are described in detail below.
  • SUMMARY OF THE INVENTION
  • The present invention is directed toward systems and methods for providing type information from programming languages, including dynamically-typed languages. More particularly, in one embodiment, types and type information can be discovered through various methodologies, examples of which are disclosed below. In one embodiment, the type information can be extracted or inferred while at the same time being immune to source file edits and the order in which those edits may have been executed.
  • One embodiment provides systems and methods of representing and extracting type information from typeless and dynamically-typed programming languages, such as for example JavaScript, while at the same time being immune to source file edits and the order in which those edits are executed. Deriving type information from these languages allows tools like an IDE to perform operations that are currently not possible, for example, refactoring, intellisense, recognition of semantic errors, etc. This can be implemented to make a developer's editing experience approach the richness of the experience expected in typed languages. This embodiment can be implemented using processes that, implicitly or explicitly, gather type information for the program, and can also accept user input as well. Although type information can be computer inferred or user supplied, it is contemplated that most applications will rely more heavily on computer-generated type information.
  • One feature of the present invention is to provide a system and method for extracting type information. In one embodiment, a system may generate nodes associated with symbols. The system may then request type information based on a particular symbol and, in response to the request, return a value associated with the particular symbol.
  • Another feature of the present invention is to provide a system for populating a type environment. In one embodiment, the system processes inputs obtained from one or more sources into type information. The system may then populate a type environment with the type information and thereafter perform one or more queries on the type information.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • The present invention will be described with reference to the accompanying drawings. In the drawings, like reference numbers indicate identical or functionally similar elements. Additionally, the left-most digit(s) of a reference number identifies the drawing in which the reference number first appears.
  • FIG. 1 is an operational flow diagram illustrating an example process for extracting type information in accordance with one embodiment of the invention.
  • FIG. 2 is a diagram illustrating an exemplary general process of populating a type environment with metadata and querying that metadata in accordance with one embodiment of the invention.
  • FIG. 3 is a diagram illustrating an example of one type of input that can be used to populate the type environment in accordance with one embodiment of the invention.
  • FIG. 4 is a diagram illustrating an exemplary implementation for a process for the conversion of source files for the population of environment information in accordance with one embodiment of the invention.
  • FIG. 5 is a diagram illustrating another exemplary implementation for a process for the conversion of source files for the population of environment information in accordance with one embodiment of the invention.
  • FIG. 6 is a diagram illustrating an exemplary process for querying a type environment in accordance with one embodiment of the invention.
  • FIG. 7 illustrates an example snippet of JavaScript and its semantically equivalent representation as a tree structure in accordance with one embodiment of the invention.
  • FIG. 8 is a diagram illustrating the entry of a code snippet into a type environment in accordance with one embodiment of the invention.
  • FIG. 9 is a diagram illustrating an example of one such data structure that can be used for the type environment in accordance with one embodiment of the invention.
  • FIG. 10 is a diagram illustrating an example scenario that includes multiple definitions of a symbol in a runtime environment in accordance with one embodiment of the invention.
  • FIG. 11 illustrates examples of multiple definitions of a symbol in a type environment in accordance with one embodiment of the invention.
  • FIG. 12 is a diagram illustrating examples of types inferenced from abstract syntax trees in accordance with one embodiment of the invention.
  • FIG. 13 is a diagram illustrating an example of how properties and values may be augmented by alternate sources in accordance with one embodiment of the invention.
  • DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS
  • The present invention, in accordance with one or more various embodiments, is described in detail with reference to the following figures. The drawings are provided for purposes of illustration only and merely depict typical or example embodiments of the invention. These drawings are provided to facilitate the reader's understanding of the invention and shall not be considered limiting the breadth, scope, or applicability of the invention. It should be noted that for clarity and ease of illustration these drawings are not necessarily made to scale.
  • The present invention is directed toward systems and methods for providing type information from programming languages, including dynamically-typed languages. More particularly, in one embodiment, types and type information can be discovered through various methodologies, examples of which are disclosed below. In one embodiment, the type information can be extracted or inferred while at the same time being immune to source file edits and the order in which those edits may have been executed.
  • Before describing the invention in further detail, it is useful to describe an example environment in which the invention can be implemented. One such example is that of a scripting language. From time-to-time, the present invention is described herein in terms of this example environment. Description in terms of this environment is provided to allow the various features and embodiments of the invention to be portrayed in the context of an exemplary application. After reading this description, it will become apparent to one of ordinary skill in the art how the invention can be implemented in different and alternative environments, including with other languages of the dynamically-typed form.
  • Scripting languages are programming languages designed for scripting the operation of a computer. In other words, they can be used to create a computer program that automates the tasks that a user might otherwise perform manually, for example at the keyboard or other user interface. A shell script can be included to provide commands that might be typed by the user, for example at a command prompt. A user can, for example, write a script that would combine a sequence of editing tasks that the user expects to perform repeatedly during programming operations. In one respect, scripting languages can be thought of as facilitating the connection of diverse pre-existing components to perform new functions.
  • JavaScript is an example of a scripting language that is based on the concept of prototypes. It is commonly used with website development, but can also be used to enable scripting access to objects embedded in other applications. JavaScript syntax is loosely based on the C programming language. It has no input or output constructs of its own, and a JavaScript engine relies on a host program into which it is embedded. JavaScript variables can also be referred to as being dynamically typed, in that they are not constrained by variable types upon creation. Unlike C, for example, where variables must be defined up front as int, char, etc., JavaScript variables can be defined by either just assigning them a value, or by using the var statement. The variables can be declared outside of any function, and if declared without the var statement, are in global scope, visible in the entire web page. Otherwise, variables declared inside a function with the var statement are local to that function. JavaScript variables can pass from one page to another using cookies, a hidden frame or windows and the like.
  • Having thus described an example environment in which the invention can be implemented, various features and embodiments of the invention are now described in further detail. Description may be provided in terms of this example environment for ease of discussion and understanding. After reading the description herein, it will become apparent to one of ordinary skill in the art that the present invention can be implemented in any of a number of different software environments, including with other dynamically-typed software languages. It will also become apparent to one of ordinary skill in the art that various features and methodologies described herein can be applied to statically typed languages.
  • In one embodiment, the invention provides systems and methods of representing and extracting type information from typeless and dynamically-typed programming languages, such as for example JavaScript, while at the same time being immune to source file edits and the order in which those edits are executed. Deriving type information from these languages allows tools like an IDE to perform operations that are currently not possible, for example, refactoring, intellisense, recognition of semantic errors, etc. This can be implemented to make a developer's editing experience approach the richness of the experience expected in typed languages. This invention can be implemented using processes that, implicitly or explicitly, gather type information for the program, and can also accept user input as well. Although type information can be computer inferred or user supplied, it is contemplated that most applications will rely more heavily on computer-generated type information.
  • FIG. 1 is an operational flow diagram illustrating an example process for extracting type information in accordance with one embodiment of the invention. Referring now to FIG. 1, in a step 104, a parser is used to generate Abstract Syntax Tree (AST) nodes that are associated with symbols in a runtime environment. An Abstract Syntax Tree is typically a tree structure that captures the semantics of source code statements. The parsing and symbol association can be implemented to occur as files are included in a project and as the developer modifies the code.
  • In a step 108, type information is requested by an outside process such as an IDE. This step can be performed at a later point in time such as, for example, during editing. In one embodiment, a position and a symbol can be used as keys to query the runtime environment. For example, the symbol can be used to retrieve information about the underlying object being queried. The position information can be useful as, in the example environment, variable types can change throughout the lifetime of a script's execution. Therefore, the symbol may have different type information at different positions in the source.
  • In a step 112, once the symbol is located in the environment, the abstract syntax tree or other value associated with the symbol is returned. The abstract syntax tree is evaluated based on the current state of the environment and returns the type at that moment in time for the given file and file offset. In some implementations, functions can have multiple signatures and as a result, multiple return types. Therefore, in one embodiment, the inferencing engine can be implemented to provide techniques for capturing this dynamic information. For example, in one embodiment nodes can be created in the abstract syntax tree for each occurrence of a symbol, and information stored for each such occurrence. In this embodiment, the specific information for a given occurrence can be used to infer a type for that occurrence of the symbol.
  • In one embodiment, associated abstract syntax trees and symbols may be removed from the runtime environment during editing. However, all references to symbols can still be counted. As a result, where all references are counted, the process can be implemented such that a symbol will be removed from the environment only when the last reference to that symbol is removed from the source code. It should be noted that in one embodiment, symbol table associations do not have to depend on the order of these edits.
  • FIG. 2 is a diagram illustrating an exemplary general process of populating a type environment with metadata and querying that metadata in accordance with one embodiment of the invention. Item 101 processes a set of inputs that can be obtained from various sources and uses the processed information to populate a type environment 102. The type environment can be combined with, for example, other information in a runtime environment. The inputs can contain structured data that can be converted into type information and stored as metadata or other data within the type environment. In one embodiment, the type environment 102 is implemented using a hash table that contains information pertaining to the variable. For example, hash table entries may include information such as a reference count indicating the number of times a variable is referenced and the one or more values or types that the referenced variable may take on at a given point in the source. As this example illustrates, other data structures can be used to create type environment 102. Populating environment 102 in advance and providing the ability to store multiple values for a given variable allows values to be properly determined for a given point in the source or for a given region of the source. After item 102 has been populated, item 103 can begin making queries on the type information contained in item 102 to extract the value. Examples of these steps are described in more detail below.
  • FIG. 3 is a diagram illustrating an example of one type of input that can be used to populate the type environment in accordance with one embodiment of the invention. In this example, one or more source files 201 are used to feed the process that populates item 102. In one embodiment, source files 201 can be a Unicode or ASCII text file whose contents follow a structured format as defined by an associated BNF grammar (defined below), although other source files 201 can be used. A Unicode file can follow a binary format used to encode text such as that defined by Unicode, Inc, at www.unicode.org. These source files 201 can, for example, be comprised of JavaScript source code, XML, programming language comments or other source files 201 such as those used with the environment in which the invention may be implemented.
  • In this example, the source files 201 are processed at step 202, which step analyzes the source code 201 to extract type information for the symbols defined in the source files. In other words, process 202 can be used to extract the type information from one or more source files 201, and the extracted information can be sent to the type environment 102 for storage. In one embodiment, state information is created as the source files are executed. Alternatively, such information can be extracted or created without execution such as for example through parsing. In one embodiment, the extracted data is added to or merged with the data or other information that may already exist in a type environment 102. As such, this process need not be a single-pass process in this embodiment.
  • FIG. 4 is a diagram illustrating an exemplary implementation for a process 202 for the conversion of source files for the population of environment information 102 in accordance with one embodiment of the invention. Referring now to FIG. 4, in a step 302 individual words or tokens of the programming language in which a source file 201 is written are identified. This step can be implemented using a lexical analyzer, or lexer. A lexer can be implemented to scan a stream of text and find patterns of text or characters or other symbols in source files 201. These patterns are called tokens and specific instances of these tokens are called lexemes. The output of step 302 in one embodiment, then, is a collection of lexemes. The process can be implemented such that one lexeme is created for each token type that is recognized. A lexeme can be, for example, a unit of analysis of the source 201 and can have associated therewith a particular meaning or value. In one implementation, the lexeme is a minimal or fundamental unit of the lexicon of the source code. Such a lexical analysis can, for example, convert strings in the source code into a list of lexemes, which can then be passed to a parser for syntactic analysis.
  • In a step 304, a parser or other like methodology is used to analyze the stream of lexemes. A parser can be implemented to scan a stream of tokens and detect patterns in the tokens. The token patterns are typically described by a Backus Naur Form grammar, or BNF (sometimes referred to as the Backus Normal Form). In effect, in this implementation, a parser recognizes the pattern of tokens as described by the Backus Naur Form grammar. The Backus Naur Form, is a formal mathematical way to describe a language that can be used to define the structure of grammars usually referred to as context-free grammars. It is a metasyntax that can express context-free grammars and is often used as a notation for programming languages and command sets. Variants of the Backus Naur Form, such as, for example, the extended Backus Naur Form, can be employed to represent equivalent grammars, sometimes more concisely than the Backus Naur Form. Because language standards often use some variant of Backus Naur Form or extended Backus Naur Form to define the grammar of the language, the parser for the compiler can be generated automatically in one embodiment. However, it is useful that the grammar used for source files 201 be computer recognizable such as, for example, context-free grammars.
  • As a result of this step 304, the parser can generate a tree structure that captures the semantics for source files 201 for those files or for regions of source code. In one embodiment, this is accomplished while the parser is processing a syntactically correct source file region. A result of step 304 can be a collection of trees 305, which, in one embodiment comprises one tree 305 (or subtree) for each valid language statement. As stated above, the trees 305 can be implemented as abstract syntax trees, or other data structure representing the parsed information. In one embodiment, files that are only partially constructed and files that contain partial errors can still be parsed and a tree or other data structure generated to identify the values obtained for the lexemes or other data elements. Where source is not parsable or where errors are identified, an output of the parser may be an error token or other symbol that is stored in the abstract syntax tree.
  • In another embodiment, where a variable is encountered that is invalid or otherwise not typically parsable, the parser may make a guess based on available information, past usage or other data. For example, assume the parser encounters the partially completed snippet “a._” in which the remainder of the string is not filled in. The parser can infer a value for the snippet based on historical usage. For example, the parser may infer that the missing element is “b” and the snippet should be “a.b” based on past usage. Additionally, the invention may also create a value for “a” as well. For example, if the text “a.b=10” is found in the source file 201, but there is no other reference to “a” in the source, an entry for “a” can be created in the type environment. Then, when “a” is subsequently entered by a user, the system can display “b” as a possible completion of that statement based on the prior encounter of “a.b” in the source file 201. In one embodiment, such ‘guesses’ are stored so as to be identifiable as an estimate or guess, rather than as a final result. For example, a list of error tokens can be stored such as in a node as a list or array. The user can be provided with a pop-up or other message telling him or her that the error was encountered so that appropriate action can be taken. Additionally, the user may be given the opportunity to change the ‘guess’ made by the parser.
  • In a step 306 the tree structures 305 are traversed to associate sub-trees with symbols in the type environment 102. This can be done, for example, using a tree walker or other like technology. In this embodiment, the system visits the nodes in the tree and evaluates their contents. For a given node, the walker determines an appropriate symbol, value or type to associate with the node and creates an entry for the type environment 102 (for example, one embodiment creates a hash table entry for a snippet). An example process for walking the tree is illustrated in more detail below with reference to FIG. 7. As this example illustrates, other data structures can be similarly analyzed to extract the type information.
  • As stated above, other data structures and typing methodologies can be used in addition to or in place of tree structures. In one embodiment, for example, values can be directly associated with a symbol. For example, if the parser encounters the text “x=5” in a source file 201, the parser can associate the “Number” type with the “x” symbol directly. This can be an optimization step and can obviate the need to populate and later walk a tree structure where the value is known, or when the symbol always returns the same type.
  • FIG. 5 is a diagram illustrating another exemplary implementation for a process 202 for the conversion of source files for the population of environment information 102 in accordance with one embodiment of the invention. Of primary distinction between the embodiment illustrated in FIG. 5 and that illustrated in FIG. 4, is that this embodiment does not perform the intermediate step of storing parsed results in a tree structure. Instead, in the example illustrated in FIG. 5, the type information is stored in type environment 102 as it is created. This embodiment may be useful, for example, when loading a JavaScript core library or other like file that can be directly typed and stored. This process can also be used to process specially formatted source code that is typically ignored in the source language (documentation comments, for example).
  • Referring now to FIG. 5, the process in this embodiment also begins with the analysis of source files 201. These source files can but need not be the same source files as those analyzed in other embodiments. In a step 322, the process searches for and recognizes the tokens and lexemes defined by the language of a source file 201. For example, a lexical analyzer or lexer can be used to create lexemes 324 of the source file 201 as discussed above with reference to FIG. 4. In this embodiment, however, in a step 326 a parser or other like technology can be used to process the lexemes 324 and to directly populate type environment 102.
  • Either embodiment can be used to capture type information that remains static throughout the lifetime of type environment 102. However, because the embodiment illustrated in FIG. 4, and its equivalents, creates an intermediate data structure (e.g., the abstract syntax tree), multiple instances of a symbol with different values can be stored for a given file or file collection. In other words, embodiments such as that illustrated in FIG. 4 allow for the capture of dynamic information.
  • It should be noted that in some instances snippets may be encountered for which it is impossible to determine a value. Therefore, in one embodiment a user is provided with an opportunity to identify the type for a given string. The parser can be implemented to parse comments, provide pop-ups to query users for information, or otherwise accept user input. This methodology can also be used to obtain user input allowing a user to confirm or correct a ‘guess’ that may have been made by the parser along the way.
  • As discussed above with reference to FIG. 2, once the type environment 102 is populated, a query process 103 queries the type environment 102. This query can be used to determine type and property information for the type environment 102. FIG. 6 is a diagram illustrating an exemplary process for querying type environment 102 in accordance with one embodiment of the invention. Referring now to FIG. 6, in the illustrated example, item 344 represents a data structure containing information that can be used to derive type, property or other information from the information populated in type environment 102. For example, in one embodiment item 344 is a key to query the hash table and includes all the information needed to derive type and property information from type environment 102. The key 344 can include three fields identifying the symbol, file index and offset. Further examples of this are discussed below with reference to FIGS. 8, 9, 10 and 11.
  • In one embodiment, all type lookups can begin with a symbol; however, it is possible that type information can be derived from data structures that are not attached directly to a symbol included in the information 102. In other words, it is possible to derive type and property information from intermediate values generated while the abstract syntax tree is being processed. Additionally, a symbol's type may change based on the position of that symbol within a source file 201. Larger collections of source files 201 can be viewed as one large source file 201 and the symbol's type may likewise have different values for different instantiations of that symbol in their respective positions within that collection of files. Because the values can change as the code is executed, the order of concatenation may be important in this scenario and there may be an implicit or explicit ordering to the source documents 201. Therefore, one embodiment captures both the index of the source file 201 (based on its order) and the offset within that source file 201 to supply enough information to determine the type for the given symbol at a given position.
  • FIG. 7 illustrates an example snippet of JavaScript and its semantically equivalent representation as a tree structure (e.g., an abstract syntax tree) in accordance with one embodiment of the invention. More specifically, this figure shows a simple symbol assignment snippet 361 that represents a symbol “abc” as the sum of two numbers, three and five in the illustrated example. In the equivalent abstract syntax tree format, the root node 362 identifies the type of operation represented by snippet 361. In this case, an assignment operation. For this operation to parse, two children are required, one for each side of the operation: nodes 363 and 364 in this case. Node 363 is the symbol “abc” to which to assign the value, and Node 364 is the value to assign to the symbol. As node 364 demonstrates, complex operations may be defined in abstract syntax trees. Item 364 shows the addition operation which signifies the addition of child nodes, nodes 365 and 366 in this case. Therefore, node 364 represents the addition of three (node 365) and five (node 366). As the example provided in FIG. 7 illustrates, a walk through the abstract syntax tree by a tree walker would indicate that symbol “abc” is to be added to the hash table, and to associate node 364 with the symbol, or the subtree identified by node 364. This operation in accordance with this example is illustrated below with reference to FIG. 8.
  • FIG. 8 is a diagram illustrating the entry of a code snippet into a type environment in accordance with one embodiment of the invention. Referring now to FIG. 8, a symbol (for example, symbol “abc” from snippet 361 in FIG. 7) is entered into type environment 102 as a property item 388. In one embodiment, the storage can be done in a hash table, for example, for fast lookup and the value of each hash entry can be a property 388 or other like entry. Some programs, including JavaScript use the concept of scope or namespaces to determine how symbols are looked up. Such scoping mechanisms may dictate how identifiers are used to retrieve values. As such, the system can be implemented to conform to the namespace or scoping requirements set forth for the source materials 201.
  • Property item 388 can store the symbols by name or other identifier. In another embodiment, the property item 388 does not store a name, but holds collections of type information (abstract syntax trees in the some of the examples outlined above) and other metadata for proper interpretation of the source language's semantics. For example, some properties may not be able to be removed from the environment. In such a scenario, the property can contain an attribute alerting the user to that fact and to prevent mechanisms such as reference counting from removing the entry.
  • In the illustrated example, key 386 is a simple string used to as a hash table index into type environment 102. In this example, key 386 points to property entry 388, which identifies the property characteristics of the “abc” node. In one embodiment, associations of symbols to values in type environment 102 are reversible and do not depend on the order in which entries are added or removed. This can be implemented to allow source code to be edited while keeping all type information up to date.
  • A property 388 can include a reference count, value and other metadata as may be specified by the source language. Reference counts can be used to keep track of the number of source code statements that reference or define this entry. In the example illustrated in FIG. 8, the value of the reference count is two. Reference counts can be used to facilitate determination of when a symbol 386 is no longer referenced, letting the programmer know when the symbol 386 can be removed from the type environment 102. Reference counts can be made independently of the order in which source code 201 is added and removed.
  • The property value can be included to identify the value of the string for which the key queried. In embodiments where references to another data structure such as an abstract syntax tree are used, the value can link back to the corresponding portion of the tree. In this example, the sub-tree starting at node 364 (from the example in FIG. 7) is inserted into or pointed to by the property 388 to as the value for that symbol at that point in the source. As further described below, storing abstract syntax tree sub-trees into the type environment 102 can be used to allow a programmer to delay type inferencing until the moment of the query.
  • As noted above, in one embodiment type environment 102 can be implemented as a hash table. Additionally, the data structure could be implemented as a simple array, a link list, or other data structure. This data structure preferably associates a key, which in this application can be a string value, with a value or simple data structure in the environment. The key or string can then be used to retrieve the associated value using only the original string value of the key.
  • FIG. 9 is a diagram illustrating an example of one such data structure that can be used for the type environment 102 in accordance with one embodiment of the invention. 392 represents a key that is used to look up a value in the runtime environment. In this case, key 392 is the string value of the symbol “abc” encountered during the parse of a source file 201 as illustrated in the examples described above with reference to FIG. 8. 394 represents the value associated with the key. In this case, 394 is a property data structure that holds information, for example a reference count and value array, used to determine the type associated with the symbol in 392. In terms of the example illustrated in FIG. 8, the value 394 is represented by property 388.
  • FIG. 10 is a diagram illustrating an example scenario that includes multiple definitions of a symbol in a runtime environment in accordance with one embodiment of the invention. In the illustrated example, a snippet 404 of JavaScript is used that contains two statements: abc=3+5; and abc=“a”+“b”. As illustrated, in this example, each statement assigns a value to the same symbol table entry, abc. However, these assignments occur at different offsets within the same file or in different files at different offsets within a merged set of files. Therefore, in one embodiment, the invention can be implemented to maintain a history of the types at various positions within the source file(s) 201.
  • The actual value of the property 388 is a collection of one or more data structures. In the illustrated example with a snippet having two statements, property 388 in type environment 102 is a collection of two data structures, data structure 406 and data structure 408. Each data structure contains the abstract syntax tree from the right-hand side of the assignment, along with the file index and offset identifying its location within that source file 201. The collection can be sorted by file index and offset for fast retrieval (binary search) of a given assignment in a file at a given position. In the illustrated example, data structure 406 represents the entry for the first line of code, and is shown as being in file 1 at an offset of zero. Likewise, data structure 408 represents the entry for the second line of code, again in file one at an offset of 13.
  • FIG. 11 illustrates examples of multiple definitions of a symbol in a type environment 102 in accordance with one embodiment of the invention. In the illustrated example, Item 432 is a snippet of JavaScript that contains three statements defining the “abc” symbol. Therefore, there are three data structures 434, 436 and 438 illustrated in this example. The first two statements are the same assignments as those discussed above with reference to FIG. 10, and have associated data structures 436 and 438. The third statement is a function definition for symbol ‘abc’ with data structure 434. Function definitions can also create symbols for type environment 102. However, in JavaScript and some other languages, functions are processed before any other content. Therefore, in one embodiment, the invention configures the sorting function to place all functions at the beginning of the list, regardless of the function definition's offset and file index. As this example illustrates, even though the assignment of a function to symbol “abc” occurs at offset 29, data structure 434 can be the first value referenced. Multiple function definitions can be sorted by file index and offset, but can always precede non-function definitions in this embodiment. Other languages may have different requirements, but many of these generally process code in a predictable order that the sorting mechanism can capture and follow. In other words, the processing or sorting orders set forth in the language can be followed for the invention. Additionally, a given order can be imposed through external mechanisms.
  • FIG. 12 is a diagram illustrating examples of types inferenced from abstract syntax trees in accordance with one embodiment of the invention. This inferencing can occur after the entry in the symbol table has been located (for example, based on file index and offset). Node 521 is the addition operator. The children of node 521 are both Numbers, so the type of 521 is inferenced as a Number type in this example. However, the “+” lexeme can have multiple meanings in JavaScript and operators may likewise have multiple meanings in other languages. Indeed, node 522 shows an example wherein that the “+” lexeme is the string concatenation operator. The children of node 522 are both Strings, so the type of node 522 is inferenced as a String in this example. Where a data structure is used to store multiple parsed occurrences of the lexeme, its dynamic nature, that is, its various types within different portions of the code, can be inferred and maintained.
  • In some circumstances, however, not all operators need to know their child node types in order to derive their return type. One such example of this is illustrated by node 523. Node 523 is the multiplication operator and, with some languages, it can always be inferenced as a type Number regardless of its child node types. In other circumstances, however, a fuzzy inferencing approach may be implemented for certain nodes. For example, where a node is a function instantiation, that node may have different return types depending on how the function is invoked. In one embodiment, the system can be implemented to perform an intelligent guess as to the type based on past usage or other information. The system can also query the user or otherwise rely on user input to validate the choice or to accept instructions regarding correct typing for the function.
  • Dynamically-typed languages typically do not require the user to specify types upon creation of source files 201. As the above examples illustrate, an abstract tree node can have a defined type based on a number of factors. For example, the “+” node adopts a type based on its children and the multiplication operator is always a number type. If a language has rules such as this, or if an operator imposes such rules, then the parser can be implemented to follow these rules. There can also be specific rules regarding whether and how known primitive types convert to one another automatically, and how they merge during operations (such as, for example, the operation “x”+5). This information can be captured using a process similar to that described above with reference to FIG. 11, in a number of different languages. Because rules within a language may dictate if and how types automatically convert to one another, the parser can be implemented so as to follow constructs outlined by those rules or based on user instruction.
  • FIG. 13 is a diagram illustrating an example of how properties and values may be augmented by alternate sources in accordance with one embodiment of the invention. Item 390 lists the parameters and return type of the “abc” symbol in type environment 102. There are cases where it may not be possible to infer a type in typeless languages. This can occur, for example, when data is supplied by an outside source, like a web service. Also, there may be cases where a function's return type cannot be inferred unless it is actually referenced in code. Typically, script libraries do not call all of their functions, potentially making it difficult or impossible to determine the return type of those functions. In those cases, alternate mechanisms can be used to provide this information, such as, for example, comment documentation, user intervention through the UI, or even probability algorithms (best guess). As these examples illustrate, other mechanisms may be invoked to provide this information as well. Item 390, for example, tells us that the symbol “abc” is a function, with three parameters (a, b, and c), and that it returns a Number. Note that where particular lexemes or other information provide a situation where it is difficult for the engine to infer a type, such items may be hard for the user to understand as well. As such, in one embodiment, the system may encourage clearly written and commented code or otherwise influence the way code is crafted.
  • The invention can be implemented in one embodiment such that the type information can be extracted or inferred without the need to execute the code to determine the type information. For example, as illustrated in FIGS. 4 and 5, in these examples the source files 201 can be analyzed and parsed, and the type information can be extracted or inferred, without executing the code. Beneficially, therefore, type information can be extracted even where the developer does not have access to an executable interpreter in the runtime, or where errors, incomplete coding or other scenarios may otherwise prevent execution to determine types.
  • Additionally, as the example in FIGS. 4, 10 and 11 illustrate, multiple values for a variable within a source file 201 (or even within multiple source files 201) can be determined and stored. In one embodiment, where a variable may have multiple values at various points in the execution of a program, the determined values are stored in a hash table that can include information pertaining to the value of the variable at a given location within the source. Because the type information can be determined without requiring execution, type information can be identified for various points in time and variable changes from one portion of the source to another can be tracked and identified.
  • Objects in the Runtime Environment
  • Below is a list of example types that can be captured in the JavaScript runtime environment.
  • 1) Array
  • 2) Boolean
  • 3) Date
  • 4) Error
  • 5) Function
  • 6) Null
  • 7) Number
  • 8) Object
  • 9) RegExp
  • 10) String
  • 11) Undefined
  • 12) User-defined
  • 13) Commands (aka AST nodes)
  • Items 1 through 11 can be provided by user agents that follow the ECMAScript specification. User-defined types (item 12) are created by the developer in their source files. AST nodes (item 13) are used to delay type inferencing until the information is requested.
  • Language Constructs
  • Below is a list of example JavaScript constructs that can be supported by this invention. As these examples illustrate, other constructs in JavaScript and other languages may be supported as well. These constructs can be parsed and represented by Abstract Syntax Tree nodes. The Abstract Syntax Tree nodes can in turn be used to associate symbols with individual sub-trees in the Abstract Syntax Tree, which in turn can be used to infer type information as it is requested. [0087] Assignment: simple assignment, add and assign, arithmetic shift right and assign, bitwise- and assign, bitwise- or and assign, bitwise-exclusive- or and assign, divide and assign, modulus and assign, shift left and assign, shift right and assign, subtract and assign. [0088] Unary operators: bitwise-not, negation, post-decrement, post-increment, pre-decrement, pre-increment, type of, with. [0089]
  • Binary operators: addition, get index, get name [0090] Logical binary operators: equality, greater than, greater than or equal, identity, in, instance of, less than, less than or equal, logical and, logical or, not equal, not identity [0091] Numerical binary operators: arithmetic shift right, bitwise- and, bitwise- or, bitwise-exclusive- or, division, modulus, multiplication, shift left, shift right, subtract [0092] Trinary operators: conditional [0093] Flow control: break, case, continue, do, for, for in, if, switch, while, function invocation, return. [0094] Instantiation: new [0095] Exception handling: try, catch, finally, throw.
  • While various embodiments of the present invention have been described above, it should be understood that they have been presented by way of example only, and not of limitation. Thus the breadth and scope of the present invention should not be limited by any of the above-described exemplary embodiments. Additionally, the invention is described above in terms of various exemplary embodiments and implementations. It should be understood that the various features and functionality described in one or more of the individual embodiments are not limited in their applicability to the particular embodiment with which they are described, but instead can be applied, alone or in some combination, to one or more of the other embodiments of the invention, whether or not such embodiments are described and whether or not such features are presented as being a part of a described embodiment.
  • Terms and phrases used in this document, and variations thereof, unless otherwise expressly stated, should be construed as open ended as opposed to limiting. As examples of the foregoing: the term “including” should be read as mean “including, without limitation” or the like; the term “example” is used to provide exemplary instances of the item in discussion, not an exhaustive or limiting list thereof; and adjectives such as “conventional,” “traditional,” “normal,” “standard,” and terms of similar meaning should not be construed as limiting the item described to a given time period or to an item available as of a given time, but instead should be read to encompass conventional, traditional, normal, or standard technologies that may be available now or at any time in the future. Likewise, a group of items linked with the conjunction “and” should not be read as requiring that each and every one of those items be present in the grouping, but rather should be read as “and/or” unless expressly stated otherwise. Similarly, a group of items linked with the conjunction “or” should not be read as requiring mutual exclusivity among that group, but rather should also be read as “and/or” unless expressly stated otherwise.
  • While various embodiments of the invention have been described above, it should be understood that they have been presented by way of example only, and not limitation. Thus, the breadth and scope of the present invention should not be limited by any of the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents.

Claims (20)

  1. 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. 2. The method of claim 1 wherein the tree data structure comprises an abstract syntax tree.
  3. 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. 4. The method of claim 1 wherein the dynamically-types programming language is JavaScript.
  5. 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. 6. The method of claim 5 further comprises providing the type to the integrated development environment.
  7. 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. 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. 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. 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. 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. 12. The method of claim 1 further comprising storing the tree data structure in metadata.
  13. 13. The method of claim 1 further comprising using a tree walker to analyze the tree data structure.
  14. 14. The method of claim 13 further comprising determining type information for the plurality of symbols of the source code.
  15. 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. 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. 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. 18. The method of claim 14 further comprising populating a type environment with the type information.
  19. 19. The method of claim 1 further comprising determining and storing type information for the plurality of symbols of the source code.
  20. 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.
US13154090 2006-01-20 2011-06-06 Type interface system and method Abandoned US20110239188A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US76075406 true 2006-01-20 2006-01-20
US11655729 US7958493B2 (en) 2006-01-20 2007-01-19 Type inference system and method
US13154090 US20110239188A1 (en) 2006-01-20 2011-06-06 Type interface system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US13154090 US20110239188A1 (en) 2006-01-20 2011-06-06 Type interface system and method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
US11655729 Continuation US7958493B2 (en) 2006-01-20 2007-01-19 Type inference system and method

Publications (1)

Publication Number Publication Date
US20110239188A1 true true US20110239188A1 (en) 2011-09-29

Family

ID=38288326

Family Applications (2)

Application Number Title Priority Date Filing Date
US11655729 Active 2029-12-21 US7958493B2 (en) 2006-01-20 2007-01-19 Type inference system and method
US13154090 Abandoned US20110239188A1 (en) 2006-01-20 2011-06-06 Type interface system and method

Family Applications Before (1)

Application Number Title Priority Date Filing Date
US11655729 Active 2029-12-21 US7958493B2 (en) 2006-01-20 2007-01-19 Type inference system and method

Country Status (2)

Country Link
US (2) US7958493B2 (en)
WO (1) WO2007084780A3 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080301078A1 (en) * 2007-05-31 2008-12-04 Mark Proctor Method and apparatus to abstract away rule languages
US20090306964A1 (en) * 2008-06-06 2009-12-10 Olivier Bonnet Data detection
US8943474B1 (en) * 2011-10-26 2015-01-27 The Mathworks, Inc. Code generation and execution for dynamic programming languages
US9135027B1 (en) 2011-10-26 2015-09-15 The Mathworks, Inc. Code generation and execution for dynamic programming languages

Families Citing this family (56)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7844958B2 (en) * 2005-03-11 2010-11-30 Aptana, Inc. System and method for creating target byte code
US7707547B2 (en) * 2005-03-11 2010-04-27 Aptana, Inc. System and method for creating target byte code
US8473971B2 (en) 2005-09-06 2013-06-25 Microsoft Corporation Type inference and type-directed late binding
US7958493B2 (en) * 2006-01-20 2011-06-07 Kevin Edward Lindsey Type inference system and method
US20070244906A1 (en) 2006-04-14 2007-10-18 Aptana Incorporated Collaborative Content Generation System And Method
US8225294B2 (en) * 2006-04-27 2012-07-17 Oracle America, Inc. Method and apparatus for expressing and checking relationships between types
US20080178149A1 (en) * 2007-01-24 2008-07-24 Peterson James G Inferencing types of variables in a dynamically typed language
US20080320453A1 (en) * 2007-06-21 2008-12-25 Microsoft Corporation Type inference and late binding
US8321836B2 (en) * 2007-06-21 2012-11-27 Microsoft Corporation Late bound programmatic assistance
US8918772B1 (en) 2007-07-25 2014-12-23 Google Inc. Statically analyzing program correctness for a dynamic programming language
US8387020B1 (en) * 2007-07-25 2013-02-26 Google Inc. Verifying that a method has been implemented for a program written in a dynamic programming language
US8196121B2 (en) * 2007-08-23 2012-06-05 International Business Machines Corporation Modular integration of distinct type systems for the compilation of programs
US9122650B1 (en) 2007-11-14 2015-09-01 Appcelerator, Inc. Web server based on the same paradigms as web clients
US8914774B1 (en) 2007-11-15 2014-12-16 Appcelerator, Inc. System and method for tagging code to determine where the code runs
US8954989B1 (en) 2007-11-19 2015-02-10 Appcelerator, Inc. Flexible, event-driven JavaScript server architecture
US8260845B1 (en) 2007-11-21 2012-09-04 Appcelerator, Inc. System and method for auto-generating JavaScript proxies and meta-proxies
US8719451B1 (en) 2007-11-23 2014-05-06 Appcelerator, Inc. System and method for on-the-fly, post-processing document object model manipulation
US8566807B1 (en) 2007-11-23 2013-10-22 Appcelerator, Inc. System and method for accessibility of document object model and JavaScript by other platforms
US8806431B1 (en) 2007-12-03 2014-08-12 Appecelerator, Inc. Aspect oriented programming
US8756579B1 (en) 2007-12-03 2014-06-17 Appcelerator, Inc. Client-side and server-side unified validation
US8819539B1 (en) 2007-12-03 2014-08-26 Appcelerator, Inc. On-the-fly rewriting of uniform resource locators in a web-page
US8527860B1 (en) 2007-12-04 2013-09-03 Appcelerator, Inc. System and method for exposing the dynamic web server-side
US8335982B1 (en) 2007-12-05 2012-12-18 Appcelerator, Inc. System and method for binding a document object model through JavaScript callbacks
US8285813B1 (en) 2007-12-05 2012-10-09 Appcelerator, Inc. System and method for emulating different user agents on a server
US8639743B1 (en) 2007-12-05 2014-01-28 Appcelerator, Inc. System and method for on-the-fly rewriting of JavaScript
US20090182689A1 (en) * 2008-01-15 2009-07-16 Microsoft Corporation Rule-based dynamic operation evaluation
US9164737B2 (en) * 2008-05-16 2015-10-20 Microsoft Technology Licensing, Llc Augmenting programming languages with a type system
US8375356B2 (en) * 2008-06-16 2013-02-12 Microsoft Corporation Tabular completion lists
US20090319991A1 (en) * 2008-06-20 2009-12-24 Microsoft Corporation Managed code type equivalence
US8769397B2 (en) * 2008-06-26 2014-07-01 Google Inc. Embedding macros in web pages with advertisements
US8473897B2 (en) * 2008-10-03 2013-06-25 Microsoft Corporation Common intermediate representation for data scripting language
US7596620B1 (en) 2008-11-04 2009-09-29 Aptana, Inc. System and method for developing, deploying, managing and monitoring a web application in a single environment
US8489388B2 (en) * 2008-11-10 2013-07-16 Apple Inc. Data detection
US20100235730A1 (en) * 2009-03-13 2010-09-16 Microsoft Corporation Consume-first mode text insertion
US8250048B2 (en) * 2009-04-20 2012-08-21 Oracle International Corporation Access control for graph data
US8301660B2 (en) * 2009-07-22 2012-10-30 Oracle International Corporation Enforcing restrictions for graph data manipulation operations
US9298427B2 (en) * 2010-01-06 2016-03-29 Microsoft Technology Licensing, Llc. Creating inferred symbols from code usage
KR101051600B1 (en) * 2010-03-29 2011-07-22 주식회사 소프트 포 소프트 Systems for performing code inspection on abap source code
US8473933B2 (en) 2010-05-12 2013-06-25 Microsoft Corporation Refactoring call sites
US8572591B2 (en) 2010-06-15 2013-10-29 Microsoft Corporation Dynamic adaptive programming
US20110321020A1 (en) * 2010-06-23 2011-12-29 Starview Technology, Inc. Transforming declarative event rules into executable procedures
US8752035B2 (en) * 2011-05-31 2014-06-10 Microsoft Corporation Transforming dynamic source code based on semantic analysis
US8789018B2 (en) * 2011-05-31 2014-07-22 Microsoft Corporation Statically derived symbolic references for dynamic languages
US9256401B2 (en) * 2011-05-31 2016-02-09 Microsoft Technology Licensing, Llc Editor visualization of symbolic relationships
US8555250B2 (en) * 2011-05-31 2013-10-08 Microsoft Corporation Static semantic analysis of dynamic languages
US9098299B2 (en) * 2011-09-16 2015-08-04 Facebook, Inc. Run time incremental compilation of script code
US9542168B2 (en) * 2011-11-10 2017-01-10 Microsoft Technology Licensing Llc Hostable compiler utilizing type information from a host application
US9032378B2 (en) * 2011-12-16 2015-05-12 Microsoft Technology Licensing, Llc Available symbol set generation using untyped variable
US9047100B2 (en) * 2011-12-16 2015-06-02 Microsoft Technology Licensing, Llc Abstract syntax tree transformation
US8924927B2 (en) * 2012-06-01 2014-12-30 Google Inc. Representation and conversion of dynamically-typed arrays
US20140047423A1 (en) * 2012-08-09 2014-02-13 Filip J. Pizlo Runtime State Based Code Re-Optimization
US9292522B2 (en) * 2012-10-04 2016-03-22 Dmytro Shyryayev Method and system for automating the editing of computer files
US8954939B2 (en) 2012-12-31 2015-02-10 Microsoft Corporation Extending a development environment
US9880820B2 (en) 2013-06-02 2018-01-30 Microsoft Technology Licensing, Llc Programming language with extensions using dynamic keywords
US10025571B1 (en) * 2014-07-17 2018-07-17 Google Llc Optimized execution of dynamic languages
US9710361B2 (en) 2015-02-25 2017-07-18 International Business Machines Corporation Smart programming playgrounds

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5361351A (en) * 1990-09-21 1994-11-01 Hewlett-Packard Company System and method for supporting run-time data type identification of objects within a computer program
US5812851A (en) * 1995-03-29 1998-09-22 Sun Microsystems, Inc. Compiler with generic front end and dynamically loadable back ends
US20020099738A1 (en) * 2000-11-22 2002-07-25 Grant Hugh Alexander Automated web access for back-end enterprise systems
US20060130020A1 (en) * 2004-12-14 2006-06-15 Abdullah Mohd H Compile time linking via hashing technique
US7480894B2 (en) * 2004-02-20 2009-01-20 International Business Machines Corporation Method and system for retaining formal data model descriptions between server-side and browser-side javascript objects
US7596620B1 (en) * 2008-11-04 2009-09-29 Aptana, Inc. System and method for developing, deploying, managing and monitoring a web application in a single environment
US7707547B2 (en) * 2005-03-11 2010-04-27 Aptana, Inc. System and method for creating target byte code
US7844958B2 (en) * 2005-03-11 2010-11-30 Aptana, Inc. System and method for creating target byte code
US7958493B2 (en) * 2006-01-20 2011-06-07 Kevin Edward Lindsey Type inference system and method
US7958232B1 (en) * 2007-12-05 2011-06-07 Appcelerator, Inc. Dashboard for on-the-fly AJAX monitoring

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4969132A (en) * 1987-05-21 1990-11-06 Hughes Aircarft Company Delay quantization technique to reduce steering errors in digital beamformers
US4989132A (en) 1988-10-24 1991-01-29 Eastman Kodak Company Object-oriented, logic, and database programming tool with garbage collection
EP0602263A1 (en) * 1992-12-15 1994-06-22 International Business Machines Corporation User interface program generator
US5821851A (en) * 1997-07-01 1998-10-13 Yazaki Corporation Vehicle deceleration sensor and indicator
US7505604B2 (en) * 2002-05-20 2009-03-17 Simmonds Precision Prodcuts, Inc. Method for detection and recognition of fog presence within an aircraft compartment using video images
US7086041B2 (en) * 2003-06-27 2006-08-01 Microsoft Corporation Extensible type system for representing and checking consistency of program components during the process of compilation
US20050043940A1 (en) * 2003-08-20 2005-02-24 Marvin Elder Preparing a data source for a natural language query
US7421680B2 (en) * 2003-09-22 2008-09-02 Microsoft Corporation Persisted specifications of method pre-and post-conditions for static checking

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5361351A (en) * 1990-09-21 1994-11-01 Hewlett-Packard Company System and method for supporting run-time data type identification of objects within a computer program
US5812851A (en) * 1995-03-29 1998-09-22 Sun Microsystems, Inc. Compiler with generic front end and dynamically loadable back ends
US20020099738A1 (en) * 2000-11-22 2002-07-25 Grant Hugh Alexander Automated web access for back-end enterprise systems
US7480894B2 (en) * 2004-02-20 2009-01-20 International Business Machines Corporation Method and system for retaining formal data model descriptions between server-side and browser-side javascript objects
US20060130020A1 (en) * 2004-12-14 2006-06-15 Abdullah Mohd H Compile time linking via hashing technique
US7707547B2 (en) * 2005-03-11 2010-04-27 Aptana, Inc. System and method for creating target byte code
US7844958B2 (en) * 2005-03-11 2010-11-30 Aptana, Inc. System and method for creating target byte code
US7958493B2 (en) * 2006-01-20 2011-06-07 Kevin Edward Lindsey Type inference system and method
US7958232B1 (en) * 2007-12-05 2011-06-07 Appcelerator, Inc. Dashboard for on-the-fly AJAX monitoring
US7596620B1 (en) * 2008-11-04 2009-09-29 Aptana, Inc. System and method for developing, deploying, managing and monitoring a web application in a single environment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Agesen, Ole, Stephen N. Freund, and John C. Mitchell. "Adding type parameterization to the Java language." ACM SIGPLAN Notices. Vol. 32. No. 10. ACM, 1997, pp. 1-17 *
De Sutter, Bjorn, Frank Tip, and Julian Dolby. "Customization of Java library classes using type constraints and profile information." ECOOP 2004-Object-Oriented Programming (2004), pp. 1-25. *
Drossopoulou, Sophia, and Susan Eisenbach. "Java is type safe-probably." ECOOP'97-Object-Oriented Programming (1997): pp.1-30 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080301078A1 (en) * 2007-05-31 2008-12-04 Mark Proctor Method and apparatus to abstract away rule languages
US8418135B2 (en) * 2007-05-31 2013-04-09 Red Hat, Inc. Method and apparatus to abstract away rule languages
US20090306964A1 (en) * 2008-06-06 2009-12-10 Olivier Bonnet Data detection
US8738360B2 (en) * 2008-06-06 2014-05-27 Apple Inc. Data detection of a character sequence having multiple possible data types
US9454522B2 (en) 2008-06-06 2016-09-27 Apple Inc. Detection of data in a sequence of characters
US8943474B1 (en) * 2011-10-26 2015-01-27 The Mathworks, Inc. Code generation and execution for dynamic programming languages
US9135027B1 (en) 2011-10-26 2015-09-15 The Mathworks, Inc. Code generation and execution for dynamic programming languages

Also Published As

Publication number Publication date Type
US7958493B2 (en) 2011-06-07 grant
US20070234288A1 (en) 2007-10-04 application
WO2007084780A3 (en) 2008-04-10 application
WO2007084780A2 (en) 2007-07-26 application

Similar Documents

Publication Publication Date Title
Murphy et al. Lightweight lexical source model extraction
Aho et al. Code generation using tree matching and dynamic programming
Reps et al. The synthesizer generator reference manual
Schordan et al. A source-to-source architecture for user-defined optimizations
Nentwich et al. Flexible consistency checking
World Wide Web Consortium Xsl transformations (xslt) version 2.0
US6182281B1 (en) Incremental compilation of C++ programs
Team R language definition
US6367068B1 (en) Dynamic parsing
US4686623A (en) Parser-based attribute analysis
Benzaken et al. CDuce: an XML-centric general-purpose language
Mamas et al. Towards portable source code representations using XML
Efftinge et al. oAW xText: A framework for textual DSLs
Marlow Haskell 2010 language report
US5161216A (en) Interprocedural slicing of computer programs using dependence graphs
Nipkow et al. Isabelle/HOL: a proof assistant for higher-order logic
US7437374B2 (en) Efficient XML schema validation of XML fragments using annotated automaton encoding
US7774746B2 (en) Generating a format translator
US7703075B2 (en) Programmable annotation inference
US7093231B2 (en) Grammer for regular expressions
US4734854A (en) System for generating software source code components
Bex et al. Inferring XML schema definitions from XML data
US7421680B2 (en) Persisted specifications of method pre-and post-conditions for static checking
Eker et al. CAL language report
US5680622A (en) System and methods for quickly detecting shareability of symbol and type information in header files

Legal Events

Date Code Title Description
AS Assignment

Owner name: APPCELERATOR, INC., CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:DEBREUIL, ROBIN S.;REEL/FRAME:028747/0635

Effective date: 20120807

AS Assignment

Owner name: APPCELERATOR, INC., CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:WASHBURN, DONALD A.;REEL/FRAME:029181/0625

Effective date: 20121019

AS Assignment

Owner name: SILICON VALLEY BANK, CALIFORNIA

Free format text: SECURITY INTEREST;ASSIGNOR:APPCELERATOR, INC.;REEL/FRAME:036442/0008

Effective date: 20150827