[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [henshin-dev] programatically creating rules and Graphs
|
Hi Zille,
in principle you can employ the match finder of Henshin to do this. What
may be difficult is the fact that you are trying to decide whether two
rules are "similar" and not -- say strictly equal or subrules. It really
depends on what you mean by "similar". The match finder in Henshin can
help you if you want to check, e.g. whether two rules are equal, or one
rule is a "subrule" of another.
Hope this helps.
Christian
On 07/31/2012 10:46 AM, huma@xxxxxxxxxxxxxxxxxxxxx wrote:
Hi,
My task is that i want to dynamically match rules in two different
transformation systems on the basis of the elements in their LHS and
RHS. This matching is to decide whether the two transformation systems
have similar rules or not. The matching of element may consider
multiple factors, e.g., the types of the elements, the structure of
LHS and RHS of the two rules, etc. Can matching API help me in this
regard? if not is there any support by henshin to do such a matching?
Quoting Christian Krause <henshin.ck@xxxxxxxxx>:
Hi Zilla,
I am not sure what you mean by "compare/match rules with each other".
Henshin targets arbitrary EMF models. Since the Henshin model for
defining transformations is itself an EMF model, you can define rules
that match other rules. This is the whole idea of HO-transformations.
If you meant something else, maybe try to explain in more detail what
you are trying to achieve.
Cheers,
Christian
On 07/12/2012 03:19 PM, Zille Huma wrote:
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
_______________________________________________
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