Skip to main content
Article thumbnail
Location of Repository

Modular, parsing-based, flow analysis of dictionary data structures in scripting languages

By David A. Schmidt

Abstract

Abstract. We design and implement a modular, constant-propagationlike forwards flow analysis for a Python subset containing strings and dictionaries (hash tables). The analysis infers types of dictionaries and the functions and modules that use them. Unlike records and class-based objects, dictionaries are wholly dynamic, and we employ a domain of dictionary types that delineate which fields a dictionary must have. We have deliberately omitted unification-based inference and row variables to obtain the benefits of a forwards analysis that matches a programmer’s intuitions. Nonetheless, to accommodate a modular analysis, the values of parameters and free (global) variables are represented by tokens to which are attached constraints. At link- and function-call-time, the constraints are matched against the actual values of arguments and global variables. Finally, programmers are encouraged to use a BNF-like syntax to define the forms of data types employed in their scripts. The analysis uses the programmer-written BNF rules to “abstractly parse ” program phrases and associate them with derivations possible from the programmer-defined grammars. A prototype of the system is under construction.

Year: 2013
OAI identifier: oai:CiteSeerX.psu:10.1.1.352.6707
Provided by: CiteSeerX
Download PDF:
Sorry, we are unable to provide the full text but you may find it at the following location(s):
  • http://citeseerx.ist.psu.edu/v... (external link)
  • http://santos.cis.ksu.edu/schm... (external link)
  • Suggested articles


    To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.