diff options
Diffstat (limited to 'subprojects/viatra-runtime-rete-recipes/src/main/resources')
4 files changed, 579 insertions, 0 deletions
diff --git a/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/recipes.ecore b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/recipes.ecore new file mode 100644 index 00000000..4eda701e --- /dev/null +++ b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/recipes.ecore | |||
@@ -0,0 +1,400 @@ | |||
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="recipes" nsURI="https://refinery.tools/emf/2023/ViatraReteRecipes" | ||
4 | nsPrefix="recipes"> | ||
5 | <eClassifiers xsi:type="ecore:EClass" name="ReteRecipe"> | ||
6 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
7 | <details key="documentation" value="Container for Rete recipes."/> | ||
8 | </eAnnotations> | ||
9 | <eStructuralFeatures xsi:type="ecore:EReference" name="recipeNodes" upperBound="-1" | ||
10 | eType="#//ReteNodeRecipe" containment="true" resolveProxies="false"/> | ||
11 | </eClassifiers> | ||
12 | <eClassifiers xsi:type="ecore:EClass" name="ReteNodeRecipe" abstract="true"> | ||
13 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
14 | <details key="documentation" value="Abstract base class for model elements that represent "Rete node recipes",
that is DTOs that carry information for Rete network construction.

@noimplement"/> | ||
15 | </eAnnotations> | ||
16 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
17 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
18 | <details key="documentation" value=" The width of tuples contained by this node."/> | ||
19 | <details key="body" value="throw new <%java.lang.UnsupportedOperationException%>();"/> | ||
20 | </eAnnotations> | ||
21 | </eOperations> | ||
22 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="traceInfo" unique="false" | ||
23 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> | ||
24 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
25 | <details key="documentation" value="Temporary construct for storing traceability information."/> | ||
26 | </eAnnotations> | ||
27 | </eStructuralFeatures> | ||
28 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="equivalenceClassIDs" upperBound="-1" | ||
29 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//ELong" transient="true"> | ||
30 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
31 | <details key="documentation" value="If two recipes were found equivalent, a matching equivalence ID can be assigned to them by {@link RecipeRecognizer}. 
If two recipes share (at least one) equivalence ID, they are known to be equivalent.

<p>
A difference in this attribute only does not preclude two recipe elements to be considered equal. 
If they are shown to be equivalent using deeper analysis, equivalence ids can be set so that the equivalence is recognized more easily the next time.

