New TR: Static Analysis Techniques for Evaluating Runtime Monitoring Properties Ahead-of-Time

Eric | November 23, 2007

imageToday I am proud to present our brand new Technical Report in which Patrick Lam, Laurie Hendren and me present how you can use static analysis to evaluate runtime monitoring properties ahead-of-time, i.e. at compile time opposed to at runtime.

We have been working on this topic for about a year now, with different approaches and it actually took us until some weeks ago to get it actually all worked out. The coolest thing is that the approach we found in the end is really surprisingly simple, yet very effective. All it needs is a good static abstraction and super-precise pointer analysis. That’s it. The problem that we had before was that we were tying to make things more complicated than they were.

Read the rest of this entry »

Java and generics: handle with care – part 2

Eric | November 23, 2007

This is a follow-up to my earlier posting in which I was ranting about Java generics. Subject of the post were these two pieces of Java code:

Set<String> stringSet = new HashSet<String>();
Set<String> otherStringSet = new HashSet<String>();
otherStringSet.add((String) stringSet);
Set<List> listSet = new HashSet<List>();
Set<List> otherListSet = new HashSet<List>();
otherListSet.add((List) listSet);

The first one gives a static type error in line 3 because obviously one cannot cast a Set to a String. What confused me was that the second piece of code is (statically) well-typed. You will get a runtime error on the cast (List) listSet, but no compile time error. Why is that?

Read the rest of this entry »

Comments
Comments Off on Java and generics: handle with care – part 2
Categories
Research
Tags
Java, Programming