[Colloquium] Today: Chunyan Song/M.S. Presentation/Nov. 15, 2004

Margaret Jaffey margaret at cs.uchicago.edu
Mon Nov 15 09:44:14 CST 2004


Chunyan Song's Master's Presentation will be held this afternoon.

------------------------------------------------

Date:  Monday, November 15, 2004

Time:  1:30 p.m.

Place:  Ryerson 251

M.S. Candidate:  Chunyan Song

M.S. Paper Title: Application Specific Foreign Interface Generation

Abstract:

In the past few years, implementers of high-level languages have come
to appreciate the importance of effective mechanisms for connecting
to libraries written in low-level languages, which are called foreign
interfaces for high-level languages. At the early time, foreign
interfaces (FIs) were written by hand. Programmers wrote wrapper code
around functions and data to make them accessible for high-level
languages. The handwriting method is tedious and prone to errors,
so it is necessary to automate the foreign interface generation.
One early approach of automating FI generation was to use existing
Interface Description Languages (IDLs) to specify foreign interfaces.
More recently, tools that process raw C header files have been
developed. These tools have the advantage that they require little user
intervention, but they produce large, low-level interfaces that are
often ill suited to the high-level programming model.

There are two major concerns in designing a foreign interface generation
tool. The first is how well the interface code is generated according to
the users' intention, which we call the "application specific" feature.
The second is automation efficiency: does it bring much convenience
to users, as well as avoid mistakes and improve correctness? In fact,
automation efficiency and result quality often conflict with each
other. Most existing FI tools choose a certain balance point between
these two factors, and do not leave much flexibility to the users. In
other words, these tools choose a fixed set of policies and build it
into their mechanisms. Based on this observation, we have designed and
implemented FIG, an application specific FI generator. In this thesis,
I will discuss foreign interface design and introduce the FIG system,
especially the system architecture and theoretical bases, such as term
rewriting and type-mapping.

This thesis is organized into three parts. The first part discusses the
major topics in foreign interface design, and how the existing FI tools
handle these problems. It gives a brief summary of the design space of
the foreign interfaces, and classifies the current techniques in the
design space.

The second part describes the architecture of the FIG system and its
position in the design space. It introduces two main theoretical
bases of FIG. One is term rewriting, a powerful method for program
transformations, which allows users to construct strategies (polices)
to guide the rewriting procedure. Term rewriting is a natural fit to
implement the "application specific" feature. The other is type-mapping,
an idea of mapping low-level types to high-level types and vice
versa. We use the type-mapping idea to implement data marshalling and
unmarshalling between low-level and high-level representations. Through
the work of FIG, we found that type-maps are constructable, and we plan
to develop a calculus for type-mapping in the near future.

The third part is a manual of FIG. It explains how to use FIG script
to write the strategies for FI generation. And it describes the
specification of FIG IDL -- the intermediate program representation,
which can be converted to various high-level languages.

---------------------------------------

Advisor: Prof. John Reppy

A draft copy of Chunyan Song's MS Paper is available in Ry 161A.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Margaret P. Jaffey				margaret at cs.uchicago.edu
Department of Computer Science
Student Support Rep (Ry 161A)		(773) 702-6011
The University of Chicago		http://www.cs.uchicago.edu
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-




More information about the Colloquium mailing list