archives

too much indentation solution?

e.g. one of the pages about OO has an interesting discussion that becomes ever harder to read with the default ui template. any way of having a default template that somehow avoids that problem yet still shows threading?

Teaching oneself Abstract Interpretation ?

My current work deals with extracting security properties from C source code. Without entering too much into the details, it started as a type-and-effects type system with dependent types, but it's slowly starting to look like abstract interpretation-and-effects. Now, my knowledge of abstract interpretation is somewhat limited: I have read one or two of Girard's papers, and everything else I know comes from talks and discussions. So I guess it's time for me to learn more.

So, here's the question: does anyone around here have good references on abstract interpretation and the techniques involved?

This class type

That may have been discussed before, but I did not find the right search terms for it. In strongly typed object-oriented languages like C++ or Java, how do you designate the type of the class in class methods?
A typical use would be the return type of factory methods but it would be useful elsewhere too. Eg.

MyClass MyClass::newInstance();

The problem with the code above is that in a derived class, the signature allows newInstance to return an instance of the base class-- the signature is not restrictive enough.

class MySubClass: MyClass
...
MyClass MySubClass::newInstance(); // WRONG newInstance must return MySubClass

There should be some way to tell the compiler that the type returned is that of the class it is invoked on, is there? Or is there simply a covalence rule for return types such that you would write

MySubClass MySubClass::newInstance();

...which looks a bit hackish to me. The signature needs to be written again for each subclass. And it needs to be extended to parameters too for eg. clone

int MyClass::clone(MyClass obj1, MyClass& obj2);

What I am looking for is something like:

ThisClassType MyClass::newInstance();

Any insight is welcome.