Invention Grant
- Patent Title: Systems and methods for converting typed code
- Patent Title (中): 用于转换类型代码的系统和方法
-
Application No.: US14010266Application Date: 2013-08-26
-
Publication No.: US09329849B2Publication Date: 2016-05-03
- Inventor: Julien Marcel Verlaguet
- Applicant: Facebook, Inc.
- Applicant Address: US CA Menlo Park
- Assignee: Facebook, Inc.
- Current Assignee: Facebook, Inc.
- Current Assignee Address: US CA Menlo Park
- Agency: Sheppard Mullin Richter & Hampton LLP
- Main IPC: G06F9/45
- IPC: G06F9/45 ; G06F9/38

Abstract:
Techniques provided implement automatic data type annotation in dynamically-typed source code. A codebase, which may comprise a plurality of source code files, is scanned at a global level. The resulting scanned data may describe characteristics of the codebase, including variable and function usage. Based on inferences drawn from the scanning, data types are determined for different variables, expressions, or functions to facilitate conversion from dynamically-typed source code to statically-typed source code. For example, if a function is called once with a parameter value of data type A (e.g., class A), and another time with a parameter value of data type B (e.g., class B), a conversion tool may annotate the parameter variable in the declaration of the function with a data type D (e.g., class d) when data type D is identified as a common ancestor (e.g., superclass) to both data type A and data type B.
Public/Granted literature
- US20150058830A1 SYSTEMS AND METHODS FOR CONVERTING TYPED CODE Public/Granted day:2015-02-26
Information query