@since 1.3"/> | ||
32 | </eAnnotations> | ||
33 | </eStructuralFeatures> | ||
34 | </eClassifiers> | ||
35 | <eClassifiers xsi:type="ecore:EClass" name="SingleParentNodeRecipe" abstract="true" | ||
36 | eSuperTypes="#//ReteNodeRecipe"> | ||
37 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
38 | <details key="documentation" value="Abstract base class for single-parent node recipes."/> | ||
39 | </eAnnotations> | ||
40 | <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//ReteNodeRecipe"/> | ||
41 | </eClassifiers> | ||
42 | <eClassifiers xsi:type="ecore:EClass" name="AlphaRecipe" abstract="true" eSuperTypes="#//SingleParentNodeRecipe"> | ||
43 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
44 | <details key="documentation" value="Abstract base class for alpha node recipes."/> | ||
45 | </eAnnotations> | ||
46 | </eClassifiers> | ||
47 | <eClassifiers xsi:type="ecore:EClass" name="MultiParentNodeRecipe" abstract="true" | ||
48 | eSuperTypes="#//ReteNodeRecipe"> | ||
49 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
50 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
51 | <details key="body" value="<%org.eclipse.emf.common.util.EList%><<%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%>> _parents = this.getParents();
<%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _get = _parents.get(0);
return _get.getArity();"/> | ||
52 | </eAnnotations> | ||
53 | </eOperations> | ||
54 | <eStructuralFeatures xsi:type="ecore:EReference" name="parents" upperBound="-1" | ||
55 | eType="#//ReteNodeRecipe"/> | ||
56 | </eClassifiers> | ||
57 | <eClassifiers xsi:type="ecore:EClass" name="MonotonicityInfo"> | ||
58 | <eStructuralFeatures xsi:type="ecore:EReference" name="coreMask" eType="#//Mask" | ||
59 | containment="true" resolveProxies="false"/> | ||
60 | <eStructuralFeatures xsi:type="ecore:EReference" name="posetMask" eType="#//Mask" | ||
61 | containment="true" resolveProxies="false"/> | ||
62 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="posetComparator" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/> | ||
63 | </eClassifiers> | ||
64 | <eClassifiers xsi:type="ecore:EClass" name="UniquenessEnforcerRecipe" eSuperTypes="#//MultiParentNodeRecipe #//RederivableNodeRecipe"> | ||
65 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
66 | <details key="documentation" value="Represents nodes that enforce tuple uniqueness, i.e. filter out
duplicate input tuples for output."/> | ||
67 | </eAnnotations> | ||
68 | </eClassifiers> | ||
69 | <eClassifiers xsi:type="ecore:EClass" name="ProductionRecipe" eSuperTypes="#//MultiParentNodeRecipe #//RederivableNodeRecipe"> | ||
70 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
71 | <details key="documentation" value="The production node represents the output of the Rete network,
from which the results of a query can be read."/> | ||
72 | </eAnnotations> | ||
73 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
74 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
75 | <details key="body" value="return this.getMappedIndices().size();"/> | ||
76 | </eAnnotations> | ||
77 | </eOperations> | ||
78 | <eStructuralFeatures xsi:type="ecore:EReference" name="mappedIndices" upperBound="-1" | ||
79 | eType="#//StringIndexMapEntry" containment="true" resolveProxies="false"> | ||
80 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
81 | <details key="documentation" value="String -> Index map.
Indicates the positions of parameters."/> | ||
82 | </eAnnotations> | ||
83 | </eStructuralFeatures> | ||
84 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="pattern" unique="false" | ||
85 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"> | ||
86 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
87 | <details key="documentation" value="Traceability link to defining pattern object (from EMFPatternLanguage)
TODO unused?"/> | ||
88 | </eAnnotations> | ||
89 | </eStructuralFeatures> | ||
90 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="patternFQN" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
91 | </eClassifiers> | ||
92 | <eClassifiers xsi:type="ecore:EClass" name="IndexerRecipe" abstract="true" eSuperTypes="#//SingleParentNodeRecipe"> | ||
93 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
94 | <details key="documentation" value="Represents a node that indexes the contents of a parent based on a projection defined by a Mask."/> | ||
95 | </eAnnotations> | ||
96 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
97 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
98 | <details key="body" value="<%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = this.getMask();
return _mask.getSourceArity();"/> | ||
99 | </eAnnotations> | ||
100 | </eOperations> | ||
101 | <eStructuralFeatures xsi:type="ecore:EReference" name="mask" eType="#//Mask" containment="true" | ||
102 | resolveProxies="false"/> | ||
103 | </eClassifiers> | ||
104 | <eClassifiers xsi:type="ecore:EClass" name="ProjectionIndexerRecipe" eSuperTypes="#//IndexerRecipe"> | ||
105 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
106 | <details key="documentation" value="Represents helper nodes that provide projection indexing for Beta nodes and user queries."/> | ||
107 | </eAnnotations> | ||
108 | </eClassifiers> | ||
109 | <eClassifiers xsi:type="ecore:EClass" name="AggregatorIndexerRecipe" eSuperTypes="#//IndexerRecipe"> | ||
110 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
111 | <details key="documentation" value="Attached to an aggregator node, provides the aggregated values for outer join."/> | ||
112 | </eAnnotations> | ||
113 | </eClassifiers> | ||
114 | <eClassifiers xsi:type="ecore:EClass" name="BetaRecipe" abstract="true" eSuperTypes="#//ReteNodeRecipe"> | ||
115 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
116 | <details key="documentation" value="Abstract base class for Beta node recipes."/> | ||
117 | </eAnnotations> | ||
118 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftParent" eType="#//ProjectionIndexerRecipe" | ||
119 | containment="true" resolveProxies="false"/> | ||
120 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightParent" eType="#//IndexerRecipe" | ||
121 | containment="true" resolveProxies="false"> | ||
122 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
123 | <details key="documentation" value=" can be an AggregatorIndexer"/> | ||
124 | </eAnnotations> | ||
125 | </eStructuralFeatures> | ||
126 | </eClassifiers> | ||
127 | <eClassifiers xsi:type="ecore:EClass" name="Mask"> | ||
128 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
129 | <details key="documentation" value="A mask defines the set of tuple variables that need to be taken into consideration for operations."/> | ||
130 | </eAnnotations> | ||
131 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="sourceIndices" unique="false" | ||
132 | upperBound="-1" eType="#//Index"> | ||
133 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
134 | <details key="documentation" value="The indices that are relevant for tuple operations."/> | ||
135 | </eAnnotations> | ||
136 | </eStructuralFeatures> | ||
137 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="sourceArity" unique="false" | ||
138 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
139 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
140 | <details key="documentation" value="The arity of tuples."/> | ||
141 | </eAnnotations> | ||
142 | </eStructuralFeatures> | ||
143 | </eClassifiers> | ||
144 | <eClassifiers xsi:type="ecore:EDataType" name="Index" instanceClassName="java.lang.Integer"> | ||
145 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
146 | <details key="documentation" value="Indexes tell which variable of tuples are relevant for a given operation.
TODO: is this necessary at all?"/> | ||
147 | </eAnnotations> | ||
148 | </eClassifiers> | ||
149 | <eClassifiers xsi:type="ecore:EClass" name="StringIndexMapEntry" instanceClassName="java.util.Map$Entry"> | ||
150 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="key" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
151 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" unique="false" eType="#//Index"/> | ||
152 | </eClassifiers> | ||
153 | <eClassifiers xsi:type="ecore:EClass" name="InputRecipe" eSuperTypes="#//ReteNodeRecipe"> | ||
154 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
155 | <details key="documentation" value="Represents input nodes for the Rete network, i.e. nodes
that generate input tuples for processing."/> | ||
156 | </eAnnotations> | ||
157 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
158 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
159 | <details key="body" value="return getKeyArity();"/> | ||
160 | </eAnnotations> | ||
161 | </eOperations> | ||
162 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="inputKey" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject" | ||
163 | transient="true"/> | ||
164 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="keyID" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> | ||
165 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
166 | <details key="documentation" value="Temporary construct for identifying types over the wire.
TODO improve type references"/> | ||
167 | </eAnnotations> | ||
168 | </eStructuralFeatures> | ||
169 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="keyArity" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> | ||
170 | </eClassifiers> | ||
171 | <eClassifiers xsi:type="ecore:EClass" name="ConstantRecipe" eSuperTypes="#//ReteNodeRecipe"> | ||
172 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
173 | <details key="documentation" value="Simple node that stores constant values."/> | ||
174 | </eAnnotations> | ||
175 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
176 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
177 | <details key="body" value="return this.getConstantValues().size();"/> | ||
178 | </eAnnotations> | ||
179 | </eOperations> | ||
180 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="constantValues" unique="false" | ||
181 | upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"> | ||
182 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
183 | <details key="documentation" value="Stores constant values. May be empty.

