Inferring type definitions of user-defined types of variables in application program code
Abstract
Type definitions of user-defined types in application program code for which definitions are absent (“unknown types”) are inferred. A static analyzer implements two passes of a fixed-point type inference algorithm. Each pass encompasses a plurality of traversals of the application's control flow to build inferred definitions of unknown types until the inferred definitions are maximally built. To build an inferred definition, based on inferring a variable is an unknown type, the static analyzer infers member variables/functions of the unknown type based on contextual information associated with the variable. Type information of unknown types is propagated along control flow paths. After the first pass terminates, unknown types can be assigned known types based on matching of inferred definitions. Inferred definitions of remaining unknown types are incorporated into the application program code. A second pass of type inferencing and data flow analysis are then performed with the inferred definitions incorporated therein.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 4 · Forward citations: 0.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method comprising: statically analyzing program code of an application over a plurality of iterations, wherein the program code is included in one or more files of the application, and wherein statically analyzing the program code over the plurality of iterations comprises traversing a control flow graph of the application in each of the plurality of iterations to, determine that an expression or statement identified in the program code of the application comprises a variable that has a user-defined type; determine if a definition of the user-defined type is known based on the program code o
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (4)
Non-Patent Literature (5)
- Chin et al., “Inference of User-Dened Type Qualiers and Qualier Rules” (Year: 2005).
- Dong et al., “Static Type Analysis for Python” (Year: 2014).
- Duggan et al., “Explaining type inference” (Year: 1996).
- Harrison et al. “Structure Editors: User-Defined Type Values and Type Inference” (Year: 2000).
- Van Der Weijde, “Type inference for PHP”, Jan. 11, 2017, Centrum Wiskunde & Informatica, https://homepages.cwi.nl/˜jurgenv/theses/RuudVanDerWeijde.pdf, Date of Access Feb. 9, 2023.