[virtmach] lambda
Stephen Pelc
sfp@mpeltd.demon.co.uk
Wed, 8 Dec 1999 18:22:43 -0000
To: virtmach@iecc.com
Subject: Re: [virtmach] lambda
From: David Rush <kumo@bellsouth.net>
Date sent: 08 Dec 1999 12:20:38 +0000
Send reply to: virtmach@iecc.com
David Rush wrote:
> Ceri Storey <cez@nomorespam.freeserve.co.uk> writes:
> > in a bytecode based VM, is it possible to have a lambda opcode? (as in
> > scheme/lisp/lambda calculus) woud it be a case of pushing a pre
> > comipled function onto the stack (from a vector of constants, as in
> > emacs) or can you create one from the nomal 'stream' of instructions?
> > (i apologise for the pointless question, and for apologising. [stack
> > overflow from exessive recursion])
> Others may disagree, but I don't think so. At least not in the way
> that you have phrased the question (Although Forth machines in
> particular probably *can*, compiler interaction is strange and
> wonderful in their world). The problem is that identifying a string of
> instructions as a well-formed function is a non-trivial task; it may
> even be undecidable. Really only the compiler knows where the function
> boundaries lie, and it got it's knowledge from the program source
> code, written by a human.
This isn't my field at all, but given the comment that Forth
machines probably can, I don't understand why Forth machines
rather than others should be capable of this.
If there is an indirect call opcode (necessary for function
pointers anyway), then the issue becomes whether the VM sees
code and data in a single address space.
If the question is whether a stream of instructions can be
placed on the VM stack/frame, then there is another question
about which VM address space the stack/frame occupies.
I hope this was relevant. If not please elucidate.
--
Stephen Pelc, sfp@mpeltd.demon.co.uk
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 1703 631441, fax: +44 1703 339691
web: http://www.mpeltd.demon.co.uk