TODO store constants as strings instead? (for easier serialization)"/> | ||
184 | </eAnnotations> | ||
185 | </eStructuralFeatures> | ||
186 | </eClassifiers> | ||
187 | <eClassifiers xsi:type="ecore:EClass" name="TransitiveClosureRecipe" eSuperTypes="#//AlphaRecipe"> | ||
188 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
189 | <details key="documentation" value="Represents transitive closure."/> | ||
190 | </eAnnotations> | ||
191 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
192 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
193 | <details key="body" value="return 2;"/> | ||
194 | </eAnnotations> | ||
195 | </eOperations> | ||
196 | </eClassifiers> | ||
197 | <eClassifiers xsi:type="ecore:EClass" name="FilterRecipe" abstract="true" eSuperTypes="#//AlphaRecipe"> | ||
198 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
199 | <details key="documentation" value="Abstract base class for nodes that implement filtering operations."/> | ||
200 | </eAnnotations> | ||
201 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
202 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
203 | <details key="body" value="<%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();
return _parent.getArity();"/> | ||
204 | </eAnnotations> | ||
205 | </eOperations> | ||
206 | </eClassifiers> | ||
207 | <eClassifiers xsi:type="ecore:EClass" name="InequalityFilterRecipe" eSuperTypes="#//FilterRecipe"> | ||
208 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="subject" unique="false" | ||
209 | eType="#//Index"/> | ||
210 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="inequals" unique="false" | ||
211 | upperBound="-1" eType="#//Index"/> | ||
212 | </eClassifiers> | ||
213 | <eClassifiers xsi:type="ecore:EClass" name="EqualityFilterRecipe" eSuperTypes="#//FilterRecipe"> | ||
214 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="indices" unique="false" | ||
215 | upperBound="-1" eType="#//Index"/> | ||
216 | </eClassifiers> | ||
217 | <eClassifiers xsi:type="ecore:EClass" name="TransparentRecipe" eSuperTypes="#//FilterRecipe"/> | ||
218 | <eClassifiers xsi:type="ecore:EClass" name="TrimmerRecipe" eSuperTypes="#//AlphaRecipe"> | ||
219 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
220 | <details key="documentation" value="Implements projection without uniqueness checking."/> | ||
221 | </eAnnotations> | ||
222 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
223 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
224 | <details key="body" value="<%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = this.getMask();
<%org.eclipse.emf.common.util.EList%><<%java.lang.Integer%>> _sourceIndices = _mask.getSourceIndices();
return _sourceIndices.size();"/> | ||
225 | </eAnnotations> | ||
226 | </eOperations> | ||
227 | <eStructuralFeatures xsi:type="ecore:EReference" name="mask" eType="#//Mask" containment="true" | ||
228 | resolveProxies="false"/> | ||
229 | </eClassifiers> | ||
230 | <eClassifiers xsi:type="ecore:EClass" name="ExpressionDefinition"> | ||
231 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="evaluator" unique="false" | ||
232 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/> | ||
233 | </eClassifiers> | ||
234 | <eClassifiers xsi:type="ecore:EClass" name="ExpressionEnforcerRecipe" abstract="true" | ||
235 | eSuperTypes="#//AlphaRecipe"> | ||
236 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
237 | <details key="documentation" value="type RuntimeExpressionEvaluator wraps tools.refinery.viatra.runtime.matchers.psystem.IExpressionEvaluator
class RuntimeExpressionDefinition extends ExpressionDefinition {
	RuntimeExpressionEvaluator evaluator
}"/> | ||
238 | </eAnnotations> | ||
239 | <eStructuralFeatures xsi:type="ecore:EReference" name="expression" eType="#//ExpressionDefinition" | ||
240 | containment="true" resolveProxies="false"> | ||
241 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
242 | <details key="documentation" value="Provides traceability to expression representation."/> | ||
243 | </eAnnotations> | ||
244 | </eStructuralFeatures> | ||
245 | <eStructuralFeatures xsi:type="ecore:EReference" name="mappedIndices" upperBound="-1" | ||
246 | eType="#//StringIndexMapEntry" containment="true" resolveProxies="false"> | ||
247 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
248 | <details key="documentation" value="String -> Index map.
Maps variable names in the expression to tuple indices."/> | ||
249 | </eAnnotations> | ||
250 | </eStructuralFeatures> | ||
251 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="cacheOutput" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | ||
252 | </eClassifiers> | ||
253 | <eClassifiers xsi:type="ecore:EClass" name="CheckRecipe" eSuperTypes="#//ExpressionEnforcerRecipe"> | ||
254 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
255 | <details key="documentation" value="Computes the result of the boolean expression evaluation and
only passes tuples for which the result is true."/> | ||
256 | </eAnnotations> | ||
257 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
258 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
259 | <details key="body" value="<%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();
return _parent.getArity();"/> | ||
260 | </eAnnotations> | ||
261 | </eOperations> | ||
262 | </eClassifiers> | ||
263 | <eClassifiers xsi:type="ecore:EClass" name="EvalRecipe" eSuperTypes="#//ExpressionEnforcerRecipe"> | ||
264 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
265 | <details key="documentation" value="Computes the result of expression evaluation and suffixes the result
to output tuples as the last element."/> | ||
266 | </eAnnotations> | ||
267 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
268 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
269 | <details key="body" value="<%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();
int _arity = _parent.getArity();
return (1 + _arity);"/> | ||
270 | </eAnnotations> | ||
271 | </eOperations> | ||
272 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="unwinding" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"> | ||
273 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
274 | <details key="documentation" value="@since 2.4"/> | ||
275 | </eAnnotations> | ||
276 | </eStructuralFeatures> | ||
277 | </eClassifiers> | ||
278 | <eClassifiers xsi:type="ecore:EClass" name="IndexerBasedAggregatorRecipe" abstract="true" | ||
279 | eSuperTypes="#//ReteNodeRecipe"> | ||
280 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
281 | <details key="documentation" value="Represents a (compound) node that performs an aggregation operation.
Parent must be a ProjectionIndexer, which defines how tuples are to be aggregated.
Usable only through an Join with an AggregatorIndexer as the right parent"/> | ||
282 | </eAnnotations> | ||
283 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
284 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
285 | <details key="body" value="<%tools.refinery.viatra.runtime.rete.recipes.ProjectionIndexerRecipe%> _parent = this.getParent();
<%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = _parent.getMask();
<%org.eclipse.emf.common.util.EList%><<%java.lang.Integer%>> _sourceIndices = _mask.getSourceIndices();
int _size = _sourceIndices.size();
return (1 + _size);"/> | ||
286 | </eAnnotations> | ||
287 | </eOperations> | ||
288 | <eStructuralFeatures xsi:type="ecore:EReference" name="parent" eType="#//ProjectionIndexerRecipe" | ||
289 | containment="true" resolveProxies="false"/> | ||
290 | </eClassifiers> | ||
291 | <eClassifiers xsi:type="ecore:EClass" name="CountAggregatorRecipe" eSuperTypes="#//IndexerBasedAggregatorRecipe"> | ||
292 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
293 | <details key="documentation" value="The count aggregator node represents a "count find" operation."/> | ||
294 | </eAnnotations> | ||
295 | </eClassifiers> | ||
296 | <eClassifiers xsi:type="ecore:EClass" name="JoinRecipe" eSuperTypes="#//BetaRecipe"> | ||
297 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
298 | <details key="documentation" value="The most basic beta operation, the join node performs a join operation over two input tuple sets."/> | ||
299 | </eAnnotations> | ||
300 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
301 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
302 | <details key="body" value="<%tools.refinery.viatra.runtime.rete.recipes.ProjectionIndexerRecipe%> _leftParent = this.getLeftParent();
int _arity = _leftParent.getArity();
<%tools.refinery.viatra.runtime.rete.recipes.IndexerRecipe%> _rightParent = this.getRightParent();
int _arity_1 = _rightParent.getArity();
int _plus = (_arity + _arity_1);
<%tools.refinery.viatra.runtime.rete.recipes.IndexerRecipe%> _rightParent_1 = this.getRightParent();
<%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = _rightParent_1.getMask();
<%org.eclipse.emf.common.util.EList%><<%java.lang.Integer%>> _sourceIndices = _mask.getSourceIndices();
int _size = _sourceIndices.size();
return (_plus - _size);"/> | ||
303 | </eAnnotations> | ||
304 | </eOperations> | ||
305 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightParentComplementaryMask" | ||
306 | eType="#//Mask" containment="true" resolveProxies="false"/> | ||
307 | </eClassifiers> | ||
308 | <eClassifiers xsi:type="ecore:EClass" name="ExistenceJoinRecipe" abstract="true" | ||
309 | eSuperTypes="#//BetaRecipe"> | ||
310 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
311 | <details key="documentation" value="Existence joins are TODO

