Thursday April 10, 2008
Maxine VM to be announced at JavaOne
The time has come.
At the JavaOne 2008 conference, we will finally reveal our new research VM for the Java platform, Maxine.
Furthermore, right then or shortly thereafter we will publish the Maxine source code under a GPLv2 license. It will show up at this address: https://maxine.dev.java.net/.
This will be a pre-alpha release in the true sense. There won't be full JVM functionality and you won't see competitive performance. However, let's just claim that it might be interesting to take a closer look at the design and estimate what it will signify in the near future...
We will also demonstrate and release the Maxine Inspector tool, which makes debugging a meta-circular VM a whole new experience.
Posted at 11:34AM Apr 10, 2008 by Bernd Mathiske in Sun | Comments[0]
Monday September 11, 2006
You know @Override, now meet @Implement
Isn't it wonderful that in Java 5 you can use the @Override annotation to indicate that a given method does override another previously specified method? Personally, I find it very handy to know whether any given method you are looking at branches off into a new direction or whether it continues an existing train of thought that is inherited from the super class. If you are still unconvinced, I recommend to at least give it a try. For some deeper insights, you may want to read Peter Ahé's blog entry on the @Override subject.
If you agree with me so far, then I think we should wonder what might indicate whether a method is an implementation of an interface method. Nothing? You have to look it up in the source code, hoping there are not too many interfaces to read until you come to the conclusion whether your new method more or less accidentally implements one of their methods or not. Maybe when writing a method signature, you misspelled the method name or used a subtly incompatible parameter type, yet you did want to implement a particular interface?
One day I asked myself: it is great that there is support for better tracking of overriding, but why should implementing interface methods then remain in the orphanage of obscurity?
So, I went about defining the @Implement annotation. This annotation has a parameter of type Class, which takes the .class literal of an interface your method is implementing as an argument. For example, you can write:
Runnable myRunnable = new Runnable() {
@Implement(Runnable.class)
public void run() { ... }
}
Hm, just even more clutter in the already verbose Java syntax, you think? Maybe so, but wait until you have used this in a class with a lot of interfaces and a bunch of methods it defines, some of which implement interfaces, some don't. For plenty of examples, take a look at the source code advertised by my previous blog entry.
The parameter of @Implement is supposed to indicate the interface that first declares the original method, not any intermittent overriding interface method. But what if a method incidentally implements several interfaces that list the same signature independently? My take on this so far is that you get away with referring to any one of them. Since those interface methods better mean the same thing if there are several of them or else you have huge problems anyway, it should not matter which one you get a hold of for providing an idea of what the purpose of your added method might be.
Posted at 06:46AM Sep 11, 2006 by Bernd Mathiske in Sun | Comments[0]
Saturday September 09, 2006
Project Maxwell Assembler System - released on java.net and presented at PPPJ06
Doug Simon and I have recently pushed out the Project Maxwell Assembler System as a java.net open source project. We made the full source code available under a BSD license.
The Project Maxwell Assembler System (PMAS) is a collection of Java(TM) 5/6 packages which implement several assemblers, disassemblers, automated testing for both and an extensible framework with generators for all of the above. The currently covered instruction set architectures (ISAs) are SPARC, PowerPC, AMD64 and IA32.
We think the PMAS will be useful for all sorts of compiler construction projects. We even imagine one might want to build on it in compiler teaching classes, as it removes a barrier to entry by dealing with tedious instruction encodings.
Read all about it in our paper in the proceeedings of the International Conference on Principles and Practices of Programming in Java (PPPJ 2006).
Posted at 07:27AM Sep 09, 2006 by Bernd Mathiske in Sun | Comments[0]
What's this?
Welcome to my Blog!
Not quite incidentally I have been programming a lot lately and sooner or later I found myself in discussions about how to do certain things, e.g. how to make use of certain new Java(TM) programming language features or how to leverage static typing some more. Having revolved around the same questions and answers many times, the urge to blog started to dawn on me. Now, for starters, this blog is intended to be a central place where I gather programming miscellania that I found to be quite useful.
I hope you will enjoy my angle.
Posted at 07:00AM Sep 09, 2006 by Bernd Mathiske in Sun | Comments[0]