Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] programatically creating rules and Graphs

Hi,

As a related question to my last query, I am curious to know whether any of the henshin plugins provide the facility to compare/match rules with eachother. By this i mean whether it is possible to compare the elements in the LHS or RHS of different rules. As far as i understood, the matching plugin is used to match actual graphs to the transformation rules.

best Regards,
Zille

On 7/12/2012 8:03 AM, Christian Krause wrote:
Hi.

that is very easy. You can use the HenshinFactory to create rules etc. at runtime. It would look like this:

Rule rule = HenshinFactory.eINSTANCE.createRule();
...

After you have created your rules or units, you can directly apply them using the interpreter (see the interpreter wiki and the source code in the examples).

Another way to create a rule (or transformation unit etc.) is using higher-order (HO) transformations. Here the idea is to create or modify a rule or unit using a transformation. We currently have two examples of HO-transformations on our website. This one here is good starting point:

http://www.eclipse.org/modeling/emft/henshin/examples.php?example=combpattern

There a rule which matches a comb-like pattern of variable width is created using a HO-order transformation (see section "Generating and matching the comb pattern").

I hope this helps.

Cheers,
Christian



On 07/11/2012 05:54 PM, ? wrote:
hi all,
I want to programatically create a Rule in a transformation system. I want to create rules programatically and then programatically combine their left and right hand side. Is there a way to create Graph, Rule programatically?

Best

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




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


-- 
Zille Huma
Database and Information Systems
Institute of Computer Science
University of Paderborn
Zukunftsmeile 1
33102 Paderborn, Germany

Tel : +49(0)5251/60-3355
Fax : +49(0)5251/60-3431

Email: zille.huma@xxxxxx

Back to the top