[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rather, DSSLs increase modularity, productivity



Thanks. I am aware of that work. It misses the JVM => JavaSource check
half of my question. -- Matthias


On Tuesday, November 18, 2003, at 08:05 AM, Daniel Weinreb wrote:

>
>
> Matthias Felleisen wrote:
>
>>
>> On Monday, November 17, 2003, at 12:08 PM, Miles Egan wrote:
>>
>>> A couple of interesting applications of byte-code engineering in Java
>>> I've come across recently:
>>>
>>> BCEL - the library used to implement a lot of these byte-code hacks:
>>> (have a look at their projects page to get an idea of how popular 
>>> this
>>> approach has become)
>>> http://jakarta.apache.org/bcel/
>>>
>>> Most Java AOP implementations seem to be implemented this way:
>>> http://www.aspectj.org
>>> http://aspectwerkz.codehaus.org/
>>>
>>> The Tapestry web framework uses it to generate new java classes on 
>>> the
>>> fly from xml templates:
>>> http://jakarta.apache.org/tapestry/
>>>
>>> Hibernate, probably the most popular Java O-R mapping library uses
>>> byte-code hacks to hook object mods for db updates:
>>> http://www.hibernate.org
>>>
>>> On the one hand it's cool that the JVM allows all this, but it seems
>>> like more explicit support for this kind of metaprogramming in the
>>> language would be better.
>>
>>
>> Even though you can write byte code and modify it with a class loader
>> you still have to get it by the byte-code verifier. So, yes, you're 
>> correct
>> a type-soundness result for Java at the source level looks 
>> irrelevant. But
>> the question you really have to pose is how the type soundness for the
>> Java type system relates to the soundness of the byte code verifier. 
>> As
>> far as we know, the second result may imply the first one.
>>
>> I don't know whether anyone has looked into this connection. I'd 
>> expect
>> so given the cottage industry on Java theory results. Guy?
>
> There's Rich Cohen's work:
>
> http://www.cli.com/software/djvm/index.html
>
> This is from six years ago so there might be some aspects of it that 
> are out
> of date. But I think it's addressing what you're asking about.
>
>>
>>
>> -- Matthias
>>
>>
>