HintConfiguration.genmodel 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
  3. xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/HintConfiguration/src-gen" modelPluginID="HintConfiguration"
  4. runtimeJar="true" modelName="HintConfiguration" updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
  5. testsDirectory="" booleanFlagsField="eFlags" booleanFlagsReservedBits="8" importerID="org.eclipse.emf.ecore.xcore.importer"
  6. containmentProxies="true" complianceLevel="8.0" language="en" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore"
  7. operationReflection="true" importOrganizing="true" decoration="Live" oSGiCompatible="true"
  8. eclipsePlatformVersion="Juno" autoResizeProperties="true" autoExpandProperties="10"
  9. findAction="true" expandAllAction="true" collapseAllAction="true" revertAction="true">
  10. <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/exporter/org.eclipse.xsd.ecore.exporter">
  11. <genAnnotations source="selectedPackages">
  12. <details key="http://www.eclipse.org/emf/2002/Ecore" value="Ecore.xsd"/>
  13. </genAnnotations>
  14. <details key="directoryURI" value="."/>
  15. </genAnnotations>
  16. <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/exporter/org.eclipse.xsd.ecore.exporter.xmi">
  17. <genAnnotations source="selectedPackages">
  18. <details key="http://www.eclipse.org/emf/2002/Ecore" value="EcoreXMI.xsd"/>
  19. </genAnnotations>
  20. <details key="directoryURI" value="."/>
  21. </genAnnotations>
  22. <foreignModel>HintConfiguration.xcore</foreignModel>
  23. <modelPluginVariables>org.eclipse.xtext.xbase.lib</modelPluginVariables>
  24. <modelPluginVariables>org.eclipse.emf.ecore.xcore.lib</modelPluginVariables>
  25. <genPackages prefix="Hintco" basePackage="ua.ansymo" disposableProviderFactory="true"
  26. ecorePackage="hintco.ecore#/">
  27. <genDataTypes ecoreDataType="hintco.ecore#//Int"/>
  28. <genClasses image="false" ecoreClass="hintco.ecore#//IDed">
  29. <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//IDed/identifier"/>
  30. </genClasses>
  31. <genClasses ecoreClass="hintco.ecore#//HintConfiguration">
  32. <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//HintConfiguration/candidates"/>
  33. <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//HintConfiguration/csuDeclarations"/>
  34. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//HintConfiguration/root"/>
  35. <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//HintConfiguration/nodes"/>
  36. </genClasses>
  37. <genClasses ecoreClass="hintco.ecore#//VariantDiagram">
  38. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//VariantDiagram/children"/>
  39. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//VariantDiagram/alternative"/>
  40. <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//VariantDiagram/name"
  41. get="&lt;%java.lang.String%> _xblockexpression = null;&#xA;{&#xA;&#x9;&lt;%java.lang.String%> _identifier = this.getIdentifier();&#xA;&#x9;final &lt;%java.lang.String%> prefix = (_identifier + &quot;_&quot;);&#xA;&#x9;&lt;%java.lang.String%> _xifexpression = null;&#xA;&#x9;&lt;%ua.ansymo.hintco.Alternative%> _alternative = this.getAlternative();&#xA;&#x9;boolean _tripleNotEquals = (_alternative != null);&#xA;&#x9;if (_tripleNotEquals)&#xA;&#x9;{&#xA;&#x9;&#x9;&lt;%java.lang.String%> _xifexpression_1 = null;&#xA;&#x9;&#x9;&lt;%ua.ansymo.hintco.Alternative%> _alternative_1 = this.getAlternative();&#xA;&#x9;&#x9;if ((_alternative_1 instanceof &lt;%ua.ansymo.hintco.RootCandidateScenario%>))&#xA;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&lt;%ua.ansymo.hintco.Alternative%> _alternative_2 = this.getAlternative();&#xA;&#x9;&#x9;&#x9;&lt;%java.lang.String%> _name = ((&lt;%ua.ansymo.hintco.RootCandidateScenario%>) _alternative_2).getName();&#xA;&#x9;&#x9;&#x9;_xifexpression_1 = ((prefix + &quot;sce &quot;) + _name);&#xA;&#x9;&#x9;}&#xA;&#x9;&#x9;else&#xA;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&lt;%java.lang.String%> _xifexpression_2 = null;&#xA;&#x9;&#x9;&#x9;&lt;%ua.ansymo.hintco.Alternative%> _alternative_3 = this.getAlternative();&#xA;&#x9;&#x9;&#x9;if ((_alternative_3 instanceof &lt;%ua.ansymo.hintco.XorPortAdaptation%>))&#xA;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&lt;%ua.ansymo.hintco.Alternative%> _alternative_4 = this.getAlternative();&#xA;&#x9;&#x9;&#x9;&#x9;&lt;%java.lang.String%> _name_1 = ((&lt;%ua.ansymo.hintco.XorPortAdaptation%>) _alternative_4).getName();&#xA;&#x9;&#x9;&#x9;&#x9;_xifexpression_2 = ((prefix + &quot;xor &quot;) + _name_1);&#xA;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&lt;%java.lang.String%> _xifexpression_3 = null;&#xA;&#x9;&#x9;&#x9;&#x9;&lt;%ua.ansymo.hintco.Alternative%> _alternative_5 = this.getAlternative();&#xA;&#x9;&#x9;&#x9;&#x9;if ((_alternative_5 instanceof &lt;%ua.ansymo.hintco.XorUnitAdaptation%>))&#xA;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;%ua.ansymo.hintco.Alternative%> _alternative_6 = this.getAlternative();&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;%java.lang.String%> _name_2 = ((&lt;%ua.ansymo.hintco.XorUnitAdaptation%>) _alternative_6).getName();&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;_xifexpression_3 = ((prefix + &quot;xor &quot;) + _name_2);&#xA;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;%java.lang.String%> _xifexpression_4 = null;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;%ua.ansymo.hintco.Alternative%> _alternative_7 = this.getAlternative();&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if ((_alternative_7 instanceof &lt;%ua.ansymo.hintco.ExtrapolationAdaptation%>))&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;%ua.ansymo.hintco.Alternative%> _alternative_8 = this.getAlternative();&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;%java.lang.String%> _name_3 = ((&lt;%ua.ansymo.hintco.ExtrapolationAdaptation%>) _alternative_8).getName();&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;_xifexpression_4 = ((prefix + &quot;extra &quot;) + _name_3);&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;%java.lang.String%> _xifexpression_5 = null;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;%ua.ansymo.hintco.Alternative%> _alternative_9 = this.getAlternative();&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if ((_alternative_9 instanceof &lt;%ua.ansymo.hintco.InterpolationAdaptation%>))&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;%ua.ansymo.hintco.Alternative%> _alternative_10 = this.getAlternative();&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&lt;%java.lang.String%> _name_4 = ((&lt;%ua.ansymo.hintco.InterpolationAdaptation%>) _alternative_10).getName();&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;_xifexpression_5 = ((prefix + &quot;intra &quot;) + _name_4);&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;_xifexpression_5 = (prefix + &quot;implement&quot;);&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;_xifexpression_4 = _xifexpression_5;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;_xifexpression_3 = _xifexpression_4;&#xA;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;&#x9;_xifexpression_2 = _xifexpression_3;&#xA;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;_xifexpression_1 = _xifexpression_2;&#xA;&#x9;&#x9;}&#xA;&#x9;&#x9;_xifexpression = _xifexpression_1;&#xA;&#x9;}&#xA;&#x9;else&#xA;&#x9;{&#xA;&#x9;&#x9;_xifexpression = (prefix + &quot;root&quot;);&#xA;&#x9;}&#xA;&#x9;_xblockexpression = _xifexpression;&#xA;}&#xA;return _xblockexpression;"/>
  42. </genClasses>
  43. <genClasses image="false" ecoreClass="hintco.ecore#//PrecedenceNode">
  44. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PrecedenceNode/precedes"/>
  45. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PrecedenceNode/succeeds"/>
  46. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PrecedenceNode/before"/>
  47. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PrecedenceNode/after"/>
  48. </genClasses>
  49. <genClasses ecoreClass="hintco.ecore#//RootCandidateScenario">
  50. <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//RootCandidateScenario/name"
  51. get="&lt;%java.lang.String%> _identifier = this.getIdentifier();&#xA;&lt;%java.lang.String%> _plus = (_identifier + &quot;(w=&quot;);&#xA;int _weight = this.getWeight();&#xA;&lt;%java.lang.String%> _plus_1 = (_plus + &lt;%java.lang.Integer%>.valueOf(_weight));&#xA;return (_plus_1 + &quot;)&quot;);"/>
  52. <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//RootCandidateScenario/stopTime"/>
  53. <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//RootCandidateScenario/stepSize"/>
  54. <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//RootCandidateScenario/outputStepSize"/>
  55. <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//RootCandidateScenario/maxInitIterations"/>
  56. </genClasses>
  57. <genClasses image="false" ecoreClass="hintco.ecore#//Scenario">
  58. <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//Scenario/cosimunits"/>
  59. </genClasses>
  60. <genClasses ecoreClass="hintco.ecore#//HierarchicalCosimUnit">
  61. <genOperations ecoreOperation="hintco.ecore#//HierarchicalCosimUnit/valid" body="final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.PortInstance%>, &lt;%java.lang.Boolean%>> _function = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.PortInstance%>, &lt;%java.lang.Boolean%>>()&#xA;{&#xA;&#x9;public &lt;%java.lang.Boolean%> apply(final &lt;%ua.ansymo.hintco.PortInstance%> p)&#xA;&#x9;{&#xA;&#x9;&#x9;return &lt;%java.lang.Boolean%>.valueOf((p instanceof &lt;%ua.ansymo.hintco.HierarchicalUnitPort%>));&#xA;&#x9;}&#xA;};&#xA;return &lt;%org.eclipse.xtext.xbase.lib.IterableExtensions%>.&lt;&lt;%ua.ansymo.hintco.PortInstance%>>forall(this.getPorts(), _function);"/>
  62. </genClasses>
  63. <genClasses ecoreClass="hintco.ecore#//CosimUnitDeclaration">
  64. <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//CosimUnitDeclaration/path"/>
  65. <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//CosimUnitDeclaration/guid"/>
  66. </genClasses>
  67. <genClasses image="false" ecoreClass="hintco.ecore#//UnitInstance">
  68. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//UnitInstance/scenario"/>
  69. <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//UnitInstance/adaptation"/>
  70. <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//UnitInstance/ports"/>
  71. <genOperations ecoreOperation="hintco.ecore#//UnitInstance/selectedAdaptations"
  72. body="&lt;%ua.ansymo.hintco.UnitAdaptation%> _adaptation = this.getAdaptation();&#xA;boolean _tripleEquals = (_adaptation == null);&#xA;if (_tripleEquals)&#xA;{&#xA;&#x9;return new &lt;%org.eclipse.emf.common.util.BasicEList%>&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>>(java.util.Collections.&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>>newArrayList()));&#xA;}&#xA;boolean _isSelected = this.getAdaptation().isSelected();&#xA;if (_isSelected)&#xA;{&#xA;&#x9;&lt;%ua.ansymo.hintco.UnitAdaptation%> _adaptation_1 = this.getAdaptation();&#xA;&#x9;if ((_adaptation_1 instanceof &lt;%ua.ansymo.hintco.DecompositionUnitAdaptation%>))&#xA;&#x9;{&#xA;&#x9;&#x9;&lt;%ua.ansymo.hintco.UnitAdaptation%> _adaptation_2 = this.getAdaptation();&#xA;&#x9;&#x9;return ((&lt;%ua.ansymo.hintco.DecompositionUnitAdaptation%>) _adaptation_2).selectedAdaptations();&#xA;&#x9;}&#xA;&#x9;&lt;%ua.ansymo.hintco.UnitAdaptation%> _adaptation_3 = this.getAdaptation();&#xA;&#x9;return new &lt;%org.eclipse.emf.common.util.BasicEList%>&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>>(java.util.Collections.&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>>newArrayList(_adaptation_3)));&#xA;}&#xA;return new &lt;%org.eclipse.emf.common.util.BasicEList%>&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>>(java.util.Collections.&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>>newArrayList()));"/>
  73. <genOperations ecoreOperation="hintco.ecore#//UnitInstance/getOutputPorts" body="final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.OutputPortInstance%>, &lt;%java.lang.Boolean%>> _function = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.OutputPortInstance%>, &lt;%java.lang.Boolean%>>()&#xA;{&#xA;&#x9;public &lt;%java.lang.Boolean%> apply(final &lt;%ua.ansymo.hintco.OutputPortInstance%> it)&#xA;&#x9;{&#xA;&#x9;&#x9;boolean _isInput = it.isInput();&#xA;&#x9;&#x9;return &lt;%java.lang.Boolean%>.valueOf((!_isInput));&#xA;&#x9;}&#xA;};&#xA;return &lt;%org.eclipse.emf.common.util.ECollections%>.&lt;&lt;%ua.ansymo.hintco.OutputPortInstance%>>toEList(&lt;%org.eclipse.xtext.xbase.lib.IterableExtensions%>.&lt;&lt;%ua.ansymo.hintco.OutputPortInstance%>>filter(&lt;%com.google.common.collect.Iterables%>.&lt;&lt;%ua.ansymo.hintco.OutputPortInstance%>>filter(this.getPorts(), &lt;%ua.ansymo.hintco.OutputPortInstance%>.class), _function));"/>
  74. <genOperations ecoreOperation="hintco.ecore#//UnitInstance/getInputPorts" body="final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.InputPortInstance%>, &lt;%java.lang.Boolean%>> _function = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.InputPortInstance%>, &lt;%java.lang.Boolean%>>()&#xA;{&#xA;&#x9;public &lt;%java.lang.Boolean%> apply(final &lt;%ua.ansymo.hintco.InputPortInstance%> it)&#xA;&#x9;{&#xA;&#x9;&#x9;return &lt;%java.lang.Boolean%>.valueOf(it.isInput());&#xA;&#x9;}&#xA;};&#xA;return &lt;%org.eclipse.emf.common.util.ECollections%>.&lt;&lt;%ua.ansymo.hintco.InputPortInstance%>>toEList(&lt;%org.eclipse.xtext.xbase.lib.IterableExtensions%>.&lt;&lt;%ua.ansymo.hintco.InputPortInstance%>>filter(&lt;%com.google.common.collect.Iterables%>.&lt;&lt;%ua.ansymo.hintco.InputPortInstance%>>filter(this.getPorts(), &lt;%ua.ansymo.hintco.InputPortInstance%>.class), _function));"/>
  75. <genOperations ecoreOperation="hintco.ecore#//UnitInstance/toString" body="return this.getIdentifier();"/>
  76. </genClasses>
  77. <genClasses ecoreClass="hintco.ecore#//CosimUnitInstance">
  78. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//CosimUnitInstance/declaration"/>
  79. </genClasses>
  80. <genClasses image="false" ecoreClass="hintco.ecore#//PortInstance">
  81. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PortInstance/unit"/>
  82. <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//PortInstance/adaptation"/>
  83. <genOperations ecoreOperation="hintco.ecore#//PortInstance/selectedAdaptations"
  84. body="&lt;%ua.ansymo.hintco.PortAdaptation%> _adaptation = this.getAdaptation();&#xA;boolean _tripleEquals = (_adaptation == null);&#xA;if (_tripleEquals)&#xA;{&#xA;&#x9;return new &lt;%org.eclipse.emf.common.util.BasicEList%>&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>>(java.util.Collections.&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>>newArrayList()));&#xA;}&#xA;boolean _isSelected = this.getAdaptation().isSelected();&#xA;if (_isSelected)&#xA;{&#xA;&#x9;&lt;%ua.ansymo.hintco.PortAdaptation%> _adaptation_1 = this.getAdaptation();&#xA;&#x9;if ((_adaptation_1 instanceof &lt;%ua.ansymo.hintco.DecompositionPortAdaptation%>))&#xA;&#x9;{&#xA;&#x9;&#x9;&lt;%ua.ansymo.hintco.PortAdaptation%> _adaptation_2 = this.getAdaptation();&#xA;&#x9;&#x9;return ((&lt;%ua.ansymo.hintco.DecompositionPortAdaptation%>) _adaptation_2).selectedAdaptations();&#xA;&#x9;}&#xA;&#x9;&lt;%ua.ansymo.hintco.PortAdaptation%> _adaptation_3 = this.getAdaptation();&#xA;&#x9;return new &lt;%org.eclipse.emf.common.util.BasicEList%>&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>>(java.util.Collections.&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>>newArrayList(_adaptation_3)));&#xA;}&#xA;return new &lt;%org.eclipse.emf.common.util.BasicEList%>&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>>(java.util.Collections.&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>>unmodifiableList(org.eclipse.xtext.xbase.lib.CollectionLiterals.&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>>newArrayList()));"/>
  85. <genOperations ecoreOperation="hintco.ecore#//PortInstance/isInput" body="return false;"/>
  86. <genOperations ecoreOperation="hintco.ecore#//PortInstance/getsValueFrom" body="return false;">
  87. <genParameters ecoreParameter="hintco.ecore#//PortInstance/getsValueFrom/p"/>
  88. </genOperations>
  89. <genOperations ecoreOperation="hintco.ecore#//PortInstance/toString" body="&lt;%java.lang.String%> _string = this.getUnit().toString();&#xA;&lt;%java.lang.String%> _plus = (_string + &quot;.&quot;);&#xA;&lt;%java.lang.String%> _identifier = this.getIdentifier();&#xA;return (_plus + _identifier);"/>
  90. </genClasses>
  91. <genClasses ecoreClass="hintco.ecore#//HierarchicalUnitPort">
  92. <genOperations ecoreOperation="hintco.ecore#//HierarchicalUnitPort/isInput"
  93. body="boolean _xblockexpression = false;&#xA;{&#xA;&#x9;final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.OutputPortInstance%>, &lt;%java.lang.Boolean%>> _function = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.OutputPortInstance%>, &lt;%java.lang.Boolean%>>()&#xA;&#x9;{&#xA;&#x9;&#x9;public &lt;%java.lang.Boolean%> apply(final &lt;%ua.ansymo.hintco.OutputPortInstance%> p)&#xA;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&lt;%ua.ansymo.hintco.OutputPortInstance%> _valueFrom = &lt;%this%>.getValueFrom();&#xA;&#x9;&#x9;&#x9;return &lt;%java.lang.Boolean%>.valueOf(&lt;%com.google.common.base.Objects%>.equal(p, _valueFrom));&#xA;&#x9;&#x9;}&#xA;&#x9;};&#xA;&#x9;boolean _exists = &lt;%org.eclipse.xtext.xbase.lib.IteratorExtensions%>.&lt;&lt;%ua.ansymo.hintco.OutputPortInstance%>>exists(&lt;%com.google.common.collect.Iterators%>.&lt;&lt;%ua.ansymo.hintco.OutputPortInstance%>>filter(this.getUnit().eAllContents(), &lt;%ua.ansymo.hintco.OutputPortInstance%>.class), _function);&#xA;&#x9;final boolean auxIsInput = (!_exists);&#xA;&#x9;final boolean auxAltIsInput = this.altIsInput();&#xA;&#x9;if (((auxIsInput &amp;&amp; (!auxAltIsInput)) || ((!auxIsInput) &amp;&amp; auxAltIsInput)))&#xA;&#x9;{&#xA;&#x9;&#x9;throw new &lt;%java.lang.RuntimeException%>(&quot;Something wrong with the implementation of isInput&quot;);&#xA;&#x9;}&#xA;&#x9;_xblockexpression = auxIsInput;&#xA;}&#xA;return _xblockexpression;"/>
  94. <genOperations ecoreOperation="hintco.ecore#//HierarchicalUnitPort/altIsInput"
  95. body="boolean _xifexpression = false;&#xA;boolean _isEmpty = this.getValueTo().isEmpty();&#xA;if (_isEmpty)&#xA;{&#xA;&#x9;_xifexpression = false;&#xA;}&#xA;else&#xA;{&#xA;&#x9;final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.InputPortInstance%>, &lt;%java.lang.Boolean%>> _function = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.InputPortInstance%>, &lt;%java.lang.Boolean%>>()&#xA;&#x9;{&#xA;&#x9;&#x9;public &lt;%java.lang.Boolean%> apply(final &lt;%ua.ansymo.hintco.InputPortInstance%> trgP)&#xA;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;boolean _xifexpression = false;&#xA;&#x9;&#x9;&#x9;&lt;%ua.ansymo.hintco.UnitInstance%> _unit = trgP.getUnit();&#xA;&#x9;&#x9;&#x9;&lt;%ua.ansymo.hintco.UnitInstance%> _unit_1 = &lt;%this%>.getUnit();&#xA;&#x9;&#x9;&#x9;boolean _tripleEquals = (_unit == _unit_1);&#xA;&#x9;&#x9;&#x9;if (_tripleEquals)&#xA;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;_xifexpression = false;&#xA;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;boolean _xblockexpression = false;&#xA;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.InputPortInstance%>, &lt;%java.lang.Boolean%>> _function = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.InputPortInstance%>, &lt;%java.lang.Boolean%>>()&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;public &lt;%java.lang.Boolean%> apply(final &lt;%ua.ansymo.hintco.InputPortInstance%> ip)&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;return &lt;%java.lang.Boolean%>.valueOf((ip == trgP));&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;};&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;final boolean internal = &lt;%org.eclipse.xtext.xbase.lib.IteratorExtensions%>.&lt;&lt;%ua.ansymo.hintco.InputPortInstance%>>exists(&lt;%com.google.common.collect.Iterators%>.&lt;&lt;%ua.ansymo.hintco.InputPortInstance%>>filter(&lt;%this%>.getUnit().eAllContents(), &lt;%ua.ansymo.hintco.InputPortInstance%>.class), _function);&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;boolean _xifexpression_1 = false;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;if ((!internal))&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;_xifexpression_1 = false;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;boolean _xifexpression_2 = false;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;if ((trgP instanceof &lt;%ua.ansymo.hintco.HierarchicalUnitPort%>))&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;_xifexpression_2 = ((&lt;%ua.ansymo.hintco.HierarchicalUnitPort%>)trgP).altIsInput();&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;_xifexpression_2 = true;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;_xifexpression_1 = _xifexpression_2;&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;_xblockexpression = _xifexpression_1;&#xA;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;&#x9;_xifexpression = _xblockexpression;&#xA;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;return &lt;%java.lang.Boolean%>.valueOf(_xifexpression);&#xA;&#x9;&#x9;}&#xA;&#x9;};&#xA;&#x9;_xifexpression = &lt;%org.eclipse.xtext.xbase.lib.IterableExtensions%>.&lt;&lt;%ua.ansymo.hintco.InputPortInstance%>>forall(this.getValueTo(), _function);&#xA;}&#xA;return _xifexpression;"/>
  96. </genClasses>
  97. <genClasses ecoreClass="hintco.ecore#//InputPortInstance">
  98. <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//InputPortInstance/extrapolationCost"/>
  99. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//InputPortInstance/internalValueTo"/>
  100. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//InputPortInstance/valueFrom"/>
  101. <genOperations ecoreOperation="hintco.ecore#//InputPortInstance/getRealValueFrom"
  102. body="&lt;%ua.ansymo.hintco.OutputPortInstance%> _xifexpression = null;&#xA;&lt;%ua.ansymo.hintco.OutputPortInstance%> _valueFrom = this.getValueFrom();&#xA;if ((_valueFrom instanceof &lt;%ua.ansymo.hintco.HierarchicalUnitPort%>))&#xA;{&#xA;&#x9;&lt;%ua.ansymo.hintco.OutputPortInstance%> _valueFrom_1 = this.getValueFrom();&#xA;&#x9;_xifexpression = ((&lt;%ua.ansymo.hintco.HierarchicalUnitPort%>) _valueFrom_1).getRealValueFrom();&#xA;}&#xA;else&#xA;{&#xA;&#x9;_xifexpression = this.getValueFrom();&#xA;}&#xA;return _xifexpression;"/>
  103. <genOperations ecoreOperation="hintco.ecore#//InputPortInstance/getsValueFrom"
  104. body="&lt;%ua.ansymo.hintco.OutputPortInstance%> _valueFrom = this.getValueFrom();&#xA;boolean _tripleEquals = (_valueFrom == p);&#xA;if (_tripleEquals)&#xA;{&#xA;&#x9;return true;&#xA;}&#xA;else&#xA;{&#xA;&#x9;&lt;%ua.ansymo.hintco.OutputPortInstance%> _valueFrom_1 = this.getValueFrom();&#xA;&#x9;if ((_valueFrom_1 instanceof &lt;%ua.ansymo.hintco.InputPortInstance%>))&#xA;&#x9;{&#xA;&#x9;&#x9;&lt;%ua.ansymo.hintco.OutputPortInstance%> _valueFrom_2 = this.getValueFrom();&#xA;&#x9;&#x9;return ((&lt;%ua.ansymo.hintco.InputPortInstance%>) _valueFrom_2).getsValueFrom(p);&#xA;&#x9;}&#xA;&#x9;else&#xA;&#x9;{&#xA;&#x9;&#x9;return false;&#xA;&#x9;}&#xA;}">
  105. <genParameters ecoreParameter="hintco.ecore#//InputPortInstance/getsValueFrom/p"/>
  106. </genOperations>
  107. <genOperations ecoreOperation="hintco.ecore#//InputPortInstance/isInput" body="return true;"/>
  108. </genClasses>
  109. <genClasses ecoreClass="hintco.ecore#//OutputPortInstance">
  110. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//OutputPortInstance/valueTo"/>
  111. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//OutputPortInstance/internalValueFrom"/>
  112. <genOperations ecoreOperation="hintco.ecore#//OutputPortInstance/isInput" body="return false;"/>
  113. </genClasses>
  114. <genClasses image="false" ecoreClass="hintco.ecore#//Alternative">
  115. <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//Alternative/weight"/>
  116. <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//Alternative/selected"/>
  117. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//Alternative/implies"/>
  118. </genClasses>
  119. <genClasses image="false" ecoreClass="hintco.ecore#//Adaptation"/>
  120. <genClasses image="false" ecoreClass="hintco.ecore#//PortAdaptation">
  121. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PortAdaptation/port"/>
  122. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PortAdaptation/parent"/>
  123. <genOperations ecoreOperation="hintco.ecore#//PortAdaptation/adapted" body="&lt;%ua.ansymo.hintco.PortInstance%> _port = this.getPort();&#xA;boolean _tripleNotEquals = (_port != null);&#xA;if (_tripleNotEquals)&#xA;{&#xA;&#x9;return this.getPort();&#xA;}&#xA;&lt;%ua.ansymo.hintco.DecompositionPortAdaptation%> _parent = this.getParent();&#xA;boolean _tripleEquals = (_parent == null);&#xA;if (_tripleEquals)&#xA;{&#xA;&#x9;return null;&#xA;}&#xA;return this.getParent().adapted();"/>
  124. </genClasses>
  125. <genClasses image="false" ecoreClass="hintco.ecore#//DecompositionPortAdaptation">
  126. <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//DecompositionPortAdaptation/children"/>
  127. <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//DecompositionPortAdaptation/name"
  128. get="int _weight = this.getWeight();&#xA;&lt;%java.lang.String%> _plus = (&quot;(w=&quot; + &lt;%java.lang.Integer%>.valueOf(_weight));&#xA;return (_plus + &quot;)&quot;);"/>
  129. <genOperations ecoreOperation="hintco.ecore#//DecompositionPortAdaptation/selectedAdaptations"
  130. body="int _size = this.getChildren().size();&#xA;final &lt;%org.eclipse.emf.common.util.BasicEList%>&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>> res = new &lt;%org.eclipse.emf.common.util.BasicEList%>&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>>(_size);&#xA;final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>, &lt;%java.lang.Boolean%>> _function = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>, &lt;%java.lang.Boolean%>>()&#xA;{&#xA;&#x9;public &lt;%java.lang.Boolean%> apply(final &lt;%ua.ansymo.hintco.PortAdaptation%> a)&#xA;&#x9;{&#xA;&#x9;&#x9;return &lt;%java.lang.Boolean%>.valueOf(a.isSelected());&#xA;&#x9;}&#xA;};&#xA;&lt;%java.lang.Iterable%>&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>> _filter = &lt;%org.eclipse.xtext.xbase.lib.IterableExtensions%>.&lt;&lt;%ua.ansymo.hintco.PortAdaptation%>>filter(this.getChildren(), _function);&#xA;for (final &lt;%ua.ansymo.hintco.PortAdaptation%> c : _filter)&#xA;{&#xA;&#x9;if ((c instanceof &lt;%ua.ansymo.hintco.DecompositionPortAdaptation%>))&#xA;&#x9;{&#xA;&#x9;&#x9;res.addAll(((&lt;%ua.ansymo.hintco.DecompositionPortAdaptation%>)c).selectedAdaptations());&#xA;&#x9;}&#xA;&#x9;else&#xA;&#x9;{&#xA;&#x9;&#x9;res.add(c);&#xA;&#x9;}&#xA;}&#xA;return res;"/>
  131. </genClasses>
  132. <genClasses image="false" ecoreClass="hintco.ecore#//UnitAdaptation">
  133. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//UnitAdaptation/unit"/>
  134. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//UnitAdaptation/parent"/>
  135. <genOperations ecoreOperation="hintco.ecore#//UnitAdaptation/adapted" body="&lt;%ua.ansymo.hintco.UnitInstance%> _unit = this.getUnit();&#xA;boolean _tripleNotEquals = (_unit != null);&#xA;if (_tripleNotEquals)&#xA;{&#xA;&#x9;return this.getUnit();&#xA;}&#xA;&lt;%ua.ansymo.hintco.DecompositionUnitAdaptation%> _parent = this.getParent();&#xA;boolean _tripleEquals = (_parent == null);&#xA;if (_tripleEquals)&#xA;{&#xA;&#x9;return null;&#xA;}&#xA;return this.getParent().adapted();"/>
  136. </genClasses>
  137. <genClasses image="false" ecoreClass="hintco.ecore#//DecompositionUnitAdaptation">
  138. <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference hintco.ecore#//DecompositionUnitAdaptation/children"/>
  139. <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//DecompositionUnitAdaptation/name"
  140. get="int _weight = this.getWeight();&#xA;&lt;%java.lang.String%> _plus = (&quot;(w=&quot; + &lt;%java.lang.Integer%>.valueOf(_weight));&#xA;return (_plus + &quot;)&quot;);"/>
  141. <genOperations ecoreOperation="hintco.ecore#//DecompositionUnitAdaptation/selectedAdaptations"
  142. body="int _size = this.getChildren().size();&#xA;final &lt;%org.eclipse.emf.common.util.BasicEList%>&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>> res = new &lt;%org.eclipse.emf.common.util.BasicEList%>&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>>(_size);&#xA;final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>, &lt;%java.lang.Boolean%>> _function = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>, &lt;%java.lang.Boolean%>>()&#xA;{&#xA;&#x9;public &lt;%java.lang.Boolean%> apply(final &lt;%ua.ansymo.hintco.UnitAdaptation%> a)&#xA;&#x9;{&#xA;&#x9;&#x9;return &lt;%java.lang.Boolean%>.valueOf(a.isSelected());&#xA;&#x9;}&#xA;};&#xA;&lt;%java.lang.Iterable%>&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>> _filter = &lt;%org.eclipse.xtext.xbase.lib.IterableExtensions%>.&lt;&lt;%ua.ansymo.hintco.UnitAdaptation%>>filter(this.getChildren(), _function);&#xA;for (final &lt;%ua.ansymo.hintco.UnitAdaptation%> c : _filter)&#xA;{&#xA;&#x9;if ((c instanceof &lt;%ua.ansymo.hintco.DecompositionUnitAdaptation%>))&#xA;&#x9;{&#xA;&#x9;&#x9;res.addAll(((&lt;%ua.ansymo.hintco.DecompositionUnitAdaptation%>)c).selectedAdaptations());&#xA;&#x9;}&#xA;&#x9;else&#xA;&#x9;{&#xA;&#x9;&#x9;res.add(c);&#xA;&#x9;}&#xA;}&#xA;return res;"/>
  143. </genClasses>
  144. <genClasses ecoreClass="hintco.ecore#//XorUnitAdaptation"/>
  145. <genClasses ecoreClass="hintco.ecore#//XorPortAdaptation"/>
  146. <genClasses image="false" ecoreClass="hintco.ecore#//ApproximationAdaptation">
  147. <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//ApproximationAdaptation/order"/>
  148. </genClasses>
  149. <genClasses ecoreClass="hintco.ecore#//MultiRateAdaptation">
  150. <genFeatures createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//MultiRateAdaptation/rate"/>
  151. <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//MultiRateAdaptation/name"
  152. get="int _rate = this.getRate();&#xA;&lt;%java.lang.String%> _plus = (&lt;%java.lang.Integer%>.valueOf(_rate) + &quot;(w=&quot;);&#xA;int _weight = this.getWeight();&#xA;&lt;%java.lang.String%> _plus_1 = (_plus + &lt;%java.lang.Integer%>.valueOf(_weight));&#xA;return (_plus_1 + &quot;)&quot;);"/>
  153. </genClasses>
  154. <genClasses ecoreClass="hintco.ecore#//PowerBondAdaptation">
  155. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PowerBondAdaptation/effort"/>
  156. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PowerBondAdaptation/flow"/>
  157. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PowerBondAdaptation/pOut"/>
  158. <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference hintco.ecore#//PowerBondAdaptation/pIn"/>
  159. <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//PowerBondAdaptation/name"
  160. get="&lt;%java.lang.String%> _xifexpression = null;&#xA;if (((this.getEffort() != null) &amp;&amp; (this.getFlow() != null)))&#xA;{&#xA;&#x9;&lt;%java.lang.String%> _identifier = this.getEffort().getIdentifier();&#xA;&#x9;&lt;%java.lang.String%> _plus = (&quot;PBond_&quot; + _identifier);&#xA;&#x9;&lt;%java.lang.String%> _plus_1 = (_plus + &quot;_&quot;);&#xA;&#x9;&lt;%java.lang.String%> _identifier_1 = this.getFlow().getIdentifier();&#xA;&#x9;&lt;%java.lang.String%> _plus_2 = (_plus_1 + _identifier_1);&#xA;&#x9;&lt;%java.lang.String%> _plus_3 = (_plus_2 + &quot;(w=&quot;);&#xA;&#x9;int _weight = this.getWeight();&#xA;&#x9;&lt;%java.lang.String%> _plus_4 = (_plus_3 + &lt;%java.lang.Integer%>.valueOf(_weight));&#xA;&#x9;_xifexpression = (_plus_4 + &quot;)&quot;);&#xA;}&#xA;else&#xA;{&#xA;&#x9;int _weight_1 = this.getWeight();&#xA;&#x9;&lt;%java.lang.String%> _plus_5 = (&quot;PBond(w=&quot; + &lt;%java.lang.Integer%>.valueOf(_weight_1));&#xA;&#x9;_xifexpression = (_plus_5 + &quot;)&quot;);&#xA;}&#xA;return _xifexpression;"/>
  161. <genOperations ecoreOperation="hintco.ecore#//PowerBondAdaptation/getDual" body="&lt;%ua.ansymo.hintco.PowerBondAdaptation%> _xblockexpression = null;&#xA;{&#xA;&#x9;&lt;%ua.ansymo.hintco.PowerBondAdaptation%> res = null;&#xA;&#x9;if (((this.getEffort() instanceof &lt;%ua.ansymo.hintco.InputPortInstance%>) &amp;&amp; (this.getFlow() instanceof &lt;%ua.ansymo.hintco.OutputPortInstance%>)))&#xA;&#x9;{&#xA;&#x9;&#x9;final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.UnitInstance%>, &lt;%java.lang.Iterable%>&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>>> _function = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.UnitInstance%>, &lt;%java.lang.Iterable%>&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>>>()&#xA;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;public &lt;%java.lang.Iterable%>&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>> apply(final &lt;%ua.ansymo.hintco.UnitInstance%> u)&#xA;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;return &lt;%org.eclipse.xtext.xbase.lib.IteratorExtensions%>.&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>>toIterable(&lt;%com.google.common.collect.Iterators%>.&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>>filter(u.eAllContents(), &lt;%ua.ansymo.hintco.PowerBondAdaptation%>.class));&#xA;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;};&#xA;&#x9;&#x9;final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>, &lt;%java.lang.Boolean%>> _function_1 = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>, &lt;%java.lang.Boolean%>>()&#xA;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;public &lt;%java.lang.Boolean%> apply(final &lt;%ua.ansymo.hintco.PowerBondAdaptation%> a)&#xA;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;return &lt;%java.lang.Boolean%>.valueOf(((a.getEffort() instanceof &lt;%ua.ansymo.hintco.OutputPortInstance%>) &amp;&amp; (a.getFlow() instanceof &lt;%ua.ansymo.hintco.InputPortInstance%>)));&#xA;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;};&#xA;&#x9;&#x9;final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>, &lt;%java.lang.Boolean%>> _function_2 = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>, &lt;%java.lang.Boolean%>>()&#xA;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;public &lt;%java.lang.Boolean%> apply(final &lt;%ua.ansymo.hintco.PowerBondAdaptation%> a)&#xA;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;return &lt;%java.lang.Boolean%>.valueOf((((&lt;%ua.ansymo.hintco.OutputPortInstance%>) a.getEffort()).getValueTo().contains(&lt;%this%>.getEffort()) &amp;&amp; (((&lt;%ua.ansymo.hintco.InputPortInstance%>) a.getFlow()).getValueFrom() == &lt;%this%>.getFlow())));&#xA;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;};&#xA;&#x9;&#x9;res = &lt;%org.eclipse.xtext.xbase.lib.IterableExtensions%>.&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>>findFirst(&lt;%org.eclipse.xtext.xbase.lib.IterableExtensions%>.&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>>filter(&lt;%org.eclipse.xtext.xbase.lib.IterableExtensions%>.&lt;&lt;%ua.ansymo.hintco.UnitInstance%>, &lt;%ua.ansymo.hintco.PowerBondAdaptation%>>flatMap(this.getUnit().getScenario().getCosimunits(), _function), _function_1), _function_2);&#xA;&#x9;}&#xA;&#x9;else&#xA;&#x9;{&#xA;&#x9;&#x9;if (((this.getEffort() instanceof &lt;%ua.ansymo.hintco.OutputPortInstance%>) &amp;&amp; (this.getFlow() instanceof &lt;%ua.ansymo.hintco.InputPortInstance%>)))&#xA;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.UnitInstance%>, &lt;%java.lang.Iterable%>&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>>> _function_3 = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.UnitInstance%>, &lt;%java.lang.Iterable%>&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>>>()&#xA;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;public &lt;%java.lang.Iterable%>&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>> apply(final &lt;%ua.ansymo.hintco.UnitInstance%> u)&#xA;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;return &lt;%org.eclipse.xtext.xbase.lib.IteratorExtensions%>.&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>>toIterable(&lt;%com.google.common.collect.Iterators%>.&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>>filter(u.eAllContents(), &lt;%ua.ansymo.hintco.PowerBondAdaptation%>.class));&#xA;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;};&#xA;&#x9;&#x9;&#x9;final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>, &lt;%java.lang.Boolean%>> _function_4 = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>, &lt;%java.lang.Boolean%>>()&#xA;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;public &lt;%java.lang.Boolean%> apply(final &lt;%ua.ansymo.hintco.PowerBondAdaptation%> a)&#xA;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;return &lt;%java.lang.Boolean%>.valueOf(((a.getEffort() instanceof &lt;%ua.ansymo.hintco.InputPortInstance%>) &amp;&amp; (a.getFlow() instanceof &lt;%ua.ansymo.hintco.OutputPortInstance%>)));&#xA;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;};&#xA;&#x9;&#x9;&#x9;final &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>, &lt;%java.lang.Boolean%>> _function_5 = new &lt;%org.eclipse.xtext.xbase.lib.Functions.Function1%>&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>, &lt;%java.lang.Boolean%>>()&#xA;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;public &lt;%java.lang.Boolean%> apply(final &lt;%ua.ansymo.hintco.PowerBondAdaptation%> a)&#xA;&#x9;&#x9;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;return &lt;%java.lang.Boolean%>.valueOf(((((&lt;%ua.ansymo.hintco.InputPortInstance%>) a.getEffort()).getValueFrom() == &lt;%this%>.getEffort()) &amp;&amp; ((&lt;%ua.ansymo.hintco.OutputPortInstance%>) a.getFlow()).getValueTo().contains(&lt;%this%>.getFlow())));&#xA;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;};&#xA;&#x9;&#x9;&#x9;res = &lt;%org.eclipse.xtext.xbase.lib.IterableExtensions%>.&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>>findFirst(&lt;%org.eclipse.xtext.xbase.lib.IterableExtensions%>.&lt;&lt;%ua.ansymo.hintco.PowerBondAdaptation%>>filter(&lt;%org.eclipse.xtext.xbase.lib.IterableExtensions%>.&lt;&lt;%ua.ansymo.hintco.UnitInstance%>, &lt;%ua.ansymo.hintco.PowerBondAdaptation%>>flatMap(this.getUnit().getScenario().getCosimunits(), _function_3), _function_4), _function_5);&#xA;&#x9;&#x9;}&#xA;&#x9;&#x9;else&#xA;&#x9;&#x9;{&#xA;&#x9;&#x9;&#x9;throw new &lt;%java.lang.RuntimeException%>(&quot;Invalid effort and flow in power bond adaptation&quot;);&#xA;&#x9;&#x9;}&#xA;&#x9;}&#xA;&#x9;if ((res == null))&#xA;&#x9;{&#xA;&#x9;&#x9;throw new &lt;%java.lang.RuntimeException%>(&quot;Power bond adaptation has no dual&quot;);&#xA;&#x9;}&#xA;&#x9;_xblockexpression = res;&#xA;}&#xA;return _xblockexpression;"/>
  162. </genClasses>
  163. <genClasses ecoreClass="hintco.ecore#//ExtrapolationAdaptation">
  164. <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//ExtrapolationAdaptation/name"
  165. get="int _order = this.getOrder();&#xA;&lt;%java.lang.String%> _plus = (&lt;%java.lang.Integer%>.valueOf(_order) + &quot;(w=&quot;);&#xA;int _weight = this.getWeight();&#xA;&lt;%java.lang.String%> _plus_1 = (_plus + &lt;%java.lang.Integer%>.valueOf(_weight));&#xA;return (_plus_1 + &quot;)&quot;);"/>
  166. </genClasses>
  167. <genClasses ecoreClass="hintco.ecore#//RollbackInterpolationAdaptation"/>
  168. <genClasses ecoreClass="hintco.ecore#//InterpolationAdaptation">
  169. <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute hintco.ecore#//InterpolationAdaptation/name"
  170. get="int _order = this.getOrder();&#xA;&lt;%java.lang.String%> _plus = (&lt;%java.lang.Integer%>.valueOf(_order) + &quot;(w=&quot;);&#xA;int _weight = this.getWeight();&#xA;&lt;%java.lang.String%> _plus_1 = (_plus + &lt;%java.lang.Integer%>.valueOf(_weight));&#xA;return (_plus_1 + &quot;)&quot;);"/>
  171. </genClasses>
  172. </genPackages>
  173. </genmodel:GenModel>