hintco.ecore 48 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="hintco" nsURI="ua.ansymo.hintco" nsPrefix="hintco">
  4. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  5. <details key="basePackage" value="ua.ansymo"/>
  6. </eAnnotations>
  7. <eClassifiers xsi:type="ecore:EDataType" name="Int" instanceClassName="int"/>
  8. <eClassifiers xsi:type="ecore:EClass" name="IDed" abstract="true">
  9. <eStructuralFeatures xsi:type="ecore:EAttribute" name="identifier" unique="false"
  10. eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
  11. </eClassifiers>
  12. <eClassifiers xsi:type="ecore:EClass" name="HintConfiguration">
  13. <eStructuralFeatures xsi:type="ecore:EReference" name="candidates" upperBound="-1"
  14. eType="#//RootCandidateScenario" containment="true" resolveProxies="false"/>
  15. <eStructuralFeatures xsi:type="ecore:EReference" name="csuDeclarations" upperBound="-1"
  16. eType="#//CosimUnitDeclaration" containment="true" resolveProxies="false"/>
  17. <eStructuralFeatures xsi:type="ecore:EReference" name="root" eType="#//VariantDiagram"/>
  18. <eStructuralFeatures xsi:type="ecore:EReference" name="nodes" upperBound="-1"
  19. eType="#//VariantDiagram" containment="true" resolveProxies="false"/>
  20. </eClassifiers>
  21. <eClassifiers xsi:type="ecore:EClass" name="VariantDiagram" eSuperTypes="#//IDed">
  22. <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
  23. eType="#//VariantDiagram"/>
  24. <eStructuralFeatures xsi:type="ecore:EReference" name="alternative" eType="#//Alternative"/>
  25. <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
  26. changeable="false" volatile="true" transient="true" derived="true">
  27. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  28. <details key="get" value="&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;"/>
  29. </eAnnotations>
  30. </eStructuralFeatures>
  31. </eClassifiers>
  32. <eClassifiers xsi:type="ecore:EClass" name="PrecendenceNode" abstract="true">
  33. <eStructuralFeatures xsi:type="ecore:EReference" name="precedes" upperBound="-1"
  34. eType="#//PrecendenceNode" eOpposite="#//PrecendenceNode/succeeds"/>
  35. <eStructuralFeatures xsi:type="ecore:EReference" name="succeeds" upperBound="-1"
  36. eType="#//PrecendenceNode" eOpposite="#//PrecendenceNode/precedes"/>
  37. <eStructuralFeatures xsi:type="ecore:EReference" name="before" eType="#//PrecendenceNode"
  38. eOpposite="#//PrecendenceNode/after"/>
  39. <eStructuralFeatures xsi:type="ecore:EReference" name="after" eType="#//PrecendenceNode"
  40. eOpposite="#//PrecendenceNode/before"/>
  41. </eClassifiers>
  42. <eClassifiers xsi:type="ecore:EClass" name="RootCandidateScenario" eSuperTypes="#//IDed #//Alternative #//Scenario">
  43. <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
  44. changeable="false" volatile="true" transient="true" derived="true">
  45. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  46. <details key="get" value="&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;);"/>
  47. </eAnnotations>
  48. </eStructuralFeatures>
  49. <eStructuralFeatures xsi:type="ecore:EAttribute" name="stopTime" unique="false"
  50. eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EDouble"/>
  51. <eStructuralFeatures xsi:type="ecore:EAttribute" name="stepSize" unique="false"
  52. eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EDouble"/>
  53. <eStructuralFeatures xsi:type="ecore:EAttribute" name="outputStepSize" unique="false"
  54. eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EDouble"/>
  55. <eStructuralFeatures xsi:type="ecore:EAttribute" name="maxInitIterations" unique="false"
  56. eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"
  57. defaultValueLiteral="10"/>
  58. </eClassifiers>
  59. <eClassifiers xsi:type="ecore:EClass" name="Scenario" abstract="true" eSuperTypes="#//IDed">
  60. <eStructuralFeatures xsi:type="ecore:EReference" name="cosimunits" upperBound="-1"
  61. eType="#//UnitInstance" containment="true" resolveProxies="false" eOpposite="#//UnitInstance/scenario"/>
  62. </eClassifiers>
  63. <eClassifiers xsi:type="ecore:EClass" name="HierarchicalCosimUnit" eSuperTypes="#//Scenario #//UnitInstance">
  64. <eOperations name="valid" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean">
  65. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  66. <details key="body" value="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);"/>
  67. </eAnnotations>
  68. </eOperations>
  69. </eClassifiers>
  70. <eClassifiers xsi:type="ecore:EClass" name="CosimUnitDeclaration" eSuperTypes="#//IDed">
  71. <eStructuralFeatures xsi:type="ecore:EAttribute" name="path" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
  72. <eStructuralFeatures xsi:type="ecore:EAttribute" name="guid" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
  73. </eClassifiers>
  74. <eClassifiers xsi:type="ecore:EClass" name="UnitInstance" abstract="true" eSuperTypes="#//IDed #//PrecendenceNode">
  75. <eOperations name="selectedAdaptations" unique="false" upperBound="-1" eType="#//UnitAdaptation">
  76. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  77. <details key="body" value="&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()));"/>
  78. </eAnnotations>
  79. </eOperations>
  80. <eOperations name="getOutputPorts" unique="false" upperBound="-1" eType="#//OutputPortInstance">
  81. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  82. <details key="body" value="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));"/>
  83. </eAnnotations>
  84. </eOperations>
  85. <eOperations name="getInputPorts" unique="false" upperBound="-1" eType="#//InputPortInstance">
  86. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  87. <details key="body" value="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));"/>
  88. </eAnnotations>
  89. </eOperations>
  90. <eOperations name="toString" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString">
  91. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  92. <details key="body" value="return this.getIdentifier();"/>
  93. </eAnnotations>
  94. </eOperations>
  95. <eStructuralFeatures xsi:type="ecore:EReference" name="scenario" eType="#//Scenario"
  96. eOpposite="#//Scenario/cosimunits"/>
  97. <eStructuralFeatures xsi:type="ecore:EReference" name="adaptation" eType="#//UnitAdaptation"
  98. containment="true" resolveProxies="false" eOpposite="#//UnitAdaptation/unit"/>
  99. <eStructuralFeatures xsi:type="ecore:EReference" name="ports" upperBound="-1"
  100. eType="#//PortInstance" containment="true" resolveProxies="false" eOpposite="#//PortInstance/unit"/>
  101. </eClassifiers>
  102. <eClassifiers xsi:type="ecore:EClass" name="CosimUnitInstance" eSuperTypes="#//UnitInstance">
  103. <eStructuralFeatures xsi:type="ecore:EReference" name="declaration" lowerBound="1"
  104. eType="#//CosimUnitDeclaration"/>
  105. </eClassifiers>
  106. <eClassifiers xsi:type="ecore:EClass" name="PortInstance" abstract="true" eSuperTypes="#//PrecendenceNode #//IDed">
  107. <eOperations name="selectedAdaptations" unique="false" upperBound="-1" eType="#//PortAdaptation">
  108. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  109. <details key="body" value="&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()));"/>
  110. </eAnnotations>
  111. </eOperations>
  112. <eOperations name="isInput" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean">
  113. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  114. <details key="body" value="return false;"/>
  115. </eAnnotations>
  116. </eOperations>
  117. <eOperations name="getsValueFrom" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean">
  118. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  119. <details key="body" value="return false;"/>
  120. </eAnnotations>
  121. <eParameters name="p" unique="false" eType="#//PortInstance"/>
  122. </eOperations>
  123. <eOperations name="toString" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString">
  124. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  125. <details key="body" value="&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);"/>
  126. </eAnnotations>
  127. </eOperations>
  128. <eStructuralFeatures xsi:type="ecore:EReference" name="unit" eType="#//UnitInstance"
  129. eOpposite="#//UnitInstance/ports"/>
  130. <eStructuralFeatures xsi:type="ecore:EAttribute" name="extrapolationCost" unique="false"
  131. eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EFloat"
  132. defaultValueLiteral="1.0"/>
  133. <eStructuralFeatures xsi:type="ecore:EReference" name="adaptation" eType="#//PortAdaptation"
  134. containment="true" resolveProxies="false" eOpposite="#//PortAdaptation/port"/>
  135. </eClassifiers>
  136. <eClassifiers xsi:type="ecore:EClass" name="HierarchicalUnitPort" eSuperTypes="#//InputPortInstance #//OutputPortInstance">
  137. <eOperations name="isInput" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean">
  138. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  139. <details key="body" value="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;"/>
  140. </eAnnotations>
  141. </eOperations>
  142. <eOperations name="altIsInput" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean">
  143. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  144. <details key="body" value="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;"/>
  145. </eAnnotations>
  146. </eOperations>
  147. </eClassifiers>
  148. <eClassifiers xsi:type="ecore:EClass" name="InputPortInstance" eSuperTypes="#//PortInstance">
  149. <eOperations name="getRealValueFrom" unique="false" eType="#//OutputPortInstance">
  150. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  151. <details key="body" value="&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;"/>
  152. </eAnnotations>
  153. </eOperations>
  154. <eOperations name="getsValueFrom" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean">
  155. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  156. <details key="body" value="&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;}"/>
  157. </eAnnotations>
  158. <eParameters name="p" unique="false" eType="#//PortInstance"/>
  159. </eOperations>
  160. <eOperations name="isInput" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean">
  161. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  162. <details key="body" value="return true;"/>
  163. </eAnnotations>
  164. </eOperations>
  165. <eStructuralFeatures xsi:type="ecore:EReference" name="internalValueTo" upperBound="-1"
  166. eType="#//OutputPortInstance" eOpposite="#//OutputPortInstance/internalValueFrom"/>
  167. <eStructuralFeatures xsi:type="ecore:EReference" name="valueFrom" eType="#//OutputPortInstance"
  168. eOpposite="#//OutputPortInstance/valueTo"/>
  169. </eClassifiers>
  170. <eClassifiers xsi:type="ecore:EClass" name="OutputPortInstance" eSuperTypes="#//PortInstance">
  171. <eOperations name="isInput" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean">
  172. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  173. <details key="body" value="return false;"/>
  174. </eAnnotations>
  175. </eOperations>
  176. <eStructuralFeatures xsi:type="ecore:EReference" name="valueTo" upperBound="-1"
  177. eType="#//InputPortInstance" eOpposite="#//InputPortInstance/valueFrom"/>
  178. <eStructuralFeatures xsi:type="ecore:EReference" name="internalValueFrom" upperBound="-1"
  179. eType="#//InputPortInstance" eOpposite="#//InputPortInstance/internalValueTo"/>
  180. </eClassifiers>
  181. <eClassifiers xsi:type="ecore:EClass" name="Alternative" abstract="true">
  182. <eStructuralFeatures xsi:type="ecore:EAttribute" name="weight" unique="false"
  183. eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"/>
  184. <eStructuralFeatures xsi:type="ecore:EAttribute" name="selected" unique="false"
  185. eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean"/>
  186. <eStructuralFeatures xsi:type="ecore:EReference" name="implies" upperBound="-1"
  187. eType="#//Alternative"/>
  188. </eClassifiers>
  189. <eClassifiers xsi:type="ecore:EClass" name="Adaptation" abstract="true" eSuperTypes="#//Alternative"/>
  190. <eClassifiers xsi:type="ecore:EClass" name="PortAdaptation" abstract="true" eSuperTypes="#//Adaptation">
  191. <eOperations name="adapted" unique="false" eType="#//PortInstance">
  192. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  193. <details key="body" value="&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();"/>
  194. </eAnnotations>
  195. </eOperations>
  196. <eStructuralFeatures xsi:type="ecore:EReference" name="port" eType="#//PortInstance"
  197. eOpposite="#//PortInstance/adaptation"/>
  198. <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//DecompositionPortAdaptation"
  199. eOpposite="#//DecompositionPortAdaptation/children"/>
  200. </eClassifiers>
  201. <eClassifiers xsi:type="ecore:EClass" name="DecompositionPortAdaptation" abstract="true"
  202. eSuperTypes="#//PortAdaptation">
  203. <eOperations name="selectedAdaptations" unique="false" upperBound="-1" eType="#//PortAdaptation">
  204. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  205. <details key="body" value="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;"/>
  206. </eAnnotations>
  207. </eOperations>
  208. <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
  209. eType="#//PortAdaptation" containment="true" resolveProxies="false" eOpposite="#//PortAdaptation/parent"/>
  210. <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
  211. changeable="false" volatile="true" transient="true" derived="true">
  212. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  213. <details key="get" value="int _weight = this.getWeight();&#xA;&lt;%java.lang.String%> _plus = (&quot;(w=&quot; + &lt;%java.lang.Integer%>.valueOf(_weight));&#xA;return (_plus + &quot;)&quot;);"/>
  214. </eAnnotations>
  215. </eStructuralFeatures>
  216. </eClassifiers>
  217. <eClassifiers xsi:type="ecore:EClass" name="UnitAdaptation" abstract="true" eSuperTypes="#//Adaptation">
  218. <eOperations name="adapted" unique="false" eType="#//UnitInstance">
  219. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  220. <details key="body" value="&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();"/>
  221. </eAnnotations>
  222. </eOperations>
  223. <eStructuralFeatures xsi:type="ecore:EReference" name="unit" eType="#//UnitInstance"
  224. eOpposite="#//UnitInstance/adaptation"/>
  225. <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//DecompositionUnitAdaptation"
  226. eOpposite="#//DecompositionUnitAdaptation/children"/>
  227. </eClassifiers>
  228. <eClassifiers xsi:type="ecore:EClass" name="DecompositionUnitAdaptation" abstract="true"
  229. eSuperTypes="#//UnitAdaptation">
  230. <eOperations name="selectedAdaptations" unique="false" upperBound="-1" eType="#//UnitAdaptation">
  231. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  232. <details key="body" value="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;"/>
  233. </eAnnotations>
  234. </eOperations>
  235. <eStructuralFeatures xsi:type="ecore:EReference" name="children" upperBound="-1"
  236. eType="#//UnitAdaptation" containment="true" resolveProxies="false" eOpposite="#//UnitAdaptation/parent"/>
  237. <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
  238. changeable="false" volatile="true" transient="true" derived="true">
  239. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  240. <details key="get" value="int _weight = this.getWeight();&#xA;&lt;%java.lang.String%> _plus = (&quot;(w=&quot; + &lt;%java.lang.Integer%>.valueOf(_weight));&#xA;return (_plus + &quot;)&quot;);"/>
  241. </eAnnotations>
  242. </eStructuralFeatures>
  243. </eClassifiers>
  244. <eClassifiers xsi:type="ecore:EClass" name="XorUnitAdaptation" eSuperTypes="#//DecompositionUnitAdaptation"/>
  245. <eClassifiers xsi:type="ecore:EClass" name="XorPortAdaptation" eSuperTypes="#//DecompositionPortAdaptation"/>
  246. <eClassifiers xsi:type="ecore:EClass" name="ApproximationAdaptation" abstract="true"
  247. eSuperTypes="#//PortAdaptation">
  248. <eStructuralFeatures xsi:type="ecore:EAttribute" name="order" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"/>
  249. </eClassifiers>
  250. <eClassifiers xsi:type="ecore:EClass" name="MultiRateAdaptation" eSuperTypes="#//UnitAdaptation">
  251. <eStructuralFeatures xsi:type="ecore:EAttribute" name="rate" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EInt"/>
  252. <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
  253. changeable="false" volatile="true" transient="true" derived="true">
  254. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  255. <details key="get" value="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;);"/>
  256. </eAnnotations>
  257. </eStructuralFeatures>
  258. </eClassifiers>
  259. <eClassifiers xsi:type="ecore:EClass" name="PowerBondAdaptation" eSuperTypes="#//UnitAdaptation">
  260. <eOperations name="getDual" unique="false" eType="#//PowerBondAdaptation">
  261. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  262. <details key="body" value="&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;"/>
  263. </eAnnotations>
  264. </eOperations>
  265. <eStructuralFeatures xsi:type="ecore:EReference" name="effort" eType="#//PortInstance"/>
  266. <eStructuralFeatures xsi:type="ecore:EReference" name="flow" eType="#//PortInstance"/>
  267. <eStructuralFeatures xsi:type="ecore:EReference" name="pOut" eType="#//OutputPortInstance"/>
  268. <eStructuralFeatures xsi:type="ecore:EReference" name="pIn" eType="#//InputPortInstance"/>
  269. <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
  270. changeable="false" volatile="true" transient="true" derived="true">
  271. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  272. <details key="get" value="&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;"/>
  273. </eAnnotations>
  274. </eStructuralFeatures>
  275. </eClassifiers>
  276. <eClassifiers xsi:type="ecore:EClass" name="ExtrapolationAdaptation" eSuperTypes="#//ApproximationAdaptation">
  277. <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
  278. changeable="false" volatile="true" transient="true" derived="true">
  279. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  280. <details key="get" value="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;);"/>
  281. </eAnnotations>
  282. </eStructuralFeatures>
  283. </eClassifiers>
  284. <eClassifiers xsi:type="ecore:EClass" name="RollbackInterpolationAdaptation" eSuperTypes="#//ExtrapolationAdaptation"/>
  285. <eClassifiers xsi:type="ecore:EClass" name="InterpolationAdaptation" eSuperTypes="#//ApproximationAdaptation">
  286. <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" unique="false" eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EString"
  287. changeable="false" volatile="true" transient="true" derived="true">
  288. <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
  289. <details key="get" value="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;);"/>
  290. </eAnnotations>
  291. </eStructuralFeatures>
  292. </eClassifiers>
  293. </ecore:EPackage>