Abstract
Type inference and type reconstruction derive static types for program elements that have no static type associated with them. They have a wide range of usage, such as helping to eliminate the burden of manually specifying types, verifying whether a program is type-safe, helping to produce more optimized code or helping to understand programs. While type inference and type reconstruction is an active field of research, most existing techniques are interested foremost in the precision of their approaches, at the expense of execution speed. As a result, existing approaches are not suited to give direct feedback in development environments, where interactivity dictates very fast approaches. This paper presents a type reconstruction algorithm for variables that is extremely fast (in the order of milliseconds) and reasonably precise (75 percent). The system is implemented as a byte-code evaluator in several Smalltalk environments, and its execution speed and precision are validated on a number of concrete case studies.
- O. Agesen. The cartesian product algorithm. In W. Olthoff, editor, Proceedings ECOOP '95, volume 952 of LNCS, pages 2--26, Aarhus, Denmark, Aug. 1995. Springer-Verlag. Google Scholar
Digital Library
- G. Bracha and D. Griswold. Strongtalk: Typechecking Smalltalk in a production environment. In Proceedings OOPSLA '93, ACM SIGPLAN Notices, volume 28, pages 215--230, Oct. 1993. Google Scholar
Digital Library
- L. Cardelli. Type systems. In A. B. Tucker, editor, The Computer Science and Engineering Handbook, chapter 103, pages 2208--2236. CRC Press, Boca Raton, FL, 1997.Google Scholar
- Chailloux. Développement d'applications avec Objective CAML. O'Reilly, 2000.Google Scholar
- M. Furr, J. hoon (David) An, J. S. Foster, and M. Hicks. Static type inference for ruby. To appear in OOPS track, SAC 2009, 2009. Google Scholar
Digital Library
- E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison Wesley, Reading, Mass., 1995. Google Scholar
Digital Library
- K. Mens, I. Michiels, and R. Wuyts. Supporting software development through declaratively codified programming patterns. SEKE 2001 Special Issue of Elsevier Journal on Expert Systems with Applications, 2001.Google Scholar
- J. Palsberg and M. I. Schwartzbach. Object-oriented type inference. In Proceedings OOPSLA '91, ACM SIGPLAN Notices, volume 26, pages 146--161, Nov. 1991. Google Scholar
Digital Library
- L. Paulson. ML for the Working Programmer. Cambridge University Press, 1991. Google Scholar
Digital Library
- R. Robbes and M. Lanza. How program history can improve code completion. In ASE: 23rd IEEE/ACM International Conference on Automated Software Engineering (ASE 2008), 15-19 September 2008, L'Aquila, Italy, pages 317--326, 2008. Google Scholar
Digital Library
- M. Salib. Starkiller: A static type inferencer and compiler for python. Master's thesis, Massachusetts Institute of Technology, may 2004.Google Scholar
- The scala programming language. http://lamp.epfl.ch/scala/.Google Scholar
- S. A. Spoon and O. Shivers. Demand-driven type inference with subgoal pruning: Trading precision for scalability. In Proceedings of ECOOP'04, pages 51--74, 2004.Google Scholar
Cross Ref
- S. A. Spoon and O. Shivers. Dynamic data polyvariance using source-tagged classes. In R. Wuyts, editor, Proceedings of the Dynamic Languages Symposium'05, pages 35--48. ACM Digital Library, 2005. Google Scholar
Digital Library
- S. Thompson. Haskell: The Craft of Functional Programming (2nd edition). Addison Wesley, Reading, Mass., 1999. Google Scholar
Digital Library
- T. Wang and S. F. Smith. Precise constraint-based type inference for java. In G. Goos, J. Hartmanis, and J. van Leeuwen, editors, Proceedings ECOOP '01, volume 2072 of LNCS, pages 99--118, Budapest, Hungary, June 2001. Springer-Verlag. Google Scholar
Digital Library
Index Terms
Fast type reconstruction for dynamically typed programming languages
Recommendations
Fast type reconstruction for dynamically typed programming languages
DLS '09: Proceedings of the 5th symposium on Dynamic languagesType inference and type reconstruction derive static types for program elements that have no static type associated with them. They have a wide range of usage, such as helping to eliminate the burden of manually specifying types, verifying whether a ...
Type elaboration and subtype completion for Java bytecode
Java source code is strongly typed, but the translation from Java source to bytecode omits much of the type information originally contained within methods. Type elaboration is a technique for reconstructing strongly typed programs from incompletely ...
Polymorphic algebraic data type reconstruction
PPDP '06: Proceedings of the 8th ACM SIGPLAN international conference on Principles and practice of declarative programmingOne of the disadvantages of statically typed languages is the programming overhead caused by writing all the necessary type information: Both type declarations and type definitions are typically required. Traditional type inference aims at relieving the ...









Comments