Dear Subramanya,
thank you for the concrete example. Looking at your figure, the
situation becomes clear now.
You can just remove one of the NAC nodes of type "WorkProduct".
The semantics is as follows:
Explicit NAC elements ("forbid") do not overlap with the LHS.
Implicit NAC elements ("preserve") are all elements in the LHS
(fomally, a NAC is an extension of the LHS).
The LHS node (preserve) of type WorkProduct is required to be
present.
The single NAC node (forbid) of type WorkProduct is an additional
node that shall not be present.
If this would be the only NAC node, then the meaning would be:
If there are 2 or more nodes of type "WorkProduct" connected to your
node "MethodServiceInterface", then the rule is not applied.
But you have more NAC nodes. This means that the NAC forbids the
application only, if all these NAC elements are present.
If this is not your intended meaning, then you can define separate
NACs in the HenshinModel Editor. Then, each NAC is checked
separately and the rule is applied only if each single NAC pattern
for itself separately is not found in the graph at the matched LHS.
So, please try to remove the one "WorkProduct" NAC node - maybe this
is already what you need.
Best regards,
Frank
On 6/27/2014 9:40 AM, Subramanya K G
wrote:
Hello Frank,
Thanks for the reply.
To be more concrete the problem what I have is : (Please
find the new attachment in this email for concrete
information)
1. As shown in the figure, I need to check if there is
only one object of type (work Product) contained by Method
Service and if yes, match the other elements and create
new elements.
2. If there are two object of type (workProduct) contained
by Method Service element the rule must not execute,
The major issue is, for the same type of objects, I have to
forbid and preserve i.e., I must say don't have two objects of
type work product and at the same time also match the same
object (work Product) with other elements. This seem is not
working for me.
Thanks you.
_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev
--
________________________________________________________________________
Dr. Frank Hermann
________________________________________________________________________
Research Associate at SnT frank.hermann@xxxxxx
+352 466644 5864 www.securityandtrust.lu
Postal address Visiting address
--------------------------------- ---------------------------------
securityandtrust.lu
University of Luxembourg D104, Campus Kirchberg
4, rue Alphonse Weicker 4, rue Alphonse Weicker
L-2721 Luxembourg L-2721 Luxembourg
________________________________________________________________________
|