A type-checking preprocessor for Cilk 2, a multithreaded C language
Year: 1995
Type: dissertation
Abstract: This thesis describes the type-checking, optimizing translator that translates Cilk (a C extension language for multithreaded parallel programming) into C.The Cilk-to-C translator is based on C-to-C, a tool I developed that parses, type checks, analyzes, and regenerates a C program. With a translator based on C-to-C, developers and users of C extension languages can enjoy the benefits of a type-checking, optimizing compiler without the attendant development and porting costs. Like a compiler, the Cilk-to-C translator runs quickly, does static checking, and generates efficient code, making it fit for everyday use by ordinary programmers. Unlike a compiler, however, the Cilk-to-C translator is easy to develop, extend, and port to other platforms. About 90% of the development effort was devoted to Cilk semantics (translating Cilk into C), which is where a language developer wants to focus. Only a small amount of work was spent extending C-to-C's parsing, type checking, and data-flow analysis to recognize Cilk. In return for a few weeks of full-time effort, I obtained a type-checking, optimizing translator for Cilk that targets any platform with an ANSI C compiler. With C-to-C, other C extension language developers can obtain the same benefits.C-to-C has a number of special features that make it a good framework for C extension language translators. First, its C output is human-readable, so that a language developer or programmer can read and debug it.C-to-C also provides operational transparency (reproducing nonsyntactic source features like line numbering and indentation), which contributes to the readability and portability of its C output and assists debuggers and profilers.C-to-C performs data-flow analysis directly on the high-level abstract syntax tree of the source program, so that its C output is also high-level, not unreadable "assembly language written in C." Finally, C-to-C provides a generic data-flow analysis abstraction, in which any monotonic data-flow problem needed for optimization can be specified and solved automatically. These features greatly simplify the task of writing a type-checking, optimizing translator for an arbitrary C extension language.
Author: Robert C. Miller
Institution: Massachusetts Institute of Technology
Language: English
Subfield: Software
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W1525801142
