You are here


Error message

  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1818 of /var/www/clients/client26283/web31566/web/includes/database/
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1818 of /var/www/clients/client26283/web31566/web/includes/database/
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1818 of /var/www/clients/client26283/web31566/web/includes/database/
  • Warning: Illegal string offset 'field' in DatabaseCondition->__clone() (line 1818 of /var/www/clients/client26283/web31566/web/includes/database/

Dangling reference message in an xtext based editor

Holiday is over and I my started working on the declare language again. Just before my holiday I fixed one problem with the xtext base editors that I might be useful for others.

The problem was that sometimes there appeared dangling reference message in the editors and I did not understand where those were coming from. But I found the problem. Say, I have one declare class A and a declare class B (in another resource/editor). A references a public field in class B. when you make a change in class B, class A has to be reparsed, because A is dependent on B. But how is this dependency determined? There is the concept of a ResourceDescription. This should contain all elements that need to be exported, that is all elements that might be used by other classes (that is in other resource).

That was where my problem was. I forgot to put the public fields in the resource description. So, class A referenced a field of class B that was not in the resource description. So, when class B is changed it does not trigger a reparse of class A. Adding the fields to the resource description solved the problem.

That's it for now.


The new eclipse is there. see eclipse Juno.
Now, I probably need to switch over. Xtext/Xtend have a number of new features and hopefully the performance has improved. Which would also be nice for declare, that also might benefits from those performance improvements.

Panel session on future of Software Development

Below a link to an interesting session on the future of software development. What are the biggest challenges now that we have multi- or manycore computers. Do we need new languages, a completely new paradigm?
I found the opening statement of Guy Steele interesting. Even if a language would allow/enable better parallelization the problem shifts to way you access your data structures.

where are the closures in java?

The mapping of multiple inheritance to single inheritance is one thing I need to do when translating declare back to java. But declare also has closures. So I need to define language with closures to java (that has still no closures, still waiting..) and in a way that is not ruining performance.

Also, another feature of declare is implicit coercions found in any language. In addition to this these coersions are user defined. If you want for example to have an implicit coersion of B to A you can define a conversion function in B that has no arguments and has a return type A, like this:

public conversion function A toA()

So, all available conversion are part of the library, there are no hidden coersions in the implmentation



The context for the investigation into a mapping multiple inheritance to single inheritance was that I am working on a new language called Declare. Declare is a object oriented language where all state transitions must be specified declaratively.

The rationale of having another language is that this language abstracts away from the procedural definition of an algorithm. This will allow for parallel execution, so we can make better use of the multi core processors that are in our personal computers, laptops and even nowadays in our smartphones.

Also the declarative specification is a more direct description of the intention what the programmer is trying to achieve. So, we expect that the maintainability of software written in declare will be higher.

If you are interested take a look at

Mapping multiple inheritance to single inheritance

I have implemented mappings from multiple inheritance to single inheritance before. But every time I feel the need to search if there are better mappings since the last time.
I found a number of papers on the subject.

On the Translation of Multiple Inheritance Hierarchies into Single Inheritance Hierarchies
Proposals for Multiple to Single Inheritance Transformation

So, I have something to read. Hopefully these papers will tell me which mapping method gives the least performance overhead and which has the least memory footprint.