US2016034261A1PendingUtilityA1

Augmenting Programming Languages with a Type System

49
Assignee: MICROSOFT TECHNOLOGY LICENSING LLCPriority: May 16, 2008Filed: Sep 4, 2015Published: Feb 4, 2016
Est. expiryMay 16, 2028(~1.8 yrs left)· nominal 20-yr term from priority
G06F 8/437G06F 8/34G06F 8/36
49
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

Described is a technology by which metadata augments a programming language such as JavaScript. Software components such as application programming interfaces are associated with metadata. When a software component is selected for use, such as when putting together a computer program in a graphical programming environment, its corresponding metadata is accessed. The metadata may be used to validate the usage of the software component, such as to validate a constraint associated with a value, provide a default value, validate a value's type, and/or determine whether a value is required. Validation may also determine whether data output by one software component is of a type that is appropriate for input by another software component. In addition to validation via type metadata, the metadata may provide descriptive information about the selected software component, such as to assist the programmer and/or provide further information to the programming environment.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
         1 . A method comprising:
 providing a set of metadata identifying a data type for each programming language code component of a plurality of programming language code components that are written in a dynamically-typed programming language;   detecting a connection of a graphical representation of a first programming language code component onto a user interface surface in a development environment, the placement graphically connecting the graphical representation of the first programming language code component to at least one graphical representation of a second programming language component of the plurality of the programming language code components;   validating usage of the first programming language code component based on a data type specified by a first set of metadata for the first programming language code component; and   inserting executable code into the first programming language component that converts one data type to an appropriate type for input or output to provide the first set of metadata to a runtime system for enhanced type matching during execution.   
     
     
         2 . The method of  claim 1  wherein detecting the usage of the first programming language code component comprises providing a graphical user interface for selecting and interacting with the first programming language code component. 
     
     
         3 . The method of  claim 1  wherein accessing the sets of metadata to select a selected set of metadata occurs in response to detecting the placement. 
     
     
         4 . The method of  claim 1  wherein using the first set of metadata in conjunction with the first programming language code component comprises validating a constraint associated with a value, providing a value with default data, validating a value's type, or determining whether a value is required, or any combination of validating a value's constraint, providing a value with default data, validating a value's type, or determining whether a value is required. 
     
     
         5 . The method of  claim 1  wherein the first programming language code component is connected to output information for input by another component, and wherein using the first set of metadata comprises determining whether a type of information output by the selected programming language code component is appropriate for input by the other component. 
     
     
         6 . The method of  claim 1  wherein the first programming language code component is connected to input information output by another component, and wherein using the first set of metadata comprises determining whether a type of information output by the other component is appropriate for input by the first programming language code component. 
     
     
         7 . The method of  claim 1  wherein using the selected set of metadata comprises providing descriptive information corresponding to the selected programming language code component. 
     
     
         8 . The method of  claim 1  wherein in response to the placement, assessing a provided set of metadata specifying the data type for the first programming language code component. 
     
     
         9 . An apparatus comprising:
 a runtime preparation system coupled to a design surface by which programming code is developed via placement of icons, the icons comprising graphical representations of reusable components of the programming code, the plurality of reusable software components programmed in a dynamically-typed programming language;   a development environment configured to access sets of metadata, each set of metadata to identify a data type corresponding to a component of the plurality of reusable components, and validate usage of a first reusable software component based on a data type identified in a corresponding first set of metadata in response to placement of a first icon corresponding to a first reusable software component on the design surface in connection with a second icon representing a second reusable software component;   a runtime system configured to run the programming code and use the first set of metadata to validate execution of the programming code at runtime by performing enhanced type matching during execution, including inserting executable code into the selected programming language component that converts one data type to an appropriate type for input or output; and   the development environment operative to provide program metadata or executable code, or both program metadata and executable code for the programming code, to the runtime system.   
     
     
         10 . The apparatus of  claim 9 , wherein the runtime system comprises an interpreter that interprets the program metadata and an engine that runs the interpreter or the executable code. 
     
     
         11 . The system of  claim 9  wherein the part of the programming code comprises a software component having a defined interface for coupling to at least one other software component. 
     
     
         12 . The system of  claim 11  wherein the software component is represented as an icon, wherein the programming code is developed in part by placing the icon on a design surface of the user interface, and wherein the first set of metadata is selected upon placing the icon. 
     
     
         13 . The system of  claim 9  further comprising type rules and logic that validates the part of the programming code based upon type data in the corresponding first set of metadata. 
     
     
         14 . The system of  claim 9  wherein the first set of metadata comprises at least some data defined according to an extensible markup language (XML) schema. 
     
     
         15 . The system of  claim 9  wherein the programming code comprises JavaScript, European Computer Manufacturers Association (ECMA)Script, or JScript. 
     
     
         16 . The system of  claim 9  further comprising a descriptive output mechanism that provides descriptive information with respect to the part of the programming code, the descriptive information based upon information maintained in the corresponding selected set of metadata. 
     
     
         17 . An article of manufacture comprising a computer-readable storage medium containing processor-executable instructions that, when executed by a system, cause a system to:
 provide a design surface comprising icons representing software components programmed in a dynamically-typed programming language;   detect a selection of an icon representing a software component based on a first set of data and connection of the icon to at least one other icon of the design surface;   use the second set of data to provide descriptive information, and   validate usage of the software component based on the data type identification in the third set of data to provide a type system for the software component that does not rely upon inference by enforcing at least one constraint, setting a default value, and validating at least one type corresponding to at least one data value of the software component by inserting executable code into the software component that converts one data type to an appropriate type for input or output during execution of the software component.   
     
     
         18 . The article of  claim 17  wherein the second set of data comprises text, or a reference to text, graphical data that may be rendered via a user interface, or a reference to graphical data that may be rendered via a user interface, or any combination of text, a reference to text, graphical data or a reference to graphical data. 
     
     
         19 . The article of  claim 17  wherein the third set of data comprises type data corresponding to a type of data that the software component inputs, outputs or both inputs and outputs. 
     
     
         20 . The article of  claim 17  wherein the third set of data comprises at least one of a constraint associated with a value, at least one of default data for a value, at least one of type information for a value, or data that indicates whether a value is required, or any combination of a constraint associated with a value, default data for a value, type system information for a value, or at least one of data that indicates whether a value is required.

Cited by (0)

No later patents cite this yet.

References (0)

No backward citations on record.