Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [incquery-dev] Viewers refactoring, help needed

Hi all,

the code is not working correctly, because the UnionSet of ComputedSets is buggy.
We have created a minimal example with Zoli that shows this, without any EMF-IncQuery or Viewers:
https://gist.github.com/abelhegedus/6121875

- Computed set works fine, as long as it is not used in anything that uses a staleness listener
- Union set works fine when used with a regular observable set
- Union set registers a staleness listener in the Computed set, which causes the set to recalculate its contents upon change _before_ it stores the old values

To sum it up, unless we are missing something related to Computed sets or Union set, this is a bug in the org.eclipse.core.databinding.observable package.

Cheers,
  Ábel Hegedüs

Fault Tolerant Systems Research Group
Department of Measurement and Information Systems
Budapest University of Technology and Economics

On 2013.07.29. 11:50:16, Istvan Rath <rath@xxxxxxxxxx> wrote:

Hi all,

I have committed a refactoring of the Viewers Framework internals, namely the switch from …List to …Set. The main motivation behind this change is that 1) observable pattern match results are (mathematically) sets anyway
2) many useful operations (e.g. search) are much faster over sets
3) these operations are necessary to efficiently support runtime validation features (e.g. dangling edge detection).

Some additional (small) API changes were necessary to hide the internal implementation from client code, so that the switch from …List to …Set can be made easily (i.e. without having to touch client code further on).

Unfortunately, the Set-based implementation doesn't work well yet:
- Items are handled correctly, but Edges and Containments are not
- it seems that the combination of UnionSet with ComputedSets is the culprit
- but I am not sure about the correctness of my itemMap implementation either.

I would be very grateful if someone knowledgeable (e.g. Zoli) could take a look at the code and help figure out why it is not working correctly.

Istvan


--
Istvan RATH, PhD
Research fellow
Budapest University of Technology and Economics
Fault Tolerant Systems Research Group
_______________________________________________ incquery-dev mailing list incquery-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/incquery-dev

Back to the top