Welcome to the new version of CaltechAUTHORS. Login is currently restricted to library staff. If you notice any issues, please email coda@library.caltech.edu
Published January 1, 1982 | public
Report Open

Type Inference in a Declarationless, Object-Oriented Language

Abstract

In recent years, two developments in the design of programming languages have yielded significant improvements in a number of areas from the standard FBAPP programming model. These are the object-oriented paradigm, and variable polymorphism. The object-oriented programming model allows the specification, hence restriction of the operations allowed on a data structure, something not possible with the more traditional PASCAL-style record structuring. This ability to encapsulate data from the outside world gives a greater security and error avoidance in very large software projects involving many programmers. In addition, the object-oriented style is conceptually easy to program in, providmg a useful framework for the subdivision of large problems into manageable pieces. This property is essential for the rapid and reliable implementation of large software systems. Variable polymorphism refers to the ability of variables to change types at runtime. This is in contradistinction to typelessness (as in BLISS) where variables have no types associated with them. In most cormon languages, the programmer must declare the types of all the variables he uses; these types are then static throughout the execution of the program. Declarations allow the compiler to produce efficient code and to identify errors whose detection must otherivlse be deferred until runtime; however, they sacrifice a good deal of the generality which is possible with less stringent variable binding schemes. On the other hand, languages which don't require declarations, and whch allow variables to change types, such as SNOBOL and LISP, provide this generality by virtue of their extremely late binding, but thereby sacrifice efficiency. SMALLTALK is perhaps the purest language which embodies both object- orientedness and declarationlessness. Unfortunately, these two features, while of great benefit in increasing programmer productivity and program reliability, suffer heavily from the point of view of runtime efiiciency. The project is to investigate ways to obtain the udeniable advantages of polymorphism and object-orientedness, without sacrificing runtime efficiency. More specifically, the goal is to build a compiler for a dialect of SMALLTALK for the VAX under UNIX (Berkeley 4.lbsd), which incorporates data-flow type inference algorithms enabling it to produce executable programs of an efficiency comparable to that of programs produced by compilers for more traditional but less powerful languages. The optimization methods are described, test results are examined, and indications of future directions are given.

Files

5035_TR_82.pdf
Files (11.4 MB)
Name Size Download all
md5:694fd4a090a5d66734c2bd8d446eadd9
5.4 MB Preview Download
md5:cef13edb8b9da4b2016ea933fe5478ea
6.1 MB Download

Additional details

Created:
August 19, 2023
Modified:
December 22, 2023