David R. Hansonis a Professor of Computer Science at Princeton University with more than 20 years of research experience in programming languages. He has conducted research in conjunction with Bell Laboratories and is the co-author oflcc, a production quality, research compiler for the C language that is popular with the Unix community. lcc is presented and analyzed in the book<A HREF="http://www.aw.com/cseng/titles/0-8053-1670-1/">A Retargetable C Compiler:
more >>
David R. Hansonis a Professor of Computer Science at Princeton University with more than 20 years of research experience in programming languages. He has conducted research in conjunction with Bell Laboratories and is the co-author oflcc, a production quality, research compiler for the C language that is popular with the Unix community. lcc is presented and analyzed in the bookA Retargetable C Compiler: Design and Implementation, by Christopher Fraser and David Hanson (c) 1995, Addison-Wesley.
0201498413AB04062001
Every programmer and software project manager must master the art of creating reusable software modules; they are the building blocks of large, reliable applications. Unlike some modern object-oriented languages, C provides little linguistic support or motivation for creating reusable application programming interfaces (APIs). While most C programmers use APIs and the libraries that implement them in almost every application they write, relatively few programmers create and disseminate new, widely applicable APIs.C Interfaces and Implementationsshows how to create reusable APIs using interface-based design, a language-independent methodology that separates interfaces from their implementations. This methodology is explained by example. The author describes in detail 24 interfaces and their implementations, providing the reader with a thorough understanding of this design approach.
Features ofC Interfaces and Implementations:
- Concise interface descriptions that comprise a reference manual for programmers interested in using the interfaces.
- A guided tour of the code that implements each chapter's interface tp help those modifying or extending an interface or designing related interfaces.
- In-depth focus on "algorithm engineering:" how to package data structures and related algorithms into reusable modules.
- Source code for 24 APIs and 8 sample applications is examined, with each presented as a "literate program" in which a thorough explanation is interleaved with the source code.
- Rarely documented C programming tricks-of-the-trade.
- Convenient access to all source code in the book via the World Wide Web athttp://www.cs.princeton.edu/software/cii/
0201498413B04062001Programmers are inundated with information about application programming interfaces, or APIs. Yet, while most programmers use APIs and the libraries that implement them in almost every application they write, relatively few create and disemminate new, widely applicable, APIs. Indeed, programmers seem to prefer to "roll their own" instead of searching for a library that might meet their needs, perhaps because it is easier to write application-specific code than to craft well-designed APIs.
I'm as guilty as the next programmer: lcc, a compiler for ANSI/ISO C written by Chris Fraser and myself, was built from the ground up. (lcc is described inA Retargetable C Compiler: Design and Implementation, Addison-Wesley, 1995.) A compiler exemplifies the kind of application for which it is possible to use standard interfaces and to create interfaces that are useful elsewhere. Examples include interfaces for memory management, string and symbol tables, and list manipulation. But lcc uses only a few routines from the standard C library, and almost none of its code can be used directly in other applications.
This book advocates a design methodology based on interfaces and their implementations, and it illustrates this methodology by describing 24 interfaces and their implementations in detail. These interfaces span a large part of the computing spectrum and include data structures, arithmetic, string processing, and concurrent programming. The implementations aren't toys - they're designed for use in pr
<< less