Common LISP is a standard dialect of LISP which has been implemented on a wide range of machines. One serious flaw in the Common LISP standard, at least to Common LISP users on general purpose computer, is the lack of the definition of Foreign Language Interface, or FLI. Without FLI, Common LISP system can not be integrated smoothly with its environment, and its usefulness may be fatally impaired. FLI enables the user to utilize full power of operating system services and makes it possible to use non-LISP codes.
In this thesis, after surveying implementations of FLI, determined is what a standard Common LISP FLI might be. We began by defining the features of FLI as foreign-calling, foreign-loading, and foreign-types. According to these three categories, various techniques and trade-offs of implementation strategies are discussed. Kyoto Common LISP(KCL), as its implementation environment.
FLI Capabilities designed and implemented are as follows. First, users are free to use functions in any form of source code, compiled object code, and library files. Second, the system provides loading facility, so the users don't have to link foreign files explicitly by themselves. Third, in a LISP session, users can define and create non-LISP data type, as well as referencing and modifying foreign data variables. To verify and demonstrate its functionality and usefulness, several Clanguage programs are integrated with LISP environment. Each of the program is a typical case of FLI demands-graphic processing, terminal I/O control, complicated mathematical computation, etc. Through these test programs, our design and implementation was demonstrated working well.