Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Henshin/FAQ"

Line 2: Line 2:
  
 
__TOC__
 
__TOC__
 
== What editors are available for defining Henshin transformations? ==
 
 
There are currently two editors available for Henshin: a tree-based one (EMF) and a graphical one (GMF).
 
For a short introduction on transformation rules see the [[Henshin Graphical Editor]] page.
 
  
 
== How can I execute transformations? ==
 
== How can I execute transformations? ==
  
Use the [[Henshin Interpreter]] to execute transformations.
+
Use the [[Henshin Interpreter]] to execute transformations (available via a wizard or programatically).
 
+
== What sort of automatic analysis is supported? ==
+
 
+
You can use the [[Henshin Statespace Explorer]] to generate a state space for a transformation system, check structural invariants and do model checking.
+
  
 
== After installing an update of Henshin, I cannot open my transformation anymore! ==
 
== After installing an update of Henshin, I cannot open my transformation anymore! ==
  
 
Migrate your old Henshin files using the [[Henshin Migration Wizard]].
 
Migrate your old Henshin files using the [[Henshin Migration Wizard]].
 +
 +
== Does Henshin support automatic tracing for exogenous transformations? ==
 +
 +
Henshin follows a rewrite approach. Tracing is not build into the transformation language but can be easily realized using a generic [[Henshin Trace Model]].
  
 
== How can I use dynamic EMF with Henshin? ==
 
== How can I use dynamic EMF with Henshin? ==
  
Define your Ecore models as usual. Make sure you use set the namespace URIs and prefixes for all packages. To use the packages in Henshin, right-click in the Henshin editor and select ''Import Package -- From Workspace'' and choose the packages from your Ecore files. To create an dynamic instance model, right-click on an Ecore file and select ''Henshin -- Create Dynamic Instance''. This will create an XMI file which you can then edit in the Sample Reflective Model Editor of EMF.
+
Define your EMF models as usual. Make sure you set the namespace URIs and prefixes for all packages. To use the packages in Henshin, right-click in the Henshin editor and select ''Import Package -- From Workspace'' and choose the packages from your Ecore files. To create an dynamic instance model, right-click on an Ecore file and select ''Henshin -- Create Dynamic Instance''. This will create an XMI file which you can then edit in the Sample Reflective Model Editor of EMF.  
  
== Does Henshin support automatic tracing for exogenous transformations? ==
+
If you '''don't''' want to use dynamic EMF, import the packages from the registry and use the runtime version (not the development version).
  
Henshin follows a rewrite approach. Tracing is not build into the transformation language but can be easily realized using a generic [[Henshin Trace Model]].
+
== I get NPEs when I try to execute my transformation ==
 +
 
 +
Make sure all node, edge and attribute types are correctly set. Also, it is important that you reference the same version of the metamodels in your Henshin files as in your instance models. For example, if you have a UML instance model created with the UML editors, you must make sure that you use the same UML metamodel in your transformation. In this case, you would have to import the UML metamodel from the registry and use the runtime version. See also the entries before and after this one.
  
 
== How can I define a higher-order (HO) transformation in Henshin? ==
 
== How can I define a higher-order (HO) transformation in Henshin? ==
  
Import the Henshin and the Ecore metamodel into your transformation (import from the registry and use the runtime versions). Check out the examples repository on our website for more details.
+
Import the Henshin and the Ecore metamodel into your transformation (import from the registry and use the '''runtime''' versions). Check out the examples repository on our website for more details.
  
 
== Why is my rule with a String constant not matched even though the constant is correct? ==
 
== Why is my rule with a String constant not matched even though the constant is correct? ==
  
 
The attribute in the Henshin rule must look like this: "CONSTANT" where CONSTANT is the string to be matched. Make sure you use double quotes here. In the instance model, the object's attribute must have the value CONSTANT -- in the EMF editor you must not use any quotes here!
 
The attribute in the Henshin rule must look like this: "CONSTANT" where CONSTANT is the string to be matched. Make sure you use double quotes here. In the instance model, the object's attribute must have the value CONSTANT -- in the EMF editor you must not use any quotes here!
 +
 +
== What sort of automatic analysis is supported? ==
 +
 +
You can use the [[Henshin Statespace Explorer]] to generate a state space for a transformation system, check structural invariants and do model checking.

Revision as of 16:03, 12 September 2012


How can I execute transformations?

Use the Henshin Interpreter to execute transformations (available via a wizard or programatically).

After installing an update of Henshin, I cannot open my transformation anymore!

Migrate your old Henshin files using the Henshin Migration Wizard.

Does Henshin support automatic tracing for exogenous transformations?

Henshin follows a rewrite approach. Tracing is not build into the transformation language but can be easily realized using a generic Henshin Trace Model.

How can I use dynamic EMF with Henshin?

Define your EMF models as usual. Make sure you set the namespace URIs and prefixes for all packages. To use the packages in Henshin, right-click in the Henshin editor and select Import Package -- From Workspace and choose the packages from your Ecore files. To create an dynamic instance model, right-click on an Ecore file and select Henshin -- Create Dynamic Instance. This will create an XMI file which you can then edit in the Sample Reflective Model Editor of EMF.

If you don't want to use dynamic EMF, import the packages from the registry and use the runtime version (not the development version).

I get NPEs when I try to execute my transformation

Make sure all node, edge and attribute types are correctly set. Also, it is important that you reference the same version of the metamodels in your Henshin files as in your instance models. For example, if you have a UML instance model created with the UML editors, you must make sure that you use the same UML metamodel in your transformation. In this case, you would have to import the UML metamodel from the registry and use the runtime version. See also the entries before and after this one.

How can I define a higher-order (HO) transformation in Henshin?

Import the Henshin and the Ecore metamodel into your transformation (import from the registry and use the runtime versions). Check out the examples repository on our website for more details.

Why is my rule with a String constant not matched even though the constant is correct?

The attribute in the Henshin rule must look like this: "CONSTANT" where CONSTANT is the string to be matched. Make sure you use double quotes here. In the instance model, the object's attribute must have the value CONSTANT -- in the EMF editor you must not use any quotes here!

What sort of automatic analysis is supported?

You can use the Henshin Statespace Explorer to generate a state space for a transformation system, check structural invariants and do model checking.

Back to the top