Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!apple!bionet!ig!arizona!rts From: rts@arizona.edu (Rick Snodgrass) Newsgroups: comp.software-eng Subject: Interface Description Language (IDL) Message-ID: <14012@megaron.arizona.edu> Date: 14 Sep 89 18:24:47 GMT Organization: U of Arizona CS Dept, Tucson Lines: 90 >> From: Will@cup.portal.com (Will E Estes) >> Subject: How Do Interface Description Languages Work? >> Date: 12 Sep 89 23:48:37 GMT >> >> Can someone explain at a high level what an interface description >> language (IDL) is? My understanding is that IDL is a pre-processor >> to an existing language such as C that implements a high-level >> language that is well-suited to dealing with complicated data structures >> like those found in compilers. First, there are many "interface description languages", of which one particular one, IDL, is perhaps the best known. Second, IDL is a specification *language*, not a particular tool. One describes complex data structures, such as those passed between tools in programming environments (e.g., syntax trees, symbol tables, cross references), in IDL. A tool, the IDL translator, then generates for several target languages both data declarations and runtime code to read instances, write instances, and manipulate instances when in a process' address space. The target languages C, Pascal, Modula-2/3, and Ada have been supported at various times by various translators; our toolkit supports both C and Pascal. >> Now, with that said, can someone >> answer the following: >> >> 1) what is it about the IDL language that makes it better suited to >> dealing with C data structures than C itself? IDL is target-language independent, allowing tools written in different languages to communicate complex data instances. However, it embraces most of the data structures that C gives you: nodes (similar to structs), classes (similar to unions), directed graphs (similar to pointers), as well as providing an escape mechanism known as private types for doing anything in the target language you wish. Also, since the readers, writers, and runtime code are generated automatically, you don't have to write it yourself. Finally, since the data structure is specified at an abstract level, there are significant opportunities for optimization. >> >> 2) can someone quantify what kind of performance benefits can be >> expected using IDL over using just C? This question is analogous to asking what are the performance benefits of using Pascal or Fortran over assembly language. One, the performance comparison depends heavily on the individual compiler used; two, it depends on the nature of the programs; and three, it ignores the substantial programming-in-the-small and programming-in-the-large benefits of using the new technology. Finally, it is an apples and oranges comparison. I have a paper coming out in IEEE Trans Software Engineering in November that compares several implementations of IDL for the C target language. To quote from the conclusion, "Our goal was to develop a mapping from IDL structures to C that is type safe, compile-time efficient, runtime efficient both in space and time, and easy to use. Our solution is a translator which automatically produces C macros and data declarations. Through the use of the C data structuring facilities and macros, our system met the goals of language coverage, type safety and runtime efficiency without any of the limitations imposed by the other implementations examined. The goals of compile-time efficiency and good user interface were only partially met. A new preprocessor, currently being implemented, appears to achieve all five goals." The paper presents the relevant details. >> >> I have had several sources suggest some good books on this topic, and >> I may get around to buying and reading these someday ( :). So far >> I haven't been able to find anyone who understands enough about IDL >> to be able to answer the two specific questions I ask above without >> resorting to saying that I "should read the book." Can someone >> here who has experience with IDL give me concise answers to my questions? >> >> Thanks, >> Will ------- End of Forwarded Message My advice is also to "read the book", since I am the author of one of them ;^). Richard Snodgrass Department of Computer Science University of Arizona Tucson, AZ 85721 rts@arizona.edu