See http://en.wikipedia.org/wiki/Relational_algebra"/> | ||
312 | </eAnnotations> | ||
313 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
314 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
315 | <details key="body" value="<%tools.refinery.viatra.runtime.rete.recipes.ProjectionIndexerRecipe%> _leftParent = this.getLeftParent();
return _leftParent.getArity();"/> | ||
316 | </eAnnotations> | ||
317 | </eOperations> | ||
318 | </eClassifiers> | ||
319 | <eClassifiers xsi:type="ecore:EClass" name="SemiJoinRecipe" eSuperTypes="#//ExistenceJoinRecipe"> | ||
320 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
321 | <details key="documentation" value="A semi-join is TODO

See http://en.wikipedia.org/wiki/Relational_algebra"/> | ||
322 | </eAnnotations> | ||
323 | </eClassifiers> | ||
324 | <eClassifiers xsi:type="ecore:EClass" name="AntiJoinRecipe" eSuperTypes="#//ExistenceJoinRecipe"> | ||
325 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
326 | <details key="documentation" value="An anti-join is TODO

See http://en.wikipedia.org/wiki/Relational_algebra"/> | ||
327 | </eAnnotations> | ||
328 | </eClassifiers> | ||
329 | <eClassifiers xsi:type="ecore:EClass" name="InputFilterRecipe" eSuperTypes="#//FilterRecipe"> | ||
330 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="inputKey" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject" | ||
331 | transient="true"/> | ||
332 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="keyID" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"> | ||
333 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
334 | <details key="documentation" value="Temporary construct for identifying types over the wire.
TODO improve type references"/> | ||
335 | </eAnnotations> | ||
336 | </eStructuralFeatures> | ||
337 | <eStructuralFeatures xsi:type="ecore:EReference" name="mask" eType="#//Mask" containment="true" | ||
338 | resolveProxies="false"/> | ||
339 | </eClassifiers> | ||
340 | <eClassifiers xsi:type="ecore:EClass" name="SingleColumnAggregatorRecipe" eSuperTypes="#//AlphaRecipe #//RederivableNodeRecipe"> | ||
341 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
342 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
343 | <details key="body" value="<%tools.refinery.viatra.runtime.rete.recipes.MonotonicityInfo%> info = getOptionalMonotonicityInfo();
if (info == null) {
	return 1 + getGroupByMask().getSourceIndices().size();
} else {	
	return info.getCoreMask().getSourceIndices().size() + info.getPosetMask().getSourceIndices().size();
}"/> | ||
344 | </eAnnotations> | ||
345 | </eOperations> | ||
346 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="multisetAggregationOperator" | ||
347 | eType="#//AggregationOperator"/> | ||
348 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="aggregableIndex" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> | ||
349 | <eStructuralFeatures xsi:type="ecore:EReference" name="groupByMask" lowerBound="1" | ||
350 | eType="#//Mask" containment="true"/> | ||
351 | </eClassifiers> | ||
352 | <eClassifiers xsi:type="ecore:EDataType" name="AggregationOperator" instanceTypeName="tools.refinery.viatra.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator<?, ?, ?>"/> | ||
353 | <eClassifiers xsi:type="ecore:EClass" name="DiscriminatorDispatcherRecipe" eSuperTypes="#//SingleParentNodeRecipe"> | ||
354 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
355 | <details key="documentation" value="Node that sends tuples off to different buckets (attached as children) based on the value of a given column."/> | ||
356 | </eAnnotations> | ||
357 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
358 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
359 | <details key="body" value="<%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();
return _parent.getArity();"/> | ||
360 | </eAnnotations> | ||
361 | </eOperations> | ||
362 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="discriminationColumnIndex" | ||
363 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> | ||
364 | </eClassifiers> | ||
365 | <eClassifiers xsi:type="ecore:EClass" name="DiscriminatorBucketRecipe" eSuperTypes="#//SingleParentNodeRecipe"> | ||
366 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
367 | <details key="documentation" value="A bucket holds a filtered set of tuples of its parent DiscriminatorDispatcher; exactly those that have the given bucket key at their discrimination column."/> | ||
368 | </eAnnotations> | ||
369 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
370 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
371 | <details key="body" value="<%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();
return _parent.getArity();"/> | ||
372 | </eAnnotations> | ||
373 | </eOperations> | ||
374 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="bucketKey" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/> | ||
375 | </eClassifiers> | ||
376 | <eClassifiers xsi:type="ecore:EClass" name="RederivableNodeRecipe" abstract="true"> | ||
377 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="deleteRederiveEvaluation" | ||
378 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" defaultValueLiteral="false"/> | ||
379 | <eStructuralFeatures xsi:type="ecore:EReference" name="optionalMonotonicityInfo" | ||
380 | eType="#//MonotonicityInfo" containment="true"/> | ||
381 | </eClassifiers> | ||
382 | <eClassifiers xsi:type="ecore:EClass" name="RelationEvaluationRecipe" eSuperTypes="#//MultiParentNodeRecipe"> | ||
383 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
384 | <details key="documentation" value="@since 2.8"/> | ||
385 | </eAnnotations> | ||
386 | <eStructuralFeatures xsi:type="ecore:EReference" name="evaluator" eType="#//ExpressionDefinition"/> | ||
387 | </eClassifiers> | ||
388 | <eClassifiers xsi:type="ecore:EClass" name="RepresentativeElectionRecipe" eSuperTypes="#//AlphaRecipe"> | ||
389 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
390 | <details key="documentation" value="Represents represenative election."/> | ||
391 | </eAnnotations> | ||
392 | <eOperations name="getArity" unique="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"> | ||
393 | <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel"> | ||
394 | <details key="body" value="return 2;"/> | ||
395 | </eAnnotations> | ||
396 | </eOperations> | ||
397 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="connectivity" eType="#//Connectivity"/> | ||
398 | </eClassifiers> | ||
399 | <eClassifiers xsi:type="ecore:EDataType" name="Connectivity" instanceClassName="tools.refinery.viatra.runtime.matchers.psystem.basicenumerables.Connectivity"/> | ||
400 | </ecore:EPackage> | ||
diff --git a/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/recipes.ecore.license b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/recipes.ecore.license new file mode 100644 index 00000000..03d1d42b --- /dev/null +++ b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/recipes.ecore.license | |||
@@ -0,0 +1,4 @@ | |||
1 | Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro | ||
2 | Copyright (c) 2023 The Refinery Authors <https://refinery.tools> | ||
3 | |||
4 | SPDX-License-Identifier: EPL-2.0 | ||
diff --git a/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel new file mode 100644 index 00000000..6b44fde6 --- /dev/null +++ b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel | |||
@@ -0,0 +1,171 @@ | |||
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" copyrightText="Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro
Copyright (c) 2023 The Refinery Authors <https://refinery.tools>
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
http://www.eclipse.org/legal/epl-v20.html.

