From: Buc Richards
Subject: Porting KCL C code
Date: 
Message-ID: <7993@lindy.Stanford.EDU>
KCL (Kyoto Common Lisp) translates programs from Lisp to C and then
compiles the C to generate compiled programs.  Is the C code generated
complete?  Can the intermediate C code be compiled on another machine,
say a 386 machine, and work?  Or does the code require the KCL
environment?

Thanks.


        Buc Richards                              @ @
        Supercomputer Support Staff                 >
        Stanford University                        -

From: Paul Verket
Subject: Re: Porting KCL C code
Date: 
Message-ID: <304@venice.SEDD.TRW.COM>
From article <····@lindy.Stanford.EDU>(Buc Richards):
> 
> KCL (Kyoto Common Lisp) translates programs from Lisp to C and then
> compiles the C to generate compiled programs.  Is the C code generated
> complete? 

No it's not complete. The C code is compiled into a .o which is then
linked (by KCL) into the KCL image.

			Paul Verket
From: Jeff Dalton
Subject: Re: Porting KCL C code
Date: 
Message-ID: <1739@skye.ed.ac.uk>
In article <····@lindy.Stanford.EDU> ·····@lindy.Stanford.EDU (Buc Richards) writes:
>
>KCL (Kyoto Common Lisp) translates programs from Lisp to C and then
>compiles the C to generate compiled programs.  

>Is the C code generated complete?

I'm not quite sure what you mean.  It can be compiled by the C
compiler.  But it's a bunch of procedure definitions, not a complete
program.

>Can the intermediate C code be compiled on another machine,
>say a 386 machine, and work?

The intermediate code is fairly portable, so it will probably compile.

>Or does the code require the KCL environment?

It calls procedures that are part of the KCL system and it expects
to be loaded into a running KCL.  It would not be too hard to hard
to link it together with the files that make up KCL instead.  If you
wanted to convert KCL into a library and have the compiler compile
files that had to be linked with that library, it would probably be
possible to do that.  But that isn't how it works now.

I would be surprised if any Lisp -> C generated C code that didn't
even have to be linked with a library of procedures for manipulating
Lisp data structures.

-- Jeff
From: Gus
Subject: Re: Porting KCL C code
Date: 
Message-ID: <1990Feb14.163819.13849@cs.pitt.edu>
In article <····@skye.ed.ac.uk> ····@aiai.UUCP (Jeff Dalton) writes:
>In article <····@lindy.Stanford.EDU> ·····@lindy.Stanford.EDU (Buc Richards) writes:
>>
>>KCL (Kyoto Common Lisp) translates programs from Lisp to C and then
>>compiles the C to generate compiled programs.  
>
>>Is the C code generated complete?
>
>I'm not quite sure what you mean.  It can be compiled by the C
>compiler.  But it's a bunch of procedure definitions, not a complete
>program.
>

>The intermediate code is fairly portable, so it will probably compile.
>
>>Or does the code require the KCL environment?
>
>It calls procedures that are part of the KCL system and it expects
>to be loaded into a running KCL.  It would not be too hard to hard
>to link it together with the files that make up KCL instead.  If you
>wanted to convert KCL into a library and have the compiler compile
>files that had to be linked with that library, it would probably be
>possible to do that.  But that isn't how it works now.
>

Has anyone done this?  I would like to be able to run compiled lisp
code outside of the KCL environment.  Any info appreciated.

Brian
-----
·····@cs.pitt.edu
From: Ronald BODKIN
Subject: Re: Porting KCL C code
Date: 
Message-ID: <2186@quiche.cs.mcgill.ca>
In article <····@lindy.Stanford.EDU> ·····@lindy.Stanford.EDU (Buc Richards) writes:
>
>KCL (Kyoto Common Lisp) translates programs from Lisp to C and then
>compiles the C to generate compiled programs.  Is the C code generated
>complete?  Can the intermediate C code be compiled on another machine,
>say a 386 machine, and work?  Or does the code require the KCL
>environment?
	The code will compile, but you would need to at least emulate
a number of fairly fundamental environmental assumptions (e.g.
some lisp stacks, calling protocols, some functions) so essentially
you do need the environment.  It would be neat to have a LISP which
could create complete, independent modules, but due to the way people
write lisp it would probably still have to package in alot of LISP 
functions...
		Ron