Closed FStolte closed 7 years ago
Hi Florian,
specify manually (or in a generated manner) unequal
constraints (from the relational
package) for the variables that have to be injectively mapped (typically the variables with compatible types).
Best regards, Greg
Thanks, that's just what I needed.
When I created a first minimal example using the unequal constraint, I ran into the following NullPointerException
:
Exception in thread "main" java.lang.RuntimeException
at org.gervarro.democles.interpreter.incremental.rete.RetePatternMatcherModule.performIncrementalUpdates(RetePatternMatcherModule.java:117)
at org.emoflon.ibex.tgg.operational.util.DemoclesHelper.updateMatches(DemoclesHelper.java:460)
at org.emoflon.ibex.tgg.operational.OperationalStrategy.run(OperationalStrategy.java:172)
at org.emoflon.ibex.tgg.operational.strategies.gen.MODELGEN.run(MODELGEN.java:103)
at org.emoflon.ibex.tgg.run.MODELGEN_App.main(MODELGEN_App.java:52)
Caused by: java.lang.NullPointerException
at org.gervarro.util.index.CompoundIndex.remove(CompoundIndex.java:58)
at org.gervarro.democles.runtime.indexer.UnfilteredIndexer.remove(UnfilteredIndexer.java:128)
at org.gervarro.democles.runtime.Indexer.handleEvent(Indexer.java:43)
at org.gervarro.democles.event.MatchEventSource.deliverEvent(MatchEventSource.java:56)
at org.gervarro.democles.event.MatchEventSource.sendEvent(MatchEventSource.java:62)
at org.gervarro.democles.runtime.BidirectionalAntiJoinOperation.handleChangeOnNegativeSide(BidirectionalAntiJoinOperation.java:72)
at org.gervarro.democles.runtime.BidirectionalAntiJoinOperation.execute(BidirectionalAntiJoinOperation.java:66)
at org.gervarro.democles.runtime.EventHandlingTask.perform(EventHandlingTask.java:37)
at org.gervarro.democles.common.runtime.Session.run(Session.java:34)
at org.gervarro.democles.runtime.IncrementalUpdateSession.call(IncrementalUpdateSession.java:176)
at org.gervarro.democles.interpreter.incremental.rete.RetePatternMatcherModule.performIncrementalUpdates(RetePatternMatcherModule.java:115)
... 4 more
It seems that during a DELETE
event for the pattern containing the unequal
constraint, the entry
variable in CompoundIndex.remove()
is null. Attached are the patterns for which I get the exception. The FatherToMaleRule__CONSTRAINT
pattern is the one with the unequal
constraint.
Hi Florian,
could you please send me some models as well, for which the exception is thrown?
@anthonyanjorin Btw. I also found the (one) reason for the join failed exception. I am now working on that fix as well.
Best regards, Greg
Hi Greg,
While trying to create models for you, I found out that this exception is not even related to the unequal
constraint. I have a new set of patterns (and models) for you that do not contain any unequal constraints. Still, the exception occurs most of the time (though not always) for these simple models.
Best regards, Florian
We were now able to eliminate one case where the exception occurs, so the above models are not relevant anymore.
However, I found another example where the exception seems to occur consistently. Patterns and Models are below.
Thanks, Florian
Hi,
@FStolte, @anthonyanjorin: Sorry for the delay. I did not forget about this issue, but the simplest bug fix was not sufficient, and I had to rearrange some pattern invocation code as part of a somewhat larger change, which might be related to #167 as well. I am going to test the new solution, and hopefully upload the fixed code next week.
Bests, Greg
Hi Greg,
great to hear that a fix is coming soon :)
Please remember that we now have tests that you should be able to very easily run (if not complain and we'll try to further simplify the process).
Taken from one of my emails:
Cheers and thanks, Tony
Hi,
I uploaded a new version of Democles to the update site that should fix this issue.
@anthonyanjorin Now I managed to install the test workspace. In my setup, the two Comparator.xtend
files were buggy in the sense that they had been committed with some other character encodings, and the << and >> characters were wrong.
I am going to check #167.
Bests, Greg
Hi Greg,
yes, sorry. For xtend files with their silly << >> characters we all have to switch the workspace encoding in Eclipse to UTF 8.
Btw. I just updated and tried our tests -- I still get 6 errors due to a "Join Failed" runtime exception. Don't you?
Cheers and thanks, Tony
Hi Tony,
I have not fixed the "Join failed" exception yet, although I already identified what the problem is.
Bests, Greg
Ok - I was worried that my update went wrong. Thanks, Greg!
The fix for the join failed exception is now available on the 2 update sites.
Hi Greg,
I am currently getting unexpected matches for a negative pattern invocation of one of my patterns. My first guess would be that those matches are not injective, although i want them to be. Can you please tell me how I can control whether a pattern should be matched injectively or not?
Thanks, Florian