comp.lang.ada
 help / color / mirror / Atom feed
* Babel in an Ada-mandated world (Was Re: perl in an Ada...)
@ 1993-04-14 21:23 Michael D Shapiro
  0 siblings, 0 replies; only message in thread
From: Michael D Shapiro @ 1993-04-14 21:23 UTC (permalink / raw)


Mike,

Your note on possible multiple language implementations in Ada and its
mention of one in particular brought back a fond reminiscence.  I was
part of the Bell Labs team that built SNOBOL4 and I did much of the
work on the first port (started by R. Stockton Gaines, then of IDA),
from an IBM 360 to a CDC 6500, at Purdue University.  One of my demo
programs was a SNOBOL4 version of "linear LISP" (with every expression
kept as a character string).  As a test case, I wrote a factorial
expression in LISP.  Factorial 0 worked reasonably well, but factorial
1 was rather slow.  We never finished computing factorial 2 because we
had to shut the machine down for maintenance.

I think that the implementation of the SNOBOL4 compiler/interpreter in
Ada you suggested would be a simple matter.  We wrote the system in the
only machine-independent language we had available at the time (late
1960s), entirely in assembly language (in macros) for a SNOBOL4
Implementation Language (SIL) virtual machine.  To port to any real
machine, we would write a set of the 120+ macro definitions and any
support routines they required.  I'm certain we could take the 7,000+
lines or so of source code (still available in the public domain),
write a "simple" translator and produce Ada source.  (The next time I
have available two graduate-student-semesters of free time, I may work
on it.)

Voila.  Mandated SNOBOL4.  (For help, we might dig up Ralph Griswold's
book "The Macro Implementation of SNOBOL4.")  And you would have the
LISP you want (?) with no extra effort!

            Michael

[Don't you dare blame my current employer, the long-ago Naval
Electronics Laboratory (NEL), for this scheme.  If you do I might wind
up having to implement a version of NELIAC in Ada.  (See Maurice
Halstead's "Machine Independent Computer Programming," Spartan Books,
1962, for information on NELIAC.)]
~~~~
=======================================================================
Michael D. Shapiro, Ph.D.              e-mail: mshapiro@nosc.mil NCCOSC
RDT&E Division (NRaD) Code 411    San Diego CA 92152-7560 Voice: (619)
553-4080     FAX: (619) 553-4808      DSN: 553-4080 [Until January 1992
we were Naval Ocean Systems Center (NOSC)]


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1993-04-14 21:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-04-14 21:23 Babel in an Ada-mandated world (Was Re: perl in an Ada...) Michael D Shapiro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox