Related articles |
---|
gbeta 0.9 -- an advanced OO language eernst@cs.auc.dk (Erik Ernst) (2001-07-03) |
From: | Erik Ernst <eernst@cs.auc.dk> |
Newsgroups: | comp.compilers |
Date: | 3 Jul 2001 23:21:57 -0400 |
Organization: | Department of Computer Science, University of Aalborg, Denmark |
Keywords: | OOP, available |
Posted-Date: | 03 Jul 2001 23:21:57 EDT |
We are happy to announce that
gbeta-0.9
---------
is now available!
News
====
Many internal changes, not many changes at the language level.
See the "News" section further down for more details.
What Is It?
===========
gbeta is an advanced OO language which supports virtual attributes
(including virtual classes), general block structure, and dynamic
inheritance in context of strict, static typing. It is a
generalization of the language BETA. The package includes an
implementation of the language which performs static analysis,
generates byte code, and runs the given program (i.e. it works like an
interpreter as seen from the outside). It is integrated with GNU
Emacs and programs can be single stepped, declarations can be looked
up by double-clicking etc. in this environment.
The current version of gbeta comes without standard libraries, and the
performance is not good, so it is relevant to use it if you want to
play around with a bleeding edge OO programming language in order to
see what possibilities the basic mechanisms of the language offer you
as a programmer, but it is not yet ready for real-life application
development. If you want to help getting it there, please speak up!
As an example of the power of the combination of generalized virtual
attributes, see the paper
@InProceedings{ernst99:prop_comb,
author = {Erik Ernst},
title = {Propagating Class and Method Combination},
booktitle = {{ECOOP'99} -- Object-Oriented Programming},
pages = {67--91},
year = 1999,
editor = {Rachid Guerraoui},
volume = {LNCS 1628},
address = {Heidelberg},
publisher = {Springer-Verlag}
}
The idea is that combinations of classes (similar to multiple
inheritance) and combinations af methods (similar to method
combination as with before/after/primary methods in CLOS) is applied
recursively. The initiation combination may be expressed like this:
Window & Door (* combine two classes *)
open & print (* combine two methods *)
Now, these combination operations _propagate_, in the following sense:
If the classes Window and Door have a method M in common, then the
resulting method M of (Window & Door) will be computed by "adding up"
the contributions from Window.M and from Door.M. Similarly, if the
methods open and print have an argument type T in common, then the
corresponding argument type of (open & print) would be computed as a
combination of open.T and print.T.
This was an example of a 1-level propagation; if open.T and print.T
have a method N in common, then the N of (open.T & print.T) will be
constructed from the contributions in open.T.N and print.T.N -- that
would be a 2-level propagation.
For an insight into the power of the gbeta type system, take a look
at the paper
@InProceedings{ernst01:fam_pol,
author = {Erik Ernst},
title = {Family Polymorphism},
crossref = {Ecoop01},
pages = {303--326}
}
@book{Ecoop01,
editor = {J{\o}rgen Lindskov Knudsen},
title = {{ECOOP} 2001 -- Object-Oriented Programming},
booktitle = {{ECOOP} 2001 -- Object-Oriented Programming},
series = {LNCS 2072},
isbn = {3-540-42206-4},
publisher = {Springer-Verlag},
address = {Heidelberg, Germany},
year = {2001},
}
This paper explains how gbeta supports a decidable variant of dependent
types to make usage of multiple, mutually dependent objects both safe
and reusable. As an example, consider the concept of a graph,
established by means of two classes, Node and Edge. If we have several
different kinds of graphs, and we want to use the same piece of code
to do something on many kinds of graphs, and we want to make sure that
each graph is built from objects which are instances of classes that
"fit together"---then family polymorphism is there to save our day!
Excessive treatment of gbeta :-) is available in my Ph.D. thesis; it
will is available at the web site mentioned below along with several
other papers.
News
====
The most visible change to the language is the addition of the "!"
operator on virtuals. This operator gives the programmer more control
over the merging process, enabling such things as writing method
wrappers in mixins.
The entire static analysis has been redesigned and rewritten, thus
making the principles easier to understand and removing some bugs.
Object creation is now compiled into byte code (that was the last part
of the language that was still interpreted). The byte code is now
complete and may be written to a disk file. Two projects are being
worked on to create a stand-alone virtual machine (however, they are
not ready to be included in the distribution), drastically improving
the time and space efficiency of gbeta program execution.
There are lots of other changes internally, but as it should be clear
already now: Most of these changes do not change the functionality,
unless you come up with a stand-alone virtual machine before we do!
As usual, the documentation has been updated, even the man page.
(but, oops, the web site really needs a good update :)
Platforms
=========
gbeta-0.9 is available on Linux (2.2.X, 2.4.X) and Solaris 7. HP/UX
and SGI currently cause some linking problems but may be added later.
It may be compiled for Windows but I do not have access to a Windows
machine.
Documentation
=============
The gbeta web site at
<URL:http://www.cs.auc.dk/~eernst/gbeta/>
contains information about installation, getting started, a tutorial,
references to papers, and several other topics. My PhD thesis (which
is mainly about gbeta) will be made available from this web site, too.
Download
========
gbeta can be downloaded from the above mentioned web site at
<URL:http://www.cs.auc.dk/~eernst/gbeta/index_download.html>
Author, Contact person, Etc.
============================
Erik Ernst,
Email: eernst@cs.auc.dk
enjoy!
--
Erik Ernst eernst@cs.auc.dk
Department of Computer Science, University of Aalborg, Denmark
Return to the
comp.compilers page.
Search the
comp.compilers archives again.