unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Reviving Guile-VM
@ 2005-04-27 13:04 Ludovic Courtès
  2005-04-28  7:53 ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2005-04-27 13:04 UTC (permalink / raw)


Hi,

I've started trying to revive Guile-VM which was written by Keisuke
Nishida 5 years ago [1] and was unfortunately never finished nor
adopted.

So far I've been mostly learning about it and updating it so that it can
use 1.7 [2].  I don't know whether I'll eventually get to something
useful but it really looks like a good piece of software and an
important feature for Guile, so it's worth giving it a try.  And it's
kind of fun.  ;-)

Thanks,
Ludovic.

[1] http://sources.redhat.com/ml/guile/2000-07/msg00418.html

[2] If someone cares, this is available in the `guile-vm--revival--0.6'
    version of my GNU arch archive located at
    http://www.laas.fr/~lcourtes/software/lcourtes@laas.fr--2004-libre .


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Reviving Guile-VM
  2005-04-27 13:04 Reviving Guile-VM Ludovic Courtès
@ 2005-04-28  7:53 ` Ludovic Courtès
  2005-04-29 20:40   ` Neil Jerram
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2005-04-28  7:53 UTC (permalink / raw)


Hi,

ludovic.courtes@laas.fr (Ludovic Courtès) writes:

> I've started trying to revive Guile-VM which was written by Keisuke
> Nishida 5 years ago [1] and was unfortunately never finished nor
> adopted.

I did not mention precisely what Guile-VM is and not everyone heard
about it before.  So here we go.

Guile-VM consists of a virtual machine, a compiler, and an assembler.
The VM itself is described in the doc as follows:

  A Guile VM has a set of registers and its own stack memory.  Guile may
  have more than one VM's.  Each VM may execute at most one program at a
  time.  Guile VM is a CISC system so designed as to execute Scheme and
  other languages efficiently.

So it's basically a CISC-like machine architecture.  The compiler can
compile Guile Scheme code into "assembly code" that uses the VM's
instruction set.  This instruction set is purposefully not too close to
Scheme, and not too close either to the underlying processor instruction
set.

Guile-VM's assembler takes a sequence of instructions and produces
bytecode which may be quickly loaded and (hopefully) interpreted by the
VM.  Other Free Scheme implementations, such as STklos [1], include an
ad hoc virtual machine.  Interpreting bytecode is usually significantly
faster than interpreting source code.  Yet, it is still potentially much
slower than equivalent code compiled to the machine's native code (as
with MIT/GNU Scheme [2]).  There were discussions about how well
Guile-VM would perform compared to an interpreter, as in [3].

Guile-VM has been dormant in the CVS repo [4] for...  4 years.  :-)

Ludovic.

[1] http://stklos.net
[2] http://www.gnu.org/software/mit-scheme/
[3] http://sources.redhat.com/ml/guile/2000-07/msg00421.html
[4] http://www.gnu.org/software/guile/anon-cvs.html


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Reviving Guile-VM
  2005-04-28  7:53 ` Ludovic Courtès
@ 2005-04-29 20:40   ` Neil Jerram
  2005-05-02 16:43     ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Neil Jerram @ 2005-04-29 20:40 UTC (permalink / raw)
  Cc: guile-devel

Ludovic Courtès wrote:
> Hi,
> 
> ludovic.courtes@laas.fr (Ludovic Courtès) writes:
> 
> 
>>I've started trying to revive Guile-VM which was written by Keisuke
>>Nishida 5 years ago [1] and was unfortunately never finished nor
>>adopted.

That is excellent news.  It always seemed like a very interesting 
project when Keisuke was working on it and discussing on the mailing 
list.  (Unfortunately, though, I can't say that I understood it very much.)

One point of possible interest is that at about that time, qscheme was 
also donated to the CVS repo, and my impression was that qscheme also 
contained some kind of VM technology.  It might be worth you taking a 
look at qscheme also, therefore.

> I did not mention precisely what Guile-VM is and not everyone heard
> about it before.  So here we go.
> 
> Guile-VM consists of a virtual machine, a compiler, and an assembler.
> The VM itself is described in the doc as follows:
> 
>   A Guile VM has a set of registers and its own stack memory.  Guile may
>   have more than one VM's.  Each VM may execute at most one program at a
>   time.  Guile VM is a CISC system so designed as to execute Scheme and
>   other languages efficiently.
> 
> So it's basically a CISC-like machine architecture.  The compiler can
> compile Guile Scheme code into "assembly code" that uses the VM's
> instruction set.  This instruction set is purposefully not too close to
> Scheme, and not too close either to the underlying processor instruction
> set.
> 
> Guile-VM's assembler takes a sequence of instructions and produces
> bytecode which may be quickly loaded and (hopefully) interpreted by the

Hang on, I thought the instructions were byte code ...  How many levels 
of byte code are there, and how do they differ?

> VM.  Other Free Scheme implementations, such as STklos [1], include an
> ad hoc virtual machine.  Interpreting bytecode is usually significantly
> faster than interpreting source code.  Yet, it is still potentially much
> slower than equivalent code compiled to the machine's native code (as
> with MIT/GNU Scheme [2]).  There were discussions about how well
> Guile-VM would perform compared to an interpreter, as in [3].
> 
> Guile-VM has been dormant in the CVS repo [4] for...  4 years.  :-)

Good luck!

	Neil


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Reviving Guile-VM
  2005-04-29 20:40   ` Neil Jerram
@ 2005-05-02 16:43     ` Ludovic Courtès
  2005-05-03 18:31       ` Neil Jerram
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2005-05-02 16:43 UTC (permalink / raw)
  Cc: guile-devel

