Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Information on attribute conditions

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.





On Fri, Jun 27, 2014 at 9:22 AM, Frank HERMANN <frank.hermann@xxxxxx> wrote:
Hello Subramany,

if you have elements in a NAC that shall be related to elements in the LHS, then you can add a mapping from the LHS node to the NAC node. This implies that the LHS node and the NAC node will be the same in the instance graph.

You only need to take care of the following: the NAC should contain at least:
- one node that is not mapped (node)
or
- one additional edge between nodes that is not present in the LHS already
or
- one more concrete information from LHS to NAC: e.g. the NAC node has a more concrete type, or an attribute value is more specific


Hope this helps - please try an example with a mapping from LHS to NAC.
If you use the graphical editor, then you can connect "<<forbid>>" NAC structures with "<<preserve>>" LHS structures.


Best regards,

Frank




On 6/27/2014 8:02 AM, Subramanya K G wrote:
Hello Matthias,

Yes, I had tried, It can be used, but the problem is, in the same(2nd rule) rule I have to match for the presence of the same object ("work product"), on which I will be creating new elements.

So to summarize, In a rule, I have to forbid the existence of 2 work products and it should have only one work product and that has to be matched with other elements, to create new elements in the model as shown in the rule file.

Thanks




On Thu, Jun 26, 2014 at 11:13 PM, Matthias Tichy <matthias.tichy@xxxxxxxxx> wrote:
Hi,

You can use NAC and PAC to constrain the matching of the LHS. However, they are not part of the computed match of the LHS. Hope this clarifies the situation. If not, simply try it with a small example :-)

Cheers,

mtt

From: Subramanya K G <subramanya.kg@xxxxxxxxx>
Reply-To: Henshin developers mailing list <henshin-dev@xxxxxxxxxxx>
Date: Donnerstag, 26. Juni 2014 23:01

To: Henshin developers mailing list <henshin-dev@xxxxxxxxxxx>
Subject: Re: [henshin-dev] Information on attribute conditions

Hello Matthias,

I have read in the below document that Negative application conditions and PACs, cannot be used to match LHS of the graph.

document : https://wiki.eclipse.org/Henshin_Transformation_Meta-Model

Please let me know if this is right.
Thanks


On Thu, Jun 26, 2014 at 10:57 PM, Matthias Tichy <matthias.tichy@xxxxxxxxx> wrote:
Hi,

Can you not simply use a Negative Application Condition in the second rule which ensure that there are not 2 work products (without using the first rule at all).

/mtt

From: Subramanya K G <subramanya.kg@xxxxxxxxx>
Reply-To: Henshin developers mailing list <henshin-dev@xxxxxxxxxxx>
Date: Donnerstag, 26. Juni 2014 22:53

To: Henshin developers mailing list <henshin-dev@xxxxxxxxxxx>
Subject: Re: [henshin-dev] Information on attribute conditions

Hello Mathias,

Thanks for the reply, but I am using state space exploration, so I cannot use any conditional units.

1. In the first rule (testRule), I check if there two elements of type "Work Product"  (see the attachment)
2. The second rule (rule2) has to be executed only if the first rule does not have two objects of type "Work Products"

Thanks



On Thu, Jun 26, 2014 at 10:44 PM, Matthias Tichy <matthias.tichy@xxxxxxxxx> wrote:
Hi, 

I am not sure that i understand what you want to do. Can you not simply to this in one rule? What about using a Conditional Unit?

If this does not help, please provide the rules as examples.

Cheers,

mtt

From: Subramanya K G <subramanya.kg@xxxxxxxxx>
Reply-To: Henshin developers mailing list <henshin-dev@xxxxxxxxxxx>
Date: Donnerstag, 26. Juni 2014 22:39
To: Henshin developers mailing list <henshin-dev@xxxxxxxxxxx>
Subject: [henshin-dev] Information on attribute conditions

Hello All,

I have two rules.
1. One rule is to check for the presence of some elements and based on this,
2. The second rule must decide whether two execute the rule or not.

I feel this can be done through adding attribute condition in the tree based editor.

Is there some reference example for this ?? or some material where I could get some more info on this.

Thanks in advance.

--


Thanks & Regards,
Subramanya



_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev




--


Thanks & Regards,
Subramanya



_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev




--


Thanks & Regards,
Subramanya



_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev




--


Thanks & Regards,
Subramanya




_______________________________________________
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
________________________________________________________________________ 

_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/henshin-dev




--


Thanks & Regards,
Subramanya


Attachment: ConcreteProblem.png
Description: PNG image


Back to the top