aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2023-10-14 14:54:38 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2023-10-14 14:54:38 +0200
commit54c4c91097c50f6cedb02cb5b1aea32ae16a3421 (patch)
tree222b86f87511582c2b602c896e210d1b138220a9 /subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel
parentfix(query-interpreter): register Recipes package (diff)
downloadrefinery-54c4c91097c50f6cedb02cb5b1aea32ae16a3421.tar.gz
refinery-54c4c91097c50f6cedb02cb5b1aea32ae16a3421.tar.zst
refinery-54c4c91097c50f6cedb02cb5b1aea32ae16a3421.zip
refactor(interpreter-rete): recipe hashing
Use isomorphism-aware hashing to speed up RecipeRecognizer. Due to possibly cyclic (recursive) recipes, we can't recursively turn recipes into a canonical form. Recipes referring to already canonical (non-recurisve, or recursive and entirely canonicalized) recipes can be hashed, while recursive recipes in the middle of caninicalization still have to be compared more slowly by their contents. To keep the list of recipes compared by contents small, recipes are assigned a hash code whenever possible. We keep the equivalence class IDs for recipes, as there might be hash code clashes, as well as recursive recipes that only later get assigned a hash code. Also fixes a concurrency problem with equivalence class IDs by using an AtomicLong. Also reworks recipe instantiation, as now recipes might be canonicalized before they are instantiated.
Diffstat (limited to 'subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel')
-rw-r--r--subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel11
1 files changed, 7 insertions, 4 deletions
diff --git a/subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel b/subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel
index 89ff6e3a..f7dc7a4e 100644
--- a/subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel
+++ b/subprojects/interpreter-rete-recipes/src/main/resources/model/rete-recipes.genmodel
@@ -2,10 +2,11 @@
2<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" 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&#xA;Copyright (c) 2023 The Refinery Authors &lt;https://refinery.tools>&#xA;This program and the accompanying materials are made available under the&#xA;terms of the Eclipse Public License v. 2.0 which is available at&#xA;http://www.eclipse.org/legal/epl-v20.html.&#xA;&#xA;SPDX-License-Identifier: EPL-2.0" 3 xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2004-2014 Gabor Bergmann and Daniel Varro&#xA;Copyright (c) 2023 The Refinery Authors &lt;https://refinery.tools>&#xA;This program and the accompanying materials are made available under the&#xA;terms of the Eclipse Public License v. 2.0 which is available at&#xA;http://www.eclipse.org/legal/epl-v20.html.&#xA;&#xA;SPDX-License-Identifier: EPL-2.0"
4 modelDirectory="/tools.refinery.refinery-interpreter-rete-recipes/src/main/emf-gen" 4 modelDirectory="/tools.refinery.refinery-interpreter-rete-recipes/src/main/emf-gen"
5 modelPluginID="tools.refinery.refinery-interpreter-rete-recipes" runtimeJar="true" forceOverwrite="true" 5 modelPluginID="tools.refinery.refinery-interpreter-rete-recipes" runtimeJar="true"
6 modelName="Rete-recipes" updateClasspath="false" nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" 6 forceOverwrite="true" modelName="Rete-recipes" updateClasspath="false" nonNLSMarkers="true"
7 testsDirectory="" importerID="org.eclipse.emf.importer.ecore" containmentProxies="true" 7 rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" testsDirectory=""
8 complianceLevel="7.0" language="en" operationReflection="true"> 8 importerID="org.eclipse.emf.importer.ecore" containmentProxies="true" complianceLevel="7.0"
9 language="en" operationReflection="true">
9 <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/exporter/org.eclipse.xsd.ecore.exporter"> 10 <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/exporter/org.eclipse.xsd.ecore.exporter">
10 <genAnnotations source="selectedPackages"> 11 <genAnnotations source="selectedPackages">
11 <details key="http://www.eclipse.org/emf/2002/Ecore" value="Ecore.xsd"/> 12 <details key="http://www.eclipse.org/emf/2002/Ecore" value="Ecore.xsd"/>
@@ -32,6 +33,8 @@
32 <genClasses image="false" ecoreClass="recipes.ecore#//ReteNodeRecipe"> 33 <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/traceInfo"/>
34 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ReteNodeRecipe/equivalenceClassIDs"/> 35 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ReteNodeRecipe/equivalenceClassIDs"/>
36 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ReteNodeRecipe/cachedHashCode"/>
37 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute recipes.ecore#//ReteNodeRecipe/constructed"/>
35 <genOperations ecoreOperation="recipes.ecore#//ReteNodeRecipe/getArity" body="throw new &lt;%java.lang.UnsupportedOperationException%>();"/> 38 <genOperations ecoreOperation="recipes.ecore#//ReteNodeRecipe/getArity" body="throw new &lt;%java.lang.UnsupportedOperationException%>();"/>
36 </genClasses> 39 </genClasses>
37 <genClasses image="false" ecoreClass="recipes.ecore#//SingleParentNodeRecipe"> 40 <genClasses image="false" ecoreClass="recipes.ecore#//SingleParentNodeRecipe">