Adding Inner Functions to C

by
Michael Levine

Abstract:

Inner functions are functions defined inside the scope of another function. They are a valuable tool, available in many programming languages, but not standard C. They are especially useful when dealing with libraries or other code the requires a function to indicate some amount of "work" to be done, for example iterators over some data structure. In this talk, I will describe how we added inner functions to C--how they are defined and called, and how they interact with their enclosing functions. We modified an existing C analysis and transformation tool to parse our extended version of C, and transform it into standard C. The transformation creates closures for inner functions that allow recursion, and respects standard C scoping rules.

Advised by Ben Ylvisaker and Carl Ebeling

CSE 403
Wednesday
May 16, 2007
4:30 - 5:20 pm