Re: [lkb] Morphological transducer in the LKB, ACL versus MCL
"Emily M. Bender" <[email protected]> Tue, 26 Apr 2005 15:34:11 -0700
| Newsgroups | gmane.comp.ai.lkb |
|---|---|
| Message-ID | <[email protected]> |
Thanks, John. Emily On Tue, Apr 26, 2005 at 10:26:40AM +0100, John Carroll wrote: > Jeff, > > I've found a better solution to this problem. It's a bit of code that > you can execute before loading tduce.lsp (or any other add-on) into the > MCL runtime version of the LKB. It prevents any attempt to use the > compiler so you shouldn't get that error message. But when you run the > tduce.lsp code you might find it goes very slow (since it has to be run > by the lisp interpreter). In that case we will have to work out how to > include the functionality in the LKB itself. > > John > > ------ > #+mcl > (progn > ;; turn off the MCL compiler explictly, for running code in an MCL > runtime image > (setq *compile-definitions* nil *compile-during-load* nil) > (let ((*warn-if-redefine-kernel* nil)) > ;; ccl:lib;defstruct.lisp > ;; nx-allow-transforms is not in the runtime image so don't allow > it to be called > ;; from the code implementing defstruct > (defun ccl::optimize-structure-access (env) > (declare (ignore env)) > nil))) > > > On 22 Apr 2005, at 14:39, Emily M. Bender wrote: > > >Hi John, > > > >Thanks for clearing that up. I'd say tduce.lsp is stable. > >It's even checked in through cvs (in src/non-core/). It's > >not referenced in any of the `system' files currently, however. > > > >Emily > > > >On Fri, Apr 22, 2005 at 01:04:07PM +0100, John Carroll wrote: > >>>I'm attaching the script I've been using, a file called tduce.lsp > >>>which reads in a prolog version of an XFST transducer, and > >>>user-fns.lsp. > >>> > >>>I'm encountering problems at a very early stage of trying to read in > >>>the files and have isolated at least some (if not all) of the > >>>problems > >>>to the use of defstruct in the tduce.lsp file. When you try to use > >>>that function in any way in the MCL version of the LKB I have, you > >>>get > >>>the error: > >>>>Error: #<Compiled-function CCL::NX-ALLOW-TRANSFORMS #x314600E>: code > >>>has been excised. > >>>>While executing: CCL::NX-ALLOW-TRANSFORMS > >>> > >>>(This error is caused by reading in tduce.lsp and also by, for > >>>example, simply trying "(defstruct foo)" in the listener.) > >> > >>The problem is that the MCL version of the LKB that I give out has had > >>the compiler excised, so this stops it being used for serious code > >>development. I think the same goes for the MCL trial version. > >> > >>The Lisp interpreter is still there in this MCL version, but it seems > >>that the Lisp system wants to turn the functions that should be > >>defined > >>by the defstructs into compiler macros, and this fails since the > >>compiler isn't there. So this is a bug in MCL. But I don't hold out > >>much help for a quick fix. > >> > >>There are 2 possible ways around this: > >> > >>1. Manually change the source code, turning the defstructs into the > >>functions that they define > >> > >>2. I make a new MCL image which includes tduce.lsp > >> > >>I'll only do 2 if tduce.lsp isn't likely to change soon. Do you know > >>if > >>it is likely to? > >> > >>John