Closed tazzme closed 7 years ago
Hi,
thank you for your interest in EMF-IncQuery/VIATRA. We'll be glad if you believe, the project is useful for you.
Looking at the pattern definition, to me it seems the validator is correct in theory (but the error message is quite misleading here). The problem here is that the pattern matcher has to be able to enumerate all possible values for all parameters (which is clearly impossible for java Date values), while in the current case is impossible for the parameter rDate:
java ^java.util.Date(dDate);
line is irrelevant, as the deployment dates are enumerated based on information stored in the model; while java ^java.util.Date(rDate);
does not help making the values of rDate enumerable.In other words, you have to change your pattern to be expressible in EMF-IncQuery/VIATRA: basically, the value of rDate has to be deterministically calculable from elements you find in the model. E.g. you can express rDate is 10 days later that the deploymentDate; or you can compare two date values stored in the model, but cannot express all dates that are after some date found in the model.
I hope this explanation was clear; if not feel free to ask for clarification.
In addition to answering your question, I have two points to clarify here:
Finally, I have opened a new issue to make the error messages easier to understand (and possibly see whether there is some kind of issue with incorrect reporting as well).
Fine, thank you for your fast response and the good explanation. I was not aware of the fact, that check-expressions must be deterministically calculable. So I solved this with rewriting the query. Thank you.
Hi,
I like your project very much as I have written my doctoral thesis in a close area in the late 2000. I am now working for a large company and I find EMFIncQuery could be very useful in our current project. I achieved creating and executing simple queries with the EMFQueryEngine, but now I'm struggeling with an issue, which could possibly be a bug in the compiler, similar to #77
The following pattern produces a compiler error "Parameter 'rDate' is never referenced in body '#1'"
If I add the following lines, I get the compiler error 'Parameter 'rDate' has no positive reference in body '#1''
What am I doing wrong?
Thank you. Theresa