Class Morphing: Safely Shaping a Class in the Image of Others

  • Yannis Smaragdakis | Department of Computer and Information Science, University of Oregon

Programming language evolution leverages different abstraction techniques. The first high-level programming languages leveraged procedural abstraction. The next major step was languages that provided safe type abstraction (polymorphism). The next big step may be called “structural abstraction”: abstraction over the structure of other program elements. The “hello world” of structural abstraction is a modular, generic logger: given any class X, produce a logged version that contains the exact same methods as X but logs each method’s return value. The challenge is to express this logging functionality in a high-level way that allows modular reasoning and checking, independently of the program elements it is applied to. This is the purpose of the structural abstraction technique of “class morphing” presented in this talk. Class morphing allows completely modular type checking: generic morphing code can be checked independently of its uses. Thus, the possibility of supplying a type parameter that will lead to invalid code is detected early-—an invaluable feature for highly general components that will be statically instantiated by other programmers.

Speaker Details

Yannis Smaragdakis is an Associate Professor at the University of Oregon. His interests are in the areas of applied programming languages and software engineering. He got his B.S. degree from the University of Crete (Greece) and his Ph.D. from the University of Texas at Austin. He is a recipient of an NSF Career award, and “best paper” awards at ASE’07, ISSTA’06, GPCE’04, and USENIX’99. Yannis has authored numerous publications, and claims that “some are even good”.More information on his work can be found at: http://www.cs.uoregon.edu/~yannis