[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Jul 4 14:46:17 1999 
Subject:Re: Can poplog make a fasl? 
From:Lieven Marchand 
Volume-ID:990704.03 

Aaron.nospam.Sloman@cs.bham.ac.uk (Aaron Sloman See text for reply address) writes:

> But on reflection I guess that's wrong: lisp could use its own linking
> mechanism and the result could be the same as if the compiled procedures
> had been directly added to the heap by an incremental compiler, as in
> poplog.
> 

Most modern lisps do. FASL's are not native object files. In fact, some
implementations have compatible FASL files over different operating systems
running on the same processor.

> I have heard that in some lisp systems neither compiled functions nor
> arrays are garbage collected because the garbage collector works only on
> lists (or lists and records?). But I don't know whether that is or ever
> was true.
> 

Could very well be true once. Lisp is 40 years old and has known a
large number of variants and implementations. It isn't with modern
implementations though.

In for example Allegro Common Lisp you have:
USER(2): (room t)
area  address(bytes)        cons        symbols        other bytes
                        8 bytes each  24 bytes each
                        (free:used)   (free:used)      (free:used)
Top #x205c8000
New #x204b2000(1138688)   596:2461      240:14        952016:102128
New #x2039c000(1138688)    -----         -----            -----
Old #x20000d48(3781304)   512:54514     159:14079    2099600:889976
Root pages: 25
Lisp heap limit: 67108864
code   type                                items    bytes   
  1: CONS                                    55956    447648 25.2%
 96: (SIMPLE-ARRAY T)                         4584    435568 24.5%
  8: FUNCTION                                 7181    434216 24.4%
  7: SYMBOL                                  14093    338232 19.0%
 12: STANDARD-INSTANCE                        2921     46736  2.6%
  9: CLOSURE                                  1841     30912  1.7%
101: (SIMPLE-ARRAY CHARACTER)                  312     16440  0.9%
 15: STRUCTURE                                 401     12144  0.7%
 10: HASH-TABLE                                 91      2912  0.2%
108: (SIMPLE-ARRAY CODE)                        20      2576  0.1%
100: (SIMPLE-ARRAY (UNSIGNED-BYTE 32))           7      2496  0.1%
 18: BIGNUM                                    221      2216  0.1%
 17: DOUBLE-FLOAT                              116      1856  0.1%
 16: SINGLE-FLOAT                              125      1000  0.1%
111: (SIMPLE-ARRAY FOREIGN)                     32       760  0.0%
 20: COMPLEX                                    11       176  0.0%
 64: (ARRAY T)                                   6       144  0.0%
 11: READTABLE                                   6        96  0.0%
107: (SIMPLE-ARRAY (SIGNED-BYTE 32))             1        88  0.0%
 97: (SIMPLE-ARRAY BIT)                          2        48  0.0%
 98: (SIMPLE-ARRAY (UNSIGNED-BYTE 8))            1        40  0.0%
 13: SYSVECTOR                                   2        32  0.0%
 69: (ARRAY CHARACTER)                           1        24  0.0%

 total bytes = 1776360
malloc arena:
   max size  free bytes  used bytes     total
       496       3968          0         3968
      1008       4032          0         4032
      2032       2032       2032         4064
      4080          0       4080         4080
 total bytes:   10032       6112        16144

> Poplog common lisp has fmakunbound and delete-package, but I can't
> find (using grep in the lisp source directory) anything called
> "drop-package". I can't find it in the index to CLTL2 either!
> I expect it's a different name for the same thing.
> 

I meant delete-package. This will hopefully teach me not to post
before checking the exact name of things.

> In poplog, unlike some (older?) lisp systems the very same heap is
> used for all poplog structures: lists, records, functions, arrays,
> properties, etc. However, the heap is allowed to have "holes" which
> contain non-relocatable objects such as externally linked procedures
> (e.g. from C or Fortran) or non-relocatable poplog objects which are
> pointed to by externally compiled procedures whose pointers the
> garbage collector cannot update.
> 

Hard to tell. The standard doesn't specify this off course. In fact,
about all you'll find even about something as crucial as garbage
collection is that objects have indefinite extent and that the
implementation is permitted to recover storage used by unreachable
objects. Off course, a lisp implementation without gc is not going to
be very popular so "quality of implementation" is used here.

Some CL implementations use the sparse virtual address space technique to 
do type checking (or rather avoid it). A page can only hold objects of one
type and they are mapped into the 64 bit (or 32 bit) virtual address space
in such a way that checking a type becomes checking the first bits of the
address.

> Negotiations are over: Sussex and ISL have achieved a friendly
> separation as regards Poplog. It's now a question of people at Sussex
> finding time to make everything happen, including tracking down and
> removing references to ISL from the documentation and sources. I don't
> know how long that will take: everyone in UK universities is overworked.
> 

Thanks for a great job. I've read Popplestone's book and another about
AI programming in Pop-11 about 10 years ago but I've never had a
pop-11 system to play with. I even started designing one myself but I
didn't get very far ;-)

-- 
Lieven Marchand <mal@bewoner.dma.be>
If there are aliens, they play Go. -- Lasker