[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Language Implementation Languages
On Monday, May 19, 2003, at 10:21 US/Eastern, Scott McKay wrote:
> At 2:16 PM -0700 5/16/03, Brent Fulgham wrote:
>> > Is anyone using anything other than C and its heirs for
>>> their low level language implemenation work?
>>> It seems all to easy to introduce bugs in one's
>>> implmentation when using something as unsafe as C.
>> That's a very common first-goal with languages. I can think
>> of several off the top of my head:
>> Gwydion Dylan (http://www.gwydiondylan.org) uses Dylan to code
>> the compiler, bootstrapping from a small subset of Dylan
>> written in C.
>> NHC98 (http://www.haskell.org/nhc98) is written in Haskell, though
>> it emits C as its "output", which is then compiled to native code.
>> Clean (http://www.cs.kun.nl/~clean) is now written mostly in Clean.
> Genera, the operating system for the Symbolics Lisp
> Machine, was written entirely in Lisp. It has to be
> said that the low-level parts of the garbage collector
> used these things called "locatives" (pointers), but
> it's hard to see how to do otherwise. The primitive
> function-call, -return, and stack-unwinding code had
> a few dozen lines of assembly code. And the device
> drivers obviously used locatives to bang on the device
> registers. But other than those few hundred lines of
> low-level code, everything else was Lisp, including
> interrupts handlers, the paging system, the scheduler,
> etc, etc.
> Minima, a stripped-down successor to Genera, was even
> more Lisp-y, and even use CLOS-style O-O at a very low
> level. It was meant to be a real-time operating system,
> and for meaningful definitions of "real-time", it was
> a success.
You left out the Front-end Processor (FEP), which was also programmed
in Lisp, and sported command history and command completion. It used
manual storage management, but was written in a simplified
single-inheritance O-O style. The first FEP had its own compiler that
compiled to 68000 code, the Ivory FEP ran in a special mode of the
Ivory processor and was compiled with the production Lisp compiler
(with some features disabled) and then linked into a PROM image and
disk overlays. The FEP ran in physical memory, but implemented a model
of Lisp VM so that it could debug a crashed Lisp image. The model VM
was robust enough that it could be used debug both VM and GC bugs.