SPDX-License-Identifier: EPL-2.0" | ||
4 | modelDirectory="/tools.refinery.refinery-viatra-runtime-rete-recipes/src/main/emf-gen" | ||
5 | modelPluginID="viatra-runtime-rete-recipes" runtimeJar="true" forceOverwrite="true" | ||
6 | modelName="Rete-recipes" updateClasspath="false" nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" | ||
7 | testsDirectory="" importerID="org.eclipse.emf.importer.ecore" containmentProxies="true" | ||
8 | complianceLevel="7.0" language="en" operationReflection="true"> | ||
9 | <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/exporter/org.eclipse.xsd.ecore.exporter"> | ||
10 | <genAnnotations source="selectedPackages"> | ||
11 | <details key="http://www.eclipse.org/emf/2002/Ecore" value="Ecore.xsd"/> | ||
12 | </genAnnotations> | ||
13 | <details key="directoryURI" value="."/> | ||
14 | </genAnnotations> | ||
15 | <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/exporter/org.eclipse.xsd.ecore.exporter.xmi"> | ||
16 | <genAnnotations source="selectedPackages"> | ||
17 | <details key="http://www.eclipse.org/emf/2002/Ecore" value="EcoreXMI.xsd"/> | ||
18 | </genAnnotations> | ||
19 | <details key="directoryURI" value="."/> | ||
20 | </genAnnotations> | ||
21 | <foreignModel>recipes.ecore</foreignModel> | ||
22 | <modelPluginVariables>org.eclipse.xtext.xbase.lib</modelPluginVariables> | ||
23 | <modelPluginVariables>org.eclipse.emf.ecore.xcore.lib</modelPluginVariables> | ||
24 | <genPackages prefix="Recipes" basePackage="tools.refinery.viatra.runtime.rete" disposableProviderFactory="true" | ||
25 | ecorePackage="recipes.ecore#/"> | ||
26 | <genDataTypes ecoreDataType="recipes.ecore#//Index"/> | ||
27 | <genDataTypes ecoreDataType="recipes.ecore#//AggregationOperator"/> | ||
28 | <genDataTypes ecoreDataType="recipes.ecore#//Connectivity"/> | ||
29 | <genClasses ecoreClass="recipes.ecore#//ReteRecipe"> | ||
30 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//ReteRecipe/recipeNodes"/> | ||
31 | </genClasses> | ||
32 | <genClasses image="false" ecoreClass="recipes.ecore#//ReteNodeRecipe"> | ||
33 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ReteNodeRecipe/traceInfo"/> | ||
34 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ReteNodeRecipe/equivalenceClassIDs"/> | ||
35 | <genOperations ecoreOperation="recipes.ecore#//ReteNodeRecipe/getArity" body="throw new <%java.lang.UnsupportedOperationException%>();"/> | ||
36 | </genClasses> | ||
37 | <genClasses image="false" ecoreClass="recipes.ecore#//SingleParentNodeRecipe"> | ||
38 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference recipes.ecore#//SingleParentNodeRecipe/parent"/> | ||
39 | </genClasses> | ||
40 | <genClasses image="false" ecoreClass="recipes.ecore#//AlphaRecipe"/> | ||
41 | <genClasses image="false" ecoreClass="recipes.ecore#//MultiParentNodeRecipe"> | ||
42 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference recipes.ecore#//MultiParentNodeRecipe/parents"/> | ||
43 | <genOperations ecoreOperation="recipes.ecore#//MultiParentNodeRecipe/getArity" | ||
44 | body="<%org.eclipse.emf.common.util.EList%><<%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%>> _parents = this.getParents();
<%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _get = _parents.get(0);
return _get.getArity();"/> | ||
45 | </genClasses> | ||
46 | <genClasses ecoreClass="recipes.ecore#//MonotonicityInfo"> | ||
47 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//MonotonicityInfo/coreMask"/> | ||
48 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//MonotonicityInfo/posetMask"/> | ||
49 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//MonotonicityInfo/posetComparator"/> | ||
50 | </genClasses> | ||
51 | <genClasses ecoreClass="recipes.ecore#//UniquenessEnforcerRecipe"/> | ||
52 | <genClasses ecoreClass="recipes.ecore#//ProductionRecipe"> | ||
53 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//ProductionRecipe/mappedIndices"/> | ||
54 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ProductionRecipe/pattern"/> | ||
55 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ProductionRecipe/patternFQN"/> | ||
56 | <genOperations ecoreOperation="recipes.ecore#//ProductionRecipe/getArity" body="return this.getMappedIndices().size();"/> | ||
57 | </genClasses> | ||
58 | <genClasses image="false" ecoreClass="recipes.ecore#//IndexerRecipe"> | ||
59 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//IndexerRecipe/mask"/> | ||
60 | <genOperations ecoreOperation="recipes.ecore#//IndexerRecipe/getArity" body="<%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = this.getMask();
return _mask.getSourceArity();"/> | ||
61 | </genClasses> | ||
62 | <genClasses ecoreClass="recipes.ecore#//ProjectionIndexerRecipe"/> | ||
63 | <genClasses ecoreClass="recipes.ecore#//AggregatorIndexerRecipe"/> | ||
64 | <genClasses image="false" ecoreClass="recipes.ecore#//BetaRecipe"> | ||
65 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//BetaRecipe/leftParent"/> | ||
66 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//BetaRecipe/rightParent"/> | ||
67 | </genClasses> | ||
68 | <genClasses ecoreClass="recipes.ecore#//Mask"> | ||
69 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//Mask/sourceIndices"/> | ||
70 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//Mask/sourceArity"/> | ||
71 | </genClasses> | ||
72 | <genClasses ecoreClass="recipes.ecore#//StringIndexMapEntry"> | ||
73 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//StringIndexMapEntry/key"/> | ||
74 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//StringIndexMapEntry/value"/> | ||
75 | </genClasses> | ||
76 | <genClasses ecoreClass="recipes.ecore#//InputRecipe"> | ||
77 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//InputRecipe/inputKey"/> | ||
78 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//InputRecipe/keyID"/> | ||
79 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//InputRecipe/keyArity"/> | ||
80 | <genOperations ecoreOperation="recipes.ecore#//InputRecipe/getArity" body="return getKeyArity();"/> | ||
81 | </genClasses> | ||
82 | <genClasses ecoreClass="recipes.ecore#//ConstantRecipe"> | ||
83 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ConstantRecipe/constantValues"/> | ||
84 | <genOperations ecoreOperation="recipes.ecore#//ConstantRecipe/getArity" body="return this.getConstantValues().size();"/> | ||
85 | </genClasses> | ||
86 | <genClasses ecoreClass="recipes.ecore#//TransitiveClosureRecipe"> | ||
87 | <genOperations ecoreOperation="recipes.ecore#//TransitiveClosureRecipe/getArity" | ||
88 | body="return 2;"/> | ||
89 | </genClasses> | ||
90 | <genClasses image="false" ecoreClass="recipes.ecore#//FilterRecipe"> | ||
91 | <genOperations ecoreOperation="recipes.ecore#//FilterRecipe/getArity" body="<%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();
return _parent.getArity();"/> | ||
92 | </genClasses> | ||
93 | <genClasses ecoreClass="recipes.ecore#//InequalityFilterRecipe"> | ||
94 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//InequalityFilterRecipe/subject"/> | ||
95 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//InequalityFilterRecipe/inequals"/> | ||
96 | </genClasses> | ||
97 | <genClasses ecoreClass="recipes.ecore#//EqualityFilterRecipe"> | ||
98 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//EqualityFilterRecipe/indices"/> | ||
99 | </genClasses> | ||
100 | <genClasses ecoreClass="recipes.ecore#//TransparentRecipe"/> | ||
101 | <genClasses ecoreClass="recipes.ecore#//TrimmerRecipe"> | ||
102 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//TrimmerRecipe/mask"/> | ||
103 | <genOperations ecoreOperation="recipes.ecore#//TrimmerRecipe/getArity" body="<%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = this.getMask();
<%org.eclipse.emf.common.util.EList%><<%java.lang.Integer%>> _sourceIndices = _mask.getSourceIndices();
return _sourceIndices.size();"/> | ||
104 | </genClasses> | ||
105 | <genClasses ecoreClass="recipes.ecore#//ExpressionDefinition"> | ||
106 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ExpressionDefinition/evaluator"/> | ||
107 | </genClasses> | ||
108 | <genClasses image="false" ecoreClass="recipes.ecore#//ExpressionEnforcerRecipe"> | ||
109 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//ExpressionEnforcerRecipe/expression"/> | ||
110 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//ExpressionEnforcerRecipe/mappedIndices"/> | ||
111 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ExpressionEnforcerRecipe/cacheOutput"/> | ||
112 | </genClasses> | ||
113 | <genClasses ecoreClass="recipes.ecore#//CheckRecipe"> | ||
114 | <genOperations ecoreOperation="recipes.ecore#//CheckRecipe/getArity" body="<%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();
return _parent.getArity();"/> | ||
115 | </genClasses> | ||
116 | <genClasses ecoreClass="recipes.ecore#//EvalRecipe"> | ||
117 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//EvalRecipe/unwinding"/> | ||
118 | <genOperations ecoreOperation="recipes.ecore#//EvalRecipe/getArity" body="<%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();
int _arity = _parent.getArity();
return (1 + _arity);"/> | ||
119 | </genClasses> | ||
120 | <genClasses image="false" ecoreClass="recipes.ecore#//IndexerBasedAggregatorRecipe"> | ||
121 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//IndexerBasedAggregatorRecipe/parent"/> | ||
122 | <genOperations ecoreOperation="recipes.ecore#//IndexerBasedAggregatorRecipe/getArity" | ||
123 | body="<%tools.refinery.viatra.runtime.rete.recipes.ProjectionIndexerRecipe%> _parent = this.getParent();
<%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = _parent.getMask();
<%org.eclipse.emf.common.util.EList%><<%java.lang.Integer%>> _sourceIndices = _mask.getSourceIndices();
int _size = _sourceIndices.size();
return (1 + _size);"/> | ||
124 | </genClasses> | ||
125 | <genClasses ecoreClass="recipes.ecore#//CountAggregatorRecipe"/> | ||
126 | <genClasses ecoreClass="recipes.ecore#//JoinRecipe"> | ||
127 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//JoinRecipe/rightParentComplementaryMask"/> | ||
128 | <genOperations ecoreOperation="recipes.ecore#//JoinRecipe/getArity" body="<%tools.refinery.viatra.runtime.rete.recipes.ProjectionIndexerRecipe%> _leftParent = this.getLeftParent();
int _arity = _leftParent.getArity();
<%tools.refinery.viatra.runtime.rete.recipes.IndexerRecipe%> _rightParent = this.getRightParent();
int _arity_1 = _rightParent.getArity();
int _plus = (_arity + _arity_1);
<%tools.refinery.viatra.runtime.rete.recipes.IndexerRecipe%> _rightParent_1 = this.getRightParent();
<%tools.refinery.viatra.runtime.rete.recipes.Mask%> _mask = _rightParent_1.getMask();
<%org.eclipse.emf.common.util.EList%><<%java.lang.Integer%>> _sourceIndices = _mask.getSourceIndices();
int _size = _sourceIndices.size();
return (_plus - _size);"/> | ||
129 | </genClasses> | ||
130 | <genClasses image="false" ecoreClass="recipes.ecore#//ExistenceJoinRecipe"> | ||
131 | <genOperations ecoreOperation="recipes.ecore#//ExistenceJoinRecipe/getArity" | ||
132 | body="<%tools.refinery.viatra.runtime.rete.recipes.ProjectionIndexerRecipe%> _leftParent = this.getLeftParent();
return _leftParent.getArity();"/> | ||
133 | </genClasses> | ||
134 | <genClasses ecoreClass="recipes.ecore#//SemiJoinRecipe"/> | ||
135 | <genClasses ecoreClass="recipes.ecore#//AntiJoinRecipe"/> | ||
136 | <genClasses ecoreClass="recipes.ecore#//InputFilterRecipe"> | ||
137 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//InputFilterRecipe/inputKey"/> | ||
138 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//InputFilterRecipe/keyID"/> | ||
139 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//InputFilterRecipe/mask"/> | ||
140 | </genClasses> | ||
141 | <genClasses ecoreClass="recipes.ecore#//SingleColumnAggregatorRecipe"> | ||
142 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//SingleColumnAggregatorRecipe/multisetAggregationOperator"/> | ||
143 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//SingleColumnAggregatorRecipe/aggregableIndex"/> | ||
144 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//SingleColumnAggregatorRecipe/groupByMask"/> | ||
145 | <genOperations ecoreOperation="recipes.ecore#//SingleColumnAggregatorRecipe/getArity" | ||
146 | body="<%tools.refinery.viatra.runtime.rete.recipes.MonotonicityInfo%> info = getOptionalMonotonicityInfo();
if (info == null) {
	return 1 + getGroupByMask().getSourceIndices().size();
} else {	
	return info.getCoreMask().getSourceIndices().size() + info.getPosetMask().getSourceIndices().size();
}"/> | ||
147 | </genClasses> | ||
148 | <genClasses ecoreClass="recipes.ecore#//DiscriminatorDispatcherRecipe"> | ||
149 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//DiscriminatorDispatcherRecipe/discriminationColumnIndex"/> | ||
150 | <genOperations ecoreOperation="recipes.ecore#//DiscriminatorDispatcherRecipe/getArity" | ||
151 | body="<%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();
return _parent.getArity();"/> | ||
152 | </genClasses> | ||
153 | <genClasses ecoreClass="recipes.ecore#//DiscriminatorBucketRecipe"> | ||
154 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//DiscriminatorBucketRecipe/bucketKey"/> | ||
155 | <genOperations ecoreOperation="recipes.ecore#//DiscriminatorBucketRecipe/getArity" | ||
156 | body="<%tools.refinery.viatra.runtime.rete.recipes.ReteNodeRecipe%> _parent = this.getParent();
return _parent.getArity();"/> | ||
157 | </genClasses> | ||
158 | <genClasses image="false" ecoreClass="recipes.ecore#//RederivableNodeRecipe"> | ||
159 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//RederivableNodeRecipe/deleteRederiveEvaluation"/> | ||
160 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference recipes.ecore#//RederivableNodeRecipe/optionalMonotonicityInfo"/> | ||
161 | </genClasses> | ||
162 | <genClasses ecoreClass="recipes.ecore#//RelationEvaluationRecipe"> | ||
163 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference recipes.ecore#//RelationEvaluationRecipe/evaluator"/> | ||
164 | </genClasses> | ||
165 | <genClasses ecoreClass="recipes.ecore#//RepresentativeElectionRecipe"> | ||
166 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//RepresentativeElectionRecipe/connectivity"/> | ||
167 | <genOperations ecoreOperation="recipes.ecore#//RepresentativeElectionRecipe/getArity" | ||
168 | body="return 2;"/> | ||
169 | </genClasses> | ||
170 | </genPackages> | ||
171 | </genmodel:GenModel> | ||
diff --git a/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel.license b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel.license new file mode 100644 index 00000000..03d1d42b --- /dev/null +++ b/subprojects/viatra-runtime-rete-recipes/src/main/resources/model/rete-recipes.genmodel.license | |||
@@ -0,0 +1,4 @@ | |||
1 | Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro | ||
2 | Copyright (c) 2023 The Refinery Authors <https://refinery.tools> | ||
3 | |||
4 | SPDX-License-Identifier: EPL-2.0 | ||