Hello,

Neil Jerram <neil@ossau.uklinux.net> writes:

> That is excellent news.  It always seemed like a very interesting
> project when Keisuke was working on it and discussing on the mailing
> list.  (Unfortunately, though, I can't say that I understood it very
> much.)

Well, it seems that it had became quite ambitious in the end.

> One point of possible interest is that at about that time, qscheme was
> also donated to the CVS repo, and my impression was that qscheme also
> contained some kind of VM technology.  It might be worth you taking a
> look at qscheme also, therefore.

QScheme [1] has apparently been abandoned since 2000, and it looks like
its VM has never been fully functional.  Guile-VM seems much more mature
actually.  However, that of STklos is fully functional and it seems to
be pretty close to Guile-VM (similar instruction set).

> Hang on, I thought the instructions were byte code ...  How many
> levels of byte code are there, and how do they differ?

Bytecode is just the binary representation of a sequence of
instructions, no more.

However, the compiler does use _two_ intermediate languages when
compiling Scheme to VM "assembly":

  Scheme -> GHIL -> GLIL -> assembly

(where GHIL stands for "Guile's High-level Intermediate Language" and
GLIL stands for "Guile's Low-level Intermediate Language").  The former
is pretty close to Scheme while the latter is closer to the VM's
assembly.  I think the goal was to make Guile-VM easily usable for other
languages as well.  Fun.  ;-)

Thanks,
Ludovic.


[1] http://sof.ch/dan/qscheme/index-e.html


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Reviving Guile-VM
  2005-05-02 16:43     ` Ludovic Courtès
@ 2005-05-03 18:31       ` Neil Jerram
  2005-05-04 11:41         ` Ludovic Courtès
  0 siblings, 1 reply; 7+ messages in thread
From: Neil Jerram @ 2005-05-03 18:31 UTC (permalink / raw)
  Cc: guile-devel

Ludovic Courtès wrote:
> 
> QScheme [1] has apparently been abandoned since 2000, and it looks like
> its VM has never been fully functional.  Guile-VM seems much more mature
> actually.  However, that of STklos is fully functional and it seems to
> be pretty close to Guile-VM (similar instruction set).

Cool, sounds like you're well on top of the field.

>>Hang on, I thought the instructions were byte code ...  How many
>>levels of byte code are there, and how do they differ?
> 
> 
> Bytecode is just the binary representation of a sequence of
> instructions, no more.
> 
> However, the compiler does use _two_ intermediate languages when
> compiling Scheme to VM "assembly":
> 
>   Scheme -> GHIL -> GLIL -> assembly
> 
> (where GHIL stands for "Guile's High-level Intermediate Language" and
> GLIL stands for "Guile's Low-level Intermediate Language").  The former
> is pretty close to Scheme while the latter is closer to the VM's
> assembly.  I think the goal was to make Guile-VM easily usable for other
> languages as well.  Fun.  ;-)

So where is the "biggest" jump here?  Would it be correct to say 
something like GHIL is a good target for all Lisp-like languages; and 
GLIL is a more general target that allows for more different languages?

Regards,
	Neil


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Reviving Guile-VM
  2005-05-03 18:31       ` Neil Jerram
@ 2005-05-04 11:41         ` Ludovic Courtès
  2005-05-04 20:23           ` Neil Jerram
  0 siblings, 1 reply; 7+ messages in thread
From: Ludovic Courtès @ 2005-05-04 11:41 UTC (permalink / raw)
  Cc: guile-devel

Hi,

Neil Jerram <neil@ossau.uklinux.net> writes:

> So where is the "biggest" jump here?  Would it be correct to say
> something like GHIL is a good target for all Lisp-like languages; and
> GLIL is a more general target that allows for more different languages?

I'm not yet very familiar with this part of Guile-VM.  Roughly, GHIL is
pretty close to Scheme: it has primitives like quote/unquote,
variable-ref/variable-set, define, lambda, if, call, etc.

GLIL, on the other hand, is very close to the VM's assembly language: it
can be told how to refer to an procedure's argument, how to refer to a
local variable, etc.

Understanding and documenting all this is part of my goal.  ;-)

Thanks,
Ludovic.



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Reviving Guile-VM
  2005-05-04 11:41         ` Ludovic Courtès
@ 2005-05-04 20:23           ` Neil Jerram
  0 siblings, 0 replies; 7+ messages in thread
From: Neil Jerram @ 2005-05-04 20:23 UTC (permalink / raw)
  Cc: guile-devel

Ludovic Courtès wrote:
> 
> I'm not yet very familiar with this part of Guile-VM.  Roughly, GHIL is
> pretty close to Scheme: it has primitives like quote/unquote,
> variable-ref/variable-set, define, lambda, if, call, etc.
> 
> GLIL, on the other hand, is very close to the VM's assembly language: it
> can be told how to refer to an procedure's argument, how to refer to a
> local variable, etc.
> 
> Understanding and documenting all this is part of my goal.  ;-)

Sorry!  I'll stop hassling you then ... good luck!  (And I'm afraid I 
have no idea about your cell allocation question - sorry.)

	Neil


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-05-04 20:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-27 13:04 Reviving Guile-VM Ludovic Courtès
2005-04-28  7:53 ` Ludovic Courtès
2005-04-29 20:40   ` Neil Jerram
2005-05-02 16:43     ` Ludovic Courtès
2005-05-03 18:31       ` Neil Jerram
2005-05-04 11:41         ` Ludovic Courtès
2005-05-04 20:23           ` Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).