Related articles |
---|
Threaded Interpretive Languages a_tucker@paul.spu.edu (Andrew Tucker) (1993-09-14) |
Re: Threaded Interpretive Languages jvn@fermi.clas.virginia.edu (Julian V. Noble) (1993-09-21) |
Re: Threaded Interpretive Languages cliffc@rice.edu (1993-09-23) |
Re: Threaded Interpretive Languages N.Chapman@cs.ucl.ac.uk (Nigel Chapman) (1993-09-24) |
Re: Threaded Interpretive Languages dsiegel@panix.com (1993-09-26) |
Re: Threaded Interpretive Languages pop@dcs.gla.ac.uk (pop) (1993-09-28) |
Re: Threaded Interpretive Languages cliffc@rice.edu (1993-09-28) |
Re: Threaded Interpretive Languages mikc@gnu.ai.mit.edu (1993-09-29) |
Newsgroups: | comp.compilers |
From: | Nigel Chapman <N.Chapman@cs.ucl.ac.uk> |
Keywords: | design |
Organization: | Compilers Central |
References: | 93-09-059 93-09-080 |
Date: | Fri, 24 Sep 1993 16:16:26 GMT |
a_tucker@paul.spu.edu (Andrew Tucker) asks:
<<<<<<
<< In a book I bought recently, the author implements a Forth-like script
<< language in what he calls a "threaded interpretive language". What are the
<< benefits/drawbacks of TILs compared to more traditional language
<< implementations are?
It doesn't seem quite appropriate to talk of a threaded interpretive
*language*, since threaded code interpretation is an implementation
technique, which shouldn't (needn't anyway) be reflected in language
design. Be that as it may, the original reference to threaded code is
J.D. Bell `Threaded Code' Comm. ACM 16,6 (June 1973) 370--372
where he talks a bit about the advantages. An interesting variant on
threaded code is indirect threaded code, which I know a bit about. This
has certainly been used for languages unlike Forth. In particular, it was
used in a successful portable Spitbol system, as described in:
R.B.K. Dewar & A.P. McCann `Macro Spitbol -- a Snobol4 compiler',
Software Practice & Experience 7 (1977) 95--113
I did my PhD under Tony McCann at Leeds and used the same technique to
implement a Setl interpeter. (This was in 1980. I believe it was revived
a few years ago and ported to IBM PC by some people at NYU, although I
haven't heard anything about that recently.) Later, Tony supervised at
least one more student who used indirect threaded code to implement
Pascal. I have no further details about this, though.
For indirect TC, the main advantages over generation of hard code are
portability and compact code (maybe not so important now). Its advantage
over source interpretation is efficiency. Compared to interpretation of
`conventional' virtual machine code, it has again advantages of
portability (only weak assumptions about wordlength are required, for
example) and very low interpretive overhead.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.