comp.lang.ada
 help / color / mirror / Atom feed
From: "chris.danx" <chris.danx@ntlworld.com>
Subject: Re: Thoughts and Opinions or something like that
Date: Wed, 25 Apr 2001 11:42:02 +0100
Date: 2001-04-25T11:42:02+01:00	[thread overview]
Message-ID: <wRxF6.384$vJ5.95977@news2-win.server.ntlworld.com> (raw)
In-Reply-To: 3AE67F57.722A78D8@andrewcooke.free-online.co.uk

Hi,

>
> Things I'd like from a VM (off the top of my head - I don't use VMs
> directly and I have no idea whether the following are possible):
>
> - garbage collection

Garbage collection is good in theory and in practise too.  The problem is that
it is complex to implement.  I will be including some support for it, but i
completely forgot about the technique.  Thanks for reminding me Andrew.


> - support for coroutines (no single stack restrictions)
>

I don't understand what you mean by "coroutines" but i assume from what comes
next it's got something to do with multiple stacks.  I suppose i could try
something like having more than one SP in the RISC version and see how that
goes.  Pop S2, for pop stack 2.  Or more generically Pop An, where An is an
address register pointing to the stack.  Then i could integrate more a specific,
better design in the WillowVM (VM version 2).

> - support for tail recursion
>

This is something i never got my head round.  I get primitive recusion, which
involves just recurring a function (e.g. a factorial function), but i know this
is innefficient.  Tail recursion has to do with finishing the computution before
calling another smaller version of the computation.  This means the system can
use the same frame over for the function i think?

Sounds like a good idea in theory, but how would one implement this in practise?
I would implement something like this if i could, because functional programs
tend to rely on tail recursion a lot.  My Haskell is currently limited to only
primitive recursion, but i'm still learning.

> (the last two are known problems with the JVM, I believe).
>


> If you want to concentrate on your language, rather than writing the VM,
> you could target an existing machine - apart from the obvious .net and
> JVM, you might consider C--

I think i will use the simple RISC machine at the start and when i know what
features are going to be in the language i will develop a VM.  The good thing
about the implementation of the RISC VM is that the VM is currently 100%
portable Ada.

There are problem coming from interface to system for files, etc.  I haven't
been able to think of a good way to do this yet, and all the schemes i devised
for representing calls in assembly have been too complex.  Need something
simpler, and i've been working towards this.  This too will hopefully be 100%
portable Ada thanks to Ada's standard packages.  I'm not holding my breathe
though.


Thanks,
Chris.





  reply	other threads:[~2001-04-25 10:42 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-24 17:12 Thoughts and Opinions or something like that chris.danx
2001-04-24 21:35 ` Ted Dennison
2001-04-24 23:27   ` chris.danx
2001-04-25  7:40 ` Andrew Cooke
2001-04-25 10:42   ` chris.danx [this message]
2001-04-25 17:26     ` Warren W. Gay VE3WWG
2001-04-26 14:22     ` Marcin 'Qrczak' Kowalczyk
     [not found]   ` <3AE69665.63E362CD@info.unicaen.fr>
2001-04-25 10:51     ` chris.danx
2001-04-25 13:51       ` Jerzy Karczmarczuk
2001-04-25 13:52         ` chris.danx
     [not found]     ` <3AE6DAB3.899FF645@andrewcooke.free-online.co.uk>
2001-04-25 14:30       ` chris.danx
     [not found]       ` <3AE7E37B.F384DCDA@info.unicaen.fr>
2001-04-26  9:02         ` Play with virtual machines (Was: Thoughts and Opinions...) chris.danx
     [not found]         ` <3AE81234.267643AC@kfunigraz.ac.at>
2001-04-26 12:57           ` chris.danx
2001-04-27  2:14             ` Larry Elmore
2001-04-27  3:27               ` Goldhammer
2001-05-03 17:00                 ` singlespeeder
2001-05-03 17:03                   ` singlespeeder
2001-04-25  9:06 ` Thoughts and Opinions or something like that Tarjei T. Jensen
2001-04-25 12:12   ` Jeffrey M. Vinocur
2001-04-26  2:12     ` Nicholas James NETHERCOTE
2001-04-26 18:23     ` Keith Thompson
2001-04-25 12:09 ` Alain Fischer
2001-04-27 18:20 ` brian hiles
2001-04-28  1:27   ` Gregory Toomey
2001-04-28 21:34     ` chris.danx
2001-04-28 21:34   ` chris.danx
2001-04-30  8:31     ` Jon Beniston
2001-05-04  8:49 ` Biep @ http://www.biep.org
replies disabled

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