[Ometa] OMeta2 for Squeak?

Hans-Martin Mosner hmm at heeg.de
Fri Apr 16 09:16:25 PDT 2010


Am 16.04.2010 08:45, schrieb Hans-Martin Mosner:
>
> I'm no Monticello expert, but I'll try to find out what needs to be
> done. It would be fantastic if OMeta could be installed into Squeak
> without hassles. (Installing a .sar is fine, but people somewhat expect
> packages to be available and updatable from MC repositories).
> While looking at the code I found that the hack to make the debugger
> work breaks the changes necessary to support real block closures in
> Squeak, so I will try to find a more compatible solution for that as well.
>   
Ok, so I've cobbled together something that could pass as a Monticello
installation of OMeta2.
it consists of two packages (pre- and postload, there is no load between
those two...).
I have done everything with the Squeak 4.1 trunk image, no tests with
other Squeak version were done, if your image dies a horrible death when
you load it don't blame me.

So how is it done?
I've created two special subclasses of PackageInfo which store different
aspects of the same OMeta2 package.
The preload thing stores decompiled versions of all OMeta2 rules, so
after loading the package created by it you would see the translated
code of all methods.
After it has been loaded, OMeta2 works, it just doesn't look so nice.
The postload version stores just the OMeta2 rules in their pristine
form. The resulting package can be loaded to get a proper OMeta2
installation.
I've found a solution for the CompiledMethod>>methodNode hack which now
just checks whether the Parser can parse a method source, and returns a
decompiled version of the method if not. This works for debugging of
OMeta2-compiled methods and should work for other specialized compilers
as well. I'll try to get that into the trunk, so we can remove the
system extension from the OMeta2 package.
One more thing that I've done (incompletely) is categorizing methods.
However, since I'm not the original author, the category names could
probably be chosen better. Just do it.

The MC repository for this can be accessed with this info:
MCHttpRepository
    location: 'http://www.heeg.de/~hmm2/mc/'
    user: ''
    password: ''

Cheers,
Hans-Martin



More information about the OMeta mailing list