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

just edit the name of the NAC in the graphical editor
-Thorsten

Hello Subramanya,

the solution to your issue is to split your single NAC with several "forbid" nodes in the graphical view into two separate NACs. I assume that you can use the Henshin model editor for that.

Matthias or Christian,
can you give advice on how to use the editor for specifying two NACs?

Best regards,

Frank


On 6/27/2014 10:29 AM, Subramanya K G wrote:
Hello Frank,

Thanks a lot for detailed description and your time.

Removing of one NAC node (WorkProduct), is still being executed even if the model contains two work products and also it is having side effects on the other node creation of the same rule.

1. As shown in the same attachment, I am creating elements " Method Service Descriptor" and "Activity Input Mapping" elements if they do not exist already and they match the work product specified by <<PRESERVE>>  Method Service Descriptor's Work Product (Through Method Service, Method Service Interface).
2. Removing one NAC, is allowing the rule to create duplicates, i.e. Method Service Descriptor and Activity InputMapping elements are created "EVEN if they exist". That means this NAC node WOrk Product, is having negative impact or other NAC nodes.

Is there any solution for this problem ?? Thank You.








On Fri, Jun 27, 2014 at 10:03 AM, Frank HERMANN <frank.hermann@xxxxxx> wrote:
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.





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




_______________________________________________
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




_______________________________________________
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


--
Dipl. Inf. Thorsten Arendt
Philipps-Universität Marburg
Fachbereich Mathematik und Informatik
Hans-Meerwein-Str.
D-35032 Marburg
Office: 05D18
Phone : +49-6421-2821540
Email : arendt@xxxxxxxxxxxxxxxxxxxxxxxxx
--

Back to the top