diff options
Diffstat (limited to 'Solvers')
231 files changed, 25223 insertions, 0 deletions
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.classpath b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.classpath new file mode 100644 index 00000000..de68b5f7 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.classpath | |||
@@ -0,0 +1,11 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <classpath> | ||
3 | <classpathentry kind="src" path="xtend-gen"/> | ||
4 | <classpathentry kind="src" path="queries"/> | ||
5 | <classpathentry kind="src" path="vql-gen"/> | ||
6 | <classpathentry exported="true" kind="lib" path="lib/alloy4.2_2015-02-22.jar"/> | ||
7 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | ||
8 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
9 | <classpathentry kind="src" path="src"/> | ||
10 | <classpathentry kind="output" path="bin"/> | ||
11 | </classpath> | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.gitignore b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.gitignore new file mode 100644 index 00000000..e42fe9ea --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.gitignore | |||
@@ -0,0 +1,4 @@ | |||
1 | /bin/ | ||
2 | /src-gen/ | ||
3 | /vql-gen/ | ||
4 | /xtend-gen/ \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.project b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.project new file mode 100644 index 00000000..a1c16519 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.project | |||
@@ -0,0 +1,40 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <projectDescription> | ||
3 | <name>hu.bme.mit.inf.dlsreasoner.alloy.reasoner</name> | ||
4 | <comment></comment> | ||
5 | <projects> | ||
6 | </projects> | ||
7 | <buildSpec> | ||
8 | <buildCommand> | ||
9 | <name>org.eclipse.viatra.query.tooling.core.projectbuilder</name> | ||
10 | <arguments> | ||
11 | </arguments> | ||
12 | </buildCommand> | ||
13 | <buildCommand> | ||
14 | <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
15 | <arguments> | ||
16 | </arguments> | ||
17 | </buildCommand> | ||
18 | <buildCommand> | ||
19 | <name>org.eclipse.jdt.core.javabuilder</name> | ||
20 | <arguments> | ||
21 | </arguments> | ||
22 | </buildCommand> | ||
23 | <buildCommand> | ||
24 | <name>org.eclipse.pde.ManifestBuilder</name> | ||
25 | <arguments> | ||
26 | </arguments> | ||
27 | </buildCommand> | ||
28 | <buildCommand> | ||
29 | <name>org.eclipse.pde.SchemaBuilder</name> | ||
30 | <arguments> | ||
31 | </arguments> | ||
32 | </buildCommand> | ||
33 | </buildSpec> | ||
34 | <natures> | ||
35 | <nature>org.eclipse.pde.PluginNature</nature> | ||
36 | <nature>org.eclipse.jdt.core.javanature</nature> | ||
37 | <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
38 | <nature>org.eclipse.viatra.query.projectnature</nature> | ||
39 | </natures> | ||
40 | </projectDescription> | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.settings/org.eclipse.incquery.patternlanguage.emf.EMFPatternLanguage.prefs b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.settings/org.eclipse.incquery.patternlanguage.emf.EMFPatternLanguage.prefs new file mode 100644 index 00000000..7d03706a --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.settings/org.eclipse.incquery.patternlanguage.emf.EMFPatternLanguage.prefs | |||
@@ -0,0 +1,29 @@ | |||
1 | BuilderConfiguration.is_project_specific=true | ||
2 | autobuilding=true | ||
3 | eclipse.preferences.version=1 | ||
4 | generateGeneratedAnnotation=false | ||
5 | generateSuppressWarnings=true | ||
6 | generatedAnnotationComment= | ||
7 | includeDateInGenerated=false | ||
8 | outlet.DEFAULT_OUTPUT.cleanDirectory=false | ||
9 | outlet.DEFAULT_OUTPUT.cleanupDerived=true | ||
10 | outlet.DEFAULT_OUTPUT.createDirectory=true | ||
11 | outlet.DEFAULT_OUTPUT.derived=true | ||
12 | outlet.DEFAULT_OUTPUT.directory=./viatra-gen | ||
13 | outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true | ||
14 | outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false | ||
15 | outlet.DEFAULT_OUTPUT.keepLocalHistory=true | ||
16 | outlet.DEFAULT_OUTPUT.override=true | ||
17 | outlet.DEFAULT_OUTPUT.sourceFolder.ecore-gen.directory= | ||
18 | outlet.DEFAULT_OUTPUT.sourceFolder.ecore-gen.ignore= | ||
19 | outlet.DEFAULT_OUTPUT.sourceFolder.queries.directory= | ||
20 | outlet.DEFAULT_OUTPUT.sourceFolder.queries.ignore= | ||
21 | outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory= | ||
22 | outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.ignore= | ||
23 | outlet.DEFAULT_OUTPUT.sourceFolder.src.directory= | ||
24 | outlet.DEFAULT_OUTPUT.sourceFolder.src.ignore= | ||
25 | outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory= | ||
26 | outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.ignore= | ||
27 | outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder= | ||
28 | targetJavaVersion=JAVA5 | ||
29 | useJavaCompilerCompliance=true | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.settings/org.eclipse.jdt.core.prefs b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..295926d9 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.settings/org.eclipse.jdt.core.prefs | |||
@@ -0,0 +1,7 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
4 | org.eclipse.jdt.core.compiler.compliance=1.8 | ||
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
7 | org.eclipse.jdt.core.compiler.source=1.8 | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.settings/org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguage.prefs b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.settings/org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguage.prefs new file mode 100644 index 00000000..c6f56e64 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/.settings/org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguage.prefs | |||
@@ -0,0 +1,29 @@ | |||
1 | BuilderConfiguration.is_project_specific=true | ||
2 | autobuilding=true | ||
3 | eclipse.preferences.version=1 | ||
4 | generateGeneratedAnnotation=false | ||
5 | generateSuppressWarnings=true | ||
6 | generatedAnnotationComment= | ||
7 | includeDateInGenerated=false | ||
8 | outlet.DEFAULT_OUTPUT.cleanDirectory=true | ||
9 | outlet.DEFAULT_OUTPUT.cleanupDerived=true | ||
10 | outlet.DEFAULT_OUTPUT.createDirectory=true | ||
11 | outlet.DEFAULT_OUTPUT.derived=true | ||
12 | outlet.DEFAULT_OUTPUT.directory=./vql-gen | ||
13 | outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true | ||
14 | outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false | ||
15 | outlet.DEFAULT_OUTPUT.keepLocalHistory=true | ||
16 | outlet.DEFAULT_OUTPUT.override=true | ||
17 | outlet.DEFAULT_OUTPUT.sourceFolder.ecore-gen.directory= | ||
18 | outlet.DEFAULT_OUTPUT.sourceFolder.ecore-gen.ignore= | ||
19 | outlet.DEFAULT_OUTPUT.sourceFolder.queries.directory= | ||
20 | outlet.DEFAULT_OUTPUT.sourceFolder.queries.ignore= | ||
21 | outlet.DEFAULT_OUTPUT.sourceFolder.src.directory= | ||
22 | outlet.DEFAULT_OUTPUT.sourceFolder.src.ignore= | ||
23 | outlet.DEFAULT_OUTPUT.sourceFolder.viatra-gen.directory= | ||
24 | outlet.DEFAULT_OUTPUT.sourceFolder.viatra-gen.ignore= | ||
25 | outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory= | ||
26 | outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.ignore= | ||
27 | outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder= | ||
28 | targetJavaVersion=JAVA5 | ||
29 | useJavaCompilerCompliance=true | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/META-INF/MANIFEST.MF b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/META-INF/MANIFEST.MF new file mode 100644 index 00000000..13ad2d10 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/META-INF/MANIFEST.MF | |||
@@ -0,0 +1,26 @@ | |||
1 | Manifest-Version: 1.0 | ||
2 | Bundle-ManifestVersion: 2 | ||
3 | Bundle-Name: %pluginName | ||
4 | Bundle-SymbolicName: hu.bme.mit.inf.dlsreasoner.alloy.reasoner;singleton:=true | ||
5 | Bundle-Version: 1.0.0.qualifier | ||
6 | Bundle-ClassPath: lib/alloy4.2_2015-02-22.jar, | ||
7 | . | ||
8 | Bundle-Vendor: %providerName | ||
9 | Bundle-Localization: plugin | ||
10 | Export-Package: hu.bme.mit.inf.dlsreasoner.alloy.reasoner, | ||
11 | hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder, | ||
12 | hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries, | ||
13 | hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries.util | ||
14 | Require-Bundle: com.google.guava, | ||
15 | org.eclipse.xtend.lib, | ||
16 | org.eclipse.xtext.xbase.lib, | ||
17 | org.eclipse.core.runtime, | ||
18 | org.eclipse.emf.ecore;visibility:=reexport, | ||
19 | hu.bme.mit.inf.dslreasoner.logic.model;bundle-version="1.0.0";visibility:=reexport, | ||
20 | hu.bme.mit.inf.dslreasoner.alloy.language;bundle-version="1.0.0", | ||
21 | org.eclipse.viatra.query.runtime;bundle-version="[1.2.0,2.0.0)", | ||
22 | org.eclipse.viatra.query.runtime.base.itc;bundle-version="1.3.0", | ||
23 | hu.bme.mit.inf.dslreasoner.ecore2logic;bundle-version="1.0.0" | ||
24 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
25 | Bundle-ActivationPolicy: lazy | ||
26 | Import-Package: org.apache.log4j;version="1.2.15" | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/build.properties b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/build.properties new file mode 100644 index 00000000..bb9e5d4d --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/build.properties | |||
@@ -0,0 +1,10 @@ | |||
1 | bin.includes = .,\ | ||
2 | model/,\ | ||
3 | META-INF/,\ | ||
4 | plugin.xml,\ | ||
5 | plugin.properties | ||
6 | jars.compile.order = . | ||
7 | source.. = ecore-gen/,\ | ||
8 | src/,\ | ||
9 | src-gen/ | ||
10 | output.. = bin/ | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/plugin.properties b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/plugin.properties new file mode 100644 index 00000000..14541a0a --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/plugin.properties | |||
@@ -0,0 +1,4 @@ | |||
1 | # | ||
2 | |||
3 | pluginName = AlloyLanguage Model | ||
4 | providerName = www.example.org | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/plugin.xml b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/plugin.xml new file mode 100644 index 00000000..23c55a4d --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/plugin.xml | |||
@@ -0,0 +1,21 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?><?eclipse version="3.0"?><!-- | ||
2 | --><plugin> | ||
3 | <extension point="org.eclipse.emf.ecore.generated_package"> | ||
4 | <!-- @generated AlloyLanguage --> | ||
5 | <package class="hu.bme.mit.inf.dlsreasoner.alloy.reasoner.alloylanguage.AlloylanguagePackage" genModel="model/AlloyLanguage.genmodel" uri="hu.bme.mit.inf.dlsreasoner.alloy.reasoner.language"/> | ||
6 | </extension> | ||
7 | <extension id="hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries.SignatureQueries" point="org.eclipse.viatra.query.runtime.queryspecification"> | ||
8 | <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries.SignatureQueries" id="hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries.SignatureQueries"> | ||
9 | <query-specification fqn="hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries.directSubset"/> | ||
10 | <query-specification fqn="hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries.subset"/> | ||
11 | </group> | ||
12 | </extension> | ||
13 | <extension id="hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries.TypeQueries" point="org.eclipse.viatra.query.runtime.queryspecification"> | ||
14 | <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries.TypeQueries" id="hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries.TypeQueries"> | ||
15 | <query-specification fqn="hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries.supertype"/> | ||
16 | <query-specification fqn="hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries.topmostCommonSubtypes"/> | ||
17 | <query-specification fqn="hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries.lowermostCommonSupertype"/> | ||
18 | <query-specification fqn="hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries.lowestCommonSupertypeOfAllOccuranceOfElement"/> | ||
19 | </group> | ||
20 | </extension> | ||
21 | </plugin> | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/queries/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/queries/signatureQueries.vql b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/queries/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/queries/signatureQueries.vql new file mode 100644 index 00000000..a020953c --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/queries/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/queries/signatureQueries.vql | |||
@@ -0,0 +1,17 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries | ||
2 | |||
3 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/AlloyLanguage" | ||
4 | |||
5 | pattern directSubset(x: ALSSignatureDeclaration, y: ALSSignatureDeclaration) { | ||
6 | ALSSignatureBody.declarations(b,y); | ||
7 | ALSSignatureBody.supertype(b,x); | ||
8 | } or { | ||
9 | ALSSignatureBody.declarations(b,y); | ||
10 | ALSSignatureBody.superset(b,x); | ||
11 | } | ||
12 | |||
13 | pattern subset(x: ALSSignatureDeclaration, y: ALSSignatureDeclaration) { | ||
14 | x == y; | ||
15 | } or { | ||
16 | find directSubset+(x,y); | ||
17 | } | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/queries/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/queries/typeQueries.vql b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/queries/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/queries/typeQueries.vql new file mode 100644 index 00000000..8d93cafb --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/queries/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/queries/typeQueries.vql | |||
@@ -0,0 +1,85 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries | ||
2 | |||
3 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
4 | |||
5 | private pattern supertypeEdge(type1: Type, type2: Type) { | ||
6 | Type.supertypes(type1,type2); | ||
7 | } | ||
8 | |||
9 | pattern supertype(type1: Type, type2: Type) { | ||
10 | type1 == type2; | ||
11 | } or { | ||
12 | find supertypeEdge+(type1,type2); | ||
13 | } | ||
14 | |||
15 | private pattern commonSubtype(type1: Type, type2: Type, common: Type) { | ||
16 | find supertype(common,type1); | ||
17 | find supertype(common,type2); | ||
18 | } | ||
19 | |||
20 | private pattern commonSupertype(type1: Type, type2: Type, common: Type) { | ||
21 | find supertype(common,type1); | ||
22 | find supertype(common,type2); | ||
23 | } | ||
24 | |||
25 | private pattern hasHigherCommonSubtype(type1: Type, type2: Type, common: Type, higher: Type) { | ||
26 | find supertype(higher,type1); | ||
27 | find supertype(higher,type2); | ||
28 | Type.supertypes(common,higher); | ||
29 | higher != common; | ||
30 | } | ||
31 | |||
32 | private pattern hasLowerCommonSupertype(type1: Type, type2: Type, common: Type, lower: Type) { | ||
33 | find supertype(type1,lower); | ||
34 | find supertype(type2,lower); | ||
35 | Type.supertypes(lower,common); | ||
36 | lower != common; | ||
37 | } | ||
38 | |||
39 | pattern topmostCommonSubtypes(type1: Type, type2: Type, common: Type) { | ||
40 | find commonSubtype(type1, type2, common); | ||
41 | neg find hasHigherCommonSubtype(type1, type2, common, _); | ||
42 | } | ||
43 | |||
44 | pattern lowermostCommonSupertype(type1: Type, type2: Type, common: Type) { | ||
45 | find commonSupertype(type1, type2, common); | ||
46 | neg find hasLowerCommonSupertype(type1, type2, common, _); | ||
47 | } | ||
48 | /*pattern topmostCommonSubtypesInObject(type1: Type, type2: Type, common: Type) { | ||
49 | find commonSubtype(type1, type2, common); | ||
50 | neg find supertypeEdge(type1,_); | ||
51 | neg find supertypeEdge(type2,_); | ||
52 | neg find hasHigherCommonSubtype(type1, type2, common, _); | ||
53 | } | ||
54 | pattern topmostCommonSubtypesInType(in: Type, type1: Type, type2: Type, common: Type) { | ||
55 | find commonSubtype(type1, type2, common); | ||
56 | find supertypeEdge(type1,in); | ||
57 | find supertypeEdge(type2,in); | ||
58 | neg find hasHigherCommonSubtype(type1, type2, common, _); | ||
59 | } | ||
60 | */ | ||
61 | |||
62 | pattern lowestCommonSupertypeOfAllOccuranceOfElement(element: DefinedElement, type: Type) { | ||
63 | find typeContainsAllOccuranceOfElement(element,type); | ||
64 | neg find hasLowerCommonSupertypeOfAllOccuranceOfElement(element, type, _); | ||
65 | } | ||
66 | |||
67 | private pattern hasLowerCommonSupertypeOfAllOccuranceOfElement(element: DefinedElement, type: Type, lower: Type) { | ||
68 | find typeContainsAllOccuranceOfElement(element, type); | ||
69 | find typeContainsAllOccuranceOfElement(element, lower); | ||
70 | find supertype(lower, type); | ||
71 | type != lower; | ||
72 | } | ||
73 | |||
74 | private pattern typeContainsAllOccuranceOfElement(element: DefinedElement, type: Type) { | ||
75 | find supertype(containerType,type); | ||
76 | TypeDefinition.elements(containerType,element); | ||
77 | neg find typeDoesNotCoverElementOccurance(element,type,_); | ||
78 | } | ||
79 | |||
80 | private pattern typeDoesNotCoverElementOccurance(element: DefinedElement, type: Type, uncoveredOccurance: TypeDefinition) { | ||
81 | find supertype(containerType,type); | ||
82 | TypeDefinition.elements(containerType,element); | ||
83 | TypeDefinition.elements(uncoveredOccurance,element); | ||
84 | neg find supertype(uncoveredOccurance,type); | ||
85 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/AlloyAnalyzerConfiguration.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/AlloyAnalyzerConfiguration.xtend new file mode 100644 index 00000000..cdf21174 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/AlloyAnalyzerConfiguration.xtend | |||
@@ -0,0 +1,32 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicSolverConfiguration | ||
4 | |||
5 | class AlloySolverConfiguration extends LogicSolverConfiguration { | ||
6 | /*public var boolean createCommonSupertype | ||
7 | public var int intScope = 1 // 5 by default | ||
8 | public def setIntScopeFor(int max) { | ||
9 | intScope = 31 - Integer.numberOfLeadingZeros(max) + 1 | ||
10 | }*/ | ||
11 | public var int symmetry = 0 // by default | ||
12 | public var AlloyBackendSolver solver = AlloyBackendSolver.SAT4J | ||
13 | public var boolean writeToFile = false | ||
14 | } | ||
15 | |||
16 | enum AlloyBackendSolver { | ||
17 | BerkMinPIPE, | ||
18 | SpearPIPE, | ||
19 | MiniSatJNI, | ||
20 | MiniSatProverJNI, | ||
21 | LingelingJNI, | ||
22 | PLingelingJNI, | ||
23 | GlucoseJNI, | ||
24 | CryptoMiniSatJNI, | ||
25 | SAT4J, | ||
26 | CNF, | ||
27 | KodKod | ||
28 | } | ||
29 | |||
30 | enum TypeMappingTechnique { | ||
31 | FilteredTypes | ||
32 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/AlloySolver.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/AlloySolver.xtend new file mode 100644 index 00000000..7dfc3161 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/AlloySolver.xtend | |||
@@ -0,0 +1,72 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder.Alloy2LogicMapper | ||
4 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder.AlloyHandler | ||
5 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder.AlloyModelInterpretation | ||
6 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder.Logic2AlloyLanguageMapper | ||
7 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder.Logic2AlloyLanguageMapperTrace | ||
8 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder.MonitoredAlloySolution | ||
9 | import hu.bme.mit.inf.dslreasoner.AlloyLanguageStandaloneSetupGenerated | ||
10 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguagePackage | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasonerException | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicSolverConfiguration | ||
14 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
15 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult | ||
16 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace | ||
17 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder.Logic2AlloyLanguageMapper_TypeMapper_FilteredTypes | ||
18 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder.AlloyModelInterpretation_TypeInterpretation_FilteredTypes | ||
19 | import org.eclipse.emf.common.util.URI | ||
20 | |||
21 | class AlloySolver extends LogicReasoner{ | ||
22 | |||
23 | new() { | ||
24 | AlloyLanguagePackage.eINSTANCE.eClass | ||
25 | val x = new AlloyLanguageStandaloneSetupGenerated | ||
26 | x.createInjectorAndDoEMFRegistration | ||
27 | } | ||
28 | |||
29 | val Logic2AlloyLanguageMapper forwardMapper = new Logic2AlloyLanguageMapper(new Logic2AlloyLanguageMapper_TypeMapper_FilteredTypes) | ||
30 | val AlloyHandler handler = new AlloyHandler | ||
31 | val Alloy2LogicMapper backwardMapper = new Alloy2LogicMapper | ||
32 | |||
33 | val fileName = "problem.als" | ||
34 | |||
35 | override solve(LogicProblem problem, LogicSolverConfiguration configuration, ReasonerWorkspace workspace) throws LogicReasonerException { | ||
36 | if(configuration instanceof AlloySolverConfiguration) { | ||
37 | val transformationStart = System.currentTimeMillis | ||
38 | val result = forwardMapper.transformProblem(problem,configuration) | ||
39 | val alloyProblem = result.output | ||
40 | |||
41 | /*val x = alloyProblem.eAllContents.filter(ALSFunctionCall).filter[it.referredDefinition == null].toList | ||
42 | println(x)*/ | ||
43 | val forwardTrace = result.trace | ||
44 | |||
45 | var String fileURI = null; | ||
46 | var String alloyCode = null; | ||
47 | if(configuration.writeToFile) { | ||
48 | fileURI = workspace.writeModel(alloyProblem,fileName).toFileString | ||
49 | } else { | ||
50 | alloyCode = workspace.writeModelToString(alloyProblem,fileName) | ||
51 | } | ||
52 | |||
53 | //val alloyCode = workspace.readText(fileName) | ||
54 | //val FunctionWithTimeout<MonitoredAlloySolution> call = new FunctionWithTimeout[] | ||
55 | |||
56 | val transformationTime = System.currentTimeMillis - transformationStart | ||
57 | val result2 = handler.callSolver(alloyProblem,workspace,configuration,fileURI,alloyCode) | ||
58 | workspace.deactivateModel(fileName) | ||
59 | val logicResult = backwardMapper.transformOutput(problem,result2,forwardTrace,transformationTime) | ||
60 | return logicResult | ||
61 | } else throw new IllegalArgumentException('''The configuration have to be an «AlloySolverConfiguration.simpleName»!''') | ||
62 | } | ||
63 | |||
64 | override getInterpretation(ModelResult modelResult) { | ||
65 | return new AlloyModelInterpretation( | ||
66 | new AlloyModelInterpretation_TypeInterpretation_FilteredTypes, | ||
67 | (modelResult.representation as MonitoredAlloySolution).solution, | ||
68 | forwardMapper, | ||
69 | modelResult.trace as Logic2AlloyLanguageMapperTrace | ||
70 | ); | ||
71 | } | ||
72 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Alloy2LogicMapper.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Alloy2LogicMapper.xtend new file mode 100644 index 00000000..637752b0 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Alloy2LogicMapper.xtend | |||
@@ -0,0 +1,48 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicresultFactory | ||
5 | |||
6 | class Alloy2LogicMapper { | ||
7 | val extension LogicresultFactory resultFactory = LogicresultFactory.eINSTANCE | ||
8 | |||
9 | public def transformOutput(LogicProblem problem, MonitoredAlloySolution solution, Logic2AlloyLanguageMapperTrace trace, long transformationTime) { | ||
10 | if(solution == null) { | ||
11 | return createInsuficientResourcesResult => [ | ||
12 | it.problem = problem | ||
13 | it.statistics = transformStatistics(solution,transformationTime) | ||
14 | ] | ||
15 | } else { | ||
16 | val logicResult = solution.solution | ||
17 | if(logicResult.satisfiable) { | ||
18 | return createModelResult => [ | ||
19 | it.problem = problem | ||
20 | it.representation += solution | ||
21 | it.maxInteger = logicResult.max | ||
22 | it.minInteger = logicResult.min | ||
23 | it.trace = trace | ||
24 | it.statistics = transformStatistics(solution,transformationTime) | ||
25 | ] | ||
26 | } else { | ||
27 | return createInconsistencyResult => [ | ||
28 | it.problem = problem | ||
29 | //trace? | ||
30 | it.statistics = transformStatistics(solution,transformationTime) | ||
31 | ] | ||
32 | } | ||
33 | } | ||
34 | } | ||
35 | |||
36 | def transformStatistics(MonitoredAlloySolution solution, long transformationTime) { | ||
37 | createStatistics => [ | ||
38 | it.transformationTime = transformationTime as int | ||
39 | if(solution != null) { | ||
40 | it.solverTime = solution.runtimeTime as int | ||
41 | it.entries += LogicresultFactory.eINSTANCE.createIntStatisticEntry => [ | ||
42 | it.name = "KoodkodToCNFTransformationTime" | ||
43 | it.value = solution.getKodkodTime as int | ||
44 | ] | ||
45 | } | ||
46 | ] | ||
47 | } | ||
48 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend new file mode 100644 index 00000000..6bac4130 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend | |||
@@ -0,0 +1,145 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import edu.mit.csail.sdg.alloy4.A4Reporter | ||
4 | import edu.mit.csail.sdg.alloy4.Err | ||
5 | import edu.mit.csail.sdg.alloy4.ErrorWarning | ||
6 | import edu.mit.csail.sdg.alloy4compiler.ast.Command | ||
7 | import edu.mit.csail.sdg.alloy4compiler.parser.CompModule | ||
8 | import edu.mit.csail.sdg.alloy4compiler.parser.CompUtil | ||
9 | import edu.mit.csail.sdg.alloy4compiler.translator.A4Options | ||
10 | import edu.mit.csail.sdg.alloy4compiler.translator.A4Solution | ||
11 | import edu.mit.csail.sdg.alloy4compiler.translator.TranslateAlloyToKodkod | ||
12 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace | ||
13 | import java.util.LinkedList | ||
14 | import java.util.List | ||
15 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.AlloyBackendSolver | ||
16 | import org.eclipse.xtend.lib.annotations.Data | ||
17 | import java.util.Map | ||
18 | import java.util.HashMap | ||
19 | import edu.mit.csail.sdg.alloy4compiler.translator.A4Options.SatSolver | ||
20 | import org.eclipse.emf.common.CommonPlugin | ||
21 | import java.util.ArrayList | ||
22 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSDocument | ||
23 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.AlloySolverConfiguration | ||
24 | |||
25 | class AlloySolverException extends Exception{ | ||
26 | new(String s) { super(s) } | ||
27 | new(String s, Exception e) { super(s,e) } | ||
28 | new(String s, List<String> errors, Exception e) { | ||
29 | super(s + '\n' + errors.join('\n'), e) | ||
30 | } | ||
31 | } | ||
32 | |||
33 | @Data class MonitoredAlloySolution{ | ||
34 | List<String> warnings | ||
35 | List<String> debugs | ||
36 | long kodkodTime | ||
37 | long runtimeTime | ||
38 | |||
39 | A4Solution solution | ||
40 | } | ||
41 | |||
42 | class AlloyHandler { | ||
43 | |||
44 | //val fileName = "problem.als" | ||
45 | |||
46 | public def callSolver(ALSDocument problem, ReasonerWorkspace workspace, AlloySolverConfiguration configuration, String path, String alloyCode) { | ||
47 | //Prepare | ||
48 | |||
49 | val warnings = new LinkedList<String> | ||
50 | val debugs = new LinkedList<String> | ||
51 | val runtime = new ArrayList<Long> | ||
52 | val reporter = new A4Reporter() { | ||
53 | override debug(String message) { debugs += message } | ||
54 | override resultSAT (Object command, long solvingTime, Object solution) { runtime += solvingTime } | ||
55 | override resultUNSAT (Object command, long solvingTime, Object solution) { runtime += solvingTime } | ||
56 | override warning(ErrorWarning msg) { warnings += msg.message } | ||
57 | } | ||
58 | |||
59 | val options = new A4Options() => [ | ||
60 | it.symmetry = configuration.symmetry | ||
61 | it.noOverflow = true | ||
62 | it.solver = getSolver(configuration.solver, configuration) | ||
63 | if(configuration.solver.externalSolver) { | ||
64 | it.solverDirectory = configuration.solverPath | ||
65 | } | ||
66 | it.tempDirectory = CommonPlugin.resolve(workspace.workspaceURI).toFileString | ||
67 | ] | ||
68 | |||
69 | // Transform | ||
70 | var Command command = null; | ||
71 | var CompModule compModule = null | ||
72 | |||
73 | val kodkodTransformStart = System.currentTimeMillis(); | ||
74 | |||
75 | try { | ||
76 | if(configuration.writeToFile) { | ||
77 | compModule = CompUtil.parseEverything_fromFile(reporter,null,path) | ||
78 | } else { | ||
79 | compModule = CompUtil.parseEverything_fromString(reporter,alloyCode) | ||
80 | } | ||
81 | if(compModule.allCommands.size != 1) | ||
82 | throw new UnsupportedOperationException('''Alloy files with multiple commands are not supported!''') | ||
83 | command = compModule.allCommands.head | ||
84 | } catch (Err e){ | ||
85 | throw new AlloySolverException(e.message,warnings,e) | ||
86 | } | ||
87 | val kodkodTransformFinish = System.currentTimeMillis - kodkodTransformStart | ||
88 | |||
89 | //Execute | ||
90 | var A4Solution answer = null; | ||
91 | try { | ||
92 | answer = TranslateAlloyToKodkod.execute_command(reporter,compModule.allSigs,command,options) | ||
93 | }catch(Exception e) { | ||
94 | warnings +=e.message | ||
95 | } | ||
96 | |||
97 | var long runtimeFromAnswer; | ||
98 | if(runtime.empty) { | ||
99 | runtimeFromAnswer = System.currentTimeMillis - (kodkodTransformStart + kodkodTransformFinish) | ||
100 | } else { | ||
101 | runtimeFromAnswer = runtime.head | ||
102 | } | ||
103 | |||
104 | return new MonitoredAlloySolution(warnings,debugs,kodkodTransformFinish,runtimeFromAnswer,answer) | ||
105 | } | ||
106 | |||
107 | val static Map<SolverConfiguration, SatSolver> previousSolverConfigurations = new HashMap | ||
108 | def getSolverConfiguration(AlloyBackendSolver backedSolver, String path, String[] options) { | ||
109 | val config = new SolverConfiguration(backedSolver,path,options) | ||
110 | if(previousSolverConfigurations.containsKey(config)) { | ||
111 | return previousSolverConfigurations.get(config) | ||
112 | } else { | ||
113 | val id ='''DSLReasoner_Alloy_«previousSolverConfigurations.size»_«backedSolver»''' | ||
114 | val newSolver = A4Options.SatSolver.make(id,id,path,options) | ||
115 | previousSolverConfigurations.put(config,newSolver) | ||
116 | return newSolver | ||
117 | } | ||
118 | } | ||
119 | |||
120 | def getSolver(AlloyBackendSolver backedSolver, AlloySolverConfiguration configuration) { | ||
121 | switch(backedSolver){ | ||
122 | case BerkMinPIPE: return A4Options.SatSolver.BerkMinPIPE | ||
123 | case SpearPIPE: return A4Options.SatSolver.SpearPIPE | ||
124 | case MiniSatJNI: return A4Options.SatSolver.MiniSatJNI | ||
125 | case MiniSatProverJNI: return A4Options.SatSolver.MiniSatProverJNI | ||
126 | case LingelingJNI: return A4Options.SatSolver.LingelingJNI | ||
127 | case PLingelingJNI: return getSolverConfiguration(backedSolver,configuration.solverPath,null) | ||
128 | case GlucoseJNI: return A4Options.SatSolver.GlucoseJNI | ||
129 | case CryptoMiniSatJNI: return A4Options.SatSolver.CryptoMiniSatJNI | ||
130 | case SAT4J: return A4Options.SatSolver.SAT4J | ||
131 | case CNF: return A4Options.SatSolver.CNF | ||
132 | case KodKod: return A4Options.SatSolver.KK | ||
133 | } | ||
134 | } | ||
135 | |||
136 | def isExternalSolver(AlloyBackendSolver backedSolver) { | ||
137 | return !(backedSolver == AlloyBackendSolver.SAT4J) | ||
138 | } | ||
139 | } | ||
140 | |||
141 | @Data class SolverConfiguration { | ||
142 | AlloyBackendSolver backedSolver | ||
143 | String path | ||
144 | String[] options | ||
145 | } | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyModelInterpretation.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyModelInterpretation.xtend new file mode 100644 index 00000000..d00291e0 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyModelInterpretation.xtend | |||
@@ -0,0 +1,331 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import edu.mit.csail.sdg.alloy4compiler.ast.ExprVar | ||
4 | import edu.mit.csail.sdg.alloy4compiler.ast.Sig.Field | ||
5 | import edu.mit.csail.sdg.alloy4compiler.translator.A4Solution | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicModelInterpretation | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDeclaration | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDeclaration | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
14 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | ||
15 | import java.util.Arrays | ||
16 | import java.util.HashMap | ||
17 | import java.util.LinkedList | ||
18 | import java.util.List | ||
19 | import java.util.Map | ||
20 | import java.util.Set | ||
21 | |||
22 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
23 | import edu.mit.csail.sdg.alloy4compiler.ast.Sig | ||
24 | import java.util.ArrayList | ||
25 | |||
26 | interface AlloyModelInterpretation_TypeInterpretation { | ||
27 | def void resolveUnknownAtoms( | ||
28 | Iterable<ExprVar> objectAtoms, | ||
29 | A4Solution solution, | ||
30 | Logic2AlloyLanguageMapperTrace forwardTrace, | ||
31 | Map<String, Sig> name2AlloySig, | ||
32 | Map<String, Field> name2AlloyField, | ||
33 | Map<String,DefinedElement> expression2DefinedElement, | ||
34 | Map<TypeDeclaration, List<DefinedElement>> interpretationOfUndefinedType) | ||
35 | } | ||
36 | |||
37 | class AlloyModelInterpretation_TypeInterpretation_FilteredTypes implements AlloyModelInterpretation_TypeInterpretation{ | ||
38 | protected val extension LogiclanguageFactory factory = LogiclanguageFactory.eINSTANCE | ||
39 | |||
40 | override resolveUnknownAtoms( | ||
41 | Iterable<ExprVar> objectAtoms, | ||
42 | A4Solution solution, | ||
43 | Logic2AlloyLanguageMapperTrace forwardTrace, | ||
44 | Map<String, Sig> name2AlloySig, | ||
45 | Map<String, Field> name2AlloyField, | ||
46 | Map<String,DefinedElement> expression2DefinedElement, | ||
47 | Map<TypeDeclaration, List<DefinedElement>> interpretationOfUndefinedType) | ||
48 | { | ||
49 | /*val Map<String,DefinedElement> expression2DefinedElement = new HashMap() | ||
50 | val Map<TypeDeclaration, List<DefinedElement>> interpretationOfUndefinedType = new HashMap;*/ | ||
51 | |||
52 | val typeTrace = forwardTrace.typeMapperTrace as Logic2AlloyLanguageMapper_TypeMapperTrace_FilteredTypes | ||
53 | |||
54 | // 1. Evaluate the defined elements | ||
55 | for(definedElementMappingEntry : typeTrace.definedElement2Declaration.entrySet) { | ||
56 | val name = definedElementMappingEntry.value.name | ||
57 | val matchingSig = '''this/«name»'''.toString.lookup(name2AlloySig) | ||
58 | val elementsOfSingletonSignature = solution.eval(matchingSig) | ||
59 | if(elementsOfSingletonSignature.size != 1) { | ||
60 | throw new IllegalArgumentException('''Defined element is unambigous: "«name»", possible values: «elementsOfSingletonSignature»!''') | ||
61 | } else { | ||
62 | val expressionOfDefinedElement = elementsOfSingletonSignature.head.atom(0)// as ExprVar | ||
63 | expression2DefinedElement.put(expressionOfDefinedElement, definedElementMappingEntry.key) | ||
64 | } | ||
65 | } | ||
66 | |||
67 | // 2. evaluate the signatures and create new elements if necessary | ||
68 | for(type2SingatureEntry : typeTrace.type2ALSType.entrySet) { | ||
69 | val type = type2SingatureEntry.key | ||
70 | if(type instanceof TypeDeclaration) { | ||
71 | val name = type2SingatureEntry.value.name | ||
72 | val matchingSig = '''this/«name»'''.toString.lookup(name2AlloySig) | ||
73 | val elementsOfSignature = solution.eval(matchingSig) | ||
74 | val elementList = new ArrayList(elementsOfSignature.size) | ||
75 | var newVariableIndex = 1; | ||
76 | for(elementOfSignature : elementsOfSignature) { | ||
77 | val expressionOfDefinedElement = elementOfSignature.atom(0) | ||
78 | if(expression2DefinedElement.containsKey(expressionOfDefinedElement)) { | ||
79 | elementList += expressionOfDefinedElement.lookup(expression2DefinedElement) | ||
80 | } else { | ||
81 | val newElementName = '''newObject «newVariableIndex.toString»''' | ||
82 | val newRepresentation = createDefinedElement => [ | ||
83 | it.name = newElementName | ||
84 | ] | ||
85 | elementList += newRepresentation | ||
86 | expression2DefinedElement.put(expressionOfDefinedElement,newRepresentation) | ||
87 | } | ||
88 | } | ||
89 | interpretationOfUndefinedType.put(type,elementList) | ||
90 | } | ||
91 | } | ||
92 | } | ||
93 | } | ||
94 | /* | ||
95 | class AlloyModelInterpretation_TypeInterpretation_Horizontal implements AlloyModelInterpretation_TypeInterpretation{ | ||
96 | protected val extension LogiclanguageFactory factory = LogiclanguageFactory.eINSTANCE | ||
97 | |||
98 | override resolveUnknownAtoms(Iterable<ExprVar> objectAtoms, Logic2AlloyLanguageMapperTrace forwardTrace, Map<String,DefinedElement> alloyAtom2LogicElement) { | ||
99 | val Map<TypeDeclaration, List<DefinedElement>> interpretationOfUndefinedType = new HashMap; | ||
100 | |||
101 | //TMP sig maps to identify alloy signatures by their names | ||
102 | val Map<String,Type> sigName2LogicType = | ||
103 | forwardTrace.type2ALSType.keySet.toMap[x|forwardTrace.type2ALSType.get(x).name] | ||
104 | //val Map<String,DefinedElement> elementNameNamel2DefinedElement = | ||
105 | // forwardTrace.definedElement2Declaration.keySet.toMap[x|forwardTrace.definedElement2Declaration.get(x).name] | ||
106 | |||
107 | // Fill the interpretation map with empty lists | ||
108 | forwardTrace.type2ALSType.keySet.filter(TypeDeclaration).forEach[x|interpretationOfUndefinedType.put(x,new LinkedList)] | ||
109 | |||
110 | // exporing individuals | ||
111 | for(atom: objectAtoms) { | ||
112 | val typeName = getName(atom.type) | ||
113 | //val atomName = atom.name | ||
114 | |||
115 | if(sigName2LogicType.containsKey(typeName)) { | ||
116 | val type = sigName2LogicType.get(typeName) | ||
117 | val elementsOfType = interpretationOfUndefinedType.get(type) | ||
118 | val element = createDefinedElement => [ | ||
119 | it.name += type.name | ||
120 | it.name += (elementsOfType.size+1).toString | ||
121 | ] | ||
122 | alloyAtom2LogicElement.put(atom.label,element) | ||
123 | elementsOfType+=element | ||
124 | } | ||
125 | else throw new UnsupportedOperationException('''Unknown atom: «atom»''') | ||
126 | } | ||
127 | |||
128 | return interpretationOfUndefinedType | ||
129 | } | ||
130 | |||
131 | def private getName(edu.mit.csail.sdg.alloy4compiler.ast.Type type) { | ||
132 | val name = type.toString | ||
133 | if(name.startsWith("{this/") && name.endsWith("}")) { | ||
134 | return type.toString.replaceFirst("\\{this\\/","").replace("}","") | ||
135 | } | ||
136 | else throw new IllegalArgumentException('''Unknown type format: "«name»"!''') | ||
137 | } | ||
138 | //def private getName(ExprVar atom) { atom.toString.split("\\$") } | ||
139 | }*/ | ||
140 | |||
141 | class AlloyModelInterpretation implements LogicModelInterpretation{ | ||
142 | |||
143 | protected val extension LogiclanguageFactory factory = LogiclanguageFactory.eINSTANCE | ||
144 | protected val AlloyModelInterpretation_TypeInterpretation typeInterpretator | ||
145 | |||
146 | protected val Logic2AlloyLanguageMapper forwardMapper | ||
147 | protected val Logic2AlloyLanguageMapperTrace forwardTrace; | ||
148 | |||
149 | private var ExprVar logicLanguage; | ||
150 | |||
151 | private var String logicBooleanTrue; | ||
152 | private var String logicBooleanFalse; | ||
153 | |||
154 | private val Map<String, DefinedElement> alloyAtom2LogicElement = new HashMap | ||
155 | private val Map<TypeDeclaration, List<DefinedElement>> interpretationOfUndefinedType = new HashMap | ||
156 | |||
157 | private val Map<ConstantDeclaration, Object> constant2Value | ||
158 | private val Map<FunctionDeclaration, ? extends Map<ParameterSubstitution, Object>> function2Value | ||
159 | private val Map<RelationDeclaration, ? extends Set<ParameterSubstitution>> relation2Value | ||
160 | |||
161 | private val int minInt | ||
162 | private val int maxInt | ||
163 | |||
164 | public new (AlloyModelInterpretation_TypeInterpretation typeInterpretator, A4Solution solution, Logic2AlloyLanguageMapper forwardMapper, Logic2AlloyLanguageMapperTrace trace) { | ||
165 | this.typeInterpretator = typeInterpretator | ||
166 | this.forwardMapper = forwardMapper | ||
167 | this.forwardTrace = trace | ||
168 | |||
169 | // Maps to trace language elements to the parsed problem. | ||
170 | val Map<String, Sig> name2AlloySig = new HashMap | ||
171 | val Map<String, Field> name2AlloyField = new HashMap | ||
172 | // exploring signatures | ||
173 | for(sig:solution.allReachableSigs) { | ||
174 | name2AlloySig.put(sig.label,sig) | ||
175 | for(field : sig.fields) { | ||
176 | name2AlloyField.put(field.label,field) | ||
177 | } | ||
178 | } | ||
179 | |||
180 | val unknownAtoms = collectUnknownAndResolveKnownAtoms(solution.allAtoms) | ||
181 | this.typeInterpretator.resolveUnknownAtoms( | ||
182 | unknownAtoms, | ||
183 | solution, | ||
184 | forwardTrace, | ||
185 | name2AlloySig, | ||
186 | name2AlloyField, | ||
187 | alloyAtom2LogicElement, | ||
188 | interpretationOfUndefinedType) | ||
189 | |||
190 | // eval consants | ||
191 | constant2Value = forwardTrace.constantDeclaration2LanguageField.mapValues[ | ||
192 | solution.eval(it.name.lookup(name2AlloyField)).head.atom(1).atomLabel2Term | ||
193 | ] | ||
194 | // eval functions | ||
195 | val hostedfunction2Value = forwardTrace.functionDeclaration2HostedField.mapValues[ function | | ||
196 | newHashMap( | ||
197 | solution.eval(function.name.lookup(name2AlloyField)) | ||
198 | .map[t | new ParameterSubstitution(#[t.atom(0).atomLabel2Term]) -> t.atom(1).atomLabel2Term])] | ||
199 | |||
200 | val globalfunction2Value = forwardTrace.functionDeclaration2LanguageField.keySet.toInvertedMap[ function | | ||
201 | val alsFunction = function.lookup(forwardTrace.functionDeclaration2LanguageField) | ||
202 | val paramIndexes = 1..(function.parameters.size) | ||
203 | return newHashMap( | ||
204 | solution.eval(alsFunction.name.lookup(name2AlloyField)).map[t | | ||
205 | new ParameterSubstitution(paramIndexes.map[t.atom(it).atomLabel2Term]) | ||
206 | -> | ||
207 | t.atom(function.parameters.size + 1).atomLabel2Term | ||
208 | ])] | ||
209 | this.function2Value = Union(hostedfunction2Value,globalfunction2Value) | ||
210 | // eval relations | ||
211 | val hostedRelation2Value = forwardTrace.relationDeclaration2Field.mapValues[ relation | | ||
212 | solution.eval(relation.name.lookup(name2AlloyField)).map[ t | | ||
213 | new ParameterSubstitution(#[t.atom(0).atomLabel2Term,t.atom(1).atomLabel2Term])].toSet] | ||
214 | val globalRelation2Value = forwardTrace.relationDeclaration2Global.mapValues[ relation | | ||
215 | solution.eval(relation.name.lookup(name2AlloyField)).map[ t | | ||
216 | new ParameterSubstitution((1..<t.arity).map[int a|t.atom(a).atomLabel2Term])].toSet] | ||
217 | this.relation2Value = Union(hostedRelation2Value,globalRelation2Value) | ||
218 | |||
219 | //Int limits | ||
220 | this.minInt = solution.min | ||
221 | this.maxInt = solution.max | ||
222 | |||
223 | //print(trace) | ||
224 | } | ||
225 | |||
226 | def List<ExprVar> collectUnknownAndResolveKnownAtoms(Iterable<ExprVar> allAtoms) { | ||
227 | val List<ExprVar> unknownAtoms = new LinkedList | ||
228 | |||
229 | for(atom: allAtoms) { | ||
230 | val typeName = getName(atom.type) | ||
231 | val atomName = atom.name | ||
232 | //println(atom.toString + " < - " + typeName) | ||
233 | if(typeName == forwardTrace.logicLanguage.name) { | ||
234 | this.logicLanguage = atom | ||
235 | } else if(typeName == "Int" || typeName == "seq/Int") { | ||
236 | // do nothing, integers will be parsed from the string | ||
237 | } else if(forwardTrace.boolType != null && typeName == forwardTrace.boolType.name) { | ||
238 | if(atomName.head == forwardTrace.boolTrue.name) { this.logicBooleanTrue = atom.label } | ||
239 | else if(atomName.head == forwardTrace.boolFalse.name) { this.logicBooleanFalse = atom.label} | ||
240 | else throw new UnsupportedOperationException('''Unknown boolean value: «atom»''') | ||
241 | } | ||
242 | else unknownAtoms += atom | ||
243 | } | ||
244 | |||
245 | return unknownAtoms | ||
246 | } | ||
247 | |||
248 | def private getName(edu.mit.csail.sdg.alloy4compiler.ast.Type type) { | ||
249 | val name = type.toString | ||
250 | if(name.startsWith("{this/") && name.endsWith("}")) { | ||
251 | return type.toString.replaceFirst("\\{this\\/","").replace("}","") | ||
252 | } | ||
253 | else throw new IllegalArgumentException('''Unknown type format: "«name»"!''') | ||
254 | } | ||
255 | def private getName(ExprVar atom) { atom.toString.split("\\$") } | ||
256 | |||
257 | def print(Logic2AlloyLanguageMapperTrace trace) { | ||
258 | println('''Undefined-----''') | ||
259 | interpretationOfUndefinedType.forEach[k,v|println('''«k.name» -> «v.map[name]»''')] | ||
260 | //println('''Defined-----''') | ||
261 | //trace.type2ALSType.keySet.filter(TypeDefinition).forEach[println('''«it.name» -> «it.elements.map[name.join]»''')] | ||
262 | |||
263 | println('''Constants-----''') | ||
264 | constant2Value.forEach[k, v|println('''«k.name» : «v»''')] | ||
265 | println('''Functions-----''') | ||
266 | function2Value.forEach[f,m|m.forEach[k,v| println('''«f.name» : «k» |-> «v»''')]] | ||
267 | println('''Relations-----''') | ||
268 | relation2Value.forEach[r,s|s.forEach[t | println('''«r.name»: («t»)''')]] | ||
269 | } | ||
270 | |||
271 | override getElements(Type type) { getElementsDispatch(type) } | ||
272 | def private dispatch getElementsDispatch(TypeDeclaration declaration) { return declaration.lookup(this.interpretationOfUndefinedType) } | ||
273 | def private dispatch getElementsDispatch(TypeDefinition declaration) { return declaration.elements } | ||
274 | |||
275 | override getInterpretation(FunctionDeclaration function, Object[] parameterSubstitution) { | ||
276 | val transformedParams = new ParameterSubstitution(parameterSubstitution) | ||
277 | return transformedParams.lookup( | ||
278 | function.lookup(this.function2Value) | ||
279 | ) | ||
280 | } | ||
281 | |||
282 | override getInterpretation(RelationDeclaration relation, Object[] parameterSubstitution) { | ||
283 | relation.lookup(this.relation2Value).contains(new ParameterSubstitution(parameterSubstitution)) | ||
284 | } | ||
285 | |||
286 | override getInterpretation(ConstantDeclaration constant) { | ||
287 | constant.lookup(this.constant2Value) | ||
288 | } | ||
289 | |||
290 | override getMinimalInteger() { this.minInt } | ||
291 | override getMaximalInteger() { this.maxInt } | ||
292 | |||
293 | // Alloy term -> logic term | ||
294 | def private atomLabel2Term(String label) { | ||
295 | if(label.number) return Integer.parseInt(label) | ||
296 | else if(label == this.logicBooleanTrue) return true | ||
297 | else if(label == this.logicBooleanFalse) return false | ||
298 | else if(this.alloyAtom2LogicElement.containsKey(label)) return label.lookup(alloyAtom2LogicElement) | ||
299 | else throw new IllegalArgumentException('''Unknown atom label: "«label»"!''') | ||
300 | } | ||
301 | def private isNumber(String s) { | ||
302 | try{ | ||
303 | Integer.parseInt(s) | ||
304 | return true | ||
305 | }catch(NumberFormatException e) { | ||
306 | return false | ||
307 | } | ||
308 | } | ||
309 | } | ||
310 | |||
311 | /** | ||
312 | * Helper class for efficiently matching parameter substitutions for functions and relations. | ||
313 | */ | ||
314 | class ParameterSubstitution{ | ||
315 | val Object[] data; | ||
316 | |||
317 | new(Object[] data) { this.data = data } | ||
318 | |||
319 | override equals(Object obj) { | ||
320 | if(obj === this) return true | ||
321 | else if(obj == null) return false | ||
322 | if(obj instanceof ParameterSubstitution) { | ||
323 | return Arrays.equals(this.data,obj.data) | ||
324 | } | ||
325 | return false | ||
326 | } | ||
327 | |||
328 | override hashCode() { | ||
329 | Arrays.hashCode(data) | ||
330 | } | ||
331 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper.xtend new file mode 100644 index 00000000..23b9027f --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper.xtend | |||
@@ -0,0 +1,467 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.AlloySolverConfiguration | ||
4 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSDocument | ||
5 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSEnumLiteral | ||
6 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSMultiplicity | ||
7 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSNumericOperator | ||
8 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSTerm | ||
9 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSVariableDeclaration | ||
10 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguageFactory | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicSolverConfiguration | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.And | ||
14 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Assertion | ||
15 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolLiteral | ||
16 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolTypeReference | ||
17 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference | ||
18 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDeclaration | ||
19 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDefinition | ||
20 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
21 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Distinct | ||
22 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Divison | ||
23 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Equals | ||
24 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Exists | ||
25 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Forall | ||
26 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDeclaration | ||
27 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDefinition | ||
28 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Iff | ||
29 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Impl | ||
30 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.InstanceOf | ||
31 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntLiteral | ||
32 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntTypeReference | ||
33 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LessOrEqualThan | ||
34 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LessThan | ||
35 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Minus | ||
36 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Mod | ||
37 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.MoreOrEqualThan | ||
38 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.MoreThan | ||
39 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Multiply | ||
40 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Not | ||
41 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Or | ||
42 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Plus | ||
43 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealLiteral | ||
44 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealTypeReference | ||
45 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
46 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition | ||
47 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.SymbolicValue | ||
48 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Term | ||
49 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Variable | ||
50 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
51 | import java.util.Collections | ||
52 | import java.util.HashMap | ||
53 | import java.util.List | ||
54 | import java.util.Map | ||
55 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine | ||
56 | import org.eclipse.viatra.query.runtime.emf.EMFScope | ||
57 | import org.eclipse.xtend.lib.annotations.Accessors | ||
58 | |||
59 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
60 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.Annotation | ||
61 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.InverseRelationAssertion | ||
62 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.AssertionAnnotation | ||
63 | import java.util.Collection | ||
64 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.LowerMultiplicityAssertion | ||
65 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.UpperMultiplicityAssertion | ||
66 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSDirectProduct | ||
67 | |||
68 | class Logic2AlloyLanguageMapper { | ||
69 | private val extension AlloyLanguageFactory factory = AlloyLanguageFactory.eINSTANCE | ||
70 | private val Logic2AlloyLanguageMapper_Support support = new Logic2AlloyLanguageMapper_Support; | ||
71 | @Accessors(PUBLIC_GETTER) private val Logic2AlloyLanguageMapper_TypeMapper typeMapper; | ||
72 | @Accessors(PUBLIC_GETTER) private val Logic2AlloyLanguageMapper_ConstantMapper constantMapper = new Logic2AlloyLanguageMapper_ConstantMapper(this) | ||
73 | @Accessors(PUBLIC_GETTER) private val Logic2AlloyLanguageMapper_FunctionMapper functionMapper = new Logic2AlloyLanguageMapper_FunctionMapper(this) | ||
74 | @Accessors(PUBLIC_GETTER) private val Logic2AlloyLanguageMapper_RelationMapper relationMapper = new Logic2AlloyLanguageMapper_RelationMapper(this) | ||
75 | @Accessors(PUBLIC_GETTER) private val Logic2AlloyLanguageMapper_Containment containmentMapper = new Logic2AlloyLanguageMapper_Containment(this) | ||
76 | |||
77 | public new(Logic2AlloyLanguageMapper_TypeMapper typeMapper) { | ||
78 | this.typeMapper = typeMapper | ||
79 | } | ||
80 | |||
81 | public def TracedOutput<ALSDocument,Logic2AlloyLanguageMapperTrace> transformProblem(LogicProblem problem, AlloySolverConfiguration config) { | ||
82 | val logicLanguage = createALSSignatureBody => [ | ||
83 | it.multiplicity = ALSMultiplicity.ONE | ||
84 | it.declarations += | ||
85 | createALSSignatureDeclaration => [ | ||
86 | it.name = support.toID(#["util", "language"]) ] | ||
87 | ] | ||
88 | |||
89 | val specification = createALSDocument=>[ | ||
90 | it.signatureBodies+=logicLanguage | ||
91 | ] | ||
92 | val trace = new Logic2AlloyLanguageMapperTrace => [ | ||
93 | it.specification = specification | ||
94 | it.logicLanguage = logicLanguage.declarations.head | ||
95 | it.logicLanguageBody = logicLanguage | ||
96 | |||
97 | it.incqueryEngine = ViatraQueryEngine.on(new EMFScope(problem)) | ||
98 | ] | ||
99 | |||
100 | typeMapper.transformTypes(problem.types,problem.elements,this,trace) | ||
101 | |||
102 | trace.constantDefinitions = problem.collectConstantDefinitions | ||
103 | trace.functionDefinitions = problem.collectFunctionDefinitions | ||
104 | trace.relationDefinitions = problem.collectRelationDefinitions | ||
105 | |||
106 | problem.constants.forEach[this.constantMapper.transformConstant(it,trace)] | ||
107 | problem.functions.forEach[this.functionMapper.transformFunction(it, trace)] | ||
108 | problem.relations.forEach[this.relationMapper.transformRelation(it, trace)] | ||
109 | |||
110 | problem.constants.filter(ConstantDefinition).forEach[this.constantMapper.transformConstantDefinitionSpecification(it,trace)] | ||
111 | problem.functions.filter(FunctionDefinition).forEach[this.functionMapper.transformFunctionDefinitionSpecification(it,trace)] | ||
112 | problem.relations.filter(RelationDefinition).forEach[this.relationMapper.transformRelationDefinitionSpecification(it,trace)] | ||
113 | |||
114 | val containment = problem.getContainmentHierarchies.head | ||
115 | if(containment !== null) { | ||
116 | this.containmentMapper.transformContainmentHierarchy(containment,trace) | ||
117 | } | ||
118 | |||
119 | //////////////////// | ||
120 | // Collect EMF-specific assertions | ||
121 | //////////////////// | ||
122 | val assertion2InverseRelation = problem.annotations.collectAnnotations(InverseRelationAssertion) | ||
123 | val assertion2UpperMultiplicityAssertion = problem.annotations.collectAnnotations(UpperMultiplicityAssertion) | ||
124 | val assertion2LowerMultiplicityAssertion = problem.annotations.collectAnnotations(LowerMultiplicityAssertion) | ||
125 | |||
126 | //////////////////// | ||
127 | // Transform Assertions | ||
128 | //////////////////// | ||
129 | for(assertion : problem.assertions) { | ||
130 | if(assertion2InverseRelation.containsKey(assertion)) { | ||
131 | transformInverseAssertion(assertion.lookup(assertion2InverseRelation),trace) | ||
132 | } else if(assertion2UpperMultiplicityAssertion.containsKey(assertion)) { | ||
133 | transformUpperMultiplicityAssertion(assertion.lookup(assertion2UpperMultiplicityAssertion),trace) | ||
134 | } else if(assertion2LowerMultiplicityAssertion.containsKey(assertion)) { | ||
135 | transformLowerMultiplicityAssertion(assertion.lookup(assertion2LowerMultiplicityAssertion),trace) | ||
136 | } else { | ||
137 | transformAssertion(assertion,trace) | ||
138 | } | ||
139 | } | ||
140 | |||
141 | transformRunCommand(specification, trace, config) | ||
142 | |||
143 | return new TracedOutput(specification,trace) | ||
144 | } | ||
145 | |||
146 | def transformInverseAssertion(InverseRelationAssertion assertion, Logic2AlloyLanguageMapperTrace trace) { | ||
147 | val a = assertion.inverseA | ||
148 | val b = assertion.inverseB | ||
149 | if(a instanceof RelationDeclaration && b instanceof RelationDeclaration && | ||
150 | !trace.relationDefinitions.containsKey(a) && !trace.relationDefinitions.containsKey(b)) | ||
151 | { | ||
152 | val fact = createALSFactDeclaration => [ | ||
153 | it.name = support.toID(assertion.target.name) | ||
154 | it.term = createALSEquals => [ | ||
155 | it.leftOperand = relationMapper.transformRelationReference(a as RelationDeclaration, trace) | ||
156 | it.rightOperand = createALSInverseRelation => [it.operand = relationMapper.transformRelationReference(b as RelationDeclaration, trace) ] | ||
157 | ] | ||
158 | ] | ||
159 | trace.specification.factDeclarations += fact | ||
160 | } else { | ||
161 | return transformAssertion(assertion.target,trace) | ||
162 | } | ||
163 | } | ||
164 | |||
165 | def transformUpperMultiplicityAssertion(UpperMultiplicityAssertion assertion, Logic2AlloyLanguageMapperTrace trace) { | ||
166 | val x = assertion.relation | ||
167 | if(x instanceof RelationDeclaration && !trace.relationDefinitions.containsKey(x)) { | ||
168 | val relation = relationMapper.getRelationReference((x as RelationDeclaration),trace) | ||
169 | val type = relation.type | ||
170 | |||
171 | if(type instanceof ALSDirectProduct) { | ||
172 | type.rightMultiplicit = type.rightMultiplicit.addUpper | ||
173 | } else { | ||
174 | relation.multiplicity = relation.multiplicity.addUpper | ||
175 | } | ||
176 | |||
177 | if(assertion.upper === 1) { | ||
178 | return true | ||
179 | } else { | ||
180 | return transformAssertion(assertion.target,trace) | ||
181 | } | ||
182 | |||
183 | } else { | ||
184 | return transformAssertion(assertion.target,trace) | ||
185 | } | ||
186 | } | ||
187 | |||
188 | def transformLowerMultiplicityAssertion(LowerMultiplicityAssertion assertion, Logic2AlloyLanguageMapperTrace trace) { | ||
189 | val x = assertion.relation | ||
190 | if(x instanceof RelationDeclaration && !trace.relationDefinitions.containsKey(x)) { | ||
191 | val relation = relationMapper.getRelationReference((x as RelationDeclaration),trace) | ||
192 | val type = relation.type | ||
193 | |||
194 | if(type instanceof ALSDirectProduct) { | ||
195 | type.rightMultiplicit = type.rightMultiplicit.addLower | ||
196 | } else { | ||
197 | relation.multiplicity = relation.multiplicity.addLower | ||
198 | } | ||
199 | |||
200 | if(assertion.lower === 1) { | ||
201 | return true | ||
202 | } else { | ||
203 | return transformAssertion(assertion.target,trace) | ||
204 | } | ||
205 | |||
206 | } else { | ||
207 | return transformAssertion(assertion.target,trace) | ||
208 | } | ||
209 | } | ||
210 | |||
211 | private def addLower(ALSMultiplicity multiplicity) { | ||
212 | if(multiplicity === ALSMultiplicity::SET || multiplicity === null) { | ||
213 | return ALSMultiplicity::SOME | ||
214 | } else if(multiplicity === ALSMultiplicity::LONE) { | ||
215 | return ALSMultiplicity::ONE | ||
216 | } else { | ||
217 | throw new IllegalArgumentException('''Lower multiplicity is already set!''') | ||
218 | } | ||
219 | } | ||
220 | private def addUpper(ALSMultiplicity multiplicity) { | ||
221 | if(multiplicity === ALSMultiplicity::SET || multiplicity === null) { | ||
222 | return ALSMultiplicity::LONE | ||
223 | } else if(multiplicity === ALSMultiplicity::SOME) { | ||
224 | return ALSMultiplicity::ONE | ||
225 | } else { | ||
226 | throw new IllegalArgumentException('''Upper multiplicity is already set!''') | ||
227 | } | ||
228 | } | ||
229 | |||
230 | private def <T extends AssertionAnnotation> collectAnnotations(Collection<? extends Annotation> collection, Class<T> annotationKind) { | ||
231 | val res = new HashMap | ||
232 | collection.filter(annotationKind).forEach[res.put(it.target,it)] | ||
233 | return res | ||
234 | } | ||
235 | |||
236 | private def collectConstantDefinitions(LogicProblem problem) { | ||
237 | val res = new HashMap | ||
238 | problem.constants.filter(ConstantDefinition).filter[it.defines!==null].forEach[ | ||
239 | res.put(it.defines,it) | ||
240 | ] | ||
241 | return res | ||
242 | } | ||
243 | private def collectFunctionDefinitions(LogicProblem problem) { | ||
244 | val res = new HashMap | ||
245 | problem.functions.filter(FunctionDefinition).filter[it.defines!==null].forEach[ | ||
246 | res.put(it.defines,it) | ||
247 | ] | ||
248 | return res | ||
249 | } | ||
250 | private def collectRelationDefinitions(LogicProblem problem) { | ||
251 | val res = new HashMap | ||
252 | problem.relations.filter(RelationDefinition).filter[it.defines!==null].forEach[ | ||
253 | res.put(it.defines,it) | ||
254 | ] | ||
255 | return res | ||
256 | } | ||
257 | |||
258 | //////////////////// | ||
259 | // Type References | ||
260 | //////////////////// | ||
261 | def dispatch protected ALSTerm transformTypeReference(BoolTypeReference boolTypeReference, Logic2AlloyLanguageMapperTrace trace) { | ||
262 | return createALSReference => [ it.referred = support.getBooleanType(trace) ] | ||
263 | } | ||
264 | def dispatch protected ALSTerm transformTypeReference(IntTypeReference intTypeReference, Logic2AlloyLanguageMapperTrace trace) { createALSInt } | ||
265 | def dispatch protected ALSTerm transformTypeReference(RealTypeReference realTypeReference, Logic2AlloyLanguageMapperTrace trace) {throw new UnsupportedOperationException('''Real types are not supported in Alloy.''')} | ||
266 | def dispatch protected ALSTerm transformTypeReference(ComplexTypeReference complexTypeReference, Logic2AlloyLanguageMapperTrace trace) { | ||
267 | val types = typeMapper.transformTypeReference(complexTypeReference.referred, this, trace) | ||
268 | return support.unfoldPlus(types.map[t|createALSReference=>[referred = t]]) | ||
269 | } | ||
270 | |||
271 | ////////////// | ||
272 | // Scopes | ||
273 | ////////////// | ||
274 | |||
275 | def transformRunCommand(ALSDocument specification, Logic2AlloyLanguageMapperTrace trace, AlloySolverConfiguration config) { | ||
276 | specification.runCommand = createALSRunCommand => [ | ||
277 | it.typeScopes+= createALSSigScope => [ | ||
278 | it.type= typeMapper.getUndefinedSupertype(trace) | ||
279 | it.number = typeMapper.getUndefinedSupertypeScope(config.typeScopes.maxNewElements,trace) | ||
280 | //it.exactly = (config.typeScopes.maxElements == config.typeScopes.minElements) | ||
281 | ] | ||
282 | if(config.typeScopes.maxIntScope == LogicSolverConfiguration::Unlimited) throw new UnsupportedOperationException( | ||
283 | '''An integer scope have to be specified for Alloy!''') | ||
284 | it.typeScopes += createALSIntScope => [ | ||
285 | number = Integer.SIZE-Integer.numberOfLeadingZeros(config.typeScopes.maxIntScope) | ||
286 | ] | ||
287 | // for(definedScope : config.typeScopes.allDefinedScope) { | ||
288 | // it.typeScopes += createALSSigScope => [ | ||
289 | // it.type = definedScope.type.lookup(trace.type2ALSType) | ||
290 | // it.number = definedScope.upperLimit | ||
291 | // it.exactly = (definedScope.upperLimit == definedScope.lowerLimit) | ||
292 | // ] | ||
293 | // } | ||
294 | ] | ||
295 | } | ||
296 | |||
297 | |||
298 | ////////////// | ||
299 | // Assertions + Terms | ||
300 | ////////////// | ||
301 | |||
302 | def protected transformAssertion(Assertion assertion, Logic2AlloyLanguageMapperTrace trace) { | ||
303 | val res = createALSFactDeclaration => [ | ||
304 | it.name = support.toID(assertion.name) | ||
305 | it.term = assertion.value.transformTerm(trace,Collections.EMPTY_MAP) | ||
306 | ] | ||
307 | trace.specification.factDeclarations += res | ||
308 | } | ||
309 | |||
310 | def dispatch protected ALSTerm transformTerm(BoolLiteral literal, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
311 | var ALSEnumLiteral ref; | ||
312 | if(literal.value==true) {ref = support.getBooleanTrue(trace)} | ||
313 | else {ref = support.getBooleanFalse(trace)} | ||
314 | val refFinal = ref | ||
315 | |||
316 | return support.booleanToLogicValue((createALSReference => [referred = refFinal]),trace) | ||
317 | } | ||
318 | def dispatch protected ALSTerm transformTerm(RealLiteral literal, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
319 | throw new UnsupportedOperationException("RealLiteral is not supported") | ||
320 | } | ||
321 | def dispatch protected ALSTerm transformTerm(IntLiteral literal, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
322 | if(literal.value>=0) { createALSNumberLiteral => [value = literal.value]} | ||
323 | else {createALSUnaryMinus => [it.operand = createALSNumberLiteral => [value = literal.value] ] } | ||
324 | } | ||
325 | |||
326 | def dispatch protected ALSTerm transformTerm(Not not, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
327 | createALSNot=>[operand = not.operand.transformTerm(trace,variables)] } | ||
328 | def dispatch protected ALSTerm transformTerm(And and, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
329 | support.unfoldAnd(and.operands.map[transformTerm(trace,variables)]) } | ||
330 | def dispatch protected ALSTerm transformTerm(Or or, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
331 | support.unfoldOr(or.operands.map[transformTerm(trace,variables)],trace) } | ||
332 | def dispatch protected ALSTerm transformTerm(Impl impl, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
333 | createALSImpl => [leftOperand = impl.leftOperand.transformTerm(trace,variables) rightOperand = impl.rightOperand.transformTerm(trace,variables)] } | ||
334 | def dispatch protected ALSTerm transformTerm(Iff iff, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
335 | createALSIff => [leftOperand = iff.leftOperand.transformTerm(trace,variables) rightOperand = iff.rightOperand.transformTerm(trace,variables)] } | ||
336 | def dispatch protected ALSTerm transformTerm(MoreThan moreThan, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
337 | createALSMore => [leftOperand = moreThan.leftOperand.transformTerm(trace,variables) rightOperand = moreThan.rightOperand.transformTerm(trace,variables)] } | ||
338 | def dispatch protected ALSTerm transformTerm(LessThan lessThan, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
339 | createALSLess => [leftOperand = lessThan.leftOperand.transformTerm(trace,variables) rightOperand = lessThan.rightOperand.transformTerm(trace,variables)] } | ||
340 | def dispatch protected ALSTerm transformTerm(MoreOrEqualThan moreThan, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
341 | createALSMeq => [leftOperand = moreThan.leftOperand.transformTerm(trace,variables) rightOperand = moreThan.rightOperand.transformTerm(trace,variables)] } | ||
342 | def dispatch protected ALSTerm transformTerm(LessOrEqualThan lessThan, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
343 | createALSLeq => [leftOperand = lessThan.leftOperand.transformTerm(trace,variables) rightOperand = lessThan.rightOperand.transformTerm(trace,variables)] } | ||
344 | def dispatch protected ALSTerm transformTerm(Equals equals, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
345 | createALSEquals => [leftOperand = equals.leftOperand.transformTerm(trace,variables) rightOperand = equals.rightOperand.transformTerm(trace,variables)] } | ||
346 | def dispatch protected ALSTerm transformTerm(Distinct distinct, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
347 | support.unfoldDistinctTerms(this,distinct.operands,trace,variables) } | ||
348 | |||
349 | def dispatch protected ALSTerm transformTerm(Plus plus, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
350 | createALSFunctionCall => [it.params += plus.leftOperand.transformTerm(trace,variables) it.params += plus.rightOperand.transformTerm(trace,variables) it.referredNumericOperator = ALSNumericOperator.PLUS] } | ||
351 | def dispatch protected ALSTerm transformTerm(Minus minus, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
352 | createALSFunctionCall => [it.params += minus.leftOperand.transformTerm(trace,variables) it.params += minus.rightOperand.transformTerm(trace,variables) it.referredNumericOperator = ALSNumericOperator.SUB] } | ||
353 | def dispatch protected ALSTerm transformTerm(Multiply multiply, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
354 | createALSFunctionCall => [it.params += multiply.leftOperand.transformTerm(trace,variables) it.params += multiply.rightOperand.transformTerm(trace,variables) it.referredNumericOperator = ALSNumericOperator.MUL] } | ||
355 | def dispatch protected ALSTerm transformTerm(Divison div, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
356 | createALSFunctionCall => [it.params += div.leftOperand.transformTerm(trace,variables) it.params += div.rightOperand.transformTerm(trace,variables) it.referredNumericOperator = ALSNumericOperator.DIV] } | ||
357 | def dispatch protected ALSTerm transformTerm(Mod mod, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
358 | createALSFunctionCall => [it.params += mod.leftOperand.transformTerm(trace,variables) it.params += mod.rightOperand.transformTerm(trace,variables) it.referredNumericOperator = ALSNumericOperator.REM] } | ||
359 | |||
360 | def dispatch protected ALSTerm transformTerm(Forall forall, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
361 | support.createQuantifiedExpression(this,forall,ALSMultiplicity.ALL,trace,variables) } | ||
362 | def dispatch protected ALSTerm transformTerm(Exists exists, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
363 | support.createQuantifiedExpression(this,exists,ALSMultiplicity.SOME,trace,variables) } | ||
364 | |||
365 | def dispatch protected ALSTerm transformTerm(InstanceOf instanceOf, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
366 | return createALSSubset => [ | ||
367 | it.leftOperand = instanceOf.value.transformTerm(trace,variables) | ||
368 | it.rightOperand = instanceOf.range.transformTypeReference(trace) | ||
369 | ] | ||
370 | } | ||
371 | |||
372 | def dispatch protected ALSTerm transformTerm(SymbolicValue symbolicValue, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
373 | symbolicValue.symbolicReference.transformSymbolicReference(symbolicValue.parameterSubstitutions,trace,variables) } | ||
374 | |||
375 | def dispatch protected ALSTerm transformSymbolicReference(DefinedElement referred, List<Term> parameterSubstitutions, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
376 | typeMapper.transformReference(referred,trace)} | ||
377 | def dispatch protected ALSTerm transformSymbolicReference(ConstantDeclaration constant, List<Term> parameterSubstitutions, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
378 | if(trace.constantDefinitions.containsKey(constant)) { | ||
379 | return this.transformSymbolicReference(constant.lookup(trace.constantDefinitions),parameterSubstitutions,trace,variables) | ||
380 | } else { | ||
381 | val res = createALSJoin=> [ | ||
382 | leftOperand = createALSReference => [ referred = trace.logicLanguage ] | ||
383 | rightOperand = createALSReference => [ referred = constant.lookup(trace.constantDeclaration2LanguageField) ] | ||
384 | ] | ||
385 | return support.postprocessResultOfSymbolicReference(constant.type,res,trace) | ||
386 | } | ||
387 | } | ||
388 | def dispatch protected ALSTerm transformSymbolicReference(ConstantDefinition constant, List<Term> parameterSubstitutions, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
389 | val res = createALSFunctionCall => [ | ||
390 | it.referredDefinition = constant.lookup(trace.constantDefinition2Function) | ||
391 | ] | ||
392 | return support.postprocessResultOfSymbolicReference(constant.type,res,trace) | ||
393 | } | ||
394 | def dispatch protected ALSTerm transformSymbolicReference(Variable variable, List<Term> parameterSubstitutions, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
395 | val res = createALSReference => [referred = variable.lookup(variables)] | ||
396 | return support.postprocessResultOfSymbolicReference(variable.range,res,trace) | ||
397 | } | ||
398 | def dispatch protected ALSTerm transformSymbolicReference(FunctionDeclaration function, List<Term> parameterSubstitutions, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
399 | if(trace.functionDefinitions.containsKey(function)) { | ||
400 | return this.transformSymbolicReference(function.lookup(trace.functionDefinitions),parameterSubstitutions,trace,variables) | ||
401 | } else { | ||
402 | if(functionMapper.transformedToHostedField(function,trace)) { | ||
403 | val param = parameterSubstitutions.get(0).transformTerm(trace,variables) | ||
404 | val res = createALSJoin => [ | ||
405 | leftOperand = support.prepareParameterOfSymbolicReference(function.parameters.get(0),param,trace) | ||
406 | rightOperand = createALSReference => [referred = function.lookup(trace.functionDeclaration2HostedField)] | ||
407 | ] | ||
408 | return support.postprocessResultOfSymbolicReference(function.range,res,trace) | ||
409 | } else { | ||
410 | val functionExpression = createALSJoin=>[ | ||
411 | leftOperand = createALSReference => [referred = trace.logicLanguage] | ||
412 | rightOperand = createALSReference => [referred = function.lookup(trace.functionDeclaration2LanguageField)] | ||
413 | ] | ||
414 | val res = support.unfoldDotJoin(this,parameterSubstitutions,functionExpression,trace,variables) | ||
415 | return support.postprocessResultOfSymbolicReference(function.range,res,trace) | ||
416 | } | ||
417 | } | ||
418 | } | ||
419 | def dispatch protected ALSTerm transformSymbolicReference(FunctionDefinition function, List<Term> parameterSubstitutions, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
420 | val result = createALSFunctionCall => [ | ||
421 | it.referredDefinition = function.lookup(trace.functionDefinition2Function) | ||
422 | it.params += parameterSubstitutions.map[it.transformTerm(trace,variables)] | ||
423 | ] | ||
424 | return support.postprocessResultOfSymbolicReference(function.range,result,trace) | ||
425 | } | ||
426 | |||
427 | def dispatch protected ALSTerm transformSymbolicReference(RelationDeclaration relation, List<Term> parameterSubstitutions, | ||
428 | Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
429 | if(trace.relationDefinitions.containsKey(relation)) { | ||
430 | this.transformSymbolicReference(relation.lookup(trace.relationDefinitions),parameterSubstitutions,trace,variables) | ||
431 | } else { | ||
432 | if(relationMapper.transformToHostedField(relation,trace)) { | ||
433 | val alsRelation = relation.lookup(trace.relationDeclaration2Field) | ||
434 | // R(a,b) => | ||
435 | // b in a.R | ||
436 | return createALSSubset => [ | ||
437 | it.leftOperand = parameterSubstitutions.get(1).transformTerm(trace,variables) | ||
438 | it.rightOperand = createALSJoin => [ | ||
439 | it.leftOperand = parameterSubstitutions.get(0).transformTerm(trace,variables) | ||
440 | it.rightOperand = createALSReference => [ it.referred = alsRelation ] | ||
441 | ] | ||
442 | ] | ||
443 | } else { | ||
444 | val target = createALSJoin => [ | ||
445 | leftOperand = createALSReference => [referred = trace.logicLanguage] | ||
446 | rightOperand = createALSReference => [ referred = relation.lookup(trace.relationDeclaration2Global) ]] | ||
447 | val source = support.unfoldTermDirectProduct(this,parameterSubstitutions,trace,variables) | ||
448 | |||
449 | return createALSSubset => [ | ||
450 | leftOperand = source | ||
451 | rightOperand = target | ||
452 | ] | ||
453 | } | ||
454 | } | ||
455 | } | ||
456 | |||
457 | |||
458 | |||
459 | def dispatch protected ALSTerm transformSymbolicReference(RelationDefinition relation, List<Term> parameterSubstitutions, | ||
460 | Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) | ||
461 | { | ||
462 | return createALSFunctionCall => [ | ||
463 | it.referredDefinition = relation.lookup(trace.relationDefinition2Predicate) | ||
464 | it.params += parameterSubstitutions.map[p | p.transformTerm(trace,variables)] | ||
465 | ] | ||
466 | } | ||
467 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapperTrace.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapperTrace.xtend new file mode 100644 index 00000000..22f49c98 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapperTrace.xtend | |||
@@ -0,0 +1,49 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSDocument | ||
4 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSEnumDeclaration | ||
5 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSEnumLiteral | ||
6 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSFieldDeclaration | ||
7 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSFunctionDefinition | ||
8 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSRelationDefinition | ||
9 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSSignatureBody | ||
10 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSSignatureDeclaration | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDeclaration | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDefinition | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDeclaration | ||
14 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDefinition | ||
15 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
16 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition | ||
17 | import java.util.HashMap | ||
18 | import java.util.Map | ||
19 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine | ||
20 | |||
21 | interface Logic2AlloyLanguageMapper_TypeMapperTrace {} | ||
22 | |||
23 | class Logic2AlloyLanguageMapperTrace { | ||
24 | public var ViatraQueryEngine incqueryEngine; | ||
25 | |||
26 | public var ALSDocument specification; | ||
27 | public var ALSSignatureDeclaration logicLanguage; | ||
28 | public var ALSSignatureBody logicLanguageBody; | ||
29 | public var ALSEnumDeclaration boolType; | ||
30 | public var ALSEnumLiteral boolTrue; | ||
31 | public var ALSEnumLiteral boolFalse; | ||
32 | |||
33 | public var Logic2AlloyLanguageMapper_TypeMapperTrace typeMapperTrace | ||
34 | |||
35 | public val Map<ConstantDeclaration, ALSFieldDeclaration> constantDeclaration2LanguageField = new HashMap | ||
36 | public val Map<ConstantDefinition, ALSFunctionDefinition> constantDefinition2Function = new HashMap | ||
37 | |||
38 | public val Map<FunctionDeclaration,ALSFieldDeclaration> functionDeclaration2HostedField = new HashMap | ||
39 | public val Map<FunctionDeclaration,ALSFieldDeclaration> functionDeclaration2LanguageField = new HashMap | ||
40 | public val Map<FunctionDefinition,ALSFunctionDefinition> functionDefinition2Function = new HashMap | ||
41 | |||
42 | public val Map<RelationDeclaration,ALSFieldDeclaration> relationDeclaration2Global = new HashMap | ||
43 | public val Map<RelationDeclaration, ALSFieldDeclaration> relationDeclaration2Field = new HashMap | ||
44 | public val Map<RelationDefinition,ALSRelationDefinition> relationDefinition2Predicate = new HashMap | ||
45 | |||
46 | public var Map<ConstantDeclaration, ConstantDefinition> constantDefinitions | ||
47 | public var Map<FunctionDeclaration, FunctionDefinition> functionDefinitions | ||
48 | public var Map<RelationDeclaration, RelationDefinition> relationDefinitions | ||
49 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_ConstantMapper.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_ConstantMapper.xtend new file mode 100644 index 00000000..401c2ec2 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_ConstantMapper.xtend | |||
@@ -0,0 +1,43 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguageFactory | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDeclaration | ||
5 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSMultiplicity | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDefinition | ||
7 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
8 | |||
9 | class Logic2AlloyLanguageMapper_ConstantMapper { | ||
10 | private val extension AlloyLanguageFactory factory = AlloyLanguageFactory.eINSTANCE | ||
11 | private val Logic2AlloyLanguageMapper_Support support = new Logic2AlloyLanguageMapper_Support; | ||
12 | val Logic2AlloyLanguageMapper base; | ||
13 | public new(Logic2AlloyLanguageMapper base) { | ||
14 | this.base = base | ||
15 | } | ||
16 | |||
17 | def protected dispatch transformConstant(ConstantDeclaration constant, Logic2AlloyLanguageMapperTrace trace) { | ||
18 | if(!trace.constantDefinitions.containsKey(constant)) { | ||
19 | val c = createALSFieldDeclaration=> [ | ||
20 | name = support.toID(constant.name) | ||
21 | it.type = base.transformTypeReference(constant.type,trace) | ||
22 | it.multiplicity = ALSMultiplicity.ONE | ||
23 | ] | ||
24 | trace.logicLanguageBody.fields+= c | ||
25 | trace.constantDeclaration2LanguageField.put(constant,c) | ||
26 | } | ||
27 | } | ||
28 | |||
29 | def protected dispatch transformConstant(ConstantDefinition constant, Logic2AlloyLanguageMapperTrace trace) { | ||
30 | val c = createALSFunctionDefinition=> [ | ||
31 | name = support.toID(constant.name) | ||
32 | it.type = base.transformTypeReference(constant.type,trace) | ||
33 | // the value is set later | ||
34 | ] | ||
35 | trace.specification.functionDefinitions += c | ||
36 | trace.constantDefinition2Function.put(constant,c) | ||
37 | } | ||
38 | |||
39 | def protected transformConstantDefinitionSpecification(ConstantDefinition constant, Logic2AlloyLanguageMapperTrace trace) { | ||
40 | val definition = constant.lookup(trace.constantDefinition2Function) | ||
41 | definition.value = base.transformTerm(constant.value, trace,emptyMap) | ||
42 | } | ||
43 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_Containment.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_Containment.xtend new file mode 100644 index 00000000..fd519c1e --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_Containment.xtend | |||
@@ -0,0 +1,260 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSMultiplicity | ||
4 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguageFactory | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.ContainmentHierarchy | ||
8 | import java.util.HashMap | ||
9 | |||
10 | class Logic2AlloyLanguageMapper_Containment { | ||
11 | val extension AlloyLanguageFactory factory = AlloyLanguageFactory.eINSTANCE | ||
12 | private val Logic2AlloyLanguageMapper_Support support = new Logic2AlloyLanguageMapper_Support; | ||
13 | val Logic2AlloyLanguageMapper base; | ||
14 | public new(Logic2AlloyLanguageMapper base) { | ||
15 | this.base = base | ||
16 | } | ||
17 | |||
18 | def protected transformContainmentHierarchy(ContainmentHierarchy containment, Logic2AlloyLanguageMapperTrace trace) { | ||
19 | // Single root | ||
20 | val rootField = createALSFieldDeclaration => [ | ||
21 | it.name= support.toID(#["util", "root"]) | ||
22 | it.multiplicity = ALSMultiplicity.ONE | ||
23 | it.type = typesOrderedInContainment(containment,trace) | ||
24 | ] | ||
25 | trace.logicLanguageBody.fields += rootField | ||
26 | |||
27 | val contains = createALSFieldDeclaration => [ | ||
28 | it.name = support.toID(#["util", "contains"]) | ||
29 | //it.multiplicity = ALSMultiplicity::SET | ||
30 | it.type = createALSDirectProduct => [ | ||
31 | it.leftMultiplicit = ALSMultiplicity::LONE | ||
32 | it.rightMultiplicit = ALSMultiplicity::SET | ||
33 | it.leftOperand = typesOrderedInContainment(containment,trace) | ||
34 | it.rightOperand = typesOrderedInContainment(containment,trace) | ||
35 | ] | ||
36 | ] | ||
37 | trace.logicLanguageBody.fields += contains | ||
38 | |||
39 | val containmentRelationDefinition = createALSFactDeclaration => [ | ||
40 | it.name = support.toID(#["util", "containmentDefinition"]) | ||
41 | ] | ||
42 | |||
43 | if(containment.containmentRelations.forall[it instanceof RelationDeclaration]) { | ||
44 | val containmentRelations = containment.containmentRelations.filter(RelationDeclaration).map[relation| | ||
45 | base.relationMapper.transformRelationReference(relation,trace) | ||
46 | ].toList | ||
47 | |||
48 | containmentRelationDefinition.term = createALSEquals => [ | ||
49 | leftOperand = createALSJoin => [ | ||
50 | leftOperand = createALSReference => [referred = trace.logicLanguage] | ||
51 | rightOperand = createALSReference => [ referred = contains ]] | ||
52 | rightOperand = support.unfoldPlus(containmentRelations) | ||
53 | ] | ||
54 | } else { | ||
55 | val parent = createALSVariableDeclaration => [ | ||
56 | it.name = "parent" | ||
57 | it.range = typesOrderedInContainment(containment, trace) | ||
58 | ] | ||
59 | val child = createALSVariableDeclaration => [ | ||
60 | it.name = "child" | ||
61 | it.range = typesOrderedInContainment(containment, trace) | ||
62 | ] | ||
63 | |||
64 | val logicFactory = LogiclanguageFactory.eINSTANCE | ||
65 | val logicParentVariable = logicFactory.createVariable | ||
66 | val logicChildVariable = logicFactory.createVariable | ||
67 | val logicParent = logicFactory.createSymbolicValue => [it.symbolicReference = logicParentVariable] | ||
68 | val logicChild = logicFactory.createSymbolicValue => [it.symbolicReference = logicChildVariable] | ||
69 | val variableMap = new HashMap => [put(logicParentVariable,parent) put(logicChildVariable,child)] | ||
70 | val possibleRelations = containment.containmentRelations.map[relation | | ||
71 | base.transformSymbolicReference(relation,#[logicParent,logicChild],trace,variableMap) | ||
72 | ] | ||
73 | |||
74 | containmentRelationDefinition.term = createALSQuantifiedEx => [ | ||
75 | it.type = ALSMultiplicity.ALL | ||
76 | it.variables += parent | ||
77 | it.variables += child | ||
78 | it.expression = createALSIff => [ | ||
79 | it.leftOperand = createALSSubset => [ | ||
80 | it.leftOperand = createALSDirectProduct => [ | ||
81 | it.leftOperand = createALSReference => [it.referred = child] | ||
82 | it.rightOperand = createALSReference => [it.referred = parent] | ||
83 | ] | ||
84 | it.rightOperand = createALSJoin => [ | ||
85 | leftOperand = createALSReference => [referred = trace.logicLanguage] | ||
86 | rightOperand = createALSReference => [ referred = contains ] | ||
87 | ] | ||
88 | ] | ||
89 | it.rightOperand = support.unfoldOr(possibleRelations,trace) | ||
90 | ] | ||
91 | ] | ||
92 | } | ||
93 | |||
94 | trace.specification.factDeclarations += containmentRelationDefinition | ||
95 | |||
96 | // With the exception of the root, every object has at least one parent | ||
97 | // No parent for root | ||
98 | trace.specification.factDeclarations += createALSFactDeclaration => [ | ||
99 | it.name = support.toID(#["util", "noParentForRoot"]) | ||
100 | it.term = createALSQuantifiedEx => [ | ||
101 | it.type = ALSMultiplicity::NO | ||
102 | val parent = createALSVariableDeclaration => [ | ||
103 | it.name = "parent" | ||
104 | it.range = typesOrderedInContainment(containment,trace) | ||
105 | ] | ||
106 | it.variables += parent | ||
107 | it.expression = createALSSubset => [ | ||
108 | it.leftOperand = createALSDirectProduct => [ | ||
109 | it.leftOperand = createALSReference => [it.referred = parent] | ||
110 | it.rightOperand = createALSJoin => [ | ||
111 | it.leftOperand = createALSReference => [it.referred = trace.logicLanguage] | ||
112 | it.rightOperand = createALSReference => [it.referred = rootField] | ||
113 | ] | ||
114 | ] | ||
115 | it.rightOperand = createALSJoin => [ | ||
116 | leftOperand = createALSReference => [referred = trace.logicLanguage] | ||
117 | rightOperand = createALSReference => [ referred = contains ] | ||
118 | ] | ||
119 | ] | ||
120 | ] | ||
121 | ] | ||
122 | // Parent for nonroot | ||
123 | trace.specification.factDeclarations += createALSFactDeclaration => [ | ||
124 | it.name = support.toID(#["util", "atLeastOneParent"]) | ||
125 | it.term = createALSQuantifiedEx => [ | ||
126 | it.type = ALSMultiplicity::ALL | ||
127 | val child = createALSVariableDeclaration => [ | ||
128 | it.name = "child" | ||
129 | it.range = typesOrderedInContainment(containment,trace) | ||
130 | ] | ||
131 | it.variables += child | ||
132 | it.expression = createALSOr => [ | ||
133 | it.leftOperand = createALSEquals => [ | ||
134 | it.leftOperand = createALSReference => [it.referred = child] | ||
135 | it.rightOperand = createALSJoin => [ | ||
136 | it.leftOperand = createALSReference => [it.referred = trace.logicLanguage] | ||
137 | it.rightOperand = createALSReference => [it.referred = rootField] | ||
138 | ] | ||
139 | ] | ||
140 | it.rightOperand = createALSQuantifiedEx => [ | ||
141 | it.type = ALSMultiplicity::SOME | ||
142 | val parent = createALSVariableDeclaration => [ | ||
143 | it.name = "parent" | ||
144 | it.range = typesOrderedInContainment(containment, trace) | ||
145 | ] | ||
146 | it.variables += parent | ||
147 | it.expression = createALSSubset => [ | ||
148 | it.leftOperand = createALSDirectProduct => [ | ||
149 | it.leftOperand = createALSReference => [it.referred = parent] | ||
150 | it.rightOperand = createALSReference => [it.referred = child] | ||
151 | ] | ||
152 | it.rightOperand = createALSJoin => [ | ||
153 | leftOperand = createALSReference => [referred = trace.logicLanguage] | ||
154 | rightOperand = createALSReference => [ referred = contains ] | ||
155 | ] | ||
156 | ] | ||
157 | ] | ||
158 | ] | ||
159 | ] | ||
160 | ] | ||
161 | |||
162 | // Every object has at most one parent | ||
163 | // trace.specification.factDeclarations += createALSFactDeclaration => [ | ||
164 | // it.name = support.toID(#["util", "atMostOneParent"]) | ||
165 | // it.term = createALSQuantifiedEx => [ | ||
166 | // it.type = ALSMultiplicity::ALL | ||
167 | // val child = createALSVariableDeclaration => [ | ||
168 | // it.name = "child" | ||
169 | // it.range = typesOrderedInContainment(containment,trace) | ||
170 | // ] | ||
171 | // it.variables += child | ||
172 | // it.expression = createALSQuantifiedEx => [ | ||
173 | // it.type = ALSMultiplicity::LONE | ||
174 | // val parent = createALSVariableDeclaration => [ | ||
175 | // it.name = "parent" | ||
176 | // it.range = typesOrderedInContainment(containment, trace) | ||
177 | // ] | ||
178 | // it.variables += parent | ||
179 | // it.expression = createALSFunctionCall => [ | ||
180 | // it.referredDefinition = containmentRelation | ||
181 | // it.params += createALSReference => [ | ||
182 | // it.referred = parent | ||
183 | // it.referred = child | ||
184 | // ] | ||
185 | // ] | ||
186 | // ] | ||
187 | // ] | ||
188 | // ] | ||
189 | |||
190 | // No circle in containment | ||
191 | trace.specification.factDeclarations += createALSFactDeclaration => [ | ||
192 | it.name = support.toID(#["util", "noCircularContainment"]) | ||
193 | it.term = createALSQuantifiedEx => [ | ||
194 | it.type = ALSMultiplicity::NO | ||
195 | val variable = createALSVariableDeclaration => [ | ||
196 | it.name = "circle" | ||
197 | it.range = typesOrderedInContainment(containment,trace) | ||
198 | ] | ||
199 | it.variables += variable | ||
200 | it.expression = createALSSubset => [ | ||
201 | it.leftOperand = createALSDirectProduct => [ | ||
202 | it.leftOperand = createALSReference => [it.referred = variable] | ||
203 | it.rightOperand = createALSReference => [it.referred = variable] | ||
204 | ] | ||
205 | it.rightOperand = createAlSTransitiveClosure => [ | ||
206 | it.operand = createALSJoin => [ | ||
207 | leftOperand = createALSReference => [referred = trace.logicLanguage] | ||
208 | rightOperand = createALSReference => [ referred = contains ] | ||
209 | ] | ||
210 | ] | ||
211 | ] | ||
212 | ] | ||
213 | ] | ||
214 | |||
215 | } | ||
216 | |||
217 | /*def protected calculateContainmentTypeCoveringSignatures(ContainmentHierarchy containment, Logic2AlloyLanguageMapperTrace trace) { | ||
218 | val types = containment.typesOrderedInHierarchy | ||
219 | val signaturesInContainment = types.map[base.typeMapper.transformTypeReference(it, base, trace)].flatten.toList | ||
220 | // val uncoveredSignatures = new ArrayList(signaturesInContainment) | ||
221 | // val coveringSignatures = new LinkedList | ||
222 | // | ||
223 | val engine = ViatraQueryEngine.on(new EMFScope(trace.specification)) | ||
224 | //val directSubsetMatcher = DirectSubsetMatcher.on(engine) | ||
225 | // x <= y | ||
226 | val subsetMatcher = SubsetMatcher.on(engine) | ||
227 | |||
228 | if() | ||
229 | }*/ | ||
230 | |||
231 | /*def boolean coveringAllSignaturesInContainment(ALSSignatureDeclaration target, List<ALSSignatureDeclaration> signaturesInContainment, SubsetMatcher matcher) { | ||
232 | for(signatureInContainment : signaturesInContainment) { | ||
233 | if(!matcher.hasMatch(signatureInContainment,target)) { | ||
234 | return false | ||
235 | } | ||
236 | } | ||
237 | return true | ||
238 | }*/ | ||
239 | |||
240 | /*def boolean coveringSignatureNotInContainment(ALSSignatureDeclaration target, List<ALSSignatureDeclaration> signaturesInContainment, SubsetMatcher matcher) { | ||
241 | val subtypes = matcher.getAllValuesOfx(target); | ||
242 | for(subType : subtypes) { | ||
243 | val isSubtypeOfASignatureInContainment = signaturesInContainment.exists[contained | | ||
244 | matcher.hasMatch(subType,contained) | ||
245 | ] | ||
246 | if(!isSubtypeOfASignatureInContainment) { | ||
247 | return false | ||
248 | } | ||
249 | } | ||
250 | return true | ||
251 | }*/ | ||
252 | |||
253 | def protected typesOrderedInContainment(ContainmentHierarchy containment, Logic2AlloyLanguageMapperTrace trace) { | ||
254 | val types = containment.typesOrderedInHierarchy | ||
255 | val signaturesInContainment = types.map[base.typeMapper.transformTypeReference(it, base, trace)].flatten | ||
256 | // val allSignatures = trace.specification.signatureBodies.map[declarations].flatten | ||
257 | val typeReferences = signaturesInContainment.map[sig | createALSReference => [it.referred = sig]].toList | ||
258 | return support.unfoldPlus(typeReferences) | ||
259 | } | ||
260 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_FunctionMapper.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_FunctionMapper.xtend new file mode 100644 index 00000000..ff18ef80 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_FunctionMapper.xtend | |||
@@ -0,0 +1,87 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguageFactory | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDeclaration | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference | ||
6 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSMultiplicity | ||
7 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSSignatureBody | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDefinition | ||
9 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
10 | import java.util.HashMap | ||
11 | |||
12 | class Logic2AlloyLanguageMapper_FunctionMapper { | ||
13 | private val extension AlloyLanguageFactory factory = AlloyLanguageFactory.eINSTANCE | ||
14 | private val Logic2AlloyLanguageMapper_Support support = new Logic2AlloyLanguageMapper_Support; | ||
15 | val Logic2AlloyLanguageMapper base; | ||
16 | public new(Logic2AlloyLanguageMapper base) { | ||
17 | this.base = base | ||
18 | } | ||
19 | |||
20 | def protected dispatch transformFunction(FunctionDeclaration f, Logic2AlloyLanguageMapperTrace trace) { | ||
21 | if(!trace.constantDefinitions.containsKey(f)) { | ||
22 | if(transformedToHostedField(f,trace)) transformFunctionToFieldOfSignature(f,trace) | ||
23 | else transformFunctionToGlobalRelation(f,trace) | ||
24 | } | ||
25 | } | ||
26 | |||
27 | def protected transformedToHostedField(FunctionDeclaration f, Logic2AlloyLanguageMapperTrace trace) { | ||
28 | if(f.parameters.size == 1 && f.parameters.head instanceof ComplexTypeReference) { | ||
29 | val head = f.parameters.head | ||
30 | if(head instanceof ComplexTypeReference) { | ||
31 | val types = base.typeMapper.transformTypeReference(head.referred,base,trace) | ||
32 | return types.size == 1 | ||
33 | } | ||
34 | } | ||
35 | return (f.parameters.size == 1 && f.parameters.head instanceof ComplexTypeReference) | ||
36 | } | ||
37 | def protected transformFunctionToFieldOfSignature(FunctionDeclaration f,Logic2AlloyLanguageMapperTrace trace) { | ||
38 | val param = (f.parameters.head as ComplexTypeReference) | ||
39 | val referred = param.referred | ||
40 | val field = createALSFieldDeclaration => [ | ||
41 | it.name = support.toID(f.getName) | ||
42 | it.multiplicity = ALSMultiplicity.ONE | ||
43 | it.type = base.transformTypeReference(f.range,trace) | ||
44 | ] | ||
45 | val host = base.typeMapper.transformTypeReference(referred,base,trace).get(0) | ||
46 | (host.eContainer as ALSSignatureBody).fields += field | ||
47 | trace.functionDeclaration2HostedField.put(f, field) | ||
48 | } | ||
49 | def protected transformFunctionToGlobalRelation(FunctionDeclaration f, Logic2AlloyLanguageMapperTrace trace) { | ||
50 | val field = createALSFieldDeclaration => [ | ||
51 | it.name = support.toID(f.name) | ||
52 | it.multiplicity = ALSMultiplicity.SET | ||
53 | it.type = createALSDirectProduct => [ | ||
54 | it.leftOperand = support.unfoldReferenceDirectProduct(base,f.parameters,trace) | ||
55 | it.rightMultiplicit = ALSMultiplicity.ONE | ||
56 | it.rightOperand = base.transformTypeReference(f.range,trace) | ||
57 | ] | ||
58 | ] | ||
59 | trace.logicLanguageBody.fields += field | ||
60 | trace.functionDeclaration2LanguageField.put(f, field) | ||
61 | } | ||
62 | |||
63 | def protected dispatch transformFunction(FunctionDefinition f, Logic2AlloyLanguageMapperTrace trace) { | ||
64 | val res = createALSFunctionDefinition => [ | ||
65 | name = support.toID(f.name) | ||
66 | // variables + specification later | ||
67 | ] | ||
68 | trace.specification.functionDefinitions+=res; | ||
69 | trace.functionDefinition2Function.put(f,res) | ||
70 | } | ||
71 | |||
72 | def protected transformFunctionDefinitionSpecification(FunctionDefinition f, Logic2AlloyLanguageMapperTrace trace) { | ||
73 | val target = f.lookup(trace.functionDefinition2Function) | ||
74 | val variableMap = new HashMap | ||
75 | for(variable : f.variable) { | ||
76 | val v = createALSVariableDeclaration => [ | ||
77 | it.name = support.toID(variable.name) | ||
78 | it.range = base.transformTypeReference(variable.range,trace) | ||
79 | // specification later | ||
80 | ] | ||
81 | target.variables+=v | ||
82 | variableMap.put(variable,v) | ||
83 | } | ||
84 | target.value = base.transformTerm(f.value,trace,variableMap) | ||
85 | } | ||
86 | |||
87 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_RelationMapper.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_RelationMapper.xtend new file mode 100644 index 00000000..9dd4da2f --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_RelationMapper.xtend | |||
@@ -0,0 +1,111 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSMultiplicity | ||
4 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSSignatureBody | ||
5 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguageFactory | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition | ||
9 | import java.util.HashMap | ||
10 | |||
11 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
12 | |||
13 | class Logic2AlloyLanguageMapper_RelationMapper { | ||
14 | private val extension AlloyLanguageFactory factory = AlloyLanguageFactory.eINSTANCE | ||
15 | private val Logic2AlloyLanguageMapper_Support support = new Logic2AlloyLanguageMapper_Support; | ||
16 | val Logic2AlloyLanguageMapper base; | ||
17 | public new(Logic2AlloyLanguageMapper base) { | ||
18 | this.base = base | ||
19 | } | ||
20 | |||
21 | def dispatch protected void transformRelation(RelationDeclaration r, Logic2AlloyLanguageMapperTrace trace) { | ||
22 | if(!trace.relationDefinitions.containsKey(r)) { | ||
23 | if(r.transformToHostedField(trace)) { | ||
24 | transformRelationDeclarationToHostedField(r,trace) | ||
25 | } else { | ||
26 | transformRelationDeclarationToGlobalField(r,trace) | ||
27 | } | ||
28 | } | ||
29 | } | ||
30 | |||
31 | def protected transformToHostedField(RelationDeclaration r, Logic2AlloyLanguageMapperTrace trace) { | ||
32 | val first = r.parameters.get(0) | ||
33 | if(r.parameters.size == 2) { | ||
34 | if(first instanceof ComplexTypeReference) { | ||
35 | val types = base.typeMapper.transformTypeReference(first.referred,base,trace) | ||
36 | if(types.size == 1) { | ||
37 | return true | ||
38 | } | ||
39 | } | ||
40 | } | ||
41 | return false | ||
42 | } | ||
43 | |||
44 | def protected transformRelationDeclarationToHostedField(RelationDeclaration r, Logic2AlloyLanguageMapperTrace trace) { | ||
45 | val hostType = (r.parameters.head as ComplexTypeReference).referred | ||
46 | |||
47 | val targetBody = base.typeMapper.transformTypeReference(hostType,base,trace).get(0).eContainer as ALSSignatureBody | ||
48 | val field = createALSFieldDeclaration => [ | ||
49 | it.name = support.toID(r.getName) | ||
50 | it.multiplicity = ALSMultiplicity.SET | ||
51 | it.type = base.transformTypeReference(r.parameters.get(1),trace) | ||
52 | ] | ||
53 | targetBody.fields += field | ||
54 | trace.relationDeclaration2Field.put(r,field) | ||
55 | |||
56 | } | ||
57 | |||
58 | def protected transformRelationDeclarationToGlobalField(RelationDeclaration r, Logic2AlloyLanguageMapperTrace trace) { | ||
59 | val field = createALSFieldDeclaration => [ | ||
60 | it.name = support.toID(r.name) | ||
61 | it.type = support.unfoldReferenceDirectProduct(base,r.parameters,trace) | ||
62 | ] | ||
63 | trace.logicLanguageBody.fields += field | ||
64 | trace.relationDeclaration2Global.put(r, field) | ||
65 | } | ||
66 | |||
67 | def dispatch protected void transformRelation(RelationDefinition r, Logic2AlloyLanguageMapperTrace trace) { | ||
68 | val res = createALSRelationDefinition => [ | ||
69 | name = support.toID(r.name) | ||
70 | // fill the variables later | ||
71 | // fill the expression later | ||
72 | ] | ||
73 | |||
74 | trace.relationDefinition2Predicate.put(r,res) | ||
75 | trace.specification.relationDefinitions+=res; | ||
76 | } | ||
77 | |||
78 | def protected void transformRelationDefinitionSpecification(RelationDefinition r, Logic2AlloyLanguageMapperTrace trace) { | ||
79 | val predicate = r.lookup(trace.relationDefinition2Predicate) | ||
80 | if(predicate !== null) { | ||
81 | val variableMap = new HashMap | ||
82 | for(variable : r.variables) { | ||
83 | val v = createALSVariableDeclaration => [ | ||
84 | it.name = support.toID(variable.name) | ||
85 | it.range = base.transformTypeReference(variable.range,trace) | ||
86 | ] | ||
87 | predicate.variables+=v | ||
88 | variableMap.put(variable,v) | ||
89 | } | ||
90 | predicate.value = base.transformTerm(r.value,trace,variableMap) | ||
91 | } | ||
92 | } | ||
93 | |||
94 | def public transformRelationReference(RelationDeclaration relation, Logic2AlloyLanguageMapperTrace trace) { | ||
95 | if(relation.transformToHostedField(trace)) { | ||
96 | return createALSReference => [it.referred = relation.lookup(trace.relationDeclaration2Field) ] | ||
97 | } else { | ||
98 | return createALSJoin => [ | ||
99 | leftOperand = createALSReference => [referred = trace.logicLanguage] | ||
100 | rightOperand = createALSReference => [ referred = relation.lookup(trace.relationDeclaration2Global) ]] | ||
101 | } | ||
102 | } | ||
103 | |||
104 | def public getRelationReference(RelationDeclaration relation, Logic2AlloyLanguageMapperTrace trace) { | ||
105 | if(relation.transformToHostedField(trace)) { | ||
106 | return relation.lookup(trace.relationDeclaration2Field) | ||
107 | } else { | ||
108 | return relation.lookup(trace.relationDeclaration2Global) | ||
109 | } | ||
110 | } | ||
111 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_Support.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_Support.xtend new file mode 100644 index 00000000..39896c27 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_Support.xtend | |||
@@ -0,0 +1,207 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSEquals | ||
4 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSMultiplicity | ||
5 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSReference | ||
6 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSTerm | ||
7 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSVariableDeclaration | ||
8 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguageFactory | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolTypeReference | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.QuantifiedExpression | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Term | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeReference | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Variable | ||
14 | import java.util.ArrayList | ||
15 | import java.util.HashMap | ||
16 | import java.util.List | ||
17 | import java.util.Map | ||
18 | import org.eclipse.emf.ecore.util.EcoreUtil | ||
19 | |||
20 | class Logic2AlloyLanguageMapper_Support { | ||
21 | private val extension AlloyLanguageFactory factory = AlloyLanguageFactory.eINSTANCE | ||
22 | |||
23 | /// ID handling | ||
24 | def protected String toIDMultiple(String... ids) { | ||
25 | ids.map[it.split("\\s+").join("'")].join("'") | ||
26 | } | ||
27 | |||
28 | def protected String toID(String ids) { | ||
29 | ids.split("\\s+").join("'") | ||
30 | } | ||
31 | def protected String toID(List<String> ids) { | ||
32 | ids.map[it.split("\\s+").join("'")].join("'") | ||
33 | } | ||
34 | |||
35 | /// Support functions | ||
36 | |||
37 | def protected getBooleanType(Logic2AlloyLanguageMapperTrace trace) { | ||
38 | if(trace.boolType!=null) { | ||
39 | return trace.boolType | ||
40 | } else { | ||
41 | trace.boolType = createALSEnumDeclaration => [ | ||
42 | it.name = toID(#["util","boolean"]) | ||
43 | trace.boolTrue = createALSEnumLiteral =>[it.name=toID(#["util","boolean","true"])] | ||
44 | it.literal += trace.boolTrue | ||
45 | trace.boolFalse = createALSEnumLiteral =>[it.name=toID(#["util","boolean","false"])] | ||
46 | it.literal += trace.boolFalse | ||
47 | ] | ||
48 | trace.specification.enumDeclarations+=trace.boolType | ||
49 | return trace.boolType | ||
50 | } | ||
51 | } | ||
52 | def protected getBooleanTrue(Logic2AlloyLanguageMapperTrace trace) { | ||
53 | getBooleanType(trace) | ||
54 | return trace.boolTrue | ||
55 | } | ||
56 | def protected getBooleanFalse(Logic2AlloyLanguageMapperTrace trace) { | ||
57 | getBooleanType(trace) | ||
58 | return trace.boolFalse | ||
59 | } | ||
60 | |||
61 | def protected booleanToLogicValue(ALSTerm boolReference, Logic2AlloyLanguageMapperTrace trace) { | ||
62 | //println((boolReference as ALSReference).referred) | ||
63 | createALSEquals => [ | ||
64 | leftOperand = EcoreUtil.copy(boolReference) | ||
65 | rightOperand = createALSReference => [referred = getBooleanTrue(trace)] | ||
66 | ] | ||
67 | } | ||
68 | def protected booleanToEnumValue(ALSTerm value, Logic2AlloyLanguageMapperTrace trace) { | ||
69 | if(value instanceof ALSEquals) { | ||
70 | val rightOperand = value.rightOperand | ||
71 | if(rightOperand instanceof ALSReference) { | ||
72 | if(rightOperand.referred == getBooleanTrue(trace)) { | ||
73 | return value.leftOperand | ||
74 | } | ||
75 | } | ||
76 | } | ||
77 | return value; | ||
78 | } | ||
79 | def protected prepareParameterOfSymbolicReference(TypeReference type, ALSTerm term, Logic2AlloyLanguageMapperTrace trace) { | ||
80 | if(type instanceof BoolTypeReference) { | ||
81 | return booleanToEnumValue(term,trace) | ||
82 | } | ||
83 | else return term | ||
84 | } | ||
85 | def protected postprocessResultOfSymbolicReference(TypeReference type, ALSTerm term, Logic2AlloyLanguageMapperTrace trace) { | ||
86 | if(type instanceof BoolTypeReference) { | ||
87 | return booleanToLogicValue(term,trace) | ||
88 | } | ||
89 | else return term | ||
90 | } | ||
91 | |||
92 | def protected ALSTerm unfoldAnd(List<? extends ALSTerm> operands) { | ||
93 | if(operands.size == 1) { return operands.head } | ||
94 | else if(operands.size > 1) { return createALSAnd=>[ | ||
95 | leftOperand=operands.head | ||
96 | rightOperand=operands.subList(1,operands.size).unfoldAnd | ||
97 | ]} | ||
98 | else throw new UnsupportedOperationException('''Logic operator with 0 operands!''') | ||
99 | } | ||
100 | |||
101 | def protected ALSTerm unfoldOr(List<? extends ALSTerm> operands, Logic2AlloyLanguageMapperTrace trace) { | ||
102 | if(operands.size == 0) { return unfoldTrueStatement(trace)} | ||
103 | else if(operands.size == 1) { return operands.head } | ||
104 | else if(operands.size > 1) { return createALSOr=>[ | ||
105 | leftOperand=operands.head | ||
106 | rightOperand=unfoldOr(operands.subList(1,operands.size),trace) | ||
107 | ]} | ||
108 | //else throw new UnsupportedOperationException('''Logic operator with 0 operands!''') | ||
109 | } | ||
110 | |||
111 | protected def unfoldTrueStatement(Logic2AlloyLanguageMapperTrace trace) { | ||
112 | createALSEquals => [ | ||
113 | it.leftOperand = createALSReference => [it.referred = getBooleanTrue(trace)] | ||
114 | it.rightOperand = createALSReference => [it.referred = getBooleanTrue(trace)] | ||
115 | ] | ||
116 | } | ||
117 | |||
118 | protected def unfoldTFalseStatement(Logic2AlloyLanguageMapper m, Logic2AlloyLanguageMapperTrace trace) { | ||
119 | createALSEquals => [ | ||
120 | it.leftOperand = createALSReference => [it.referred = getBooleanTrue(trace)] | ||
121 | it.rightOperand = createALSReference => [it.referred = getBooleanTrue(trace)] | ||
122 | ] | ||
123 | } | ||
124 | |||
125 | def protected ALSTerm unfoldPlus(List<? extends ALSTerm> operands) { | ||
126 | if(operands.size == 1) { return operands.head } | ||
127 | else if(operands.size > 1) { return createALSPlus=>[ | ||
128 | leftOperand=operands.head | ||
129 | rightOperand=operands.subList(1,operands.size).unfoldPlus | ||
130 | ]} | ||
131 | else return createALSNone | ||
132 | } | ||
133 | |||
134 | def protected ALSTerm unfoldIntersection(List<? extends ALSTerm> operands) { | ||
135 | if(operands.size == 1) { return operands.head } | ||
136 | else if(operands.size > 1) { return createALSIntersection=>[ | ||
137 | leftOperand=operands.head | ||
138 | rightOperand=operands.subList(1,operands.size).unfoldIntersection | ||
139 | ]} | ||
140 | else throw new UnsupportedOperationException('''Logic operator with 0 operands!''') | ||
141 | } | ||
142 | |||
143 | def protected ALSTerm unfoldDistinctTerms(Logic2AlloyLanguageMapper m, List<Term> operands, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
144 | if(operands.size == 1) { return m.transformTerm(operands.head,trace,variables) } | ||
145 | else if(operands.size > 1) { | ||
146 | val notEquals = new ArrayList<ALSTerm>(operands.size*operands.size/2) | ||
147 | for(i:0..<operands.size) { | ||
148 | for(j: i+1..<operands.size) { | ||
149 | notEquals+=createALSNotEquals=>[ | ||
150 | leftOperand = m.transformTerm(operands.get(i),trace,variables) | ||
151 | rightOperand = m.transformTerm(operands.get(j),trace,variables) | ||
152 | ] | ||
153 | } | ||
154 | } | ||
155 | return notEquals.unfoldAnd | ||
156 | } | ||
157 | else throw new UnsupportedOperationException('''Logic operator with 0 operands!''') | ||
158 | } | ||
159 | |||
160 | def protected ALSTerm unfoldReferenceDirectProduct(Logic2AlloyLanguageMapper m, List<TypeReference> references,Logic2AlloyLanguageMapperTrace trace) { | ||
161 | if(references.size == 1) return m.transformTypeReference(references.head,trace) | ||
162 | else if(references.size > 1) return createALSDirectProduct => [ | ||
163 | it.leftOperand = m.transformTypeReference(references.head,trace) | ||
164 | it.rightOperand = unfoldReferenceDirectProduct(m,references.subList(1,references.size),trace) | ||
165 | ] | ||
166 | else throw new UnsupportedOperationException | ||
167 | } | ||
168 | |||
169 | def protected ALSTerm unfoldDotJoin(Logic2AlloyLanguageMapper m, List<Term> elements, ALSTerm target, Logic2AlloyLanguageMapperTrace trace, | ||
170 | Map<Variable, ALSVariableDeclaration> variables) { | ||
171 | if (elements.size == 1) { | ||
172 | return createALSJoin => [ | ||
173 | it.leftOperand = m.transformTerm(elements.head,trace, variables) | ||
174 | it.rightOperand = target | ||
175 | ] | ||
176 | } else if (elements.size > 1) { | ||
177 | return createALSJoin => [ | ||
178 | it.leftOperand = m.transformTerm(elements.last,trace, variables) | ||
179 | it.rightOperand = m.unfoldDotJoin(elements.subList(0, elements.size - 1), target, trace, variables) | ||
180 | ] | ||
181 | } else | ||
182 | throw new UnsupportedOperationException | ||
183 | } | ||
184 | |||
185 | def protected ALSTerm unfoldTermDirectProduct(Logic2AlloyLanguageMapper m, List<Term> references,Logic2AlloyLanguageMapperTrace trace,Map<Variable, ALSVariableDeclaration> variables) { | ||
186 | if(references.size == 1) return m.transformTerm(references.head,trace,variables) | ||
187 | else if(references.size > 1) return createALSDirectProduct => [ | ||
188 | it.leftOperand = m.transformTerm(references.head,trace,variables) | ||
189 | it.rightOperand = unfoldTermDirectProduct(m,references.subList(1,references.size),trace, variables) | ||
190 | ] | ||
191 | else throw new UnsupportedOperationException | ||
192 | } | ||
193 | |||
194 | def protected createQuantifiedExpression(Logic2AlloyLanguageMapper m, QuantifiedExpression q, ALSMultiplicity multiplicity, Logic2AlloyLanguageMapperTrace trace, Map<Variable, ALSVariableDeclaration> variables) { | ||
195 | val variableMap = q.quantifiedVariables.toInvertedMap[v | createALSVariableDeclaration=> [ | ||
196 | it.name = toID(v.name) | ||
197 | it.range = m.transformTypeReference(v.range,trace) ]] | ||
198 | |||
199 | createALSQuantifiedEx=>[ | ||
200 | it.type = multiplicity | ||
201 | it.variables += variableMap.values | ||
202 | it.expression = m.transformTerm(q.expression,trace,variables.withAddition(variableMap)) | ||
203 | ] | ||
204 | } | ||
205 | |||
206 | def protected withAddition(Map<Variable, ALSVariableDeclaration> v1, Map<Variable, ALSVariableDeclaration> v2) { new HashMap(v1) => [putAll(v2)] } | ||
207 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_TypeMapper.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_TypeMapper.xtend new file mode 100644 index 00000000..9927f1cc --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_TypeMapper.xtend | |||
@@ -0,0 +1,16 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSSignatureDeclaration | ||
4 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSTerm | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
7 | import java.util.Collection | ||
8 | import java.util.List | ||
9 | |||
10 | interface Logic2AlloyLanguageMapper_TypeMapper { | ||
11 | def void transformTypes(Collection<Type> types, Collection<DefinedElement> elements, Logic2AlloyLanguageMapper mapper, Logic2AlloyLanguageMapperTrace trace); | ||
12 | def List<ALSSignatureDeclaration> transformTypeReference(Type referred, Logic2AlloyLanguageMapper mapper, Logic2AlloyLanguageMapperTrace trace) | ||
13 | def ALSSignatureDeclaration getUndefinedSupertype(Logic2AlloyLanguageMapperTrace trace) | ||
14 | def int getUndefinedSupertypeScope(int undefinedScope,Logic2AlloyLanguageMapperTrace trace) | ||
15 | def ALSTerm transformReference(DefinedElement referred,Logic2AlloyLanguageMapperTrace trace) | ||
16 | } | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_TypeMapper_FilteredTypes.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_TypeMapper_FilteredTypes.xtend new file mode 100644 index 00000000..ade9860b --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_TypeMapper_FilteredTypes.xtend | |||
@@ -0,0 +1,268 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.queries.TypeQueries | ||
4 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSMultiplicity | ||
5 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSSignatureBody | ||
6 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSSignatureDeclaration | ||
7 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSTerm | ||
8 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguageFactory | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage | ||
13 | import java.util.ArrayList | ||
14 | import java.util.Collection | ||
15 | import java.util.HashMap | ||
16 | import java.util.List | ||
17 | import java.util.Map | ||
18 | |||
19 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
20 | |||
21 | class Logic2AlloyLanguageMapper_TypeMapperTrace_FilteredTypes | ||
22 | implements Logic2AlloyLanguageMapper_TypeMapperTrace | ||
23 | { | ||
24 | public var ALSSignatureDeclaration objectSupperClass; | ||
25 | public val Map<Type, ALSSignatureDeclaration> type2ALSType = new HashMap; | ||
26 | public val Map<DefinedElement, ALSSignatureDeclaration> definedElement2Declaration = new HashMap | ||
27 | } | ||
28 | /** | ||
29 | * Each object is an element of an Object set, and types are subsets of the objects. | ||
30 | */ | ||
31 | class Logic2AlloyLanguageMapper_TypeMapper_FilteredTypes implements Logic2AlloyLanguageMapper_TypeMapper{ | ||
32 | private val Logic2AlloyLanguageMapper_Support support = new Logic2AlloyLanguageMapper_Support; | ||
33 | private val extension AlloyLanguageFactory factory = AlloyLanguageFactory.eINSTANCE | ||
34 | |||
35 | new() { | ||
36 | // Initialize package | ||
37 | LogicproblemPackage.eINSTANCE.class | ||
38 | } | ||
39 | |||
40 | override transformTypes(Collection<Type> types, Collection<DefinedElement> elements, Logic2AlloyLanguageMapper mapper, Logic2AlloyLanguageMapperTrace trace) { | ||
41 | val typeTrace = new Logic2AlloyLanguageMapper_TypeMapperTrace_FilteredTypes | ||
42 | trace.typeMapperTrace = typeTrace | ||
43 | |||
44 | // 1. A global type for Objects is created | ||
45 | val objectSig = createALSSignatureDeclaration => [it.name = support.toID(#["util","Object"])] | ||
46 | val objectBody = createALSSignatureBody => [ | ||
47 | it.declarations += objectSig | ||
48 | it.abstract = true | ||
49 | ] | ||
50 | typeTrace.objectSupperClass = objectSig | ||
51 | trace.specification.signatureBodies += objectBody | ||
52 | |||
53 | // 2. Each type is mapped to a unique sig | ||
54 | for(type : types) { | ||
55 | val sig = createALSSignatureDeclaration => [it.name = support.toIDMultiple("type",type.name)] | ||
56 | val body = createALSSignatureBody => [it.declarations += sig] | ||
57 | trace.specification.signatureBodies += body | ||
58 | typeTrace.type2ALSType.put(type,sig) | ||
59 | } | ||
60 | |||
61 | // 3. The elements of a defined type is mapped to singleton signatures | ||
62 | // 3.1 Collect the elements | ||
63 | val elementMatcher = TypeQueries.instance.getLowestCommonSupertypeOfAllOccuranceOfElement(trace.incqueryEngine) | ||
64 | val topmostType2Elements = new HashMap<ALSSignatureDeclaration,List<DefinedElement>> | ||
65 | for(element : elements) { | ||
66 | val topmostTypes = elementMatcher.getAllValuesOftype(element) | ||
67 | var ALSSignatureDeclaration selectedTopmostType; | ||
68 | if(topmostTypes.empty) { | ||
69 | selectedTopmostType = objectSig | ||
70 | } else{ | ||
71 | selectedTopmostType = topmostTypes.head.lookup(typeTrace.type2ALSType) | ||
72 | } | ||
73 | topmostType2Elements.putOrAddToList(selectedTopmostType,element) | ||
74 | } | ||
75 | |||
76 | // 4. For each topmost types several singleton classes are generated, which represents the elements. | ||
77 | // For the sake of clarity, common bodies are used. | ||
78 | for(topmostEntry : topmostType2Elements.entrySet) { | ||
79 | |||
80 | for(element : topmostEntry.value) { | ||
81 | val signature = createALSSignatureDeclaration => [it.name = support.toIDMultiple("element",element.name)] | ||
82 | typeTrace.definedElement2Declaration.put(element,signature) | ||
83 | } | ||
84 | |||
85 | val body = createALSSignatureBody => [ | ||
86 | it.multiplicity = ALSMultiplicity.ONE | ||
87 | it.declarations += topmostEntry.value.map[it.lookup(typeTrace.definedElement2Declaration)] | ||
88 | ] | ||
89 | |||
90 | val containerLogicType = topmostEntry.key | ||
91 | body.superset += containerLogicType | ||
92 | |||
93 | trace.specification.signatureBodies+=body | ||
94 | } | ||
95 | |||
96 | // 5.1 Each Defined Type is specified as the union of its elements | ||
97 | for(definedType : types.filter(TypeDefinition)) { | ||
98 | trace.specification.factDeclarations += createALSFactDeclaration => [ | ||
99 | it.name = support.toIDMultiple("typedefinition",definedType.name) | ||
100 | it.term = createALSEquals => [ | ||
101 | it.leftOperand = createALSReference => [ it.referred = definedType.lookup(typeTrace.type2ALSType) ] | ||
102 | it.rightOperand = support.unfoldPlus(definedType.elements.map[e| | ||
103 | createALSReference => [it.referred = e.lookup(typeTrace.definedElement2Declaration)]]) | ||
104 | ] | ||
105 | ] | ||
106 | } | ||
107 | // 5.2 Each Defined Element is unique | ||
108 | for(definedType : types.filter(TypeDefinition)) { | ||
109 | val allElementsIncludingSubtypes = | ||
110 | definedType.<Type>transitiveClosureStar[it.subtypes].filter(TypeDefinition) | ||
111 | .map[elements].flatten.toSet.toList | ||
112 | if(allElementsIncludingSubtypes.size>=2) { | ||
113 | trace.specification.factDeclarations += createALSFactDeclaration => [ | ||
114 | it.name = support.toIDMultiple("typeElementsUnique",definedType.name) | ||
115 | it.term = unfoldDistinctElements(allElementsIncludingSubtypes,trace) | ||
116 | ] | ||
117 | } | ||
118 | } | ||
119 | |||
120 | // 6. Each inheritance is modeled by subset operator 'in' | ||
121 | for(type : types) { | ||
122 | val sigBody = type.lookup(typeTrace.type2ALSType).eContainer as ALSSignatureBody | ||
123 | if(type.supertypes.empty) { | ||
124 | sigBody.superset += typeTrace.objectSupperClass | ||
125 | } else { | ||
126 | sigBody.superset += type.supertypes.map[lookup(typeTrace.type2ALSType)] | ||
127 | } | ||
128 | } | ||
129 | |||
130 | |||
131 | // 7. Each type is in the intersection of the supertypes | ||
132 | for(type : types.filter[it.supertypes.size>=2]) { | ||
133 | trace.specification.factDeclarations += createALSFactDeclaration => [ | ||
134 | it.name = support.toIDMultiple("abstract",type.name) | ||
135 | it.term = createALSEquals => [ | ||
136 | it.leftOperand = createALSReference => [ it.referred = type.lookup(typeTrace.type2ALSType) ] | ||
137 | it.rightOperand = support.unfoldIntersection(type.supertypes.map[e| | ||
138 | createALSReference => [it.referred = e.lookup(typeTrace.type2ALSType)]]) | ||
139 | ] | ||
140 | ] | ||
141 | } | ||
142 | |||
143 | // 8. Each abstract type is equal to the union of the subtypes | ||
144 | for(type : types.filter[isIsAbstract]) { | ||
145 | trace.specification.factDeclarations += createALSFactDeclaration => [ | ||
146 | it.name = support.toIDMultiple("abstract",type.name) | ||
147 | it.term = createALSEquals => [ | ||
148 | it.leftOperand = createALSReference => [ it.referred = type.lookup(typeTrace.type2ALSType) ] | ||
149 | it.rightOperand = support.unfoldPlus(type.subtypes.map[e| | ||
150 | createALSReference => [it.referred = e.lookup(typeTrace.type2ALSType)]]) | ||
151 | ] | ||
152 | ] | ||
153 | } | ||
154 | // 8.1 The object type is the union of the root types. | ||
155 | val rootTypes = types.filter[it.supertypes.empty].toList | ||
156 | trace.specification.factDeclarations += createALSFactDeclaration => [ | ||
157 | it.name = support.toIDMultiple(#["ObjectTypeDefinition"]) | ||
158 | it.term = createALSEquals => [ | ||
159 | it.leftOperand = createALSReference => [ it.referred = typeTrace.objectSupperClass ] | ||
160 | it.rightOperand = support.unfoldPlus(rootTypes.map[e| | ||
161 | createALSReference => [it.referred = e.lookup(typeTrace.type2ALSType)]]) | ||
162 | ] | ||
163 | ] | ||
164 | |||
165 | // 9. For each type X (including Object) | ||
166 | // only the common subtypes are in the intersection | ||
167 | // of the two subtype. | ||
168 | // 9.1. for the object | ||
169 | { | ||
170 | val rootTypeList = types.filter[it.supertypes.empty].toList | ||
171 | for(type1Index: 0..<rootTypeList.size) { | ||
172 | for(type2Index: 0..<type1Index) { | ||
173 | trace.specification.factDeclarations += | ||
174 | commonSubtypeOnlyInDiamonds(rootTypeList.get(type1Index),rootTypeList.get(type2Index),trace) | ||
175 | } | ||
176 | } | ||
177 | } | ||
178 | |||
179 | //9.3 for the subtypes of each objects | ||
180 | { | ||
181 | for(inScope : types) { | ||
182 | val subtypeList = inScope.subtypes//.toList | ||
183 | if(subtypeList.size>=2) { | ||
184 | for(type1Index: 0..<subtypeList.size) { | ||
185 | for(type2Index: 0..<type1Index) { | ||
186 | trace.specification.factDeclarations += | ||
187 | commonSubtypeOnlyInDiamonds(subtypeList.get(type1Index),subtypeList.get(type2Index),trace) | ||
188 | } | ||
189 | } | ||
190 | } | ||
191 | } | ||
192 | } | ||
193 | } | ||
194 | |||
195 | private def isEnumlikeType(Type type) { | ||
196 | if(type instanceof TypeDefinition) { | ||
197 | val elements = type.elements | ||
198 | return elements.forall[it.definedInType.size === 1 && it.definedInType.head === type] | ||
199 | } | ||
200 | return false | ||
201 | } | ||
202 | |||
203 | private def isEnumlikeElement(DefinedElement d) { | ||
204 | d.definedInType.size === 1 && d.definedInType.head.isEnumlikeType | ||
205 | } | ||
206 | |||
207 | def getTypeTrace(Logic2AlloyLanguageMapperTrace trace) { | ||
208 | val res = trace.typeMapperTrace | ||
209 | if(res instanceof Logic2AlloyLanguageMapper_TypeMapperTrace_FilteredTypes) { | ||
210 | return res | ||
211 | } else { | ||
212 | throw new IllegalArgumentException(''' | ||
213 | Expected type mapping trace: «Logic2AlloyLanguageMapper_TypeMapperTrace_FilteredTypes.name», | ||
214 | but found «res.class.name»''') | ||
215 | } | ||
216 | } | ||
217 | |||
218 | def private commonSubtypeOnlyInDiamonds(Type t1, Type t2, Logic2AlloyLanguageMapperTrace trace) { | ||
219 | val topmostCommonSubtypes = TypeQueries.instance.getTopmostCommonSubtypes(trace.incqueryEngine) | ||
220 | val allTopmostCommon = topmostCommonSubtypes.getAllValuesOfcommon(t1,t2).toList | ||
221 | return createALSFactDeclaration => [ | ||
222 | it.name = support.toIDMultiple("common","types",t1.name,t2.name) | ||
223 | it.term = createALSEquals => [ | ||
224 | it.leftOperand = createALSIntersection => [ | ||
225 | it.leftOperand = createALSReference => [it.referred = t1.lookup(trace.typeTrace.type2ALSType)] | ||
226 | it.rightOperand = createALSReference => [it.referred = t2.lookup(trace.typeTrace.type2ALSType)] | ||
227 | ] | ||
228 | it.rightOperand = support.unfoldPlus(allTopmostCommon.map[t|createALSReference => [it.referred = t.lookup(trace.typeTrace.type2ALSType)]]) | ||
229 | ] | ||
230 | ] | ||
231 | } | ||
232 | |||
233 | def private unfoldDistinctElements( | ||
234 | List<DefinedElement> operands, | ||
235 | Logic2AlloyLanguageMapperTrace trace | ||
236 | ) { | ||
237 | if(operands.size == 1 || operands.size == 0) {support.unfoldTrueStatement(trace);} | ||
238 | else { | ||
239 | val notEquals = new ArrayList<ALSTerm>(operands.size*operands.size/2) | ||
240 | for(i:0..<operands.size) { | ||
241 | for(j: i+1..<operands.size) { | ||
242 | notEquals+=createALSNotEquals=>[ | ||
243 | leftOperand = createALSReference => [it.referred = trace.typeTrace.definedElement2Declaration.get(operands.get(i)) ] | ||
244 | rightOperand = createALSReference => [it.referred = trace.typeTrace.definedElement2Declaration.get(operands.get(j)) ] | ||
245 | ] | ||
246 | } | ||
247 | } | ||
248 | return support.unfoldAnd(notEquals) | ||
249 | } | ||
250 | } | ||
251 | |||
252 | override transformTypeReference(Type referred, Logic2AlloyLanguageMapper mapper, Logic2AlloyLanguageMapperTrace trace) { | ||
253 | return #[trace.typeTrace.type2ALSType.get(referred)] | ||
254 | } | ||
255 | |||
256 | override getUndefinedSupertype(Logic2AlloyLanguageMapperTrace trace) { | ||
257 | trace.typeTrace.objectSupperClass | ||
258 | } | ||
259 | |||
260 | override transformReference(DefinedElement referred, Logic2AlloyLanguageMapperTrace trace) { | ||
261 | createALSReference => [it.referred = referred.lookup(trace.typeTrace.definedElement2Declaration)] | ||
262 | } | ||
263 | |||
264 | override getUndefinedSupertypeScope(int undefinedScope, Logic2AlloyLanguageMapperTrace trace) { | ||
265 | return undefinedScope + trace.typeTrace.definedElement2Declaration.size | ||
266 | } | ||
267 | |||
268 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_TypeMapper_Horizontal.xtend_old b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_TypeMapper_Horizontal.xtend_old new file mode 100644 index 00000000..7383904d --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_TypeMapper_Horizontal.xtend_old | |||
@@ -0,0 +1,428 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSIntersection | ||
4 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSMultiplicity | ||
5 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSSignatureDeclaration | ||
6 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSTerm | ||
7 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguageFactory | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
14 | import hu.bme.mit.inf.dslreasoner.logic.model.patterns.SupertypeStarMatcher | ||
15 | import java.util.HashMap | ||
16 | import java.util.LinkedHashSet | ||
17 | import java.util.LinkedList | ||
18 | import java.util.List | ||
19 | import java.util.Map | ||
20 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine | ||
21 | import org.eclipse.viatra.query.runtime.emf.EMFScope | ||
22 | import org.eclipse.xtend.lib.annotations.Data | ||
23 | |||
24 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
25 | |||
26 | class Logic2AlloyLanguageMapper_TypeMapperTrace_Horizontal | ||
27 | implements Logic2AlloyLanguageMapper_TypeMapperTrace { | ||
28 | public var ALSSignatureDeclaration declaredSupertype | ||
29 | public var ALSSignatureDeclaration definedSupertype | ||
30 | public val Map<DefinedElement, ALSSignatureDeclaration> definedElement2Declaration = new HashMap | ||
31 | |||
32 | public val Map<TypeDefinition, ALSSignatureDeclaration> definition2definition = new HashMap | ||
33 | public val Map<TypeDeclaration, ALSSignatureDeclaration> declaration2definition = new HashMap | ||
34 | public val Map<TypeDeclaration, ALSSignatureDeclaration> undefined2definition = new HashMap | ||
35 | public val Map<TypeDeclaration, ALSSignatureDeclaration> new2declaration = new HashMap | ||
36 | |||
37 | def getAllDefinedTypes() { | ||
38 | return (definition2definition.values) + | ||
39 | (declaration2definition.values) + | ||
40 | (undefined2definition.values) | ||
41 | } | ||
42 | def getAllDeclaredTypes() { | ||
43 | return new2declaration.values | ||
44 | } | ||
45 | |||
46 | public val Map<Type,List<ALSSignatureDeclaration>> type2AllSignatures = new HashMap; | ||
47 | } | ||
48 | |||
49 | @Data | ||
50 | class DynamicTypeConstraints { | ||
51 | List<List<Type>> positiveCNF | ||
52 | LinkedHashSet<Type> negative | ||
53 | public new() { | ||
54 | this.positiveCNF = new LinkedList | ||
55 | this.negative = new LinkedHashSet | ||
56 | } | ||
57 | def public void addPositiveTypeOptions(List<Type> typeDisjunction) { | ||
58 | this.positiveCNF.add(typeDisjunction) | ||
59 | } | ||
60 | def public void addNegativeTypes(Iterable<Type> negativeTypes) { | ||
61 | this.negative.addAll(negativeTypes) | ||
62 | } | ||
63 | } | ||
64 | |||
65 | /** | ||
66 | * Dynamic types are represented by disjoint sets, and | ||
67 | * static types are represented by the union of the dynamic type sets. | ||
68 | * | ||
69 | * Definition Declaration | ||
70 | * | / \ | ||
71 | * | W/DefinedSuper Wo/DefinedSuper | ||
72 | * | | / \ | ||
73 | * | | undefined2declaration new2declaration | ||
74 | * definition2definition definition2declaration | ||
75 | * +----------------------------------------------------+ +-------------+ | ||
76 | * Defined Declared | ||
77 | */ | ||
78 | class Logic2AlloyLanguageMapper_TypeMapper_Horizontal implements Logic2AlloyLanguageMapper_TypeMapper{ | ||
79 | private val Logic2AlloyLanguageMapper_Support support = new Logic2AlloyLanguageMapper_Support; | ||
80 | private val extension AlloyLanguageFactory factory = AlloyLanguageFactory.eINSTANCE | ||
81 | |||
82 | override transformTypes(LogicProblem problem, Logic2AlloyLanguageMapper mapper, Logic2AlloyLanguageMapperTrace trace) { | ||
83 | // 0. Creating the traces | ||
84 | val typeTrace = new Logic2AlloyLanguageMapper_TypeMapperTrace_Horizontal | ||
85 | trace.typeMapperTrace = typeTrace | ||
86 | /** | ||
87 | * Static type -> list of possible dynamic type map | ||
88 | */ | ||
89 | val typeToConcreteSubtypes = problem.typeToConcreteSubtypes(trace) | ||
90 | |||
91 | |||
92 | |||
93 | // 1. Transforming the types | ||
94 | |||
95 | // There are two kind of types: | ||
96 | // A: one with defined supertypes (including itself), that only has defined elements | ||
97 | // Those types can have instances only from the defined elements, ie they are subset of problem.elements | ||
98 | // B: one without defined supertypes | ||
99 | // Those types can have instances from two sources | ||
100 | // B.1 from elements that dont have definitions | ||
101 | // B.2 from newly created elements | ||
102 | val allConcreteTypes = problem.types.filter[!it.isAbstract] | ||
103 | val definitions = allConcreteTypes.filter(TypeDefinition).toList | ||
104 | val declarationsWithDefinedSupertype = allConcreteTypes.filter(TypeDeclaration).filter[it.hasDefinedSupertype].toList | ||
105 | val declarationsWithoutDefinedSupertype = allConcreteTypes.filter(TypeDeclaration).filter[!it.hasDefinedSupertype].toList | ||
106 | |||
107 | // 2. If there are defined elements | ||
108 | if(trace.typeTrace.definedSupertype != null) { | ||
109 | // 3 mapping the elements | ||
110 | problem.elements.transformDefinedSupertype(trace) | ||
111 | // 4. if there are elements that are added to types, then it have to be mapped to defined parts | ||
112 | if(problem.elements.exists[!it.definedInType.empty]) { | ||
113 | definitions.forEach[it.transformDefinition2Definition(trace)] | ||
114 | declarationsWithDefinedSupertype.forEach[it.transformDeclaration2Definition(trace)] | ||
115 | } | ||
116 | // 5. if there are elements that are not added to types, then it have to be mapped to declarations without definitions | ||
117 | if(problem.elements.exists[it.definedInType.empty]) { | ||
118 | declarationsWithoutDefinedSupertype.forEach[it.transformUndefined2Definition(trace)] | ||
119 | } | ||
120 | |||
121 | definedConcreteTypesAreFull(trace) | ||
122 | definedConcreteTypesAreDisjoint(trace) | ||
123 | problem.definedConcreteTypesAreSatisfyingDefinitions(typeToConcreteSubtypes,trace) | ||
124 | } | ||
125 | |||
126 | // Transforming the declared and defined concrete types | ||
127 | problem.elements.transformDefinedSupertype(trace) | ||
128 | if(trace.typeTrace.definedSupertype != null) { | ||
129 | problem.elements.transformDefinedElements(trace) | ||
130 | declarationsWithoutDefinedSupertype.forEach[it.transformNew2Declaration(trace)] | ||
131 | } | ||
132 | |||
133 | // 2: Caching the types by filling type2AllSignatures | ||
134 | for(typeToConcreteSubtypesEntry : typeToConcreteSubtypes.entrySet) { | ||
135 | val type = typeToConcreteSubtypesEntry.key | ||
136 | val List<ALSSignatureDeclaration> signatures = new LinkedList | ||
137 | |||
138 | } | ||
139 | } | ||
140 | |||
141 | def getTypeTrace(Logic2AlloyLanguageMapperTrace trace) { | ||
142 | val res = trace.typeMapperTrace | ||
143 | if(res instanceof Logic2AlloyLanguageMapper_TypeMapperTrace_Horizontal) { | ||
144 | return res | ||
145 | } else { | ||
146 | throw new IllegalArgumentException(''' | ||
147 | Expected type mapping trace: «Logic2AlloyLanguageMapper_TypeMapperTrace_Horizontal.name», | ||
148 | but found «res.class.name»''') | ||
149 | } | ||
150 | } | ||
151 | |||
152 | private def boolean hasDefinedSupertype(Type type) { | ||
153 | if(type instanceof TypeDefinition) { | ||
154 | return true | ||
155 | } else { | ||
156 | if(type.supertypes.empty) return false | ||
157 | else return type.supertypes.exists[it.hasDefinedSupertype] | ||
158 | } | ||
159 | } | ||
160 | |||
161 | private def transformDefinedSupertype(List<DefinedElement> elements, Logic2AlloyLanguageMapperTrace trace) { | ||
162 | trace.typeTrace.definedSupertype = createALSSignatureDeclaration => [ | ||
163 | it.name = support.toID(#["util","defined","Object"]) | ||
164 | ] | ||
165 | trace.specification.signatureBodies += createALSSignatureBody => [ | ||
166 | it.abstract = true | ||
167 | it.declarations += trace.typeTrace.definedSupertype | ||
168 | ] | ||
169 | } | ||
170 | |||
171 | private def transformDefinedElements(List<DefinedElement> elements, | ||
172 | Logic2AlloyLanguageMapperTrace trace){ | ||
173 | if(trace.typeTrace.definedSupertype != null) { | ||
174 | // 2. Create elements as singleton signatures subtype of definedSupertype | ||
175 | val elementBodies = createALSSignatureBody => [ | ||
176 | it.multiplicity = ALSMultiplicity::ONE | ||
177 | it.supertype = trace.typeTrace.definedSupertype | ||
178 | ] | ||
179 | trace.specification.signatureBodies += elementBodies | ||
180 | for(element : elements) { | ||
181 | val elementDeclaration = createALSSignatureDeclaration => [ | ||
182 | it.name = support.toIDMultiple(#["element"],element.name) | ||
183 | ] | ||
184 | elementBodies.declarations += elementDeclaration | ||
185 | trace.typeTrace.definedElement2Declaration.put(element,elementDeclaration) | ||
186 | } | ||
187 | // 3. Specify that definedSupertype is equal to the union of specified | ||
188 | /*trace.specification.factDeclarations += createALSFactDeclaration => [ | ||
189 | it.name = support.toID(#["util","typehierarchy","definitionOfElements"]) | ||
190 | it.term = createALSEquals => [ | ||
191 | it.leftOperand = createALSReference => [it.referred = trace.typeTrace.definedSupertype] | ||
192 | it.rightOperand = support.unfoldPlus(elements.map[element|createALSReference=>[ | ||
193 | it.referred = element.lookup(trace.typeTrace.definedElement2Declaration) | ||
194 | ]]) | ||
195 | ] | ||
196 | ]*/ | ||
197 | } | ||
198 | } | ||
199 | |||
200 | ///// Type definitions | ||
201 | |||
202 | protected def void transformDefinition2Definition(TypeDefinition type, Logic2AlloyLanguageMapperTrace trace) { | ||
203 | val sig = createALSSignatureDeclaration => [it.name = support.toIDMultiple(#["definition2definition"],type.name)] | ||
204 | val body = createALSSignatureBody => [ | ||
205 | it.declarations += sig | ||
206 | it.superset += trace.typeTrace.definedSupertype | ||
207 | ] | ||
208 | trace.specification.signatureBodies += body | ||
209 | trace.typeTrace.definition2definition.put(type,sig) | ||
210 | } | ||
211 | protected def void transformDeclaration2Definition(TypeDeclaration type, Logic2AlloyLanguageMapperTrace trace) { | ||
212 | val sig = createALSSignatureDeclaration => [it.name = support.toIDMultiple(#["declaration2definition"],type.name)] | ||
213 | val body = createALSSignatureBody => [ | ||
214 | it.declarations += sig | ||
215 | it.superset += trace.typeTrace.definedSupertype | ||
216 | ] | ||
217 | trace.specification.signatureBodies += body | ||
218 | trace.typeTrace.declaration2definition.put(type,sig) | ||
219 | } | ||
220 | protected def void transformUndefined2Definition(TypeDeclaration type, Logic2AlloyLanguageMapperTrace trace) { | ||
221 | val sig = createALSSignatureDeclaration => [it.name = support.toIDMultiple(#["undefined2definition"],type.name)] | ||
222 | val body = createALSSignatureBody => [ | ||
223 | it.declarations += sig | ||
224 | it.supertype = trace.typeTrace.definedSupertype | ||
225 | ] | ||
226 | trace.specification.signatureBodies += body | ||
227 | trace.typeTrace.undefined2definition.put(type,sig) | ||
228 | } | ||
229 | protected def void transformNew2Declaration(TypeDeclaration type, Logic2AlloyLanguageMapperTrace trace) { | ||
230 | val sig = createALSSignatureDeclaration => [it.name = support.toIDMultiple(#["declaredPartOfDeclaration"],type.name)] | ||
231 | val body = createALSSignatureBody => [ | ||
232 | it.declarations += sig | ||
233 | it.supertype = trace.typeTrace.declaredSupertype | ||
234 | ] | ||
235 | trace.specification.signatureBodies += body | ||
236 | trace.typeTrace.new2declaration.put(type,sig) | ||
237 | } | ||
238 | |||
239 | /** | ||
240 | * The dynamic types cover each concrete types | ||
241 | */ | ||
242 | protected def definedConcreteTypesAreFull(Logic2AlloyLanguageMapperTrace trace) { | ||
243 | trace.specification.factDeclarations += createALSFactDeclaration => [ | ||
244 | it.name = support.toID(#["util","typehierarchy","elementFull"]) | ||
245 | it.term = createALSEquals => [ | ||
246 | it.leftOperand = createALSReference => [it.referred = trace.typeTrace.definedSupertype] | ||
247 | it.rightOperand = support.unfoldPlus( | ||
248 | trace.typeTrace.allDefinedTypes.map[type| | ||
249 | createALSReference=>[referred = type] | ||
250 | ].toList | ||
251 | ) | ||
252 | ] | ||
253 | ] | ||
254 | |||
255 | } | ||
256 | /** | ||
257 | * The dynamic types are disjoint | ||
258 | */ | ||
259 | protected def definedConcreteTypesAreDisjoint(Logic2AlloyLanguageMapperTrace trace) { | ||
260 | val types = trace.getTypeTrace.allDefinedTypes.toList | ||
261 | if (types.size >= 2) { | ||
262 | trace.specification.factDeclarations += createALSFactDeclaration => [ | ||
263 | it.name = support.toID(#["util", "typehierarchy", "elementFull"]) | ||
264 | it.term = types.disjointSets | ||
265 | ] | ||
266 | } | ||
267 | } | ||
268 | /** | ||
269 | * The dynamic types are subtypes of the types where it is defined, but not subtypes where it is not | ||
270 | */ | ||
271 | protected def definedConcreteTypesAreSatisfyingDefinitions(LogicProblem problem, Map<Type,List<Type>> typeToConcreteSubtypes, Logic2AlloyLanguageMapperTrace trace) { | ||
272 | val constraintOnElements = problem.elements.typeConstraints(typeToConcreteSubtypes) | ||
273 | for(constraintOnElement : constraintOnElements.entrySet) { | ||
274 | val element = constraintOnElement.key | ||
275 | val elementSignature = element.lookup(trace.typeTrace.definedElement2Declaration) | ||
276 | val constraint = constraintOnElement.value | ||
277 | |||
278 | var ALSTerm negativeConstraints; | ||
279 | if(constraint.negative.isEmpty) { | ||
280 | negativeConstraints = null | ||
281 | } else { | ||
282 | negativeConstraints = support.unfoldAnd(constraint.negative.map[type| | ||
283 | createALSNot=> [ elementInDefinedType(elementSignature, type, trace) ] | ||
284 | ].toList) | ||
285 | } | ||
286 | |||
287 | var ALSTerm positiveTypeConstraints | ||
288 | if(constraint.positiveCNF.isEmpty) { | ||
289 | positiveTypeConstraints = null | ||
290 | } else { | ||
291 | positiveTypeConstraints = support.unfoldAnd(constraint.positiveCNF.map[ typeConstraintFromDefinition | | ||
292 | support.unfoldOr(typeConstraintFromDefinition.map[type | | ||
293 | elementInDefinedType(elementSignature,type,trace) | ||
294 | ].toList,trace) | ||
295 | ]) | ||
296 | } | ||
297 | |||
298 | var ALSTerm typeConstraint | ||
299 | if(negativeConstraints != null && positiveTypeConstraints == null) { | ||
300 | typeConstraint = negativeConstraints | ||
301 | } else if (negativeConstraints == null && positiveTypeConstraints != null) { | ||
302 | typeConstraint = positiveTypeConstraints | ||
303 | } else if (negativeConstraints != null && positiveTypeConstraints != null) { | ||
304 | val and = createALSAnd | ||
305 | and.leftOperand = positiveTypeConstraints | ||
306 | and.rightOperand = negativeConstraints | ||
307 | typeConstraint = and | ||
308 | } else { | ||
309 | typeConstraint = null | ||
310 | } | ||
311 | |||
312 | if(typeConstraint != null) { | ||
313 | val fact = createALSFactDeclaration => [ | ||
314 | name = support.toIDMultiple(#["util","typehierarchy","definition"],element.name) | ||
315 | ] | ||
316 | fact.term = typeConstraint | ||
317 | trace.specification.factDeclarations +=fact | ||
318 | } | ||
319 | // otherwise there is no type constraint on element | ||
320 | } | ||
321 | } | ||
322 | |||
323 | private def elementInDefinedType( | ||
324 | ALSSignatureDeclaration elementSignature, | ||
325 | Type type, | ||
326 | Logic2AlloyLanguageMapperTrace trace) | ||
327 | { | ||
328 | var ALSSignatureDeclaration signature | ||
329 | if(type instanceof TypeDeclaration) { | ||
330 | if(trace.typeTrace.declaration2definition.containsKey(type)) { | ||
331 | signature = type.lookup(trace.typeTrace.declaration2definition) | ||
332 | } else if(trace.typeTrace.undefined2definition.containsKey(type)) { | ||
333 | signature = type.lookup(trace.typeTrace.undefined2definition) | ||
334 | } else { | ||
335 | return null | ||
336 | } | ||
337 | } else if(type instanceof TypeDefinition) { | ||
338 | if(trace.typeTrace.definition2definition.containsKey(type)) { | ||
339 | signature = type.lookup(trace.typeTrace.definition2definition) | ||
340 | } else { | ||
341 | return null | ||
342 | } | ||
343 | } else throw new IllegalArgumentException('''Unknownt type «type.class.name»''') | ||
344 | |||
345 | val finalSignature = signature | ||
346 | return createALSSubset => [ | ||
347 | leftOperand = createALSReference => [ | ||
348 | referred = elementSignature | ||
349 | ] | ||
350 | rightOperand = createALSReference => [ | ||
351 | referred = finalSignature | ||
352 | ] | ||
353 | ] | ||
354 | } | ||
355 | |||
356 | def private typeToConcreteSubtypes(LogicProblem problem, Logic2AlloyLanguageMapperTrace trace) { | ||
357 | if(trace.incqueryEngine == null) { | ||
358 | trace.incqueryEngine = ViatraQueryEngine.on(new EMFScope(problem)) | ||
359 | } | ||
360 | val matcher = SupertypeStarMatcher.on(trace.incqueryEngine) | ||
361 | val Map<Type,List<Type>> typeToConcreteSubtypes = new HashMap | ||
362 | for(supertype : problem.types) { | ||
363 | typeToConcreteSubtypes.put( | ||
364 | supertype, | ||
365 | matcher.getAllValuesOfsubtype(supertype) | ||
366 | .filter[!it.isIsAbstract].toList) | ||
367 | } | ||
368 | return typeToConcreteSubtypes | ||
369 | } | ||
370 | |||
371 | /** | ||
372 | * Gives type constraints in a form of CNF | ||
373 | */ | ||
374 | def private Map<DefinedElement,DynamicTypeConstraints> typeConstraints(List<DefinedElement> elements, Map<Type,List<Type>> typeToConcreteSubtypes) { | ||
375 | val Map<DefinedElement,DynamicTypeConstraints> constraints = new HashMap | ||
376 | elements.forEach[constraints.put(it,new DynamicTypeConstraints)] | ||
377 | |||
378 | for(type : typeToConcreteSubtypes.keySet.filter(TypeDefinition)) { | ||
379 | val subtypes = type.lookup(typeToConcreteSubtypes) | ||
380 | for(elementInType:type.elements) { | ||
381 | elementInType.lookup(constraints).addPositiveTypeOptions(subtypes) | ||
382 | } | ||
383 | for(elementNotInType:elements.filter[!type.elements.contains(it)]) { | ||
384 | elementNotInType.lookup(constraints).addNegativeTypes(subtypes) | ||
385 | } | ||
386 | } | ||
387 | |||
388 | return constraints | ||
389 | } | ||
390 | |||
391 | private def ALSTerm disjointSets(List<ALSSignatureDeclaration> signatures) { | ||
392 | if(signatures.size >= 2){ | ||
393 | val top = createALSEquals => [ | ||
394 | it.leftOperand = signatures.intersectionOfTypes | ||
395 | it.rightOperand = createALSNone | ||
396 | ] | ||
397 | if(signatures.size > 2) { | ||
398 | return createALSAnd => [ | ||
399 | it.leftOperand = top | ||
400 | it.rightOperand = signatures.subList(1,signatures.size).disjointSets | ||
401 | ] | ||
402 | } else{ | ||
403 | return top | ||
404 | } | ||
405 | } else { | ||
406 | throw new UnsupportedOperationException() | ||
407 | } | ||
408 | } | ||
409 | |||
410 | private def ALSIntersection intersectionOfTypes(List<ALSSignatureDeclaration> signatures) { | ||
411 | if(signatures.size == 2) { | ||
412 | return createALSIntersection => [ | ||
413 | leftOperand = createALSReference => [it.referred = signatures.get(0)] | ||
414 | rightOperand = createALSReference => [it.referred = signatures.get(1)] | ||
415 | ] | ||
416 | } else if(signatures.size > 2) { | ||
417 | return createALSIntersection => [ | ||
418 | leftOperand = createALSReference => [it.referred = signatures.get(0)] | ||
419 | rightOperand = signatures.subList(1,signatures.size).intersectionOfTypes | ||
420 | ] | ||
421 | } else throw new UnsupportedOperationException() | ||
422 | } | ||
423 | |||
424 | |||
425 | override transformTypeReference(ComplexTypeReference complexTypeReference, Logic2AlloyLanguageMapper mapper, Logic2AlloyLanguageMapperTrace trace) { | ||
426 | //trace.typeTrace. | ||
427 | } | ||
428 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_TypeMapper_InheritanceAndHorizontal.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_TypeMapper_InheritanceAndHorizontal.xtend new file mode 100644 index 00000000..6533ad36 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/Logic2AlloyLanguageMapper_TypeMapper_InheritanceAndHorizontal.xtend | |||
@@ -0,0 +1,50 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSSignatureDeclaration | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
9 | import java.util.HashMap | ||
10 | import java.util.Map | ||
11 | import java.util.Collection | ||
12 | |||
13 | class Logic2AlloyLanguageMapper_TypeMapperTrace_InheritanceAndHorizontal implements Logic2AlloyLanguageMapper_TypeMapperTrace { | ||
14 | val Map<TypeDeclaration,ALSSignatureDeclaration> newElementTypes = new HashMap | ||
15 | val Map<Type,ALSSignatureDeclaration> definedElementTypes = new HashMap | ||
16 | var ALSSignatureDeclaration undefinedSupertype | ||
17 | var ALSSignatureDeclaration definedSupertype | ||
18 | } | ||
19 | |||
20 | class Logic2AlloyLanguageMapper_TypeMapper_InheritanceAndHorizontal implements Logic2AlloyLanguageMapper_TypeMapper{ | ||
21 | |||
22 | override transformTypes(Collection<Type> types, Collection<DefinedElement> elements, Logic2AlloyLanguageMapper mapper, Logic2AlloyLanguageMapperTrace trace) { | ||
23 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
24 | } | ||
25 | |||
26 | private def boolean hasDefinedSupertype(Type type) { | ||
27 | if(type instanceof TypeDefinition) { | ||
28 | return true | ||
29 | } else { | ||
30 | if(type.supertypes.empty) return false | ||
31 | else return type.supertypes.exists[it.hasDefinedSupertype] | ||
32 | } | ||
33 | } | ||
34 | |||
35 | override transformTypeReference(Type referred, Logic2AlloyLanguageMapper mapper, Logic2AlloyLanguageMapperTrace trace) { | ||
36 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
37 | } | ||
38 | |||
39 | override getUndefinedSupertype(Logic2AlloyLanguageMapperTrace trace) { | ||
40 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
41 | } | ||
42 | |||
43 | override transformReference(DefinedElement referred, Logic2AlloyLanguageMapperTrace trace) { | ||
44 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
45 | } | ||
46 | |||
47 | override getUndefinedSupertypeScope(int undefinedScope, Logic2AlloyLanguageMapperTrace trace) { | ||
48 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
49 | } | ||
50 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/unused/AlloyModelInterpretation.xtend_ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/unused/AlloyModelInterpretation.xtend_ new file mode 100644 index 00000000..05b97b0c --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/unused/AlloyModelInterpretation.xtend_ | |||
@@ -0,0 +1,212 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import edu.mit.csail.sdg.alloy4compiler.ast.ExprVar | ||
4 | import edu.mit.csail.sdg.alloy4compiler.ast.Sig.Field | ||
5 | import edu.mit.csail.sdg.alloy4compiler.translator.A4Solution | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicModelInterpretation | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDeclaration | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDeclaration | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
14 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | ||
15 | import java.util.Arrays | ||
16 | import java.util.HashMap | ||
17 | import java.util.LinkedList | ||
18 | import java.util.List | ||
19 | import java.util.Map | ||
20 | import java.util.Set | ||
21 | |||
22 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
23 | |||
24 | class AlloyModelInterpretation implements LogicModelInterpretation{ | ||
25 | |||
26 | protected val extension LogiclanguageFactory factory = LogiclanguageFactory.eINSTANCE | ||
27 | //protected val extension LogicProblemBuilder builder = new LogicProblemBuilder | ||
28 | |||
29 | protected val Logic2AlloyLanguageMapper forwardMapper | ||
30 | protected val Logic2AlloyLanguageMapperTrace forwardTrace; | ||
31 | |||
32 | private var ExprVar logicLanguage; | ||
33 | private var String logicBooleanTrue; | ||
34 | private var String logicBooleanFalse; | ||
35 | |||
36 | val Map<String,DefinedElement> alloyAtom2LogicElement = new HashMap | ||
37 | private val Map<TypeDeclaration, List<DefinedElement>> interpretationOfUndefinedType = new HashMap | ||
38 | |||
39 | private val Map<ConstantDeclaration, Object> constant2Value | ||
40 | private val Map<FunctionDeclaration, ? extends Map<ParameterSubstitution, Object>> function2Value | ||
41 | private val Map<RelationDeclaration, ? extends Set<ParameterSubstitution>> relation2Value | ||
42 | |||
43 | private val int minInt | ||
44 | private val int maxInt | ||
45 | |||
46 | public new (A4Solution solution, Logic2AlloyLanguageMapper forwardMapper, Logic2AlloyLanguageMapperTrace trace) { | ||
47 | |||
48 | this.forwardMapper = forwardMapper | ||
49 | this.forwardTrace = trace | ||
50 | |||
51 | //TMP sig maps to identify alloy signatures by their names | ||
52 | val Map<String,Type> sigName2LogicType = | ||
53 | forwardTrace.type2ALSType.keySet.toMap[x|forwardTrace.type2ALSType.get(x).name] | ||
54 | val Map<String,DefinedElement> elementNameNamel2DefinedElement = | ||
55 | forwardTrace.definedElement2Declaration.keySet.toMap[x|forwardTrace.definedElement2Declaration.get(x).name] | ||
56 | |||
57 | // Fill the interpretation map with empty lists | ||
58 | forwardTrace.type2ALSType.keySet.filter(TypeDeclaration).forEach[x|interpretationOfUndefinedType.put(x,new LinkedList)] | ||
59 | |||
60 | // exporing individuals | ||
61 | for(atom: solution.allAtoms) { | ||
62 | val typeName = getName(atom.type) | ||
63 | val atomName = atom.name | ||
64 | //println(atom.toString + " < - " + typeName) | ||
65 | if(typeName == forwardTrace.logicLanguage.name) { | ||
66 | this.logicLanguage = atom | ||
67 | } else if(typeName == "Int" || typeName == "seq/Int") { | ||
68 | // do nothing | ||
69 | } else if(sigName2LogicType.containsKey(typeName) && typeName.lookup(sigName2LogicType) instanceof TypeDefinition) { | ||
70 | val element = elementNameNamel2DefinedElement.get(atomName.head) | ||
71 | alloyAtom2LogicElement.put(atom.label,element) | ||
72 | } else if(sigName2LogicType.containsKey(typeName)) { | ||
73 | val type = sigName2LogicType.get(typeName) | ||
74 | val elementsOfType = interpretationOfUndefinedType.get(type) | ||
75 | val element = createDefinedElement => [ | ||
76 | it.name += type.name | ||
77 | it.name += (elementsOfType.size+1).toString | ||
78 | ] | ||
79 | alloyAtom2LogicElement.put(atom.label,element) | ||
80 | elementsOfType+=element | ||
81 | } else if(forwardTrace.boolType != null && typeName == forwardTrace.boolType.name) { | ||
82 | if(atomName.head == forwardTrace.boolTrue.name) { this.logicBooleanTrue = atom.label } | ||
83 | else if(atomName.head == forwardTrace.boolFalse.name) { this.logicBooleanFalse = atom.label} | ||
84 | else throw new UnsupportedOperationException('''Unknown boolean value: «atom»''') | ||
85 | } | ||
86 | else throw new UnsupportedOperationException('''Unknown atom: «atom»''') | ||
87 | } | ||
88 | |||
89 | //TMP field maps | ||
90 | val Map<String, Field> name2AlloyField = new HashMap | ||
91 | // exploring signatures | ||
92 | for(sig:solution.allReachableSigs) { | ||
93 | for(field : sig.fields) { | ||
94 | name2AlloyField.put(field.label,field) | ||
95 | } | ||
96 | } | ||
97 | |||
98 | // eval consants | ||
99 | constant2Value = forwardTrace.constantDeclaration2LanguageField.mapValues[ | ||
100 | solution.eval(it.name.lookup(name2AlloyField)).head.atom(1).atomLabel2Term | ||
101 | ] | ||
102 | // eval functions | ||
103 | val hostedfunction2Value = forwardTrace.functionDeclaration2HostedField.mapValues[ function | | ||
104 | newHashMap( | ||
105 | solution.eval(function.name.lookup(name2AlloyField)) | ||
106 | .map[t | new ParameterSubstitution(#[t.atom(0).atomLabel2Term]) -> t.atom(1).atomLabel2Term])] | ||
107 | |||
108 | val globalfunction2Value = forwardTrace.functionDeclaration2LanguageField.keySet.toInvertedMap[ function | | ||
109 | val alsFunction = function.lookup(forwardTrace.functionDeclaration2LanguageField) | ||
110 | val paramIndexes = 1..(function.parameters.size) | ||
111 | return newHashMap( | ||
112 | solution.eval(alsFunction.name.lookup(name2AlloyField)).map[t | | ||
113 | new ParameterSubstitution(paramIndexes.map[t.atom(it).atomLabel2Term]) | ||
114 | -> | ||
115 | t.atom(function.parameters.size + 1).atomLabel2Term | ||
116 | ])] | ||
117 | this.function2Value = Union(hostedfunction2Value,globalfunction2Value) | ||
118 | // eval relations | ||
119 | val hostedRelation2Value = forwardTrace.relationDeclaration2Field.mapValues[ relation | | ||
120 | solution.eval(relation.name.lookup(name2AlloyField)).map[ t | | ||
121 | new ParameterSubstitution(#[t.atom(0).atomLabel2Term,t.atom(1).atomLabel2Term])].toSet] | ||
122 | val globalRelation2Value = forwardTrace.relationDeclaration2Global.mapValues[ relation | | ||
123 | solution.eval(relation.name.lookup(name2AlloyField)).map[ t | | ||
124 | new ParameterSubstitution((1..<t.arity).map[int a|t.atom(a).atomLabel2Term])].toSet] | ||
125 | this.relation2Value = Union(hostedRelation2Value,globalRelation2Value) | ||
126 | |||
127 | //Int limits | ||
128 | this.minInt = solution.min | ||
129 | this.maxInt = solution.max | ||
130 | |||
131 | |||
132 | } | ||
133 | |||
134 | def print() { | ||
135 | println('''Elements-----''') | ||
136 | interpretationOfUndefinedType.forEach[k,v|println('''«k.name» -> «v»''')] | ||
137 | |||
138 | println('''Constants-----''') | ||
139 | constant2Value.forEach[k, v|println('''«k.name» : «v»''')] | ||
140 | println('''Functions-----''') | ||
141 | function2Value.forEach[f,m|m.forEach[k,v| println('''«f.name» : «k» |-> «v»''')]] | ||
142 | println('''Relations-----''') | ||
143 | relation2Value.forEach[r,s|s.forEach[t | println('''«r.name»: («t»)''')]] | ||
144 | } | ||
145 | |||
146 | def private getName(edu.mit.csail.sdg.alloy4compiler.ast.Type type) { | ||
147 | val name = type.toString | ||
148 | if(name.startsWith("{this/") && name.endsWith("}")) { | ||
149 | return type.toString.replaceFirst("\\{this\\/","").replace("}","") | ||
150 | } | ||
151 | else throw new IllegalArgumentException('''Unknown type format: "«name»"!''') | ||
152 | } | ||
153 | def private getName(ExprVar atom) { atom.toString.split("\\$") } | ||
154 | |||
155 | override getElements(Type type) { getElementsDispatch(type) } | ||
156 | def private dispatch getElementsDispatch(TypeDeclaration declaration) { return declaration.lookup(this.interpretationOfUndefinedType) } | ||
157 | def private dispatch getElementsDispatch(TypeDefinition declaration) { return declaration.elements } | ||
158 | |||
159 | override getInterpretation(FunctionDeclaration function, Object[] parameterSubstitution) { | ||
160 | val transformedParams = new ParameterSubstitution(parameterSubstitution) | ||
161 | return transformedParams.lookup( | ||
162 | function.lookup(this.function2Value) | ||
163 | ) | ||
164 | } | ||
165 | |||
166 | override getInterpretation(RelationDeclaration relation, Object[] parameterSubstitution) { | ||
167 | relation.lookup(this.relation2Value).contains(new ParameterSubstitution(parameterSubstitution)) | ||
168 | } | ||
169 | |||
170 | override getInterpretation(ConstantDeclaration constant) { | ||
171 | constant.lookup(this.constant2Value) | ||
172 | } | ||
173 | |||
174 | override getMinimalInteger() { this.minInt } | ||
175 | override getMaximalInteger() { this.maxInt } | ||
176 | |||
177 | // Alloy term -> logic term | ||
178 | def private atomLabel2Term(String label) { | ||
179 | if(label.number) return Integer.parseInt(label) | ||
180 | else if(label == this.logicBooleanTrue) return true | ||
181 | else if(label == this.logicBooleanFalse) return false | ||
182 | else if(this.alloyAtom2LogicElement.containsKey(label)) return label.lookup(alloyAtom2LogicElement) | ||
183 | else throw new IllegalArgumentException('''Unknown atom label: "«label»"!''') | ||
184 | } | ||
185 | def isNumber(String s) { | ||
186 | try{ | ||
187 | Integer.parseInt(s) | ||
188 | return true | ||
189 | }catch(NumberFormatException e) { | ||
190 | return false | ||
191 | } | ||
192 | } | ||
193 | } | ||
194 | |||
195 | class ParameterSubstitution{ | ||
196 | val Object[] data; | ||
197 | |||
198 | new(Object[] data) { this.data = data } | ||
199 | |||
200 | override equals(Object obj) { | ||
201 | if(obj === this) return true | ||
202 | else if(obj == null) return false | ||
203 | if(obj instanceof ParameterSubstitution) { | ||
204 | return Arrays.equals(this.data,obj.data) | ||
205 | } | ||
206 | return false | ||
207 | } | ||
208 | |||
209 | override hashCode() { | ||
210 | Arrays.hashCode(data) | ||
211 | } | ||
212 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/unused/FunctionWithTimeout.xtend_ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/unused/FunctionWithTimeout.xtend_ new file mode 100644 index 00000000..8c03af6e --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/unused/FunctionWithTimeout.xtend_ | |||
@@ -0,0 +1,40 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import org.eclipse.xtext.xbase.lib.Functions.Function0 | ||
4 | import java.util.concurrent.Executors | ||
5 | import java.util.concurrent.Callable | ||
6 | import java.util.concurrent.TimeUnit | ||
7 | import java.util.concurrent.TimeoutException | ||
8 | import java.util.concurrent.ExecutionException | ||
9 | |||
10 | class FunctionWithTimeout<Type> { | ||
11 | val Function0<Type> function; | ||
12 | |||
13 | new(Function0<Type> function) { | ||
14 | this.function = function | ||
15 | } | ||
16 | |||
17 | def execute(long millisecs) { | ||
18 | if(millisecs>0) { | ||
19 | val executor = Executors.newCachedThreadPool(); | ||
20 | val task = new Callable<Type>() { | ||
21 | override Type call() { function.apply } | ||
22 | }; | ||
23 | val future = executor.submit(task); | ||
24 | try { | ||
25 | val result = future.get(millisecs, TimeUnit.MILLISECONDS); | ||
26 | return result | ||
27 | } catch (TimeoutException ex) { | ||
28 | // handle the timeout | ||
29 | } catch (InterruptedException e) { | ||
30 | // handle the interrupts | ||
31 | } catch (ExecutionException e) { | ||
32 | // handle other exceptions | ||
33 | } finally { | ||
34 | future.cancel(true); // may or may not desire this | ||
35 | } | ||
36 | return null | ||
37 | } | ||
38 | else return function.apply | ||
39 | } | ||
40 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/unused/Logic2AlloyApiMapper.xtend_ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/unused/Logic2AlloyApiMapper.xtend_ new file mode 100644 index 00000000..29acd681 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/unused/Logic2AlloyApiMapper.xtend_ | |||
@@ -0,0 +1,345 @@ | |||
1 | package hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder | ||
2 | |||
3 | import java.util.Map | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
6 | import java.util.List | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolTypeReference | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntTypeReference | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealTypeReference | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference | ||
11 | import edu.mit.csail.sdg.alloy4compiler.ast.ExprConstant | ||
12 | import edu.mit.csail.sdg.alloy4compiler.ast.Expr | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Assertion | ||
14 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolLiteral | ||
15 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntLiteral | ||
16 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Variable | ||
17 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Not | ||
18 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.And | ||
19 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Or | ||
20 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Impl | ||
21 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Iff | ||
22 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.MoreThan | ||
23 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LessThan | ||
24 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.MoreOrEqualThan | ||
25 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LessOrEqualThan | ||
26 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Equals | ||
27 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Plus | ||
28 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Minus | ||
29 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Multiply | ||
30 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Divison | ||
31 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Mod | ||
32 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Forall | ||
33 | import java.util.HashMap | ||
34 | import edu.mit.csail.sdg.alloy4compiler.ast.Decl | ||
35 | import java.util.ArrayList | ||
36 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Exists | ||
37 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealLiteral | ||
38 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
39 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
40 | import edu.mit.csail.sdg.alloy4compiler.ast.Attr | ||
41 | import edu.mit.csail.sdg.alloy4compiler.ast.Sig.PrimSig | ||
42 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
43 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Term | ||
44 | import javax.naming.OperationNotSupportedException | ||
45 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.SymbolicValue | ||
46 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Constant | ||
47 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.alloylanguage.AlloySpecification | ||
48 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.alloylanguage.Multiplicity | ||
49 | import hu.bme.mit.inf.dlsreasoner.alloy.reasoner.alloylanguage.InverseReference | ||
50 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | ||
51 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
52 | |||
53 | class AlloyInput{ | ||
54 | public val List<PrimSig> typeDeclarations=new ArrayList | ||
55 | public val List<Expr> functionDeclarations=new ArrayList | ||
56 | public val List<Expr> assertions=new ArrayList | ||
57 | public val List<Expr> multiplicityConstraints=new ArrayList | ||
58 | public val List<Expr> inverseConstraints=new ArrayList | ||
59 | } | ||
60 | |||
61 | class Logic2AlloyApiMapperTrace { | ||
62 | val Map<Type, PrimSig> typeMap | ||
63 | val Map<DefinedElement, PrimSig> elementMap | ||
64 | //val Map<Function, SMTFunctionDeclaration> functionMap | ||
65 | val Map<Relation,Expr> relationMap | ||
66 | //val Map<Constant,SMTFunctionDeclaration> constantMap | ||
67 | |||
68 | new () { | ||
69 | this.typeMap = new HashMap | ||
70 | this.elementMap = new HashMap | ||
71 | //this.functionMap = new HashMap | ||
72 | this.relationMap = new HashMap | ||
73 | //this.constantMap = new HashMap | ||
74 | } | ||
75 | new (Map<Type, PrimSig> typeMap, | ||
76 | Map<DefinedElement, PrimSig> elementMap, | ||
77 | //Map<Function, SMTFunctionDeclaration> functionMap, | ||
78 | Map<Relation,Expr> relationMap/*, | ||
79 | Map<Constant,SMTFunctionDeclaration> constantMap*/) | ||
80 | { | ||
81 | this.typeMap = typeMap | ||
82 | this.elementMap = elementMap | ||
83 | //this.functionMap = functionMap | ||
84 | this.relationMap = relationMap | ||
85 | //this.constantMap = constantMap | ||
86 | } | ||
87 | |||
88 | def types() { typeMap } | ||
89 | def elements() { elementMap } | ||
90 | //def functions() { functionMap } | ||
91 | def relations() { relationMap } | ||
92 | //def constants() { constantMap } | ||
93 | } | ||
94 | |||
95 | class Logic2AlloyApiMapper{ | ||
96 | //TODO output | ||
97 | public def TracedOutput<List<PrimSig>, Logic2AlloyApiMapperTrace> transformProblem(LogicProblem problem) { | ||
98 | val documentInput = new AlloyInput() | ||
99 | //createSMTInput => [satCommand = createSMTSimpleSatCommand getModelCommand = createSMTGetModelCommand] | ||
100 | //val document = createSMTDocument => [input = documentInput] | ||
101 | val List<PrimSig> document=new ArrayList | ||
102 | val trace = new Logic2AlloyApiMapperTrace | ||
103 | |||
104 | // Trafo | ||
105 | documentInput.typeDeclarations += problem.types.map[transformType(trace)] | ||
106 | //documentInput.functionDeclarations += problem.functions.map[transformFunction(trace)] | ||
107 | documentInput.functionDeclarations += problem.relations.map[transformRelation(trace)] | ||
108 | //documentInput.functionDeclarations += problem.constants.map[transformConstant(trace)] | ||
109 | documentInput.assertions += problem.assertions.map[transformAssertion(trace)] | ||
110 | |||
111 | |||
112 | val alloySpecification = problem.specifications.filter(AlloySpecification).head | ||
113 | |||
114 | for(mult: alloySpecification.multiplicities){ | ||
115 | if(mult.min>0){ | ||
116 | documentInput.multiplicityConstraints+=mult.transformMultiplicityLowerBound(trace) | ||
117 | } | ||
118 | if(mult.max!=-1){ | ||
119 | documentInput.multiplicityConstraints+=mult.transformMultiplicityUpperBound(trace) | ||
120 | } | ||
121 | } | ||
122 | |||
123 | for(inv: alloySpecification.inverses){ | ||
124 | documentInput.inverseConstraints += inv.transformInverse(trace) | ||
125 | } | ||
126 | // End trafo | ||
127 | |||
128 | return new TracedOutput(document,trace) | ||
129 | } | ||
130 | |||
131 | def Expr transformMultiplicityLowerBound(Multiplicity multiplicity, Logic2AlloyApiMapperTrace trace){ | ||
132 | |||
133 | val Decl forallVariable=(trace.relations.get(multiplicity.multiplicityOf)).oneOf("o") as Decl | ||
134 | return (forallVariable.get.cardinality.gte(ExprConstant.makeNUMBER(multiplicity.min))).forAll(forallVariable) | ||
135 | |||
136 | } | ||
137 | |||
138 | def Expr transformMultiplicityUpperBound(Multiplicity multiplicity, Logic2AlloyApiMapperTrace trace){ | ||
139 | |||
140 | val Decl forallVariable=(trace.relations.get(multiplicity.multiplicityOf)).oneOf("o") as Decl | ||
141 | return (forallVariable.get.cardinality.lte(ExprConstant.makeNUMBER(multiplicity.max))).forAll(forallVariable) | ||
142 | |||
143 | } | ||
144 | |||
145 | def Expr transformInverse(InverseReference inverse, Logic2AlloyApiMapperTrace trace){ | ||
146 | return trace.relations.get(inverse.inverseOf.get(0)).equal(trace.relations.get(inverse.inverseOf.get(1)).transpose) | ||
147 | } | ||
148 | |||
149 | private def toID(List<String> names) {names.join("!") } | ||
150 | |||
151 | def dispatch protected transformType(TypeDefinition declaration, Logic2AlloyApiMapperTrace trace) { | ||
152 | val result = new PrimSig(declaration.name.toID, Attr.ABSTRACT) | ||
153 | trace.types.put(declaration,result) | ||
154 | return result | ||
155 | } | ||
156 | |||
157 | def protected transformDefinedElement(TypeDefinition enumType, DefinedElement element, Logic2AlloyApiMapperTrace trace) { | ||
158 | val result=new PrimSig(element.name.toID, trace.types.get(enumType), Attr.ONE) | ||
159 | trace.elements.put(element,result) | ||
160 | return result | ||
161 | } | ||
162 | |||
163 | def dispatch protected transformType(TypeDeclaration declaration, Logic2AlloyApiMapperTrace trace) { | ||
164 | //TODO �r�kles, absztrakt | ||
165 | val result = new PrimSig(declaration.name.toID) | ||
166 | trace.types.put(declaration,result) | ||
167 | return result | ||
168 | } | ||
169 | |||
170 | def dispatch protected transformTypeReference(BoolTypeReference boolTypeReference, Logic2AlloyApiMapperTrace trace) { | ||
171 | throw new UnsupportedOperationException("BoolTypeReference is not supported.") | ||
172 | } | ||
173 | def dispatch protected transformTypeReference(IntTypeReference intTypeReference, Logic2AlloyApiMapperTrace trace) { | ||
174 | return PrimSig.SIGINT | ||
175 | } | ||
176 | def dispatch protected transformTypeReference(RealTypeReference realTypeReference, Logic2AlloyApiMapperTrace trace) { | ||
177 | throw new UnsupportedOperationException("RealTypeReference is not supported.") | ||
178 | } | ||
179 | def dispatch protected PrimSig transformTypeReference(ComplexTypeReference complexTypeReference, Logic2AlloyApiMapperTrace trace) { | ||
180 | return trace.types.get(complexTypeReference.referred) | ||
181 | } | ||
182 | |||
183 | /*def protected transformFunction(Function declaration, Logic2AlloyApiMapperTrace trace) { | ||
184 | val functionDeclaration = createSMTFunctionDeclaration => [ | ||
185 | name = declaration.name.toID | ||
186 | range = declaration.range.transformTypeReference(trace) | ||
187 | parameters+= declaration.parameters.map[transformTypeReference(trace)] | ||
188 | ] | ||
189 | trace.functions.put(declaration,functionDeclaration) | ||
190 | return functionDeclaration | ||
191 | }*/ | ||
192 | |||
193 | def transformRelation(Relation relation, Logic2AlloyApiMapperTrace trace) { | ||
194 | if(relation.parameters.size==2){ | ||
195 | trace.relations.put(relation,(relation.parameters.get(0).transformTypeReference(trace) as PrimSig).addField(relation.name.toID, (relation.parameters.get(1).transformTypeReference(trace) as PrimSig).setOf)) | ||
196 | } else{ | ||
197 | throw new OperationNotSupportedException("More parameters are not supported.") | ||
198 | } | ||
199 | } | ||
200 | |||
201 | /*def transformConstant(Constant constant, Logic2AlloyApiMapperTrace trace) { | ||
202 | val smtConstant = createSMTFunctionDeclaration => [ | ||
203 | name = constant.name.toID | ||
204 | range = transformTypeReference(constant.type, trace) | ||
205 | ] | ||
206 | trace.constants.put(constant,smtConstant) | ||
207 | return smtConstant | ||
208 | }*/ | ||
209 | |||
210 | def protected Expr transformAssertion(Assertion assertion, Logic2AlloyApiMapperTrace trace) { | ||
211 | |||
212 | return assertion.value.transformTerm(trace,emptyMap) | ||
213 | } | ||
214 | |||
215 | def dispatch protected Expr transformTerm(BoolLiteral literal, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
216 | throw new UnsupportedOperationException("Bool is not supported") | ||
217 | //open util/boolean, autoPay: Bool | ||
218 | //https://code.google.com/p/valloy2009/source/browse/trunk/src/models/util/boolean.als?r=142 | ||
219 | } | ||
220 | def dispatch protected Expr transformTerm(IntLiteral literal, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
221 | return ExprConstant.makeNUMBER(literal.value) | ||
222 | } | ||
223 | def dispatch protected Expr transformTerm(RealLiteral literal, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
224 | throw new UnsupportedOperationException("Real number is not supported") | ||
225 | } | ||
226 | def dispatch protected Expr transformTerm(Not not, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
227 | return not.operand.transformTerm(trace,variables).not} | ||
228 | def dispatch protected Expr transformTerm(And and, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
229 | val List<Expr> operands= and.operands.map[transformTerm(trace,variables)] | ||
230 | var andTerm=operands.get(0) | ||
231 | for(Integer i: 1..(operands.size-1)){ | ||
232 | andTerm=andTerm.and(operands.get(i)) | ||
233 | } | ||
234 | return andTerm | ||
235 | } | ||
236 | def dispatch protected Expr transformTerm(Or or, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
237 | val List<Expr> operands= or.operands.map[transformTerm(trace,variables)] | ||
238 | var orTerm=operands.get(0) | ||
239 | for(Integer i: 1..(operands.size-1)){ | ||
240 | orTerm=orTerm.or(operands.get(i)) | ||
241 | } | ||
242 | return orTerm | ||
243 | } | ||
244 | def dispatch protected Expr transformTerm(Impl impl, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
245 | return impl.leftOperand.transformTerm(trace,variables).implies(impl.rightOperand.transformTerm(trace,variables)) | ||
246 | } | ||
247 | def dispatch protected Expr transformTerm(Iff ifExpression, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
248 | return ifExpression.leftOperand.transformTerm(trace,variables).iff(ifExpression.rightOperand.transformTerm(trace,variables)) | ||
249 | } | ||
250 | def dispatch protected Expr transformTerm(MoreThan moreThan, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
251 | return moreThan.leftOperand.transformTerm(trace,variables).gt(moreThan.rightOperand.transformTerm(trace,variables)) | ||
252 | } | ||
253 | def dispatch protected Expr transformTerm(LessThan lessThan, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
254 | return lessThan.leftOperand.transformTerm(trace,variables).lt(lessThan.rightOperand.transformTerm(trace,variables)) | ||
255 | } | ||
256 | def dispatch protected Expr transformTerm(MoreOrEqualThan moreThan, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
257 | return moreThan.leftOperand.transformTerm(trace,variables).gte(moreThan.rightOperand.transformTerm(trace,variables)) | ||
258 | } | ||
259 | def dispatch protected Expr transformTerm(LessOrEqualThan lessThan, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
260 | return lessThan.leftOperand.transformTerm(trace,variables).lte(lessThan.rightOperand.transformTerm(trace,variables)) | ||
261 | } | ||
262 | def dispatch protected Expr transformTerm(Equals equals, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
263 | return equals.leftOperand.transformTerm(trace,variables).equal(equals.rightOperand.transformTerm(trace,variables)) | ||
264 | } | ||
265 | /*def dispatch protected Expr transformTerm(Distinct distinct, Logic2AlloyApiMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
266 | createSMTDistinct => [ operands += distinct.operands.map[transformTerm(trace,variables)]]}*/ | ||
267 | def dispatch protected Expr transformTerm(Plus plus, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
268 | return plus.leftOperand.transformTerm(trace,variables).plus(plus.rightOperand.transformTerm(trace,variables)) | ||
269 | } | ||
270 | def dispatch protected Expr transformTerm(Minus minus, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
271 | return minus.leftOperand.transformTerm(trace,variables).minus(minus.rightOperand.transformTerm(trace,variables)) | ||
272 | } | ||
273 | def dispatch protected Expr transformTerm(Multiply multiply, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
274 | return multiply.leftOperand.transformTerm(trace,variables).mul(multiply.rightOperand.transformTerm(trace,variables)) | ||
275 | } | ||
276 | def dispatch protected Expr transformTerm(Divison div, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
277 | return div.leftOperand.transformTerm(trace,variables).div(div.rightOperand.transformTerm(trace,variables)) | ||
278 | } | ||
279 | def dispatch protected Expr transformTerm(Mod mod, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
280 | throw new UnsupportedOperationException("Modulo is not supported.") | ||
281 | } | ||
282 | def dispatch protected Expr transformTerm(Forall forall, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
283 | return configureForall(forall,trace,variables) | ||
284 | } | ||
285 | def dispatch protected Expr transformTerm(Exists exists, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
286 | return configureExists(exists,trace,variables) | ||
287 | } | ||
288 | def dispatch protected Expr transformTerm(SymbolicValue symbolicValue, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
289 | symbolicValue.symbolicReference.transformSymbolicReference(symbolicValue.parameterSubstitutions,trace,variables) } | ||
290 | |||
291 | def private configureForall( | ||
292 | Forall quantifiedExpression, | ||
293 | Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) | ||
294 | { | ||
295 | val allVariables = new HashMap(variables) | ||
296 | val newAlloyVariables = new ArrayList<Decl>(quantifiedExpression.quantifiedVariables.size) | ||
297 | |||
298 | for(logicVariable: quantifiedExpression.quantifiedVariables) { | ||
299 | val newAlloyVariable = (logicVariable.range.transformTypeReference(trace)).oneOf(logicVariable.name.toID) as Decl | ||
300 | allVariables.put(logicVariable, newAlloyVariable) | ||
301 | newAlloyVariables += newAlloyVariable | ||
302 | } | ||
303 | val variable0=newAlloyVariables.get(0) | ||
304 | newAlloyVariables.remove(0) | ||
305 | return (quantifiedExpression.expression.transformTerm(trace,allVariables)).forAll(variable0, newAlloyVariables) | ||
306 | } | ||
307 | |||
308 | def private configureExists( | ||
309 | Exists quantifiedExpression, | ||
310 | Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) | ||
311 | { | ||
312 | val allVariables = new HashMap(variables) | ||
313 | val newAlloyVariables = new ArrayList<Decl>(quantifiedExpression.quantifiedVariables.size) | ||
314 | |||
315 | for(logicVariable: quantifiedExpression.quantifiedVariables) { | ||
316 | val newAlloyVariable = (logicVariable.range.transformTypeReference(trace)).oneOf(logicVariable.name.toID) as Decl | ||
317 | allVariables.put(logicVariable, newAlloyVariable) | ||
318 | newAlloyVariables += newAlloyVariable | ||
319 | } | ||
320 | val variable0=newAlloyVariables.get(0) | ||
321 | newAlloyVariables.remove(0) | ||
322 | return (quantifiedExpression.expression.transformTerm(trace,allVariables)).forSome(variable0, newAlloyVariables) | ||
323 | } | ||
324 | |||
325 | def dispatch protected Expr transformSymbolicReference(DefinedElement referred, List<Term> parameterSubstitutions, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
326 | return trace.elements.get(referred) | ||
327 | } | ||
328 | def dispatch protected Expr transformSymbolicReference(Variable variable, List<Term> parameterSubstitutions, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
329 | return variables.get(variable).get | ||
330 | } | ||
331 | /*def dispatch protected Expr transformSymbolicReference(Function function, List<Term> parameterSubstitutions, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
332 | val result = createSMTSymbolicValue => [sv | sv.symbolicReference = trace.functions.get(function)] | ||
333 | for(paramSubstitution : parameterSubstitutions) { | ||
334 | result.parameterSubstitutions.add(paramSubstitution.transformTerm(trace,variables)) | ||
335 | } | ||
336 | return result | ||
337 | }*/ | ||
338 | def dispatch protected Expr transformSymbolicReference(Relation relation, List<Term> parameterSubstitutions, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
339 | return trace.relations.get(relation) | ||
340 | } | ||
341 | def dispatch protected Expr transformSymbolicReference(Constant constant, List<Term> parameterSubstitutions, Logic2AlloyApiMapperTrace trace, Map<Variable, Decl> variables) { | ||
342 | //createSMTSymbolicValue => [symbolicReference = trace.constants.get(constant)] | ||
343 | throw new UnsupportedOperationException("Constant is not supported") | ||
344 | } | ||
345 | } \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/unused/oldTypes b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/unused/oldTypes new file mode 100644 index 00000000..5e349ac8 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/unused/oldTypes | |||
@@ -0,0 +1,74 @@ | |||
1 | /*def dispatch boolean hasDeclaredElement(TypeDefinition type) { return false; } | ||
2 | def dispatch boolean hasDeclaredElement(TypeDeclaration type) { | ||
3 | if(type.isAbstract) { | ||
4 | type.subtypes.exists[it.hasDeclaredElement] | ||
5 | } else return true; | ||
6 | } | ||
7 | |||
8 | def dispatch List<TypeDefinition> allEnumSubtypes(TypeDefinition type) { return #[type] } | ||
9 | def dispatch List<TypeDefinition> allEnumSubtypes(TypeDeclaration type) { | ||
10 | return type.subtypes.map[it.allEnumSubtypes].flatten.toList | ||
11 | } | ||
12 | |||
13 | def protected transformTypes(List<Type> types, Logic2AlloyLanguageMapperTrace trace) { | ||
14 | val Map<TypeDeclaration,ALSSignatureDeclaration> signatureTrace = new HashMap; | ||
15 | |||
16 | // Creating the root type | ||
17 | val objectType = createALSSignatureDeclaration => [ name=#["util","object"].toID it.abstract = true ] | ||
18 | trace.objectSupperClass = objectType | ||
19 | trace.specification.typeDeclarations += objectType | ||
20 | |||
21 | // Creating the images of the types | ||
22 | for(type : types) { | ||
23 | if(type instanceof TypeDefinition) { | ||
24 | if(type.elements.empty) { | ||
25 | trace.type2ALSType.put(type,#[]); | ||
26 | } else { | ||
27 | val e = createALSEnumDeclaration => [ | ||
28 | it.name = type.name.toID | ||
29 | it.literal += type.elements.map[transformDefinedElement(trace)] | ||
30 | ] | ||
31 | trace.type2ALSType.put(type,#[e]) | ||
32 | trace.specification.typeDeclarations += e | ||
33 | } | ||
34 | } | ||
35 | else if(type instanceof TypeDeclaration) { | ||
36 | if(hasDeclaredElement(type)) { | ||
37 | val s = createALSSignatureDeclaration => [ | ||
38 | name=type.name.toID | ||
39 | it.abstract = type.isIsAbstract | ||
40 | ] | ||
41 | trace.type2ALSType.put(type,new LinkedList=>[add(s)]) | ||
42 | signatureTrace.put(type, s) | ||
43 | trace.specification.typeDeclarations += s | ||
44 | } | ||
45 | else { | ||
46 | signatureTrace.put(type, null) | ||
47 | trace.type2ALSType.put(type,new LinkedList);// empty | ||
48 | } | ||
49 | } | ||
50 | else throw new IllegalArgumentException('''Unknown type «type.class.name»''') | ||
51 | } | ||
52 | |||
53 | |||
54 | for(type: types.filter(TypeDeclaration)) { | ||
55 | // Adding inheritance | ||
56 | val s = type.lookup(signatureTrace) | ||
57 | if(s!=null) { | ||
58 | for(supertype : type.supertypes) { | ||
59 | s.supertype += (supertype as TypeDeclaration).lookup(signatureTrace) | ||
60 | } | ||
61 | if(type.supertypes.empty) { | ||
62 | s.supertype += objectType | ||
63 | } | ||
64 | } | ||
65 | // Adding enum subtypes | ||
66 | type.lookup(trace.type2ALSType)+=type.allEnumSubtypes.map[it.lookup(trace.type2ALSType)].flatten | ||
67 | } | ||
68 | } | ||
69 | |||
70 | def protected transformDefinedElement(DefinedElement element, Logic2AlloyLanguageMapperTrace trace) { | ||
71 | val result = createALSEnumLiteral => [name = element.name.toID] | ||
72 | trace.definedElement2EnumProperty.put(element,result) | ||
73 | return result | ||
74 | }*/ \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.classpath b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.classpath new file mode 100644 index 00000000..f5ffadb8 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.classpath | |||
@@ -0,0 +1,9 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <classpath> | ||
3 | <classpathentry kind="src" path="src"/> | ||
4 | <classpathentry kind="src" path="src-gen"/> | ||
5 | <classpathentry kind="src" path="xtend-gen"/> | ||
6 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> | ||
7 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
8 | <classpathentry kind="output" path="bin"/> | ||
9 | </classpath> | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.gitignore b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.gitignore new file mode 100644 index 00000000..8ae4e44d --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.gitignore | |||
@@ -0,0 +1,4 @@ | |||
1 | /bin/ | ||
2 | /src-gen/ | ||
3 | /vql-gen/ | ||
4 | /xtend-gen/ | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.project b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.project new file mode 100644 index 00000000..25768d12 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.project | |||
@@ -0,0 +1,34 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <projectDescription> | ||
3 | <name>hu.bme.mit.inf.dslreasoner.alloy.language.ui</name> | ||
4 | <comment></comment> | ||
5 | <projects> | ||
6 | </projects> | ||
7 | <buildSpec> | ||
8 | <buildCommand> | ||
9 | <name>org.eclipse.jdt.core.javabuilder</name> | ||
10 | <arguments> | ||
11 | </arguments> | ||
12 | </buildCommand> | ||
13 | <buildCommand> | ||
14 | <name>org.eclipse.pde.ManifestBuilder</name> | ||
15 | <arguments> | ||
16 | </arguments> | ||
17 | </buildCommand> | ||
18 | <buildCommand> | ||
19 | <name>org.eclipse.pde.SchemaBuilder</name> | ||
20 | <arguments> | ||
21 | </arguments> | ||
22 | </buildCommand> | ||
23 | <buildCommand> | ||
24 | <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
25 | <arguments> | ||
26 | </arguments> | ||
27 | </buildCommand> | ||
28 | </buildSpec> | ||
29 | <natures> | ||
30 | <nature>org.eclipse.jdt.core.javanature</nature> | ||
31 | <nature>org.eclipse.pde.PluginNature</nature> | ||
32 | <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
33 | </natures> | ||
34 | </projectDescription> | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.settings/org.eclipse.core.resources.prefs b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..4824b802 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.settings/org.eclipse.core.resources.prefs | |||
@@ -0,0 +1,2 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | encoding/<project>=UTF-8 | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.settings/org.eclipse.jdt.core.prefs b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..11f6e462 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/.settings/org.eclipse.jdt.core.prefs | |||
@@ -0,0 +1,7 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 | ||
4 | org.eclipse.jdt.core.compiler.compliance=1.7 | ||
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
7 | org.eclipse.jdt.core.compiler.source=1.7 | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/META-INF/MANIFEST.MF b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/META-INF/MANIFEST.MF new file mode 100644 index 00000000..a6ff6ade --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/META-INF/MANIFEST.MF | |||
@@ -0,0 +1,27 @@ | |||
1 | Manifest-Version: 1.0 | ||
2 | Bundle-ManifestVersion: 2 | ||
3 | Bundle-Name: hu.bme.mit.inf.dslreasoner.alloy.language.ui | ||
4 | Bundle-Vendor: My Company | ||
5 | Bundle-Version: 1.0.0.qualifier | ||
6 | Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.alloy.language.ui; singleton:=true | ||
7 | Bundle-ActivationPolicy: lazy | ||
8 | Require-Bundle: hu.bme.mit.inf.dslreasoner.alloy.language;visibility:=reexport, | ||
9 | org.eclipse.xtext.ui, | ||
10 | org.eclipse.ui.editors;bundle-version="3.5.0", | ||
11 | org.eclipse.ui.ide;bundle-version="3.5.0", | ||
12 | org.eclipse.xtext.ui.shared, | ||
13 | org.eclipse.ui, | ||
14 | org.eclipse.xtext.builder, | ||
15 | org.eclipse.xtext.xbase.lib, | ||
16 | org.antlr.runtime, | ||
17 | org.eclipse.xtext.common.types.ui, | ||
18 | org.eclipse.xtext.ui.codetemplates.ui, | ||
19 | org.eclipse.compare | ||
20 | Import-Package: org.apache.log4j | ||
21 | Bundle-RequiredExecutionEnvironment: JavaSE-1.7 | ||
22 | Export-Package: hu.bme.mit.inf.dslreasoner.ui.quickfix, | ||
23 | hu.bme.mit.inf.dslreasoner.ui.contentassist, | ||
24 | hu.bme.mit.inf.dslreasoner.ui.contentassist.antlr, | ||
25 | hu.bme.mit.inf.dslreasoner.ui.internal, | ||
26 | hu.bme.mit.inf.dslreasoner.ui.contentassist.antlr.internal | ||
27 | Bundle-Activator: hu.bme.mit.inf.dslreasoner.ui.internal.AlloyLanguageActivator | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/build.properties b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/build.properties new file mode 100644 index 00000000..31255ed0 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/build.properties | |||
@@ -0,0 +1,6 @@ | |||
1 | source.. = src/,\ | ||
2 | src-gen/,\ | ||
3 | xtend-gen/ | ||
4 | bin.includes = META-INF/,\ | ||
5 | .,\ | ||
6 | plugin.xml \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/plugin.xml b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/plugin.xml new file mode 100644 index 00000000..962a70ce --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/plugin.xml | |||
@@ -0,0 +1,398 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <?eclipse version="3.0"?> | ||
3 | |||
4 | <plugin> | ||
5 | |||
6 | <extension | ||
7 | point="org.eclipse.ui.editors"> | ||
8 | <editor | ||
9 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor" | ||
10 | contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor" | ||
11 | default="true" | ||
12 | extensions="als" | ||
13 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
14 | name="AlloyLanguage Editor"> | ||
15 | </editor> | ||
16 | </extension> | ||
17 | <extension | ||
18 | point="org.eclipse.ui.handlers"> | ||
19 | <handler | ||
20 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler" | ||
21 | commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration"> | ||
22 | <activeWhen> | ||
23 | <reference | ||
24 | definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
25 | </reference> | ||
26 | </activeWhen> | ||
27 | </handler> | ||
28 | <handler | ||
29 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler" | ||
30 | commandId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.validate"> | ||
31 | <activeWhen> | ||
32 | <reference | ||
33 | definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
34 | </reference> | ||
35 | </activeWhen> | ||
36 | </handler> | ||
37 | <!-- copy qualified name --> | ||
38 | <handler | ||
39 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler" | ||
40 | commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"> | ||
41 | <activeWhen> | ||
42 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened" /> | ||
43 | </activeWhen> | ||
44 | </handler> | ||
45 | <handler | ||
46 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler" | ||
47 | commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"> | ||
48 | <activeWhen> | ||
49 | <and> | ||
50 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.XtextEditor.opened" /> | ||
51 | <iterate> | ||
52 | <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> | ||
53 | </iterate> | ||
54 | </and> | ||
55 | </activeWhen> | ||
56 | </handler> | ||
57 | </extension> | ||
58 | <extension point="org.eclipse.core.expressions.definitions"> | ||
59 | <definition id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
60 | <and> | ||
61 | <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/> | ||
62 | <with variable="activeEditor"> | ||
63 | <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" | ||
64 | value="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
65 | forcePluginActivation="true"/> | ||
66 | </with> | ||
67 | </and> | ||
68 | </definition> | ||
69 | <definition id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.XtextEditor.opened"> | ||
70 | <and> | ||
71 | <reference definitionId="isXtextEditorActive"/> | ||
72 | <with variable="activeEditor"> | ||
73 | <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" | ||
74 | value="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
75 | forcePluginActivation="true"/> | ||
76 | </with> | ||
77 | </and> | ||
78 | </definition> | ||
79 | </extension> | ||
80 | <extension | ||
81 | point="org.eclipse.ui.preferencePages"> | ||
82 | <page | ||
83 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" | ||
84 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
85 | name="AlloyLanguage"> | ||
86 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage"/> | ||
87 | </page> | ||
88 | <page | ||
89 | category="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
90 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage" | ||
91 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.coloring" | ||
92 | name="Syntax Coloring"> | ||
93 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage"/> | ||
94 | </page> | ||
95 | <page | ||
96 | category="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
97 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage" | ||
98 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.templates" | ||
99 | name="Templates"> | ||
100 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage"/> | ||
101 | </page> | ||
102 | </extension> | ||
103 | <extension | ||
104 | point="org.eclipse.ui.propertyPages"> | ||
105 | <page | ||
106 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" | ||
107 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
108 | name="AlloyLanguage"> | ||
109 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage"/> | ||
110 | <enabledWhen> | ||
111 | <adapt type="org.eclipse.core.resources.IProject"/> | ||
112 | </enabledWhen> | ||
113 | <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> | ||
114 | </page> | ||
115 | </extension> | ||
116 | <extension | ||
117 | point="org.eclipse.ui.keywords"> | ||
118 | <keyword | ||
119 | id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage" | ||
120 | label="AlloyLanguage"/> | ||
121 | </extension> | ||
122 | <extension | ||
123 | point="org.eclipse.ui.commands"> | ||
124 | <command | ||
125 | description="Trigger expensive validation" | ||
126 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.validate" | ||
127 | name="Validate"> | ||
128 | </command> | ||
129 | <!-- copy qualified name --> | ||
130 | <command | ||
131 | id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" | ||
132 | categoryId="org.eclipse.ui.category.edit" | ||
133 | description="Copy the qualified name for the selected element" | ||
134 | name="Copy Qualified Name"> | ||
135 | </command> | ||
136 | <command | ||
137 | id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" | ||
138 | categoryId="org.eclipse.ui.category.edit" | ||
139 | description="Copy the qualified name for the selected element" | ||
140 | name="Copy Qualified Name"> | ||
141 | </command> | ||
142 | </extension> | ||
143 | <extension point="org.eclipse.ui.menus"> | ||
144 | <menuContribution | ||
145 | locationURI="popup:#TextEditorContext?after=group.edit"> | ||
146 | <command | ||
147 | commandId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.validate" | ||
148 | style="push" | ||
149 | tooltip="Trigger expensive validation"> | ||
150 | <visibleWhen checkEnabled="false"> | ||
151 | <reference | ||
152 | definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
153 | </reference> | ||
154 | </visibleWhen> | ||
155 | </command> | ||
156 | </menuContribution> | ||
157 | <!-- copy qualified name --> | ||
158 | <menuContribution locationURI="popup:#TextEditorContext?after=copy"> | ||
159 | <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" | ||
160 | style="push" tooltip="Copy Qualified Name"> | ||
161 | <visibleWhen checkEnabled="false"> | ||
162 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened" /> | ||
163 | </visibleWhen> | ||
164 | </command> | ||
165 | </menuContribution> | ||
166 | <menuContribution locationURI="menu:edit?after=copy"> | ||
167 | <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" | ||
168 | style="push" tooltip="Copy Qualified Name"> | ||
169 | <visibleWhen checkEnabled="false"> | ||
170 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened" /> | ||
171 | </visibleWhen> | ||
172 | </command> | ||
173 | </menuContribution> | ||
174 | <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions"> | ||
175 | <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" | ||
176 | style="push" tooltip="Copy Qualified Name"> | ||
177 | <visibleWhen checkEnabled="false"> | ||
178 | <and> | ||
179 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.XtextEditor.opened" /> | ||
180 | <iterate> | ||
181 | <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> | ||
182 | </iterate> | ||
183 | </and> | ||
184 | </visibleWhen> | ||
185 | </command> | ||
186 | </menuContribution> | ||
187 | </extension> | ||
188 | <extension point="org.eclipse.ui.menus"> | ||
189 | <menuContribution locationURI="popup:#TextEditorContext?endof=group.find"> | ||
190 | <command commandId="org.eclipse.xtext.ui.editor.FindReferences"> | ||
191 | <visibleWhen checkEnabled="false"> | ||
192 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
193 | </reference> | ||
194 | </visibleWhen> | ||
195 | </command> | ||
196 | </menuContribution> | ||
197 | </extension> | ||
198 | <extension point="org.eclipse.ui.handlers"> | ||
199 | <handler | ||
200 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler" | ||
201 | commandId="org.eclipse.xtext.ui.editor.FindReferences"> | ||
202 | <activeWhen> | ||
203 | <reference | ||
204 | definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
205 | </reference> | ||
206 | </activeWhen> | ||
207 | </handler> | ||
208 | </extension> | ||
209 | |||
210 | <!-- adding resource factories --> | ||
211 | |||
212 | <extension | ||
213 | point="org.eclipse.emf.ecore.extension_parser"> | ||
214 | <parser | ||
215 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory" | ||
216 | type="als"> | ||
217 | </parser> | ||
218 | </extension> | ||
219 | <extension point="org.eclipse.xtext.extension_resourceServiceProvider"> | ||
220 | <resourceServiceProvider | ||
221 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider" | ||
222 | uriExtension="als"> | ||
223 | </resourceServiceProvider> | ||
224 | </extension> | ||
225 | |||
226 | |||
227 | <!-- marker definitions for hu.bme.mit.inf.dslreasoner.AlloyLanguage --> | ||
228 | <extension | ||
229 | id="alloylanguage.check.fast" | ||
230 | name="AlloyLanguage Problem" | ||
231 | point="org.eclipse.core.resources.markers"> | ||
232 | <super type="org.eclipse.xtext.ui.check.fast"/> | ||
233 | <persistent value="true"/> | ||
234 | </extension> | ||
235 | <extension | ||
236 | id="alloylanguage.check.normal" | ||
237 | name="AlloyLanguage Problem" | ||
238 | point="org.eclipse.core.resources.markers"> | ||
239 | <super type="org.eclipse.xtext.ui.check.normal"/> | ||
240 | <persistent value="true"/> | ||
241 | </extension> | ||
242 | <extension | ||
243 | id="alloylanguage.check.expensive" | ||
244 | name="AlloyLanguage Problem" | ||
245 | point="org.eclipse.core.resources.markers"> | ||
246 | <super type="org.eclipse.xtext.ui.check.expensive"/> | ||
247 | <persistent value="true"/> | ||
248 | </extension> | ||
249 | |||
250 | <extension | ||
251 | point="org.eclipse.xtext.builder.participant"> | ||
252 | <participant | ||
253 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant" | ||
254 | fileExtensions="als" | ||
255 | > | ||
256 | </participant> | ||
257 | </extension> | ||
258 | <extension | ||
259 | point="org.eclipse.ui.preferencePages"> | ||
260 | <page | ||
261 | category="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
262 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" | ||
263 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.compiler.preferencePage" | ||
264 | name="Compiler"> | ||
265 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage"/> | ||
266 | </page> | ||
267 | </extension> | ||
268 | <extension | ||
269 | point="org.eclipse.ui.propertyPages"> | ||
270 | <page | ||
271 | category="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
272 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" | ||
273 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.compiler.propertyPage" | ||
274 | name="Compiler"> | ||
275 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage"/> | ||
276 | <enabledWhen> | ||
277 | <adapt type="org.eclipse.core.resources.IProject"/> | ||
278 | </enabledWhen> | ||
279 | <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> | ||
280 | </page> | ||
281 | </extension> | ||
282 | |||
283 | <!-- Quick Outline --> | ||
284 | <extension | ||
285 | point="org.eclipse.ui.handlers"> | ||
286 | <handler | ||
287 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler" | ||
288 | commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"> | ||
289 | <activeWhen> | ||
290 | <reference | ||
291 | definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
292 | </reference> | ||
293 | </activeWhen> | ||
294 | </handler> | ||
295 | </extension> | ||
296 | <extension | ||
297 | point="org.eclipse.ui.commands"> | ||
298 | <command | ||
299 | description="Open the quick outline." | ||
300 | id="org.eclipse.xtext.ui.editor.outline.QuickOutline" | ||
301 | name="Quick Outline"> | ||
302 | </command> | ||
303 | </extension> | ||
304 | <extension point="org.eclipse.ui.menus"> | ||
305 | <menuContribution | ||
306 | locationURI="popup:#TextEditorContext?after=group.open"> | ||
307 | <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline" | ||
308 | style="push" | ||
309 | tooltip="Open Quick Outline"> | ||
310 | <visibleWhen checkEnabled="false"> | ||
311 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"/> | ||
312 | </visibleWhen> | ||
313 | </command> | ||
314 | </menuContribution> | ||
315 | </extension> | ||
316 | <!-- quickfix marker resolution generator for hu.bme.mit.inf.dslreasoner.AlloyLanguage --> | ||
317 | <extension | ||
318 | point="org.eclipse.ui.ide.markerResolution"> | ||
319 | <markerResolutionGenerator | ||
320 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" | ||
321 | markerType="hu.bme.mit.inf.dslreasoner.ui.alloylanguage.check.fast"> | ||
322 | <attribute | ||
323 | name="FIXABLE_KEY" | ||
324 | value="true"> | ||
325 | </attribute> | ||
326 | </markerResolutionGenerator> | ||
327 | <markerResolutionGenerator | ||
328 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" | ||
329 | markerType="hu.bme.mit.inf.dslreasoner.ui.alloylanguage.check.normal"> | ||
330 | <attribute | ||
331 | name="FIXABLE_KEY" | ||
332 | value="true"> | ||
333 | </attribute> | ||
334 | </markerResolutionGenerator> | ||
335 | <markerResolutionGenerator | ||
336 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" | ||
337 | markerType="hu.bme.mit.inf.dslreasoner.ui.alloylanguage.check.expensive"> | ||
338 | <attribute | ||
339 | name="FIXABLE_KEY" | ||
340 | value="true"> | ||
341 | </attribute> | ||
342 | </markerResolutionGenerator> | ||
343 | </extension> | ||
344 | <!-- Rename Refactoring --> | ||
345 | <extension point="org.eclipse.ui.handlers"> | ||
346 | <handler | ||
347 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler" | ||
348 | commandId="org.eclipse.xtext.ui.refactoring.RenameElement"> | ||
349 | <activeWhen> | ||
350 | <reference | ||
351 | definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
352 | </reference> | ||
353 | </activeWhen> | ||
354 | </handler> | ||
355 | </extension> | ||
356 | <extension point="org.eclipse.ui.menus"> | ||
357 | <menuContribution | ||
358 | locationURI="popup:#TextEditorContext?after=group.edit"> | ||
359 | <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement" | ||
360 | style="push"> | ||
361 | <visibleWhen checkEnabled="false"> | ||
362 | <reference | ||
363 | definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
364 | </reference> | ||
365 | </visibleWhen> | ||
366 | </command> | ||
367 | </menuContribution> | ||
368 | </extension> | ||
369 | <extension point="org.eclipse.ui.preferencePages"> | ||
370 | <page | ||
371 | category="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
372 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage" | ||
373 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.refactoring" | ||
374 | name="Refactoring"> | ||
375 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage"/> | ||
376 | </page> | ||
377 | </extension> | ||
378 | |||
379 | <extension point="org.eclipse.compare.contentViewers"> | ||
380 | <viewer id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.compare.contentViewers" | ||
381 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator" | ||
382 | extensions="als"> | ||
383 | </viewer> | ||
384 | </extension> | ||
385 | <extension point="org.eclipse.compare.contentMergeViewers"> | ||
386 | <viewer id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.compare.contentMergeViewers" | ||
387 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator" | ||
388 | extensions="als" label="AlloyLanguage Compare"> | ||
389 | </viewer> | ||
390 | </extension> | ||
391 | <extension point="org.eclipse.ui.editors.documentProviders"> | ||
392 | <provider id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.editors.documentProviders" | ||
393 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider" | ||
394 | extensions="als"> | ||
395 | </provider> | ||
396 | </extension> | ||
397 | |||
398 | </plugin> | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/plugin.xml_gen b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/plugin.xml_gen new file mode 100644 index 00000000..634f234b --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/plugin.xml_gen | |||
@@ -0,0 +1,425 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <?eclipse version="3.0"?> | ||
3 | |||
4 | <plugin> | ||
5 | |||
6 | <extension | ||
7 | point="org.eclipse.ui.editors"> | ||
8 | <editor | ||
9 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor" | ||
10 | contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor" | ||
11 | default="true" | ||
12 | extensions="als" | ||
13 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
14 | name="AlloyLanguage Editor"> | ||
15 | </editor> | ||
16 | </extension> | ||
17 | <extension | ||
18 | point="org.eclipse.ui.handlers"> | ||
19 | <handler | ||
20 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler" | ||
21 | commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration"> | ||
22 | <activeWhen> | ||
23 | <reference | ||
24 | definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
25 | </reference> | ||
26 | </activeWhen> | ||
27 | </handler> | ||
28 | <handler | ||
29 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler" | ||
30 | commandId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.validate"> | ||
31 | <activeWhen> | ||
32 | <reference | ||
33 | definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
34 | </reference> | ||
35 | </activeWhen> | ||
36 | </handler> | ||
37 | <!-- copy qualified name --> | ||
38 | <handler | ||
39 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler" | ||
40 | commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"> | ||
41 | <activeWhen> | ||
42 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened" /> | ||
43 | </activeWhen> | ||
44 | </handler> | ||
45 | <handler | ||
46 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler" | ||
47 | commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"> | ||
48 | <activeWhen> | ||
49 | <and> | ||
50 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.XtextEditor.opened" /> | ||
51 | <iterate> | ||
52 | <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> | ||
53 | </iterate> | ||
54 | </and> | ||
55 | </activeWhen> | ||
56 | </handler> | ||
57 | </extension> | ||
58 | <extension point="org.eclipse.core.expressions.definitions"> | ||
59 | <definition id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
60 | <and> | ||
61 | <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/> | ||
62 | <with variable="activeEditor"> | ||
63 | <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" | ||
64 | value="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
65 | forcePluginActivation="true"/> | ||
66 | </with> | ||
67 | </and> | ||
68 | </definition> | ||
69 | <definition id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.XtextEditor.opened"> | ||
70 | <and> | ||
71 | <reference definitionId="isXtextEditorActive"/> | ||
72 | <with variable="activeEditor"> | ||
73 | <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" | ||
74 | value="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
75 | forcePluginActivation="true"/> | ||
76 | </with> | ||
77 | </and> | ||
78 | </definition> | ||
79 | </extension> | ||
80 | <extension | ||
81 | point="org.eclipse.ui.preferencePages"> | ||
82 | <page | ||
83 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" | ||
84 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
85 | name="AlloyLanguage"> | ||
86 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage"/> | ||
87 | </page> | ||
88 | <page | ||
89 | category="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
90 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage" | ||
91 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.coloring" | ||
92 | name="Syntax Coloring"> | ||
93 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage"/> | ||
94 | </page> | ||
95 | <page | ||
96 | category="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
97 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage" | ||
98 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.templates" | ||
99 | name="Templates"> | ||
100 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage"/> | ||
101 | </page> | ||
102 | </extension> | ||
103 | <extension | ||
104 | point="org.eclipse.ui.propertyPages"> | ||
105 | <page | ||
106 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" | ||
107 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
108 | name="AlloyLanguage"> | ||
109 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage"/> | ||
110 | <enabledWhen> | ||
111 | <adapt type="org.eclipse.core.resources.IProject"/> | ||
112 | </enabledWhen> | ||
113 | <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> | ||
114 | </page> | ||
115 | </extension> | ||
116 | <extension | ||
117 | point="org.eclipse.ui.keywords"> | ||
118 | <keyword | ||
119 | id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage" | ||
120 | label="AlloyLanguage"/> | ||
121 | </extension> | ||
122 | <extension | ||
123 | point="org.eclipse.ui.commands"> | ||
124 | <command | ||
125 | description="Trigger expensive validation" | ||
126 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.validate" | ||
127 | name="Validate"> | ||
128 | </command> | ||
129 | <!-- copy qualified name --> | ||
130 | <command | ||
131 | id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" | ||
132 | categoryId="org.eclipse.ui.category.edit" | ||
133 | description="Copy the qualified name for the selected element" | ||
134 | name="Copy Qualified Name"> | ||
135 | </command> | ||
136 | <command | ||
137 | id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" | ||
138 | categoryId="org.eclipse.ui.category.edit" | ||
139 | description="Copy the qualified name for the selected element" | ||
140 | name="Copy Qualified Name"> | ||
141 | </command> | ||
142 | </extension> | ||
143 | <extension point="org.eclipse.ui.menus"> | ||
144 | <menuContribution | ||
145 | locationURI="popup:#TextEditorContext?after=group.edit"> | ||
146 | <command | ||
147 | commandId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.validate" | ||
148 | style="push" | ||
149 | tooltip="Trigger expensive validation"> | ||
150 | <visibleWhen checkEnabled="false"> | ||
151 | <reference | ||
152 | definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
153 | </reference> | ||
154 | </visibleWhen> | ||
155 | </command> | ||
156 | </menuContribution> | ||
157 | <!-- copy qualified name --> | ||
158 | <menuContribution locationURI="popup:#TextEditorContext?after=copy"> | ||
159 | <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" | ||
160 | style="push" tooltip="Copy Qualified Name"> | ||
161 | <visibleWhen checkEnabled="false"> | ||
162 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened" /> | ||
163 | </visibleWhen> | ||
164 | </command> | ||
165 | </menuContribution> | ||
166 | <menuContribution locationURI="menu:edit?after=copy"> | ||
167 | <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" | ||
168 | style="push" tooltip="Copy Qualified Name"> | ||
169 | <visibleWhen checkEnabled="false"> | ||
170 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened" /> | ||
171 | </visibleWhen> | ||
172 | </command> | ||
173 | </menuContribution> | ||
174 | <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions"> | ||
175 | <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" | ||
176 | style="push" tooltip="Copy Qualified Name"> | ||
177 | <visibleWhen checkEnabled="false"> | ||
178 | <and> | ||
179 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.XtextEditor.opened" /> | ||
180 | <iterate> | ||
181 | <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> | ||
182 | </iterate> | ||
183 | </and> | ||
184 | </visibleWhen> | ||
185 | </command> | ||
186 | </menuContribution> | ||
187 | </extension> | ||
188 | <extension point="org.eclipse.ui.menus"> | ||
189 | <menuContribution locationURI="popup:#TextEditorContext?endof=group.find"> | ||
190 | <command commandId="org.eclipse.xtext.ui.editor.FindReferences"> | ||
191 | <visibleWhen checkEnabled="false"> | ||
192 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
193 | </reference> | ||
194 | </visibleWhen> | ||
195 | </command> | ||
196 | </menuContribution> | ||
197 | </extension> | ||
198 | <extension point="org.eclipse.ui.handlers"> | ||
199 | <handler | ||
200 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler" | ||
201 | commandId="org.eclipse.xtext.ui.editor.FindReferences"> | ||
202 | <activeWhen> | ||
203 | <reference | ||
204 | definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
205 | </reference> | ||
206 | </activeWhen> | ||
207 | </handler> | ||
208 | </extension> | ||
209 | |||
210 | <!-- adding resource factories --> | ||
211 | |||
212 | <extension | ||
213 | point="org.eclipse.emf.ecore.extension_parser"> | ||
214 | <parser | ||
215 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory" | ||
216 | type="als"> | ||
217 | </parser> | ||
218 | </extension> | ||
219 | <extension point="org.eclipse.xtext.extension_resourceServiceProvider"> | ||
220 | <resourceServiceProvider | ||
221 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider" | ||
222 | uriExtension="als"> | ||
223 | </resourceServiceProvider> | ||
224 | </extension> | ||
225 | |||
226 | |||
227 | <!-- marker definitions for hu.bme.mit.inf.dslreasoner.AlloyLanguage --> | ||
228 | <extension | ||
229 | id="alloylanguage.check.fast" | ||
230 | name="AlloyLanguage Problem" | ||
231 | point="org.eclipse.core.resources.markers"> | ||
232 | <super type="org.eclipse.xtext.ui.check.fast"/> | ||
233 | <persistent value="true"/> | ||
234 | </extension> | ||
235 | <extension | ||
236 | id="alloylanguage.check.normal" | ||
237 | name="AlloyLanguage Problem" | ||
238 | point="org.eclipse.core.resources.markers"> | ||
239 | <super type="org.eclipse.xtext.ui.check.normal"/> | ||
240 | <persistent value="true"/> | ||
241 | </extension> | ||
242 | <extension | ||
243 | id="alloylanguage.check.expensive" | ||
244 | name="AlloyLanguage Problem" | ||
245 | point="org.eclipse.core.resources.markers"> | ||
246 | <super type="org.eclipse.xtext.ui.check.expensive"/> | ||
247 | <persistent value="true"/> | ||
248 | </extension> | ||
249 | |||
250 | <extension | ||
251 | point="org.eclipse.xtext.builder.participant"> | ||
252 | <participant | ||
253 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant" | ||
254 | fileExtensions="als" | ||
255 | > | ||
256 | </participant> | ||
257 | </extension> | ||
258 | <extension | ||
259 | point="org.eclipse.ui.preferencePages"> | ||
260 | <page | ||
261 | category="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
262 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" | ||
263 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.compiler.preferencePage" | ||
264 | name="Compiler"> | ||
265 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage"/> | ||
266 | </page> | ||
267 | </extension> | ||
268 | <extension | ||
269 | point="org.eclipse.ui.propertyPages"> | ||
270 | <page | ||
271 | category="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
272 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" | ||
273 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.compiler.propertyPage" | ||
274 | name="Compiler"> | ||
275 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage"/> | ||
276 | <enabledWhen> | ||
277 | <adapt type="org.eclipse.core.resources.IProject"/> | ||
278 | </enabledWhen> | ||
279 | <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> | ||
280 | </page> | ||
281 | </extension> | ||
282 | <extension point="org.eclipse.ui.menus"> | ||
283 | <menuContribution locationURI="popup:#TextEditorContext?after=xtext.ui.openDeclaration"> | ||
284 | <command | ||
285 | commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand" | ||
286 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.OpenGeneratedCode" | ||
287 | style="push"> | ||
288 | <visibleWhen checkEnabled="false"> | ||
289 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened" /> | ||
290 | </visibleWhen> | ||
291 | </command> | ||
292 | </menuContribution> | ||
293 | </extension> | ||
294 | <extension point="org.eclipse.ui.handlers"> | ||
295 | <handler | ||
296 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler" | ||
297 | commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand"> | ||
298 | <activeWhen> | ||
299 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened" /> | ||
300 | </activeWhen> | ||
301 | </handler> | ||
302 | </extension> | ||
303 | |||
304 | <!-- Quick Outline --> | ||
305 | <extension | ||
306 | point="org.eclipse.ui.handlers"> | ||
307 | <handler | ||
308 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler" | ||
309 | commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"> | ||
310 | <activeWhen> | ||
311 | <reference | ||
312 | definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
313 | </reference> | ||
314 | </activeWhen> | ||
315 | </handler> | ||
316 | </extension> | ||
317 | <extension | ||
318 | point="org.eclipse.ui.commands"> | ||
319 | <command | ||
320 | description="Open the quick outline." | ||
321 | id="org.eclipse.xtext.ui.editor.outline.QuickOutline" | ||
322 | name="Quick Outline"> | ||
323 | </command> | ||
324 | </extension> | ||
325 | <extension point="org.eclipse.ui.menus"> | ||
326 | <menuContribution | ||
327 | locationURI="popup:#TextEditorContext?after=group.open"> | ||
328 | <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline" | ||
329 | style="push" | ||
330 | tooltip="Open Quick Outline"> | ||
331 | <visibleWhen checkEnabled="false"> | ||
332 | <reference definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"/> | ||
333 | </visibleWhen> | ||
334 | </command> | ||
335 | </menuContribution> | ||
336 | </extension> | ||
337 | <!-- quickfix marker resolution generator for hu.bme.mit.inf.dslreasoner.AlloyLanguage --> | ||
338 | <extension | ||
339 | point="org.eclipse.ui.ide.markerResolution"> | ||
340 | <markerResolutionGenerator | ||
341 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" | ||
342 | markerType="hu.bme.mit.inf.dslreasoner.ui.alloylanguage.check.fast"> | ||
343 | <attribute | ||
344 | name="FIXABLE_KEY" | ||
345 | value="true"> | ||
346 | </attribute> | ||
347 | </markerResolutionGenerator> | ||
348 | <markerResolutionGenerator | ||
349 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" | ||
350 | markerType="hu.bme.mit.inf.dslreasoner.ui.alloylanguage.check.normal"> | ||
351 | <attribute | ||
352 | name="FIXABLE_KEY" | ||
353 | value="true"> | ||
354 | </attribute> | ||
355 | </markerResolutionGenerator> | ||
356 | <markerResolutionGenerator | ||
357 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" | ||
358 | markerType="hu.bme.mit.inf.dslreasoner.ui.alloylanguage.check.expensive"> | ||
359 | <attribute | ||
360 | name="FIXABLE_KEY" | ||
361 | value="true"> | ||
362 | </attribute> | ||
363 | </markerResolutionGenerator> | ||
364 | </extension> | ||
365 | <!-- Rename Refactoring --> | ||
366 | <extension point="org.eclipse.ui.handlers"> | ||
367 | <handler | ||
368 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler" | ||
369 | commandId="org.eclipse.xtext.ui.refactoring.RenameElement"> | ||
370 | <activeWhen> | ||
371 | <reference | ||
372 | definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
373 | </reference> | ||
374 | </activeWhen> | ||
375 | </handler> | ||
376 | </extension> | ||
377 | <extension point="org.eclipse.ui.menus"> | ||
378 | <menuContribution | ||
379 | locationURI="popup:#TextEditorContext?after=group.edit"> | ||
380 | <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement" | ||
381 | style="push"> | ||
382 | <visibleWhen checkEnabled="false"> | ||
383 | <reference | ||
384 | definitionId="hu.bme.mit.inf.dslreasoner.AlloyLanguage.Editor.opened"> | ||
385 | </reference> | ||
386 | </visibleWhen> | ||
387 | </command> | ||
388 | </menuContribution> | ||
389 | </extension> | ||
390 | <extension point="org.eclipse.ui.preferencePages"> | ||
391 | <page | ||
392 | category="hu.bme.mit.inf.dslreasoner.AlloyLanguage" | ||
393 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage" | ||
394 | id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.refactoring" | ||
395 | name="Refactoring"> | ||
396 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_AlloyLanguage"/> | ||
397 | </page> | ||
398 | </extension> | ||
399 | |||
400 | <extension point="org.eclipse.compare.contentViewers"> | ||
401 | <viewer id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.compare.contentViewers" | ||
402 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator" | ||
403 | extensions="als"> | ||
404 | </viewer> | ||
405 | </extension> | ||
406 | <extension point="org.eclipse.compare.contentMergeViewers"> | ||
407 | <viewer id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.compare.contentMergeViewers" | ||
408 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator" | ||
409 | extensions="als" label="AlloyLanguage Compare"> | ||
410 | </viewer> | ||
411 | </extension> | ||
412 | <extension point="org.eclipse.ui.editors.documentProviders"> | ||
413 | <provider id="hu.bme.mit.inf.dslreasoner.AlloyLanguage.editors.documentProviders" | ||
414 | class="hu.bme.mit.inf.dslreasoner.ui.AlloyLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider" | ||
415 | extensions="als"> | ||
416 | </provider> | ||
417 | </extension> | ||
418 | <extension point="org.eclipse.team.core.fileTypes"> | ||
419 | <fileTypes | ||
420 | extension="als" | ||
421 | type="text"> | ||
422 | </fileTypes> | ||
423 | </extension> | ||
424 | |||
425 | </plugin> | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/AlloyLanguageUiModule.java b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/AlloyLanguageUiModule.java new file mode 100644 index 00000000..20d083e6 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/AlloyLanguageUiModule.java | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.ui; | ||
5 | |||
6 | import org.eclipse.ui.plugin.AbstractUIPlugin; | ||
7 | |||
8 | /** | ||
9 | * Use this class to register components to be used within the IDE. | ||
10 | */ | ||
11 | public class AlloyLanguageUiModule extends hu.bme.mit.inf.dslreasoner.ui.AbstractAlloyLanguageUiModule { | ||
12 | public AlloyLanguageUiModule(AbstractUIPlugin plugin) { | ||
13 | super(plugin); | ||
14 | } | ||
15 | } | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/contentassist/AlloyLanguageProposalProvider.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/contentassist/AlloyLanguageProposalProvider.xtend new file mode 100644 index 00000000..cf8d33f8 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/contentassist/AlloyLanguageProposalProvider.xtend | |||
@@ -0,0 +1,12 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.ui.contentassist | ||
5 | |||
6 | import hu.bme.mit.inf.dslreasoner.ui.contentassist.AbstractAlloyLanguageProposalProvider | ||
7 | |||
8 | /** | ||
9 | * see http://www.eclipse.org/Xtext/documentation.html#contentAssist on how to customize content assistant | ||
10 | */ | ||
11 | class AlloyLanguageProposalProvider extends AbstractAlloyLanguageProposalProvider { | ||
12 | } | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/labeling/AlloyLanguageDescriptionLabelProvider.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/labeling/AlloyLanguageDescriptionLabelProvider.xtend new file mode 100644 index 00000000..89bb0f87 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/labeling/AlloyLanguageDescriptionLabelProvider.xtend | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.ui.labeling | ||
5 | |||
6 | //import org.eclipse.xtext.resource.IEObjectDescription | ||
7 | |||
8 | /** | ||
9 | * Provides labels for a IEObjectDescriptions and IResourceDescriptions. | ||
10 | * | ||
11 | * see http://www.eclipse.org/Xtext/documentation.html#labelProvider | ||
12 | */ | ||
13 | class AlloyLanguageDescriptionLabelProvider extends org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider { | ||
14 | |||
15 | // Labels and icons can be computed like this: | ||
16 | |||
17 | // override text(IEObjectDescription ele) { | ||
18 | // ele.name.toString | ||
19 | // } | ||
20 | // | ||
21 | // override image(IEObjectDescription ele) { | ||
22 | // ele.EClass.name + '.gif' | ||
23 | // } | ||
24 | } | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/labeling/AlloyLanguageLabelProvider.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/labeling/AlloyLanguageLabelProvider.xtend new file mode 100644 index 00000000..6f002921 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/labeling/AlloyLanguageLabelProvider.xtend | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.ui.labeling | ||
5 | |||
6 | import com.google.inject.Inject | ||
7 | |||
8 | /** | ||
9 | * Provides labels for a EObjects. | ||
10 | * | ||
11 | * see http://www.eclipse.org/Xtext/documentation.html#labelProvider | ||
12 | */ | ||
13 | class AlloyLanguageLabelProvider extends org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider { | ||
14 | |||
15 | @Inject | ||
16 | new(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider delegate) { | ||
17 | super(delegate); | ||
18 | } | ||
19 | |||
20 | // Labels and icons can be computed like this: | ||
21 | |||
22 | // def text(Greeting ele) { | ||
23 | // 'A greeting to ' + ele.name | ||
24 | // } | ||
25 | // | ||
26 | // def image(Greeting ele) { | ||
27 | // 'Greeting.gif' | ||
28 | // } | ||
29 | } | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/outline/AlloyLanguageOutlineTreeProvider.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/outline/AlloyLanguageOutlineTreeProvider.xtend new file mode 100644 index 00000000..fe3fef9d --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/outline/AlloyLanguageOutlineTreeProvider.xtend | |||
@@ -0,0 +1,13 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.ui.outline | ||
5 | |||
6 | /** | ||
7 | * Customization of the default outline structure. | ||
8 | * | ||
9 | * see http://www.eclipse.org/Xtext/documentation.html#outline | ||
10 | */ | ||
11 | class AlloyLanguageOutlineTreeProvider extends org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider { | ||
12 | |||
13 | } | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/quickfix/AlloyLanguageQuickfixProvider.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/quickfix/AlloyLanguageQuickfixProvider.xtend new file mode 100644 index 00000000..3e329e62 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/quickfix/AlloyLanguageQuickfixProvider.xtend | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.ui.quickfix | ||
5 | |||
6 | //import org.eclipse.xtext.ui.editor.quickfix.Fix | ||
7 | //import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionAcceptor | ||
8 | //import org.eclipse.xtext.validation.Issue | ||
9 | |||
10 | /** | ||
11 | * Custom quickfixes. | ||
12 | * | ||
13 | * see http://www.eclipse.org/Xtext/documentation.html#quickfixes | ||
14 | */ | ||
15 | class AlloyLanguageQuickfixProvider extends org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider { | ||
16 | |||
17 | // @Fix(MyDslValidator::INVALID_NAME) | ||
18 | // def capitalizeName(Issue issue, IssueResolutionAcceptor acceptor) { | ||
19 | // acceptor.accept(issue, 'Capitalize name', 'Capitalize the name.', 'upcase.png') [ | ||
20 | // context | | ||
21 | // val xtextDocument = context.xtextDocument | ||
22 | // val firstLetter = xtextDocument.get(issue.offset, 1) | ||
23 | // xtextDocument.replace(issue.offset, 1, firstLetter.toUpperCase) | ||
24 | // ] | ||
25 | // } | ||
26 | } | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.classpath b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.classpath new file mode 100644 index 00000000..5c568755 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.classpath | |||
@@ -0,0 +1,9 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <classpath> | ||
3 | <classpathentry kind="src" path="src"/> | ||
4 | <classpathentry kind="src" path="src-gen"/> | ||
5 | <classpathentry kind="src" path="xtend-gen"/> | ||
6 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
7 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
8 | <classpathentry kind="output" path="bin"/> | ||
9 | </classpath> | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.gitignore b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.gitignore new file mode 100644 index 00000000..8ae4e44d --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.gitignore | |||
@@ -0,0 +1,4 @@ | |||
1 | /bin/ | ||
2 | /src-gen/ | ||
3 | /vql-gen/ | ||
4 | /xtend-gen/ | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.launch/Generate Language Infrastructure (hu.bme.mit.inf.dslreasoner.alloy.language).launch b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.launch/Generate Language Infrastructure (hu.bme.mit.inf.dslreasoner.alloy.language).launch new file mode 100644 index 00000000..77031bf1 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.launch/Generate Language Infrastructure (hu.bme.mit.inf.dslreasoner.alloy.language).launch | |||
@@ -0,0 +1,18 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | <launchConfiguration type="org.eclipse.emf.mwe2.launch.Mwe2LaunchConfigurationType"> | ||
3 | <stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1299248699643_13" label="working set" name="working set"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/hu.bme.mit.inf.dslreasoner.alloy.language" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/hu.bme.mit.inf.dslreasoner.alloy.language.generator" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/hu.bme.mit.inf.dslreasoner.alloy.language.tests" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/hu.bme.mit.inf.dslreasoner.alloy.language.ui" type="4"/> </launchConfigurationWorkingSet>}"/> | ||
4 | <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
5 | <listEntry value="/hu.bme.mit.inf.dslreasoner.alloy.language"/> | ||
6 | </listAttribute> | ||
7 | <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
8 | <listEntry value="4"/> | ||
9 | </listAttribute> | ||
10 | <listAttribute key="org.eclipse.debug.ui.favoriteGroups"> | ||
11 | <listEntry value="org.eclipse.debug.ui.launchGroup.debug"/> | ||
12 | <listEntry value="org.eclipse.debug.ui.launchGroup.run"/> | ||
13 | </listAttribute> | ||
14 | <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher"/> | ||
15 | <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="src/hu/bme/mit/inf/dslreasoner/GenerateAlloyLanguage.mwe2"/> | ||
16 | <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="hu.bme.mit.inf.dslreasoner.alloy.language"/> | ||
17 | <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m"/> | ||
18 | </launchConfiguration> | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.project b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.project new file mode 100644 index 00000000..d33a2394 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.project | |||
@@ -0,0 +1,34 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <projectDescription> | ||
3 | <name>hu.bme.mit.inf.dslreasoner.alloy.language</name> | ||
4 | <comment></comment> | ||
5 | <projects> | ||
6 | </projects> | ||
7 | <buildSpec> | ||
8 | <buildCommand> | ||
9 | <name>org.eclipse.jdt.core.javabuilder</name> | ||
10 | <arguments> | ||
11 | </arguments> | ||
12 | </buildCommand> | ||
13 | <buildCommand> | ||
14 | <name>org.eclipse.pde.ManifestBuilder</name> | ||
15 | <arguments> | ||
16 | </arguments> | ||
17 | </buildCommand> | ||
18 | <buildCommand> | ||
19 | <name>org.eclipse.pde.SchemaBuilder</name> | ||
20 | <arguments> | ||
21 | </arguments> | ||
22 | </buildCommand> | ||
23 | <buildCommand> | ||
24 | <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
25 | <arguments> | ||
26 | </arguments> | ||
27 | </buildCommand> | ||
28 | </buildSpec> | ||
29 | <natures> | ||
30 | <nature>org.eclipse.jdt.core.javanature</nature> | ||
31 | <nature>org.eclipse.pde.PluginNature</nature> | ||
32 | <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
33 | </natures> | ||
34 | </projectDescription> | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.settings/org.eclipse.core.resources.prefs b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..4824b802 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.settings/org.eclipse.core.resources.prefs | |||
@@ -0,0 +1,2 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | encoding/<project>=UTF-8 | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.settings/org.eclipse.jdt.core.prefs b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..ace45cee --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/.settings/org.eclipse.jdt.core.prefs | |||
@@ -0,0 +1,12 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate | ||
4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
6 | org.eclipse.jdt.core.compiler.compliance=1.8 | ||
7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
12 | org.eclipse.jdt.core.compiler.source=1.8 | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/META-INF/MANIFEST.MF b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/META-INF/MANIFEST.MF new file mode 100644 index 00000000..1de8b744 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/META-INF/MANIFEST.MF | |||
@@ -0,0 +1,37 @@ | |||
1 | Manifest-Version: 1.0 | ||
2 | Bundle-ManifestVersion: 2 | ||
3 | Bundle-Name: hu.bme.mit.inf.dslreasoner.alloy.language | ||
4 | Bundle-Vendor: My Company | ||
5 | Bundle-Version: 1.0.0.qualifier | ||
6 | Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.alloy.language; singleton:=true | ||
7 | Bundle-ActivationPolicy: lazy | ||
8 | Require-Bundle: org.eclipse.xtext;visibility:=reexport, | ||
9 | org.eclipse.xtext.xbase;resolution:=optional;visibility:=reexport, | ||
10 | org.eclipse.xtext.generator;resolution:=optional, | ||
11 | org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional, | ||
12 | org.eclipse.emf.codegen.ecore;resolution:=optional, | ||
13 | org.eclipse.emf.mwe.utils;resolution:=optional, | ||
14 | org.eclipse.emf.mwe2.launch;resolution:=optional, | ||
15 | org.eclipse.xtext.util, | ||
16 | org.eclipse.emf.ecore, | ||
17 | org.eclipse.emf.common, | ||
18 | org.eclipse.xtext.xbase.lib, | ||
19 | org.antlr.runtime, | ||
20 | org.eclipse.xtext.common.types, | ||
21 | org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional, | ||
22 | org.eclipse.equinox.common;bundle-version="3.7.0" | ||
23 | Import-Package: org.apache.log4j | ||
24 | Bundle-RequiredExecutionEnvironment: JavaSE-1.7 | ||
25 | Export-Package: hu.bme.mit.inf.dslreasoner, | ||
26 | hu.bme.mit.inf.dslreasoner.services, | ||
27 | hu.bme.mit.inf.dslreasoner.alloyLanguage, | ||
28 | hu.bme.mit.inf.dslreasoner.alloyLanguage.impl, | ||
29 | hu.bme.mit.inf.dslreasoner.alloyLanguage.util, | ||
30 | hu.bme.mit.inf.dslreasoner.serializer, | ||
31 | hu.bme.mit.inf.dslreasoner.parser.antlr, | ||
32 | hu.bme.mit.inf.dslreasoner.parser.antlr.internal, | ||
33 | hu.bme.mit.inf.dslreasoner.validation, | ||
34 | hu.bme.mit.inf.dslreasoner.scoping, | ||
35 | hu.bme.mit.inf.dslreasoner.generator, | ||
36 | hu.bme.mit.inf.dslreasoner.formatting | ||
37 | |||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/build.properties b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/build.properties new file mode 100644 index 00000000..07a42688 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/build.properties | |||
@@ -0,0 +1,7 @@ | |||
1 | source.. = src/,\ | ||
2 | src-gen/,\ | ||
3 | xtend-gen/ | ||
4 | bin.includes = model/,\ | ||
5 | META-INF/,\ | ||
6 | .,\ | ||
7 | plugin.xml \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/model/generated/AlloyLanguage.ecore b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/model/generated/AlloyLanguage.ecore new file mode 100644 index 00000000..a825966e --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/model/generated/AlloyLanguage.ecore | |||
@@ -0,0 +1,267 @@ | |||
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="alloyLanguage" nsURI="http://www.bme.hu/mit/inf/dslreasoner/AlloyLanguage" | ||
4 | nsPrefix="alloyLanguage"> | ||
5 | <eClassifiers xsi:type="ecore:EClass" name="ALSDocument"> | ||
6 | <eStructuralFeatures xsi:type="ecore:EReference" name="enumDeclarations" upperBound="-1" | ||
7 | eType="#//ALSEnumDeclaration" containment="true"/> | ||
8 | <eStructuralFeatures xsi:type="ecore:EReference" name="signatureBodies" upperBound="-1" | ||
9 | eType="#//ALSSignatureBody" containment="true"/> | ||
10 | <eStructuralFeatures xsi:type="ecore:EReference" name="functionDefinitions" upperBound="-1" | ||
11 | eType="#//ALSFunctionDefinition" containment="true"/> | ||
12 | <eStructuralFeatures xsi:type="ecore:EReference" name="relationDefinitions" upperBound="-1" | ||
13 | eType="#//ALSRelationDefinition" containment="true"/> | ||
14 | <eStructuralFeatures xsi:type="ecore:EReference" name="factDeclarations" upperBound="-1" | ||
15 | eType="#//ALSFactDeclaration" containment="true"/> | ||
16 | <eStructuralFeatures xsi:type="ecore:EReference" name="runCommand" eType="#//ALSRunCommand" | ||
17 | containment="true"/> | ||
18 | </eClassifiers> | ||
19 | <eClassifiers xsi:type="ecore:EEnum" name="ALSMultiplicity"> | ||
20 | <eLiterals name="all" literal="all"/> | ||
21 | <eLiterals name="no" value="1" literal="no"/> | ||
22 | <eLiterals name="some" value="2" literal="some"/> | ||
23 | <eLiterals name="lone" value="3" literal="lone"/> | ||
24 | <eLiterals name="one" value="4" literal="one"/> | ||
25 | <eLiterals name="set" value="5" literal="set"/> | ||
26 | </eClassifiers> | ||
27 | <eClassifiers xsi:type="ecore:EClass" name="ALSRelationDeclaration"> | ||
28 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
29 | </eClassifiers> | ||
30 | <eClassifiers xsi:type="ecore:EClass" name="ALSTypeDeclaration" eSuperTypes="#//ALSRelationDeclaration"/> | ||
31 | <eClassifiers xsi:type="ecore:EClass" name="ALSEnumDeclaration" eSuperTypes="#//ALSTypeDeclaration"> | ||
32 | <eStructuralFeatures xsi:type="ecore:EReference" name="literal" upperBound="-1" | ||
33 | eType="#//ALSEnumLiteral" containment="true"/> | ||
34 | </eClassifiers> | ||
35 | <eClassifiers xsi:type="ecore:EClass" name="ALSEnumLiteral" eSuperTypes="#//ALSRelationDeclaration"/> | ||
36 | <eClassifiers xsi:type="ecore:EClass" name="ALSSignatureDeclaration" eSuperTypes="#//ALSTypeDeclaration"/> | ||
37 | <eClassifiers xsi:type="ecore:EClass" name="ALSSignatureBody"> | ||
38 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="multiplicity" eType="#//ALSMultiplicity"/> | ||
39 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="abstract" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | ||
40 | <eStructuralFeatures xsi:type="ecore:EReference" name="declarations" upperBound="-1" | ||
41 | eType="#//ALSSignatureDeclaration" containment="true"/> | ||
42 | <eStructuralFeatures xsi:type="ecore:EReference" name="supertype" eType="#//ALSSignatureDeclaration"/> | ||
43 | <eStructuralFeatures xsi:type="ecore:EReference" name="superset" unique="false" | ||
44 | upperBound="-1" eType="#//ALSSignatureDeclaration"/> | ||
45 | <eStructuralFeatures xsi:type="ecore:EReference" name="fields" upperBound="-1" | ||
46 | eType="#//ALSFieldDeclaration" containment="true"/> | ||
47 | </eClassifiers> | ||
48 | <eClassifiers xsi:type="ecore:EClass" name="ALSFieldDeclaration" eSuperTypes="#//ALSRelationDeclaration"> | ||
49 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="multiplicity" eType="#//ALSMultiplicity"/> | ||
50 | <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="#//ALSTerm" | ||
51 | containment="true"/> | ||
52 | </eClassifiers> | ||
53 | <eClassifiers xsi:type="ecore:EClass" name="ALSDefinition"> | ||
54 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
55 | <eStructuralFeatures xsi:type="ecore:EReference" name="variables" upperBound="-1" | ||
56 | eType="#//ALSVariableDeclaration" containment="true"/> | ||
57 | <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="#//ALSTerm" | ||
58 | containment="true"/> | ||
59 | </eClassifiers> | ||
60 | <eClassifiers xsi:type="ecore:EClass" name="ALSFunctionDefinition" eSuperTypes="#//ALSDefinition"> | ||
61 | <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="#//ALSTerm" | ||
62 | containment="true"/> | ||
63 | </eClassifiers> | ||
64 | <eClassifiers xsi:type="ecore:EClass" name="ALSRelationDefinition" eSuperTypes="#//ALSDefinition"/> | ||
65 | <eClassifiers xsi:type="ecore:EClass" name="ALSFactDeclaration"> | ||
66 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
67 | <eStructuralFeatures xsi:type="ecore:EReference" name="term" eType="#//ALSTerm" | ||
68 | containment="true"/> | ||
69 | </eClassifiers> | ||
70 | <eClassifiers xsi:type="ecore:EClass" name="ALSTerm"/> | ||
71 | <eClassifiers xsi:type="ecore:EEnum" name="ALSNumericOperator"> | ||
72 | <eLiterals name="plus" literal="plus"/> | ||
73 | <eLiterals name="sub" value="1" literal="sub"/> | ||
74 | <eLiterals name="mul" value="2" literal="mul"/> | ||
75 | <eLiterals name="rem" value="3" literal="rem"/> | ||
76 | <eLiterals name="div" value="4" literal="div"/> | ||
77 | </eClassifiers> | ||
78 | <eClassifiers xsi:type="ecore:EClass" name="ALSVariableDeclaration" eSuperTypes="#//ALSRelationDeclaration"> | ||
79 | <eStructuralFeatures xsi:type="ecore:EReference" name="range" eType="#//ALSTerm" | ||
80 | containment="true"/> | ||
81 | </eClassifiers> | ||
82 | <eClassifiers xsi:type="ecore:EClass" name="ALSRunCommand"> | ||
83 | <eStructuralFeatures xsi:type="ecore:EReference" name="typeScopes" upperBound="-1" | ||
84 | eType="#//ALSTypeScope" containment="true"/> | ||
85 | </eClassifiers> | ||
86 | <eClassifiers xsi:type="ecore:EClass" name="ALSTypeScope"> | ||
87 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="number" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> | ||
88 | </eClassifiers> | ||
89 | <eClassifiers xsi:type="ecore:EClass" name="ALSSigScope" eSuperTypes="#//ALSTypeScope"> | ||
90 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="exactly" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | ||
91 | <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="#//ALSSignatureDeclaration"/> | ||
92 | </eClassifiers> | ||
93 | <eClassifiers xsi:type="ecore:EClass" name="ALSIntScope" eSuperTypes="#//ALSTypeScope"/> | ||
94 | <eClassifiers xsi:type="ecore:EClass" name="ALSQuantifiedEx" eSuperTypes="#//ALSTerm"> | ||
95 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="#//ALSMultiplicity"/> | ||
96 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="disj" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | ||
97 | <eStructuralFeatures xsi:type="ecore:EReference" name="variables" upperBound="-1" | ||
98 | eType="#//ALSVariableDeclaration" containment="true"/> | ||
99 | <eStructuralFeatures xsi:type="ecore:EReference" name="expression" eType="#//ALSTerm" | ||
100 | containment="true"/> | ||
101 | </eClassifiers> | ||
102 | <eClassifiers xsi:type="ecore:EClass" name="ALSOr" eSuperTypes="#//ALSTerm"> | ||
103 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
104 | containment="true"/> | ||
105 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
106 | containment="true"/> | ||
107 | </eClassifiers> | ||
108 | <eClassifiers xsi:type="ecore:EClass" name="ALSIff" eSuperTypes="#//ALSTerm"> | ||
109 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
110 | containment="true"/> | ||
111 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
112 | containment="true"/> | ||
113 | </eClassifiers> | ||
114 | <eClassifiers xsi:type="ecore:EClass" name="ALSImpl" eSuperTypes="#//ALSTerm"> | ||
115 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
116 | containment="true"/> | ||
117 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
118 | containment="true"/> | ||
119 | <eStructuralFeatures xsi:type="ecore:EReference" name="elseOperand" eType="#//ALSTerm" | ||
120 | containment="true"/> | ||
121 | </eClassifiers> | ||
122 | <eClassifiers xsi:type="ecore:EClass" name="ALSAnd" eSuperTypes="#//ALSTerm"> | ||
123 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
124 | containment="true"/> | ||
125 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
126 | containment="true"/> | ||
127 | </eClassifiers> | ||
128 | <eClassifiers xsi:type="ecore:EClass" name="ALSEquals" eSuperTypes="#//ALSTerm"> | ||
129 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
130 | containment="true"/> | ||
131 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
132 | containment="true"/> | ||
133 | </eClassifiers> | ||
134 | <eClassifiers xsi:type="ecore:EClass" name="ALSNotEquals" eSuperTypes="#//ALSTerm"> | ||
135 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
136 | containment="true"/> | ||
137 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
138 | containment="true"/> | ||
139 | </eClassifiers> | ||
140 | <eClassifiers xsi:type="ecore:EClass" name="ALSSubset" eSuperTypes="#//ALSTerm"> | ||
141 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
142 | containment="true"/> | ||
143 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
144 | containment="true"/> | ||
145 | </eClassifiers> | ||
146 | <eClassifiers xsi:type="ecore:EClass" name="ALSLess" eSuperTypes="#//ALSTerm"> | ||
147 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
148 | containment="true"/> | ||
149 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
150 | containment="true"/> | ||
151 | </eClassifiers> | ||
152 | <eClassifiers xsi:type="ecore:EClass" name="ALSLeq" eSuperTypes="#//ALSTerm"> | ||
153 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
154 | containment="true"/> | ||
155 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
156 | containment="true"/> | ||
157 | </eClassifiers> | ||
158 | <eClassifiers xsi:type="ecore:EClass" name="ALSMore" eSuperTypes="#//ALSTerm"> | ||
159 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
160 | containment="true"/> | ||
161 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
162 | containment="true"/> | ||
163 | </eClassifiers> | ||
164 | <eClassifiers xsi:type="ecore:EClass" name="ALSMeq" eSuperTypes="#//ALSTerm"> | ||
165 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
166 | containment="true"/> | ||
167 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
168 | containment="true"/> | ||
169 | </eClassifiers> | ||
170 | <eClassifiers xsi:type="ecore:EClass" name="ALSOverride" eSuperTypes="#//ALSTerm"> | ||
171 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
172 | containment="true"/> | ||
173 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
174 | containment="true"/> | ||
175 | </eClassifiers> | ||
176 | <eClassifiers xsi:type="ecore:EClass" name="ALSRangeRestrictionRight" eSuperTypes="#//ALSTerm"> | ||
177 | <eStructuralFeatures xsi:type="ecore:EReference" name="relation" eType="#//ALSTerm" | ||
178 | containment="true"/> | ||
179 | <eStructuralFeatures xsi:type="ecore:EReference" name="filter" eType="#//ALSTerm" | ||
180 | containment="true"/> | ||
181 | </eClassifiers> | ||
182 | <eClassifiers xsi:type="ecore:EClass" name="ALSRangeRestrictionLeft" eSuperTypes="#//ALSTerm"> | ||
183 | <eStructuralFeatures xsi:type="ecore:EReference" name="filter" eType="#//ALSTerm" | ||
184 | containment="true"/> | ||
185 | <eStructuralFeatures xsi:type="ecore:EReference" name="relation" eType="#//ALSTerm" | ||
186 | containment="true"/> | ||
187 | </eClassifiers> | ||
188 | <eClassifiers xsi:type="ecore:EClass" name="ALSJoin" eSuperTypes="#//ALSTerm"> | ||
189 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
190 | containment="true"/> | ||
191 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
192 | containment="true"/> | ||
193 | </eClassifiers> | ||
194 | <eClassifiers xsi:type="ecore:EClass" name="ALSMinus" eSuperTypes="#//ALSTerm"> | ||
195 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
196 | containment="true"/> | ||
197 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
198 | containment="true"/> | ||
199 | </eClassifiers> | ||
200 | <eClassifiers xsi:type="ecore:EClass" name="ALSPlus" eSuperTypes="#//ALSTerm"> | ||
201 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
202 | containment="true"/> | ||
203 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
204 | containment="true"/> | ||
205 | </eClassifiers> | ||
206 | <eClassifiers xsi:type="ecore:EClass" name="ALSIntersection" eSuperTypes="#//ALSTerm"> | ||
207 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
208 | containment="true"/> | ||
209 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
210 | containment="true"/> | ||
211 | </eClassifiers> | ||
212 | <eClassifiers xsi:type="ecore:EClass" name="ALSDirectProduct" eSuperTypes="#//ALSTerm"> | ||
213 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//ALSTerm" | ||
214 | containment="true"/> | ||
215 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="leftMultiplicit" eType="#//ALSMultiplicity"/> | ||
216 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="rightMultiplicit" eType="#//ALSMultiplicity"/> | ||
217 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//ALSTerm" | ||
218 | containment="true"/> | ||
219 | </eClassifiers> | ||
220 | <eClassifiers xsi:type="ecore:EClass" name="ALSNot" eSuperTypes="#//ALSTerm"> | ||
221 | <eStructuralFeatures xsi:type="ecore:EReference" name="operand" eType="#//ALSTerm" | ||
222 | containment="true"/> | ||
223 | </eClassifiers> | ||
224 | <eClassifiers xsi:type="ecore:EClass" name="ALSInverseRelation" eSuperTypes="#//ALSTerm"> | ||
225 | <eStructuralFeatures xsi:type="ecore:EReference" name="operand" eType="#//ALSTerm" | ||
226 | containment="true"/> | ||
227 | </eClassifiers> | ||
228 | <eClassifiers xsi:type="ecore:EClass" name="AlSTransitiveClosure" eSuperTypes="#//ALSTerm"> | ||
229 | <eStructuralFeatures xsi:type="ecore:EReference" name="operand" eType="#//ALSTerm" | ||
230 | containment="true"/> | ||
231 | </eClassifiers> | ||
232 | <eClassifiers xsi:type="ecore:EClass" name="ALSReflectiveTransitiveClosure" eSuperTypes="#//ALSTerm"> | ||
233 | <eStructuralFeatures xsi:type="ecore:EReference" name="operand" eType="#//ALSTerm" | ||
234 | containment="true"/> | ||
235 | </eClassifiers> | ||
236 | <eClassifiers xsi:type="ecore:EClass" name="ALSCardinality" eSuperTypes="#//ALSTerm"> | ||
237 | <eStructuralFeatures xsi:type="ecore:EReference" name="operand" eType="#//ALSTerm" | ||
238 | containment="true"/> | ||
239 | </eClassifiers> | ||
240 | <eClassifiers xsi:type="ecore:EClass" name="ALSUnaryMinus" eSuperTypes="#//ALSTerm"> | ||
241 | <eStructuralFeatures xsi:type="ecore:EReference" name="operand" eType="#//ALSTerm" | ||
242 | containment="true"/> | ||
243 | </eClassifiers> | ||
244 | <eClassifiers xsi:type="ecore:EClass" name="ALSSum" eSuperTypes="#//ALSTerm"> | ||
245 | <eStructuralFeatures xsi:type="ecore:EReference" name="variables" upperBound="-1" | ||
246 | eType="#//ALSVariableDeclaration" containment="true"/> | ||
247 | <eStructuralFeatures xsi:type="ecore:EReference" name="expression" eType="#//ALSTerm" | ||
248 | containment="true"/> | ||
249 | </eClassifiers> | ||
250 | <eClassifiers xsi:type="ecore:EClass" name="ALSFunctionCall" eSuperTypes="#//ALSTerm"> | ||
251 | <eStructuralFeatures xsi:type="ecore:EReference" name="referredDefinition" eType="#//ALSDefinition"/> | ||
252 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="referredNumericOperator" | ||
253 | eType="#//ALSNumericOperator"/> | ||
254 | <eStructuralFeatures xsi:type="ecore:EReference" name="params" upperBound="-1" | ||
255 | eType="#//ALSTerm" containment="true"/> | ||
256 | </eClassifiers> | ||
257 | <eClassifiers xsi:type="ecore:EClass" name="ALSNone" eSuperTypes="#//ALSTerm"/> | ||
258 | <eClassifiers xsi:type="ecore:EClass" name="ALSIden" eSuperTypes="#//ALSTerm"/> | ||
259 | <eClassifiers xsi:type="ecore:EClass" name="ALSUniv" eSuperTypes="#//ALSTerm"/> | ||
260 | <eClassifiers xsi:type="ecore:EClass" name="ALSInt" eSuperTypes="#//ALSTerm"/> | ||
261 | <eClassifiers xsi:type="ecore:EClass" name="ALSReference" eSuperTypes="#//ALSTerm"> | ||
262 | <eStructuralFeatures xsi:type="ecore:EReference" name="referred" eType="#//ALSRelationDeclaration"/> | ||
263 | </eClassifiers> | ||
264 | <eClassifiers xsi:type="ecore:EClass" name="ALSNumberLiteral" eSuperTypes="#//ALSTerm"> | ||
265 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> | ||
266 | </eClassifiers> | ||
267 | </ecore:EPackage> | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/model/generated/AlloyLanguage.genmodel b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/model/generated/AlloyLanguage.genmodel new file mode 100644 index 00000000..dd1d46d2 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/model/generated/AlloyLanguage.genmodel | |||
@@ -0,0 +1,206 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" | ||
3 | xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/hu.bme.mit.inf.dslreasoner.alloy.language/src-gen" | ||
4 | editDirectory="/hu.bme.mit.inf.dslreasoner.alloy.language.edit/src" editorDirectory="/hu.bme.mit.inf.dslreasoner.alloy.language.editor/src" | ||
5 | modelPluginID="hu.bme.mit.inf.dslreasoner.alloy.language" forceOverwrite="true" | ||
6 | modelName="AlloyLanguage" updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" | ||
7 | complianceLevel="6.0" copyrightFields="false" editPluginID="hu.bme.mit.inf.dslreasoner.alloy.language.edit" | ||
8 | editorPluginID="hu.bme.mit.inf.dslreasoner.alloy.language.editor" runtimeVersion="2.11"> | ||
9 | <genPackages prefix="AlloyLanguage" basePackage="hu.bme.mit.inf.dslreasoner" disposableProviderFactory="true" | ||
10 | fileExtensions="als" ecorePackage="AlloyLanguage.ecore#/"> | ||
11 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="AlloyLanguage.ecore#//ALSMultiplicity"> | ||
12 | <genEnumLiterals ecoreEnumLiteral="AlloyLanguage.ecore#//ALSMultiplicity/all"/> | ||
13 | <genEnumLiterals ecoreEnumLiteral="AlloyLanguage.ecore#//ALSMultiplicity/no"/> | ||
14 | <genEnumLiterals ecoreEnumLiteral="AlloyLanguage.ecore#//ALSMultiplicity/some"/> | ||
15 | <genEnumLiterals ecoreEnumLiteral="AlloyLanguage.ecore#//ALSMultiplicity/lone"/> | ||
16 | <genEnumLiterals ecoreEnumLiteral="AlloyLanguage.ecore#//ALSMultiplicity/one"/> | ||
17 | <genEnumLiterals ecoreEnumLiteral="AlloyLanguage.ecore#//ALSMultiplicity/set"/> | ||
18 | </genEnums> | ||
19 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="AlloyLanguage.ecore#//ALSNumericOperator"> | ||
20 | <genEnumLiterals ecoreEnumLiteral="AlloyLanguage.ecore#//ALSNumericOperator/plus"/> | ||
21 | <genEnumLiterals ecoreEnumLiteral="AlloyLanguage.ecore#//ALSNumericOperator/sub"/> | ||
22 | <genEnumLiterals ecoreEnumLiteral="AlloyLanguage.ecore#//ALSNumericOperator/mul"/> | ||
23 | <genEnumLiterals ecoreEnumLiteral="AlloyLanguage.ecore#//ALSNumericOperator/rem"/> | ||
24 | <genEnumLiterals ecoreEnumLiteral="AlloyLanguage.ecore#//ALSNumericOperator/div"/> | ||
25 | </genEnums> | ||
26 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSDocument"> | ||
27 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSDocument/enumDeclarations"/> | ||
28 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSDocument/signatureBodies"/> | ||
29 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSDocument/functionDefinitions"/> | ||
30 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSDocument/relationDefinitions"/> | ||
31 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSDocument/factDeclarations"/> | ||
32 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSDocument/runCommand"/> | ||
33 | </genClasses> | ||
34 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSRelationDeclaration"> | ||
35 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute AlloyLanguage.ecore#//ALSRelationDeclaration/name"/> | ||
36 | </genClasses> | ||
37 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSTypeDeclaration"/> | ||
38 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSEnumDeclaration"> | ||
39 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSEnumDeclaration/literal"/> | ||
40 | </genClasses> | ||
41 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSEnumLiteral"/> | ||
42 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSSignatureDeclaration"/> | ||
43 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSSignatureBody"> | ||
44 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute AlloyLanguage.ecore#//ALSSignatureBody/multiplicity"/> | ||
45 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute AlloyLanguage.ecore#//ALSSignatureBody/abstract"/> | ||
46 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSSignatureBody/declarations"/> | ||
47 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSSignatureBody/supertype"/> | ||
48 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSSignatureBody/superset"/> | ||
49 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSSignatureBody/fields"/> | ||
50 | </genClasses> | ||
51 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSFieldDeclaration"> | ||
52 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute AlloyLanguage.ecore#//ALSFieldDeclaration/multiplicity"/> | ||
53 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSFieldDeclaration/type"/> | ||
54 | </genClasses> | ||
55 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSDefinition"> | ||
56 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute AlloyLanguage.ecore#//ALSDefinition/name"/> | ||
57 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSDefinition/variables"/> | ||
58 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSDefinition/value"/> | ||
59 | </genClasses> | ||
60 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSFunctionDefinition"> | ||
61 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSFunctionDefinition/type"/> | ||
62 | </genClasses> | ||
63 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSRelationDefinition"/> | ||
64 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSFactDeclaration"> | ||
65 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute AlloyLanguage.ecore#//ALSFactDeclaration/name"/> | ||
66 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSFactDeclaration/term"/> | ||
67 | </genClasses> | ||
68 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSTerm"/> | ||
69 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSVariableDeclaration"> | ||
70 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSVariableDeclaration/range"/> | ||
71 | </genClasses> | ||
72 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSRunCommand"> | ||
73 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSRunCommand/typeScopes"/> | ||
74 | </genClasses> | ||
75 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSTypeScope"> | ||
76 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute AlloyLanguage.ecore#//ALSTypeScope/number"/> | ||
77 | </genClasses> | ||
78 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSSigScope"> | ||
79 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute AlloyLanguage.ecore#//ALSSigScope/exactly"/> | ||
80 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSSigScope/type"/> | ||
81 | </genClasses> | ||
82 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSIntScope"/> | ||
83 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSQuantifiedEx"> | ||
84 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute AlloyLanguage.ecore#//ALSQuantifiedEx/type"/> | ||
85 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute AlloyLanguage.ecore#//ALSQuantifiedEx/disj"/> | ||
86 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSQuantifiedEx/variables"/> | ||
87 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSQuantifiedEx/expression"/> | ||
88 | </genClasses> | ||
89 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSOr"> | ||
90 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSOr/leftOperand"/> | ||
91 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSOr/rightOperand"/> | ||
92 | </genClasses> | ||
93 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSIff"> | ||
94 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSIff/leftOperand"/> | ||
95 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSIff/rightOperand"/> | ||
96 | </genClasses> | ||
97 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSImpl"> | ||
98 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSImpl/leftOperand"/> | ||
99 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSImpl/rightOperand"/> | ||
100 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSImpl/elseOperand"/> | ||
101 | </genClasses> | ||
102 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSAnd"> | ||
103 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSAnd/leftOperand"/> | ||
104 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSAnd/rightOperand"/> | ||
105 | </genClasses> | ||
106 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSEquals"> | ||
107 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSEquals/leftOperand"/> | ||
108 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSEquals/rightOperand"/> | ||
109 | </genClasses> | ||
110 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSNotEquals"> | ||
111 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSNotEquals/leftOperand"/> | ||
112 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSNotEquals/rightOperand"/> | ||
113 | </genClasses> | ||
114 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSSubset"> | ||
115 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSSubset/leftOperand"/> | ||
116 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSSubset/rightOperand"/> | ||
117 | </genClasses> | ||
118 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSLess"> | ||
119 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSLess/leftOperand"/> | ||
120 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSLess/rightOperand"/> | ||
121 | </genClasses> | ||
122 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSLeq"> | ||
123 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSLeq/leftOperand"/> | ||
124 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSLeq/rightOperand"/> | ||
125 | </genClasses> | ||
126 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSMore"> | ||
127 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSMore/leftOperand"/> | ||
128 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSMore/rightOperand"/> | ||
129 | </genClasses> | ||
130 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSMeq"> | ||
131 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSMeq/leftOperand"/> | ||
132 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSMeq/rightOperand"/> | ||
133 | </genClasses> | ||
134 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSOverride"> | ||
135 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSOverride/leftOperand"/> | ||
136 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSOverride/rightOperand"/> | ||
137 | </genClasses> | ||
138 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSRangeRestrictionRight"> | ||
139 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSRangeRestrictionRight/relation"/> | ||
140 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSRangeRestrictionRight/filter"/> | ||
141 | </genClasses> | ||
142 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSRangeRestrictionLeft"> | ||
143 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSRangeRestrictionLeft/filter"/> | ||
144 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSRangeRestrictionLeft/relation"/> | ||
145 | </genClasses> | ||
146 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSJoin"> | ||
147 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSJoin/leftOperand"/> | ||
148 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSJoin/rightOperand"/> | ||
149 | </genClasses> | ||
150 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSMinus"> | ||
151 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSMinus/leftOperand"/> | ||
152 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSMinus/rightOperand"/> | ||
153 | </genClasses> | ||
154 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSPlus"> | ||
155 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSPlus/leftOperand"/> | ||
156 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSPlus/rightOperand"/> | ||
157 | </genClasses> | ||
158 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSIntersection"> | ||
159 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSIntersection/leftOperand"/> | ||
160 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSIntersection/rightOperand"/> | ||
161 | </genClasses> | ||
162 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSDirectProduct"> | ||
163 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSDirectProduct/leftOperand"/> | ||
164 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute AlloyLanguage.ecore#//ALSDirectProduct/leftMultiplicit"/> | ||
165 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute AlloyLanguage.ecore#//ALSDirectProduct/rightMultiplicit"/> | ||
166 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSDirectProduct/rightOperand"/> | ||
167 | </genClasses> | ||
168 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSNot"> | ||
169 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSNot/operand"/> | ||
170 | </genClasses> | ||
171 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSInverseRelation"> | ||
172 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSInverseRelation/operand"/> | ||
173 | </genClasses> | ||
174 | <genClasses ecoreClass="AlloyLanguage.ecore#//AlSTransitiveClosure"> | ||
175 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//AlSTransitiveClosure/operand"/> | ||
176 | </genClasses> | ||
177 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSReflectiveTransitiveClosure"> | ||
178 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSReflectiveTransitiveClosure/operand"/> | ||
179 | </genClasses> | ||
180 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSCardinality"> | ||
181 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSCardinality/operand"/> | ||
182 | </genClasses> | ||
183 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSUnaryMinus"> | ||
184 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSUnaryMinus/operand"/> | ||
185 | </genClasses> | ||
186 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSSum"> | ||
187 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSSum/variables"/> | ||
188 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSSum/expression"/> | ||
189 | </genClasses> | ||
190 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSFunctionCall"> | ||
191 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSFunctionCall/referredDefinition"/> | ||
192 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute AlloyLanguage.ecore#//ALSFunctionCall/referredNumericOperator"/> | ||
193 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSFunctionCall/params"/> | ||
194 | </genClasses> | ||
195 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSNone"/> | ||
196 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSIden"/> | ||
197 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSUniv"/> | ||
198 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSInt"/> | ||
199 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSReference"> | ||
200 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference AlloyLanguage.ecore#//ALSReference/referred"/> | ||
201 | </genClasses> | ||
202 | <genClasses ecoreClass="AlloyLanguage.ecore#//ALSNumberLiteral"> | ||
203 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute AlloyLanguage.ecore#//ALSNumberLiteral/value"/> | ||
204 | </genClasses> | ||
205 | </genPackages> | ||
206 | </genmodel:GenModel> | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/plugin.xml b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/plugin.xml new file mode 100644 index 00000000..7567279d --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/plugin.xml | |||
@@ -0,0 +1,16 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <?eclipse version="3.0"?> | ||
3 | |||
4 | <plugin> | ||
5 | |||
6 | <extension point="org.eclipse.emf.ecore.generated_package"> | ||
7 | <package | ||
8 | uri = "http://www.bme.hu/mit/inf/dslreasoner/AlloyLanguage" | ||
9 | class = "hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguagePackage" | ||
10 | genModel = "model/generated/AlloyLanguage.genmodel" /> | ||
11 | |||
12 | </extension> | ||
13 | |||
14 | |||
15 | |||
16 | </plugin> | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/plugin.xml_gen b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/plugin.xml_gen new file mode 100644 index 00000000..7567279d --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/plugin.xml_gen | |||
@@ -0,0 +1,16 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <?eclipse version="3.0"?> | ||
3 | |||
4 | <plugin> | ||
5 | |||
6 | <extension point="org.eclipse.emf.ecore.generated_package"> | ||
7 | <package | ||
8 | uri = "http://www.bme.hu/mit/inf/dslreasoner/AlloyLanguage" | ||
9 | class = "hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguagePackage" | ||
10 | genModel = "model/generated/AlloyLanguage.genmodel" /> | ||
11 | |||
12 | </extension> | ||
13 | |||
14 | |||
15 | |||
16 | </plugin> | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/AlloyLanguage.xtext b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/AlloyLanguage.xtext new file mode 100644 index 00000000..6d5fcf58 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/AlloyLanguage.xtext | |||
@@ -0,0 +1,149 @@ | |||
1 | grammar hu.bme.mit.inf.dslreasoner.AlloyLanguage with org.eclipse.xtext.common.Terminals | ||
2 | |||
3 | generate alloyLanguage "http://www.bme.hu/mit/inf/dslreasoner/AlloyLanguage" | ||
4 | |||
5 | ALSDocument: | ||
6 | ( enumDeclarations += ALSEnumDeclaration | | ||
7 | signatureBodies += ALSSignatureBody | | ||
8 | functionDefinitions += ALSFunctionDefinition | | ||
9 | relationDefinitions += ALSRelationDefinition | | ||
10 | factDeclarations += ALSFactDeclaration)+ | ||
11 | runCommand = ALSRunCommand | ||
12 | ; | ||
13 | |||
14 | ////////////////////////////////// | ||
15 | // ALS terminals | ||
16 | ////////////////////////////////// | ||
17 | |||
18 | terminal ID: ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|"'"|'"'|'0'..'9')*; | ||
19 | ALSID: ID; | ||
20 | |||
21 | enum ALSMultiplicity: all | no | some | lone | one | set; | ||
22 | |||
23 | |||
24 | ////////////////////////////////// | ||
25 | // ALS types | ||
26 | ////////////////////////////////// | ||
27 | |||
28 | ALSRelationDeclaration: ALSTypeDeclaration | ALSEnumLiteral | ALSFieldDeclaration | ALSVariableDeclaration; | ||
29 | |||
30 | ALSTypeDeclaration: | ||
31 | ALSEnumDeclaration | ALSSignatureDeclaration | ||
32 | ; | ||
33 | |||
34 | ALSEnumDeclaration: | ||
35 | 'enum' name=ALSID '{' | ||
36 | literal+=ALSEnumLiteral ("," literal+=ALSEnumLiteral)* | ||
37 | '}'; | ||
38 | ALSEnumLiteral: name = ALSID; | ||
39 | |||
40 | ALSSignatureDeclaration: name = ALSID; | ||
41 | |||
42 | ALSSignatureBody: | ||
43 | ((multiplicity = ALSMultiplicity?) & (abstract ?= 'abstract')?) | ||
44 | 'sig' | ||
45 | declarations += ALSSignatureDeclaration (',' declarations += ALSSignatureDeclaration)* | ||
46 | (('extends' supertype = [ALSSignatureDeclaration]) | ||
47 | | | ||
48 | ('in' superset += [ALSSignatureDeclaration] ('+' superset += [ALSSignatureDeclaration])*) )? | ||
49 | '{' (fields+=ALSFieldDeclaration ("," fields+=ALSFieldDeclaration)*)? '}' | ||
50 | ; | ||
51 | |||
52 | ALSFieldDeclaration: | ||
53 | name = ALSID ':' (multiplicity = ALSMultiplicity)? type = ALSTerm | ||
54 | ; | ||
55 | |||
56 | ALSDefinition : ALSFunctionDefinition | ALSRelationDefinition; | ||
57 | |||
58 | ALSFunctionDefinition: | ||
59 | "fun" name = ALSID "[" variables+=ALSVariableDeclaration (',' variables+=ALSVariableDeclaration)* "]" ":" type = ALSTerm | ||
60 | "{" value = ALSTerm "}" | ||
61 | ; | ||
62 | ALSRelationDefinition: | ||
63 | "pred" name = ALSID "[" variables+=ALSVariableDeclaration (',' variables+=ALSVariableDeclaration)* "]" | ||
64 | "{" value = ALSTerm "}" | ||
65 | ; | ||
66 | |||
67 | ALSFactDeclaration: {ALSFactDeclaration} 'fact' (name=ALSID)? '{' (term = ALSTerm) '}' ; | ||
68 | |||
69 | ////////////////////////////////// | ||
70 | // ALS terms | ||
71 | ////////////////////////////////// | ||
72 | ALSTerm: ALSQuantified; | ||
73 | |||
74 | ALSQuantified returns ALSTerm: ({ALSQuantifiedEx} type = ALSMultiplicity | ||
75 | (disj?='disj')? variables+=ALSVariableDeclaration (',' variables+=ALSVariableDeclaration)* '{' expression = ALSTerm '}') | ALSOr; | ||
76 | |||
77 | ALSOr returns ALSTerm: ALSIff ({ALSOr.leftOperand = current} ( "||" | "or" ) rightOperand = ALSIff)?; | ||
78 | ALSIff returns ALSTerm: ALSImpl ({ALSIff.leftOperand = current} ("<=>" | "iff") rightOperand = ALSImpl)?; | ||
79 | ALSImpl returns ALSTerm: ALSAnd ({ALSImpl.leftOperand = current} ("=>" | "implies") rightOperand = ALSAnd ('else' elseOperand = ALSAnd)?)?; | ||
80 | ALSAnd returns ALSTerm: ALSComparison ({ALSAnd.leftOperand = current} ( "&&" | "and" ) rightOperand = ALSComparison)?; | ||
81 | |||
82 | ALSComparison returns ALSTerm: | ||
83 | ALSOverride | ||
84 | (({ALSEquals.leftOperand = current} "=" | | ||
85 | {ALSNotEquals.leftOperand = current} "!=" | | ||
86 | {ALSSubset.leftOperand = current} "in" | | ||
87 | {ALSLess.leftOperand = current} ">" | | ||
88 | {ALSLeq.leftOperand = current} ">=" | | ||
89 | {ALSMore.leftOperand = current} "<" | | ||
90 | {ALSMeq.leftOperand = current} "<=") | ||
91 | rightOperand = ALSOverride)?; | ||
92 | |||
93 | ALSOverride returns ALSTerm: ALSRangeRestrictionRight ({ALSOverride.leftOperand = current} '++' rightOperand = ALSRangeRestrictionRight)?; | ||
94 | |||
95 | ALSRangeRestrictionRight returns ALSTerm: ALSRangeRestrictionLeft ({ALSRangeRestrictionRight.relation = current} ':>' filter = ALSRangeRestrictionLeft)?; | ||
96 | ALSRangeRestrictionLeft returns ALSTerm: ALSJoin ({ALSRangeRestrictionLeft.filter = current} '<:' relation = ALSJoin)?; | ||
97 | ALSJoin returns ALSTerm: ALSMinus ({ALSJoin.leftOperand = current} '.' rightOperand = ALSMinus )*; | ||
98 | |||
99 | ALSMinus returns ALSTerm: ALSPlus ({ALSMinus.leftOperand = current} '-' rightOperand = ALSPlus)*; | ||
100 | ALSPlus returns ALSTerm: ALSIntersection ({ALSPlus.leftOperand = current} '+' rightOperand = ALSIntersection)*; | ||
101 | ALSIntersection returns ALSTerm: ALSDirectProduct ({ALSIntersection.leftOperand = current} '&' rightOperand = ALSDirectProduct)*; | ||
102 | //ALSMultiply returns ALSTerm: ALSDirectProduct ({ALSMultiply.leftOperand = current} '*' rightOperand = ALSDirectProduct)*; | ||
103 | |||
104 | ALSDirectProduct returns ALSTerm: | ||
105 | ALSPreficed | ||
106 | ({ALSDirectProduct.leftOperand = current} (leftMultiplicit = ALSMultiplicity)? | ||
107 | '->' | ||
108 | (rightMultiplicit = ALSMultiplicity)? | ||
109 | rightOperand = ALSPreficed)? | ||
110 | ; | ||
111 | |||
112 | ALSPreficed returns ALSTerm: | ||
113 | {ALSNot}=>("!"|'not') operand = ALSBasicRelationTerm | | ||
114 | {ALSInverseRelation}=>"~" operand = ALSBasicRelationTerm | | ||
115 | {AlSTransitiveClosure} "^" operand = ALSBasicRelationTerm | | ||
116 | {ALSReflectiveTransitiveClosure} "*" operand = ALSBasicRelationTerm | | ||
117 | {ALSCardinality} '#' operand = ALSBasicRelationTerm | | ||
118 | {ALSUnaryMinus} =>'-' operand = ALSBasicRelationTerm | | ||
119 | {ALSSum} 'sum' variables+=ALSVariableDeclaration (',' variables+=ALSVariableDeclaration)* '{' expression = ALSTerm '}' | | ||
120 | // {ALSQuantifiedEx} type = ALSMultiplicity | ||
121 | // (disj?='disj')? variables+=ALSVariableDeclaration (',' variables+=ALSVariableDeclaration)* '{' expression = ALSTerm '}' | | ||
122 | {ALSFunctionCall} (referredDefinition=[ALSDefinition]|referredNumericOperator=ALSNumericOperator) '['params+=ALSTerm (',' params+=ALSTerm)*']' | | ||
123 | ALSBasicRelationTerm; | ||
124 | |||
125 | enum ALSNumericOperator: plus|sub|mul|rem|div; | ||
126 | |||
127 | //ALSVariable: name = ALSID; | ||
128 | ALSVariableDeclaration: name=ALSID ':' range = ALSTerm; | ||
129 | |||
130 | ALSBasicRelationTerm returns ALSTerm: | ||
131 | {ALSNone} 'none'| | ||
132 | {ALSIden} 'iden'| | ||
133 | {ALSUniv} 'univ'| | ||
134 | {ALSInt} 'Int' | | ||
135 | {ALSReference} referred = [ALSRelationDeclaration] | | ||
136 | {ALSNumberLiteral} value = INT| | ||
137 | '(' ALSTerm ')' | ||
138 | ; | ||
139 | |||
140 | ////////////////////////////////// | ||
141 | // ALS Commands and scopes | ||
142 | ////////////////////////////////// | ||
143 | ALSRunCommand: | ||
144 | {ALSRunCommand} 'run' '{' '}' ('for' typeScopes+=ALSTypeScope (',' typeScopes+=ALSTypeScope)*)?; | ||
145 | |||
146 | ALSTypeScope: ALSSigScope | ALSIntScope; | ||
147 | |||
148 | ALSSigScope: (exactly?='exactly')? number = INT type = [ALSSignatureDeclaration]; | ||
149 | ALSIntScope: number = INT 'Int'; \ No newline at end of file | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/AlloyLanguageRuntimeModule.java b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/AlloyLanguageRuntimeModule.java new file mode 100644 index 00000000..b78c88c2 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/AlloyLanguageRuntimeModule.java | |||
@@ -0,0 +1,11 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner; | ||
5 | |||
6 | /** | ||
7 | * Use this class to register components to be used at runtime / without the Equinox extension registry. | ||
8 | */ | ||
9 | public class AlloyLanguageRuntimeModule extends hu.bme.mit.inf.dslreasoner.AbstractAlloyLanguageRuntimeModule { | ||
10 | |||
11 | } | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/AlloyLanguageStandaloneSetup.java b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/AlloyLanguageStandaloneSetup.java new file mode 100644 index 00000000..bb1447eb --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/AlloyLanguageStandaloneSetup.java | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner; | ||
5 | |||
6 | /** | ||
7 | * Initialization support for running Xtext languages | ||
8 | * without equinox extension registry | ||
9 | */ | ||
10 | public class AlloyLanguageStandaloneSetup extends AlloyLanguageStandaloneSetupGenerated{ | ||
11 | |||
12 | public static void doSetup() { | ||
13 | new AlloyLanguageStandaloneSetup().createInjectorAndDoEMFRegistration(); | ||
14 | } | ||
15 | } | ||
16 | |||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/GenerateAlloyLanguage.mwe2 b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/GenerateAlloyLanguage.mwe2 new file mode 100644 index 00000000..fa57e2de --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/GenerateAlloyLanguage.mwe2 | |||
@@ -0,0 +1,133 @@ | |||
1 | module hu.bme.mit.inf.dslreasoner.GenerateAlloyLanguage | ||
2 | |||
3 | import org.eclipse.emf.mwe.utils.* | ||
4 | import org.eclipse.xtext.generator.* | ||
5 | import org.eclipse.xtext.ui.generator.* | ||
6 | |||
7 | var grammarURI = "classpath:/hu/bme/mit/inf/dslreasoner/AlloyLanguage.xtext" | ||
8 | var fileExtensions = "als" | ||
9 | var projectName = "hu.bme.mit.inf.dslreasoner.alloy.language" | ||
10 | var runtimeProject = "../${projectName}" | ||
11 | var generateXtendStub = true | ||
12 | var encoding = "UTF-8" | ||
13 | |||
14 | Workflow { | ||
15 | bean = StandaloneSetup { | ||
16 | scanClassPath = true | ||
17 | platformUri = "${runtimeProject}/.." | ||
18 | // The following two lines can be removed, if Xbase is not used. | ||
19 | registerGeneratedEPackage = "org.eclipse.xtext.xbase.XbasePackage" | ||
20 | registerGenModelFile = "platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel" | ||
21 | } | ||
22 | |||
23 | component = DirectoryCleaner { | ||
24 | directory = "${runtimeProject}/src-gen" | ||
25 | } | ||
26 | |||
27 | component = DirectoryCleaner { | ||
28 | directory = "${runtimeProject}/model/generated" | ||
29 | } | ||
30 | |||
31 | component = DirectoryCleaner { | ||
32 | directory = "${runtimeProject}.ui/src-gen" | ||
33 | } | ||
34 | |||
35 | // component = DirectoryCleaner { | ||
36 | // directory = "${runtimeProject}.tests/src-gen" | ||
37 | // } | ||
38 | |||
39 | component = Generator { | ||
40 | pathRtProject = runtimeProject | ||
41 | pathUiProject = "${runtimeProject}.ui" | ||
42 | //pathTestProject = "${runtimeProject}.tests" | ||
43 | projectNameRt = projectName | ||
44 | projectNameUi = "${projectName}.ui" | ||
45 | encoding = encoding | ||
46 | language = auto-inject { | ||
47 | uri = grammarURI | ||
48 | |||
49 | // Java API to access grammar elements (required by several other fragments) | ||
50 | fragment = grammarAccess.GrammarAccessFragment auto-inject {} | ||
51 | |||
52 | // generates Java API for the generated EPackages | ||
53 | fragment = ecore.EMFGeneratorFragment auto-inject {} | ||
54 | |||
55 | // the old serialization component | ||
56 | // fragment = parseTreeConstructor.ParseTreeConstructorFragment auto-inject {} | ||
57 | |||
58 | // serializer 2.0 | ||
59 | fragment = serializer.SerializerFragment auto-inject { | ||
60 | generateStub = false | ||
61 | } | ||
62 | |||
63 | // a custom ResourceFactory for use with EMF | ||
64 | fragment = resourceFactory.ResourceFactoryFragment auto-inject {} | ||
65 | |||
66 | // The antlr parser generator fragment. | ||
67 | fragment = parser.antlr.XtextAntlrGeneratorFragment auto-inject { | ||
68 | // options = { | ||
69 | // backtrack = true | ||
70 | // } | ||
71 | } | ||
72 | |||
73 | // Xtend-based API for validation | ||
74 | fragment = validation.ValidatorFragment auto-inject { | ||
75 | // composedCheck = "org.eclipse.xtext.validation.ImportUriValidator" | ||
76 | // composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" | ||
77 | } | ||
78 | |||
79 | // old scoping and exporting API | ||
80 | // fragment = scoping.ImportURIScopingFragment auto-inject {} | ||
81 | // fragment = exporting.SimpleNamesFragment auto-inject {} | ||
82 | |||
83 | // scoping and exporting API | ||
84 | fragment = scoping.ImportNamespacesScopingFragment auto-inject {} | ||
85 | fragment = exporting.QualifiedNamesFragment auto-inject {} | ||
86 | fragment = builder.BuilderIntegrationFragment auto-inject {} | ||
87 | |||
88 | // generator API | ||
89 | fragment = generator.GeneratorFragment auto-inject {} | ||
90 | |||
91 | // formatter API | ||
92 | fragment = formatting.FormatterFragment auto-inject {} | ||
93 | |||
94 | // labeling API | ||
95 | fragment = labeling.LabelProviderFragment auto-inject {} | ||
96 | |||
97 | // outline API | ||
98 | fragment = outline.OutlineTreeProviderFragment auto-inject {} | ||
99 | fragment = outline.QuickOutlineFragment auto-inject {} | ||
100 | |||
101 | // quickfix API | ||
102 | fragment = quickfix.QuickfixProviderFragment auto-inject {} | ||
103 | |||
104 | // content assist API | ||
105 | fragment = contentAssist.ContentAssistFragment auto-inject {} | ||
106 | |||
107 | // generates a more lightweight Antlr parser and lexer tailored for content assist | ||
108 | fragment = parser.antlr.XtextAntlrUiGeneratorFragment auto-inject {} | ||
109 | |||
110 | // generates junit test support classes into Generator#pathTestProject | ||
111 | fragment = junit.Junit4Fragment auto-inject {} | ||
112 | |||
113 | // rename refactoring | ||
114 | fragment = refactoring.RefactorElementNameFragment auto-inject {} | ||
115 | |||
116 | // provides the necessary bindings for java types integration | ||
117 | fragment = types.TypesGeneratorFragment auto-inject {} | ||
118 | |||
119 | // generates the required bindings only if the grammar inherits from Xbase | ||
120 | fragment = xbase.XbaseGeneratorFragment auto-inject {} | ||
121 | |||
122 | // generates the required bindings only if the grammar inherits from Xtype | ||
123 | fragment = xbase.XtypeGeneratorFragment auto-inject {} | ||
124 | |||
125 | // provides a preference page for template proposals | ||
126 | fragment = templates.CodetemplatesGeneratorFragment auto-inject {} | ||
127 | |||
128 | // provides a compare view | ||
129 | fragment = compare.CompareFragment auto-inject {} | ||
130 | } | ||
131 | } | ||
132 | } | ||
133 | |||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/formatting/AlloyLanguageFormatter.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/formatting/AlloyLanguageFormatter.xtend new file mode 100644 index 00000000..28797bc4 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/formatting/AlloyLanguageFormatter.xtend | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.formatting | ||
5 | |||
6 | import com.google.inject.Inject | ||
7 | import hu.bme.mit.inf.dslreasoner.services.AlloyLanguageGrammarAccess | ||
8 | import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter | ||
9 | import org.eclipse.xtext.formatting.impl.FormattingConfig | ||
10 | |||
11 | /** | ||
12 | * This class contains custom formatting description. | ||
13 | * | ||
14 | * see : http://www.eclipse.org/Xtext/documentation.html#formatting | ||
15 | * on how and when to use it | ||
16 | * | ||
17 | * Also see {@link org.eclipse.xtext.xtext.XtextFormattingTokenSerializer} as an example | ||
18 | */ | ||
19 | class AlloyLanguageFormatter extends AbstractDeclarativeFormatter { | ||
20 | |||
21 | @Inject extension AlloyLanguageGrammarAccess | ||
22 | |||
23 | override protected void configureFormatting(FormattingConfig c) { | ||
24 | // It's usually a good idea to activate the following three statements. | ||
25 | // They will add and preserve newlines around comments | ||
26 | c.setLinewrap(0, 1, 2).before(SL_COMMENTRule) | ||
27 | c.setLinewrap(0, 1, 2).before(ML_COMMENTRule) | ||
28 | c.setLinewrap(0, 1, 1).after(ML_COMMENTRule) | ||
29 | |||
30 | c.setAutoLinewrap(100000); | ||
31 | |||
32 | //Signatures | ||
33 | c.setIndentationIncrement.after(ALSSignatureBodyAccess.leftCurlyBracketKeyword_5); | ||
34 | c.setLinewrap.after(ALSSignatureBodyAccess.leftCurlyBracketKeyword_5) | ||
35 | c.setIndentationDecrement.before(ALSSignatureBodyAccess.rightCurlyBracketKeyword_7); | ||
36 | c.setLinewrap.after(ALSSignatureBodyAccess.rightCurlyBracketKeyword_7) | ||
37 | c.setLinewrap.before(ALSSignatureBodyAccess.rightCurlyBracketKeyword_7) | ||
38 | c.setNoSpace.before(ALSSignatureBodyAccess.commaKeyword_3_0) | ||
39 | c.setLinewrap.after(ALSSignatureBodyAccess.commaKeyword_3_0) | ||
40 | c.setNoSpace.before(ALSSignatureBodyAccess.commaKeyword_3_0) | ||
41 | c.setNoSpace.before(ALSSignatureBodyAccess.commaKeyword_6_1_0) | ||
42 | c.setLinewrap.after(ALSSignatureBodyAccess.commaKeyword_6_1_0) | ||
43 | c.setNoSpace.before(ALSSignatureBodyAccess.commaKeyword_6_1_0) | ||
44 | //c.setLinewrap(0,1,2).between(ALSSignatureDeclarationRule,ALSSignatureDeclarationRule) | ||
45 | |||
46 | //Enums | ||
47 | c.setIndentationIncrement.after(ALSEnumDeclarationAccess.leftCurlyBracketKeyword_2) | ||
48 | c.setLinewrap.after(ALSEnumDeclarationAccess.leftCurlyBracketKeyword_2) | ||
49 | c.setIndentationDecrement.before(ALSEnumDeclarationAccess.rightCurlyBracketKeyword_5) | ||
50 | c.setLinewrap.before(ALSEnumDeclarationAccess.rightCurlyBracketKeyword_5) | ||
51 | c.setLinewrap.after(ALSEnumDeclarationAccess.rightCurlyBracketKeyword_5) | ||
52 | c.setNoSpace.before(ALSEnumDeclarationAccess.commaKeyword_4_0) | ||
53 | |||
54 | |||
55 | //facts | ||
56 | c.setIndentationIncrement.after(ALSFactDeclarationAccess.leftCurlyBracketKeyword_3) | ||
57 | c.setLinewrap.after(ALSFactDeclarationAccess.leftCurlyBracketKeyword_3) | ||
58 | c.setIndentationDecrement.before(ALSFactDeclarationAccess.rightCurlyBracketKeyword_5) | ||
59 | c.setLinewrap.before(ALSFactDeclarationAccess.rightCurlyBracketKeyword_5) | ||
60 | c.setLinewrap.after(ALSFactDeclarationAccess.rightCurlyBracketKeyword_5) | ||
61 | |||
62 | //predicates | ||
63 | c.setIndentationIncrement.after(ALSRelationDefinitionAccess.leftCurlyBracketKeyword_6) | ||
64 | c.setLinewrap.after(ALSRelationDefinitionAccess.leftCurlyBracketKeyword_6) | ||
65 | c.setIndentationDecrement.before(ALSRelationDefinitionAccess.rightCurlyBracketKeyword_8) | ||
66 | c.setLinewrap.before(ALSRelationDefinitionAccess.rightCurlyBracketKeyword_8) | ||
67 | c.setLinewrap.after(ALSRelationDefinitionAccess.rightCurlyBracketKeyword_8) | ||
68 | c.setNoSpace.after(ALSRelationDefinitionAccess.leftSquareBracketKeyword_2) | ||
69 | c.setNoSpace.before(ALSRelationDefinitionAccess.rightSquareBracketKeyword_5) | ||
70 | c.setNoSpace.before(ALSRelationDefinitionAccess.commaKeyword_4_0) | ||
71 | |||
72 | // terms | ||
73 | //c.setNoSpace.before(ALSJoinAccess.rightSquareBracketKeyword_1_2_1_3) | ||
74 | c.setNoSpace.before(ALSJoinAccess.fullStopKeyword_1_1) | ||
75 | c.setNoSpace.after(ALSJoinAccess.fullStopKeyword_1_1) | ||
76 | |||
77 | c.setNoSpace.before(ALSDirectProductAccess.hyphenMinusGreaterThanSignKeyword_1_2) | ||
78 | c.setNoSpace.after(ALSDirectProductAccess.hyphenMinusGreaterThanSignKeyword_1_2) | ||
79 | |||
80 | c.setNoSpace.before(ALSVariableDeclarationAccess.colonKeyword_1) | ||
81 | // c.setNoSpace.before(ALSPreficedAccess.commaKeyword_5_3_0) | ||
82 | // c.setNoSpace.before(ALSPreficedAccess.commaKeyword_6_4_0) | ||
83 | // | ||
84 | // c.setIndentationIncrement.after(ALSPreficedAccess.leftCurlyBracketKeyword_5_4) | ||
85 | // c.setLinewrap.after(ALSPreficedAccess.leftCurlyBracketKeyword_5_4) | ||
86 | // c.setLinewrap.before(ALSPreficedAccess.rightCurlyBracketKeyword_5_6) | ||
87 | // c.setIndentationDecrement.before(ALSPreficedAccess.rightCurlyBracketKeyword_5_6) | ||
88 | |||
89 | c.setNoSpace.after(ALSBasicRelationTermAccess.leftParenthesisKeyword_6_0) | ||
90 | c.setNoSpace.before(ALSBasicRelationTermAccess.rightParenthesisKeyword_6_2) | ||
91 | |||
92 | // Quantified expression | ||
93 | c.setNoSpace.before(ALSQuantifiedAccess.commaKeyword_0_4_0) | ||
94 | |||
95 | } | ||
96 | } | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/generator/AlloyLanguageGenerator.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/generator/AlloyLanguageGenerator.xtend new file mode 100644 index 00000000..9afcc300 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/generator/AlloyLanguageGenerator.xtend | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.generator | ||
5 | |||
6 | import org.eclipse.emf.ecore.resource.Resource | ||
7 | import org.eclipse.xtext.generator.IGenerator | ||
8 | import org.eclipse.xtext.generator.IFileSystemAccess | ||
9 | |||
10 | /** | ||
11 | * Generates code from your model files on save. | ||
12 | * | ||
13 | * see http://www.eclipse.org/Xtext/documentation.html#TutorialCodeGeneration | ||
14 | */ | ||
15 | class AlloyLanguageGenerator implements IGenerator { | ||
16 | |||
17 | override void doGenerate(Resource resource, IFileSystemAccess fsa) { | ||
18 | // fsa.generateFile('greetings.txt', 'People to greet: ' + | ||
19 | // resource.allContents | ||
20 | // .filter(typeof(Greeting)) | ||
21 | // .map[name] | ||
22 | // .join(', ')) | ||
23 | } | ||
24 | } | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/scoping/AlloyLanguageScopeProvider.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/scoping/AlloyLanguageScopeProvider.xtend new file mode 100644 index 00000000..6e095f3c --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/scoping/AlloyLanguageScopeProvider.xtend | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.scoping | ||
5 | |||
6 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSDefinition | ||
7 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSDocument | ||
8 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSEnumDeclaration | ||
9 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSFunctionCall | ||
10 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSQuantifiedEx | ||
11 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSReference | ||
12 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSRelationDeclaration | ||
13 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSRelationDefinition | ||
14 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSSignatureBody | ||
15 | import hu.bme.mit.inf.dslreasoner.alloyLanguage.ALSSum | ||
16 | import java.util.ArrayList | ||
17 | import java.util.Collections | ||
18 | import java.util.HashSet | ||
19 | import java.util.LinkedList | ||
20 | import java.util.List | ||
21 | import java.util.Set | ||
22 | import org.eclipse.emf.ecore.EObject | ||
23 | import org.eclipse.emf.ecore.EReference | ||
24 | import org.eclipse.xtext.scoping.IScope | ||
25 | import org.eclipse.xtext.scoping.Scopes | ||
26 | import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider | ||
27 | |||
28 | /** | ||
29 | * This class contains custom scoping description. | ||
30 | * | ||
31 | * see : http://www.eclipse.org/Xtext/documentation.html#scoping | ||
32 | * on how and when to use it | ||
33 | * | ||
34 | */ | ||
35 | class AlloyLanguageScopeProvider extends AbstractDeclarativeScopeProvider { | ||
36 | |||
37 | def public IScope scope_ALSReference_referred(ALSReference alsReferecnce, EReference ref) { | ||
38 | val Set<ALSRelationDeclaration> declarations = new HashSet | ||
39 | |||
40 | val parent = alsReferecnce.getAllParents(ALSDocument).head as ALSDocument | ||
41 | val signatures = parent.signatureBodies.map[ALSSignatureBody x|x.declarations].flatten | ||
42 | declarations+=parent.enumDeclarations | ||
43 | declarations+=signatures | ||
44 | declarations+=parent.enumDeclarations.map[ALSEnumDeclaration x | x.literal].flatten | ||
45 | declarations+=parent.signatureBodies.map[ALSSignatureBody x|x.fields].flatten | ||
46 | |||
47 | declarations+=alsReferecnce.getAllParents(ALSQuantifiedEx).map[ALSQuantifiedEx x | x.variables].flatten | ||
48 | declarations+=alsReferecnce.getAllParents(ALSSum).map[ALSSum x | x.variables].flatten | ||
49 | declarations+=alsReferecnce.getAllParents(ALSRelationDefinition).map[ALSRelationDefinition x | x.variables].flatten | ||
50 | |||
51 | // println("---") | ||
52 | // println(declarations.map[it.name].join(", ")) | ||
53 | |||
54 | return Scopes.scopeFor(declarations) | ||
55 | } | ||
56 | //{ALSFunctionCall} (/*functionName=ALSID |*/ referredDefinition=[ALSDefinition]) | ||
57 | def public IScope scope_ALSFunctionCall_referredDefinition(ALSFunctionCall call, EReference ref) { | ||
58 | val parent = call.<ALSDocument>getAllParents(ALSDocument).head as ALSDocument | ||
59 | val list = new LinkedList<ALSDefinition> | ||
60 | list += parent.relationDefinitions | ||
61 | list += parent.functionDefinitions | ||
62 | //list.forEach[println(it.name + " " + it.eContainer)] | ||
63 | return Scopes.scopeFor(list) | ||
64 | } | ||
65 | |||
66 | def <X extends EObject> List<X> getAllParents(EObject object, Class<X> type) { | ||
67 | if(object.eContainer == null) { | ||
68 | return Collections.EMPTY_LIST | ||
69 | } else { | ||
70 | val container = object.eContainer; | ||
71 | val previousParents = container.getAllParents(type) | ||
72 | if(type.isInstance(container)){ | ||
73 | val res = new ArrayList(previousParents) | ||
74 | res+= container as X | ||
75 | return res | ||
76 | } | ||
77 | else return previousParents | ||
78 | |||
79 | } | ||
80 | } | ||
81 | } | ||
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/validation/AlloyLanguageValidator.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/validation/AlloyLanguageValidator.xtend new file mode 100644 index 00000000..8e1efc99 --- /dev/null +++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dslreasoner.alloy.language/src/hu/bme/mit/inf/dslreasoner/validation/AlloyLanguageValidator.xtend | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.validation | ||
5 | //import org.eclipse.xtext.validation.Check | ||
6 | |||
7 | /** | ||
8 | * Custom validation rules. | ||
9 | * | ||
10 | * see http://www.eclipse.org/Xtext/documentation.html#validation | ||
11 | */ | ||
12 | class AlloyLanguageValidator extends AbstractAlloyLanguageValidator { | ||
13 | |||
14 | // public static val INVALID_NAME = 'invalidName' | ||
15 | // | ||
16 | // @Check | ||
17 | // def checkGreetingStartsWithCapital(Greeting greeting) { | ||
18 | // if (!Character.isUpperCase(greeting.name.charAt(0))) { | ||
19 | // warning('Name should start with a capital', | ||
20 | // MyDslPackage.Literals.GREETING__NAME, | ||
21 | // INVALID_NAME) | ||
22 | // } | ||
23 | // } | ||
24 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.classpath b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.classpath new file mode 100644 index 00000000..1287f96c --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.classpath | |||
@@ -0,0 +1,9 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <classpath> | ||
3 | <classpathentry kind="src" path="src"/> | ||
4 | <classpathentry kind="src" path="src-gen"/> | ||
5 | <classpathentry kind="src" path="xtend-gen"/> | ||
6 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | ||
7 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
8 | <classpathentry kind="output" path="bin"/> | ||
9 | </classpath> | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.gitignore b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.gitignore new file mode 100644 index 00000000..8ae4e44d --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.gitignore | |||
@@ -0,0 +1,4 @@ | |||
1 | /bin/ | ||
2 | /src-gen/ | ||
3 | /vql-gen/ | ||
4 | /xtend-gen/ | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.project b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.project new file mode 100644 index 00000000..94d225bf --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.project | |||
@@ -0,0 +1,34 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <projectDescription> | ||
3 | <name>hu.bme.mit.inf.dslreasoner.smt.language.ui</name> | ||
4 | <comment></comment> | ||
5 | <projects> | ||
6 | </projects> | ||
7 | <buildSpec> | ||
8 | <buildCommand> | ||
9 | <name>org.eclipse.jdt.core.javabuilder</name> | ||
10 | <arguments> | ||
11 | </arguments> | ||
12 | </buildCommand> | ||
13 | <buildCommand> | ||
14 | <name>org.eclipse.pde.ManifestBuilder</name> | ||
15 | <arguments> | ||
16 | </arguments> | ||
17 | </buildCommand> | ||
18 | <buildCommand> | ||
19 | <name>org.eclipse.pde.SchemaBuilder</name> | ||
20 | <arguments> | ||
21 | </arguments> | ||
22 | </buildCommand> | ||
23 | <buildCommand> | ||
24 | <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
25 | <arguments> | ||
26 | </arguments> | ||
27 | </buildCommand> | ||
28 | </buildSpec> | ||
29 | <natures> | ||
30 | <nature>org.eclipse.jdt.core.javanature</nature> | ||
31 | <nature>org.eclipse.pde.PluginNature</nature> | ||
32 | <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
33 | </natures> | ||
34 | </projectDescription> | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.settings/org.eclipse.core.resources.prefs b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..4824b802 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.settings/org.eclipse.core.resources.prefs | |||
@@ -0,0 +1,2 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | encoding/<project>=UTF-8 | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.settings/org.eclipse.jdt.core.prefs b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..295926d9 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/.settings/org.eclipse.jdt.core.prefs | |||
@@ -0,0 +1,7 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
4 | org.eclipse.jdt.core.compiler.compliance=1.8 | ||
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
7 | org.eclipse.jdt.core.compiler.source=1.8 | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/META-INF/MANIFEST.MF b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/META-INF/MANIFEST.MF new file mode 100644 index 00000000..ba28b7ef --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/META-INF/MANIFEST.MF | |||
@@ -0,0 +1,27 @@ | |||
1 | Manifest-Version: 1.0 | ||
2 | Bundle-ManifestVersion: 2 | ||
3 | Bundle-Name: hu.bme.mit.inf.dslreasoner.smt.language.ui | ||
4 | Bundle-Vendor: My Company | ||
5 | Bundle-Version: 1.0.0.qualifier | ||
6 | Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.smt.language.ui; singleton:=true | ||
7 | Bundle-ActivationPolicy: lazy | ||
8 | Require-Bundle: hu.bme.mit.inf.dslreasoner.smt.language;visibility:=reexport, | ||
9 | org.eclipse.xtext.ui, | ||
10 | org.eclipse.ui.editors;bundle-version="3.5.0", | ||
11 | org.eclipse.ui.ide;bundle-version="3.5.0", | ||
12 | org.eclipse.xtext.ui.shared, | ||
13 | org.eclipse.ui, | ||
14 | org.eclipse.xtext.builder, | ||
15 | org.antlr.runtime, | ||
16 | org.eclipse.xtext.common.types.ui, | ||
17 | org.eclipse.xtext.ui.codetemplates.ui, | ||
18 | org.eclipse.compare, | ||
19 | org.eclipse.xtext.xbase.lib | ||
20 | Import-Package: org.apache.log4j, | ||
21 | org.eclipse.xtext.xbase.lib | ||
22 | Bundle-RequiredExecutionEnvironment: J2SE-1.5 | ||
23 | Export-Package: hu.bme.mit.inf.dslreasoner.ui.quickfix, | ||
24 | hu.bme.mit.inf.dslreasoner.ui.contentassist, | ||
25 | hu.bme.mit.inf.dslreasoner.ui.contentassist.antlr, | ||
26 | hu.bme.mit.inf.dslreasoner.ui.internal | ||
27 | Bundle-Activator: hu.bme.mit.inf.dslreasoner.ui.internal.SmtLanguageActivator | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/build.properties b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/build.properties new file mode 100644 index 00000000..31255ed0 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/build.properties | |||
@@ -0,0 +1,6 @@ | |||
1 | source.. = src/,\ | ||
2 | src-gen/,\ | ||
3 | xtend-gen/ | ||
4 | bin.includes = META-INF/,\ | ||
5 | .,\ | ||
6 | plugin.xml \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/plugin.xml b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/plugin.xml new file mode 100644 index 00000000..2602c957 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/plugin.xml | |||
@@ -0,0 +1,398 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <?eclipse version="3.0"?> | ||
3 | |||
4 | <plugin> | ||
5 | |||
6 | <extension | ||
7 | point="org.eclipse.ui.editors"> | ||
8 | <editor | ||
9 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor" | ||
10 | contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor" | ||
11 | default="true" | ||
12 | extensions="smt2" | ||
13 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
14 | name="SmtLanguage Editor"> | ||
15 | </editor> | ||
16 | </extension> | ||
17 | <extension | ||
18 | point="org.eclipse.ui.handlers"> | ||
19 | <handler | ||
20 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler" | ||
21 | commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration"> | ||
22 | <activeWhen> | ||
23 | <reference | ||
24 | definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
25 | </reference> | ||
26 | </activeWhen> | ||
27 | </handler> | ||
28 | <handler | ||
29 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler" | ||
30 | commandId="hu.bme.mit.inf.dslreasoner.SmtLanguage.validate"> | ||
31 | <activeWhen> | ||
32 | <reference | ||
33 | definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
34 | </reference> | ||
35 | </activeWhen> | ||
36 | </handler> | ||
37 | <!-- copy qualified name --> | ||
38 | <handler | ||
39 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler" | ||
40 | commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"> | ||
41 | <activeWhen> | ||
42 | <reference definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened" /> | ||
43 | </activeWhen> | ||
44 | </handler> | ||
45 | <handler | ||
46 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler" | ||
47 | commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"> | ||
48 | <activeWhen> | ||
49 | <and> | ||
50 | <reference definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.XtextEditor.opened" /> | ||
51 | <iterate> | ||
52 | <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> | ||
53 | </iterate> | ||
54 | </and> | ||
55 | </activeWhen> | ||
56 | </handler> | ||
57 | </extension> | ||
58 | <extension point="org.eclipse.core.expressions.definitions"> | ||
59 | <definition id="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
60 | <and> | ||
61 | <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/> | ||
62 | <with variable="activeEditor"> | ||
63 | <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" | ||
64 | value="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
65 | forcePluginActivation="true"/> | ||
66 | </with> | ||
67 | </and> | ||
68 | </definition> | ||
69 | <definition id="hu.bme.mit.inf.dslreasoner.SmtLanguage.XtextEditor.opened"> | ||
70 | <and> | ||
71 | <reference definitionId="isXtextEditorActive"/> | ||
72 | <with variable="activeEditor"> | ||
73 | <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" | ||
74 | value="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
75 | forcePluginActivation="true"/> | ||
76 | </with> | ||
77 | </and> | ||
78 | </definition> | ||
79 | </extension> | ||
80 | <extension | ||
81 | point="org.eclipse.ui.preferencePages"> | ||
82 | <page | ||
83 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" | ||
84 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
85 | name="SmtLanguage"> | ||
86 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage"/> | ||
87 | </page> | ||
88 | <page | ||
89 | category="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
90 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage" | ||
91 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage.coloring" | ||
92 | name="Syntax Coloring"> | ||
93 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage"/> | ||
94 | </page> | ||
95 | <page | ||
96 | category="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
97 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage" | ||
98 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage.templates" | ||
99 | name="Templates"> | ||
100 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage"/> | ||
101 | </page> | ||
102 | </extension> | ||
103 | <extension | ||
104 | point="org.eclipse.ui.propertyPages"> | ||
105 | <page | ||
106 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" | ||
107 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
108 | name="SmtLanguage"> | ||
109 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage"/> | ||
110 | <enabledWhen> | ||
111 | <adapt type="org.eclipse.core.resources.IProject"/> | ||
112 | </enabledWhen> | ||
113 | <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> | ||
114 | </page> | ||
115 | </extension> | ||
116 | <extension | ||
117 | point="org.eclipse.ui.keywords"> | ||
118 | <keyword | ||
119 | id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage" | ||
120 | label="SmtLanguage"/> | ||
121 | </extension> | ||
122 | <extension | ||
123 | point="org.eclipse.ui.commands"> | ||
124 | <command | ||
125 | description="Trigger expensive validation" | ||
126 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage.validate" | ||
127 | name="Validate"> | ||
128 | </command> | ||
129 | <!-- copy qualified name --> | ||
130 | <command | ||
131 | id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" | ||
132 | categoryId="org.eclipse.ui.category.edit" | ||
133 | description="Copy the qualified name for the selected element" | ||
134 | name="Copy Qualified Name"> | ||
135 | </command> | ||
136 | <command | ||
137 | id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" | ||
138 | categoryId="org.eclipse.ui.category.edit" | ||
139 | description="Copy the qualified name for the selected element" | ||
140 | name="Copy Qualified Name"> | ||
141 | </command> | ||
142 | </extension> | ||
143 | <extension point="org.eclipse.ui.menus"> | ||
144 | <menuContribution | ||
145 | locationURI="popup:#TextEditorContext?after=group.edit"> | ||
146 | <command | ||
147 | commandId="hu.bme.mit.inf.dslreasoner.SmtLanguage.validate" | ||
148 | style="push" | ||
149 | tooltip="Trigger expensive validation"> | ||
150 | <visibleWhen checkEnabled="false"> | ||
151 | <reference | ||
152 | definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
153 | </reference> | ||
154 | </visibleWhen> | ||
155 | </command> | ||
156 | </menuContribution> | ||
157 | <!-- copy qualified name --> | ||
158 | <menuContribution locationURI="popup:#TextEditorContext?after=copy"> | ||
159 | <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" | ||
160 | style="push" tooltip="Copy Qualified Name"> | ||
161 | <visibleWhen checkEnabled="false"> | ||
162 | <reference definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened" /> | ||
163 | </visibleWhen> | ||
164 | </command> | ||
165 | </menuContribution> | ||
166 | <menuContribution locationURI="menu:edit?after=copy"> | ||
167 | <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" | ||
168 | style="push" tooltip="Copy Qualified Name"> | ||
169 | <visibleWhen checkEnabled="false"> | ||
170 | <reference definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened" /> | ||
171 | </visibleWhen> | ||
172 | </command> | ||
173 | </menuContribution> | ||
174 | <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions"> | ||
175 | <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" | ||
176 | style="push" tooltip="Copy Qualified Name"> | ||
177 | <visibleWhen checkEnabled="false"> | ||
178 | <and> | ||
179 | <reference definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.XtextEditor.opened" /> | ||
180 | <iterate> | ||
181 | <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> | ||
182 | </iterate> | ||
183 | </and> | ||
184 | </visibleWhen> | ||
185 | </command> | ||
186 | </menuContribution> | ||
187 | </extension> | ||
188 | <extension point="org.eclipse.ui.menus"> | ||
189 | <menuContribution locationURI="popup:#TextEditorContext?endof=group.find"> | ||
190 | <command commandId="org.eclipse.xtext.ui.editor.FindReferences"> | ||
191 | <visibleWhen checkEnabled="false"> | ||
192 | <reference definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
193 | </reference> | ||
194 | </visibleWhen> | ||
195 | </command> | ||
196 | </menuContribution> | ||
197 | </extension> | ||
198 | <extension point="org.eclipse.ui.handlers"> | ||
199 | <handler | ||
200 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler" | ||
201 | commandId="org.eclipse.xtext.ui.editor.FindReferences"> | ||
202 | <activeWhen> | ||
203 | <reference | ||
204 | definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
205 | </reference> | ||
206 | </activeWhen> | ||
207 | </handler> | ||
208 | </extension> | ||
209 | |||
210 | <!-- adding resource factories --> | ||
211 | |||
212 | <extension | ||
213 | point="org.eclipse.emf.ecore.extension_parser"> | ||
214 | <parser | ||
215 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory" | ||
216 | type="smt2"> | ||
217 | </parser> | ||
218 | </extension> | ||
219 | <extension point="org.eclipse.xtext.extension_resourceServiceProvider"> | ||
220 | <resourceServiceProvider | ||
221 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider" | ||
222 | uriExtension="smt2"> | ||
223 | </resourceServiceProvider> | ||
224 | </extension> | ||
225 | |||
226 | |||
227 | <!-- marker definitions for hu.bme.mit.inf.dslreasoner.SmtLanguage --> | ||
228 | <extension | ||
229 | id="smtlanguage.check.fast" | ||
230 | name="SmtLanguage Problem" | ||
231 | point="org.eclipse.core.resources.markers"> | ||
232 | <super type="org.eclipse.xtext.ui.check.fast"/> | ||
233 | <persistent value="true"/> | ||
234 | </extension> | ||
235 | <extension | ||
236 | id="smtlanguage.check.normal" | ||
237 | name="SmtLanguage Problem" | ||
238 | point="org.eclipse.core.resources.markers"> | ||
239 | <super type="org.eclipse.xtext.ui.check.normal"/> | ||
240 | <persistent value="true"/> | ||
241 | </extension> | ||
242 | <extension | ||
243 | id="smtlanguage.check.expensive" | ||
244 | name="SmtLanguage Problem" | ||
245 | point="org.eclipse.core.resources.markers"> | ||
246 | <super type="org.eclipse.xtext.ui.check.expensive"/> | ||
247 | <persistent value="true"/> | ||
248 | </extension> | ||
249 | |||
250 | <extension | ||
251 | point="org.eclipse.xtext.builder.participant"> | ||
252 | <participant | ||
253 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant" | ||
254 | fileExtensions="smt2" | ||
255 | > | ||
256 | </participant> | ||
257 | </extension> | ||
258 | <extension | ||
259 | point="org.eclipse.ui.preferencePages"> | ||
260 | <page | ||
261 | category="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
262 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" | ||
263 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage.compiler.preferencePage" | ||
264 | name="Compiler"> | ||
265 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage"/> | ||
266 | </page> | ||
267 | </extension> | ||
268 | <extension | ||
269 | point="org.eclipse.ui.propertyPages"> | ||
270 | <page | ||
271 | category="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
272 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" | ||
273 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage.compiler.propertyPage" | ||
274 | name="Compiler"> | ||
275 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage"/> | ||
276 | <enabledWhen> | ||
277 | <adapt type="org.eclipse.core.resources.IProject"/> | ||
278 | </enabledWhen> | ||
279 | <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> | ||
280 | </page> | ||
281 | </extension> | ||
282 | |||
283 | <!-- Quick Outline --> | ||
284 | <extension | ||
285 | point="org.eclipse.ui.handlers"> | ||
286 | <handler | ||
287 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler" | ||
288 | commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"> | ||
289 | <activeWhen> | ||
290 | <reference | ||
291 | definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
292 | </reference> | ||
293 | </activeWhen> | ||
294 | </handler> | ||
295 | </extension> | ||
296 | <extension | ||
297 | point="org.eclipse.ui.commands"> | ||
298 | <command | ||
299 | description="Open the quick outline." | ||
300 | id="org.eclipse.xtext.ui.editor.outline.QuickOutline" | ||
301 | name="Quick Outline"> | ||
302 | </command> | ||
303 | </extension> | ||
304 | <extension point="org.eclipse.ui.menus"> | ||
305 | <menuContribution | ||
306 | locationURI="popup:#TextEditorContext?after=group.open"> | ||
307 | <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline" | ||
308 | style="push" | ||
309 | tooltip="Open Quick Outline"> | ||
310 | <visibleWhen checkEnabled="false"> | ||
311 | <reference definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"/> | ||
312 | </visibleWhen> | ||
313 | </command> | ||
314 | </menuContribution> | ||
315 | </extension> | ||
316 | <!-- quickfix marker resolution generator for hu.bme.mit.inf.dslreasoner.SmtLanguage --> | ||
317 | <extension | ||
318 | point="org.eclipse.ui.ide.markerResolution"> | ||
319 | <markerResolutionGenerator | ||
320 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" | ||
321 | markerType="hu.bme.mit.inf.dslreasoner.ui.smtlanguage.check.fast"> | ||
322 | <attribute | ||
323 | name="FIXABLE_KEY" | ||
324 | value="true"> | ||
325 | </attribute> | ||
326 | </markerResolutionGenerator> | ||
327 | <markerResolutionGenerator | ||
328 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" | ||
329 | markerType="hu.bme.mit.inf.dslreasoner.ui.smtlanguage.check.normal"> | ||
330 | <attribute | ||
331 | name="FIXABLE_KEY" | ||
332 | value="true"> | ||
333 | </attribute> | ||
334 | </markerResolutionGenerator> | ||
335 | <markerResolutionGenerator | ||
336 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" | ||
337 | markerType="hu.bme.mit.inf.dslreasoner.ui.smtlanguage.check.expensive"> | ||
338 | <attribute | ||
339 | name="FIXABLE_KEY" | ||
340 | value="true"> | ||
341 | </attribute> | ||
342 | </markerResolutionGenerator> | ||
343 | </extension> | ||
344 | <!-- Rename Refactoring --> | ||
345 | <extension point="org.eclipse.ui.handlers"> | ||
346 | <handler | ||
347 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler" | ||
348 | commandId="org.eclipse.xtext.ui.refactoring.RenameElement"> | ||
349 | <activeWhen> | ||
350 | <reference | ||
351 | definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
352 | </reference> | ||
353 | </activeWhen> | ||
354 | </handler> | ||
355 | </extension> | ||
356 | <extension point="org.eclipse.ui.menus"> | ||
357 | <menuContribution | ||
358 | locationURI="popup:#TextEditorContext?after=group.edit"> | ||
359 | <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement" | ||
360 | style="push"> | ||
361 | <visibleWhen checkEnabled="false"> | ||
362 | <reference | ||
363 | definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
364 | </reference> | ||
365 | </visibleWhen> | ||
366 | </command> | ||
367 | </menuContribution> | ||
368 | </extension> | ||
369 | <extension point="org.eclipse.ui.preferencePages"> | ||
370 | <page | ||
371 | category="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
372 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage" | ||
373 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage.refactoring" | ||
374 | name="Refactoring"> | ||
375 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage"/> | ||
376 | </page> | ||
377 | </extension> | ||
378 | |||
379 | <extension point="org.eclipse.compare.contentViewers"> | ||
380 | <viewer id="hu.bme.mit.inf.dslreasoner.SmtLanguage.compare.contentViewers" | ||
381 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator" | ||
382 | extensions="smt2"> | ||
383 | </viewer> | ||
384 | </extension> | ||
385 | <extension point="org.eclipse.compare.contentMergeViewers"> | ||
386 | <viewer id="hu.bme.mit.inf.dslreasoner.SmtLanguage.compare.contentMergeViewers" | ||
387 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator" | ||
388 | extensions="smt2" label="SmtLanguage Compare"> | ||
389 | </viewer> | ||
390 | </extension> | ||
391 | <extension point="org.eclipse.ui.editors.documentProviders"> | ||
392 | <provider id="hu.bme.mit.inf.dslreasoner.SmtLanguage.editors.documentProviders" | ||
393 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider" | ||
394 | extensions="smt2"> | ||
395 | </provider> | ||
396 | </extension> | ||
397 | |||
398 | </plugin> | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/plugin.xml_gen b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/plugin.xml_gen new file mode 100644 index 00000000..4edb0697 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/plugin.xml_gen | |||
@@ -0,0 +1,398 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <?eclipse version="3.0"?> | ||
3 | |||
4 | <plugin> | ||
5 | |||
6 | <extension | ||
7 | point="org.eclipse.ui.editors"> | ||
8 | <editor | ||
9 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor" | ||
10 | contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor" | ||
11 | default="true" | ||
12 | extensions="smt2" | ||
13 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
14 | name="SmtLanguage Editor"> | ||
15 | </editor> | ||
16 | </extension> | ||
17 | <extension | ||
18 | point="org.eclipse.ui.handlers"> | ||
19 | <handler | ||
20 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler" | ||
21 | commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration"> | ||
22 | <activeWhen> | ||
23 | <reference | ||
24 | definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
25 | </reference> | ||
26 | </activeWhen> | ||
27 | </handler> | ||
28 | <handler | ||
29 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler" | ||
30 | commandId="hu.bme.mit.inf.dslreasoner.SmtLanguage.validate"> | ||
31 | <activeWhen> | ||
32 | <reference | ||
33 | definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
34 | </reference> | ||
35 | </activeWhen> | ||
36 | </handler> | ||
37 | <!-- copy qualified name --> | ||
38 | <handler | ||
39 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler" | ||
40 | commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"> | ||
41 | <activeWhen> | ||
42 | <reference definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened" /> | ||
43 | </activeWhen> | ||
44 | </handler> | ||
45 | <handler | ||
46 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler" | ||
47 | commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"> | ||
48 | <activeWhen> | ||
49 | <and> | ||
50 | <reference definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.XtextEditor.opened" /> | ||
51 | <iterate> | ||
52 | <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> | ||
53 | </iterate> | ||
54 | </and> | ||
55 | </activeWhen> | ||
56 | </handler> | ||
57 | </extension> | ||
58 | <extension point="org.eclipse.core.expressions.definitions"> | ||
59 | <definition id="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
60 | <and> | ||
61 | <reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/> | ||
62 | <with variable="activeEditor"> | ||
63 | <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" | ||
64 | value="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
65 | forcePluginActivation="true"/> | ||
66 | </with> | ||
67 | </and> | ||
68 | </definition> | ||
69 | <definition id="hu.bme.mit.inf.dslreasoner.SmtLanguage.XtextEditor.opened"> | ||
70 | <and> | ||
71 | <reference definitionId="isXtextEditorActive"/> | ||
72 | <with variable="activeEditor"> | ||
73 | <test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName" | ||
74 | value="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
75 | forcePluginActivation="true"/> | ||
76 | </with> | ||
77 | </and> | ||
78 | </definition> | ||
79 | </extension> | ||
80 | <extension | ||
81 | point="org.eclipse.ui.preferencePages"> | ||
82 | <page | ||
83 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" | ||
84 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
85 | name="SmtLanguage"> | ||
86 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage"/> | ||
87 | </page> | ||
88 | <page | ||
89 | category="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
90 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage" | ||
91 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage.coloring" | ||
92 | name="Syntax Coloring"> | ||
93 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage"/> | ||
94 | </page> | ||
95 | <page | ||
96 | category="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
97 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage" | ||
98 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage.templates" | ||
99 | name="Templates"> | ||
100 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage"/> | ||
101 | </page> | ||
102 | </extension> | ||
103 | <extension | ||
104 | point="org.eclipse.ui.propertyPages"> | ||
105 | <page | ||
106 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage" | ||
107 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
108 | name="SmtLanguage"> | ||
109 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage"/> | ||
110 | <enabledWhen> | ||
111 | <adapt type="org.eclipse.core.resources.IProject"/> | ||
112 | </enabledWhen> | ||
113 | <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> | ||
114 | </page> | ||
115 | </extension> | ||
116 | <extension | ||
117 | point="org.eclipse.ui.keywords"> | ||
118 | <keyword | ||
119 | id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage" | ||
120 | label="SmtLanguage"/> | ||
121 | </extension> | ||
122 | <extension | ||
123 | point="org.eclipse.ui.commands"> | ||
124 | <command | ||
125 | description="Trigger expensive validation" | ||
126 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage.validate" | ||
127 | name="Validate"> | ||
128 | </command> | ||
129 | <!-- copy qualified name --> | ||
130 | <command | ||
131 | id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" | ||
132 | categoryId="org.eclipse.ui.category.edit" | ||
133 | description="Copy the qualified name for the selected element" | ||
134 | name="Copy Qualified Name"> | ||
135 | </command> | ||
136 | <command | ||
137 | id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" | ||
138 | categoryId="org.eclipse.ui.category.edit" | ||
139 | description="Copy the qualified name for the selected element" | ||
140 | name="Copy Qualified Name"> | ||
141 | </command> | ||
142 | </extension> | ||
143 | <extension point="org.eclipse.ui.menus"> | ||
144 | <menuContribution | ||
145 | locationURI="popup:#TextEditorContext?after=group.edit"> | ||
146 | <command | ||
147 | commandId="hu.bme.mit.inf.dslreasoner.SmtLanguage.validate" | ||
148 | style="push" | ||
149 | tooltip="Trigger expensive validation"> | ||
150 | <visibleWhen checkEnabled="false"> | ||
151 | <reference | ||
152 | definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
153 | </reference> | ||
154 | </visibleWhen> | ||
155 | </command> | ||
156 | </menuContribution> | ||
157 | <!-- copy qualified name --> | ||
158 | <menuContribution locationURI="popup:#TextEditorContext?after=copy"> | ||
159 | <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" | ||
160 | style="push" tooltip="Copy Qualified Name"> | ||
161 | <visibleWhen checkEnabled="false"> | ||
162 | <reference definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened" /> | ||
163 | </visibleWhen> | ||
164 | </command> | ||
165 | </menuContribution> | ||
166 | <menuContribution locationURI="menu:edit?after=copy"> | ||
167 | <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName" | ||
168 | style="push" tooltip="Copy Qualified Name"> | ||
169 | <visibleWhen checkEnabled="false"> | ||
170 | <reference definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened" /> | ||
171 | </visibleWhen> | ||
172 | </command> | ||
173 | </menuContribution> | ||
174 | <menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions"> | ||
175 | <command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName" | ||
176 | style="push" tooltip="Copy Qualified Name"> | ||
177 | <visibleWhen checkEnabled="false"> | ||
178 | <and> | ||
179 | <reference definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.XtextEditor.opened" /> | ||
180 | <iterate> | ||
181 | <adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" /> | ||
182 | </iterate> | ||
183 | </and> | ||
184 | </visibleWhen> | ||
185 | </command> | ||
186 | </menuContribution> | ||
187 | </extension> | ||
188 | <extension point="org.eclipse.ui.menus"> | ||
189 | <menuContribution locationURI="popup:#TextEditorContext?endof=group.find"> | ||
190 | <command commandId="org.eclipse.xtext.ui.editor.FindReferences"> | ||
191 | <visibleWhen checkEnabled="false"> | ||
192 | <reference definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
193 | </reference> | ||
194 | </visibleWhen> | ||
195 | </command> | ||
196 | </menuContribution> | ||
197 | </extension> | ||
198 | <extension point="org.eclipse.ui.handlers"> | ||
199 | <handler | ||
200 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler" | ||
201 | commandId="org.eclipse.xtext.ui.editor.FindReferences"> | ||
202 | <activeWhen> | ||
203 | <reference | ||
204 | definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
205 | </reference> | ||
206 | </activeWhen> | ||
207 | </handler> | ||
208 | </extension> | ||
209 | |||
210 | <!-- adding resource factories --> | ||
211 | |||
212 | <extension | ||
213 | point="org.eclipse.emf.ecore.extension_parser"> | ||
214 | <parser | ||
215 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory" | ||
216 | type="smt2"> | ||
217 | </parser> | ||
218 | </extension> | ||
219 | <extension point="org.eclipse.xtext.extension_resourceServiceProvider"> | ||
220 | <resourceServiceProvider | ||
221 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider" | ||
222 | uriExtension="smt2"> | ||
223 | </resourceServiceProvider> | ||
224 | </extension> | ||
225 | |||
226 | |||
227 | <!-- marker definitions for hu.bme.mit.inf.dslreasoner.SmtLanguage --> | ||
228 | <extension | ||
229 | id="smtlanguage.check.fast" | ||
230 | name="SmtLanguage Problem" | ||
231 | point="org.eclipse.core.resources.markers"> | ||
232 | <super type="org.eclipse.xtext.ui.check.fast"/> | ||
233 | <persistent value="true"/> | ||
234 | </extension> | ||
235 | <extension | ||
236 | id="smtlanguage.check.normal" | ||
237 | name="SmtLanguage Problem" | ||
238 | point="org.eclipse.core.resources.markers"> | ||
239 | <super type="org.eclipse.xtext.ui.check.normal"/> | ||
240 | <persistent value="true"/> | ||
241 | </extension> | ||
242 | <extension | ||
243 | id="smtlanguage.check.expensive" | ||
244 | name="SmtLanguage Problem" | ||
245 | point="org.eclipse.core.resources.markers"> | ||
246 | <super type="org.eclipse.xtext.ui.check.expensive"/> | ||
247 | <persistent value="true"/> | ||
248 | </extension> | ||
249 | |||
250 | <extension | ||
251 | point="org.eclipse.xtext.builder.participant"> | ||
252 | <participant | ||
253 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant" | ||
254 | fileExtensions="smt2" | ||
255 | > | ||
256 | </participant> | ||
257 | </extension> | ||
258 | <extension | ||
259 | point="org.eclipse.ui.preferencePages"> | ||
260 | <page | ||
261 | category="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
262 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" | ||
263 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage.compiler.preferencePage" | ||
264 | name="Compiler"> | ||
265 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage"/> | ||
266 | </page> | ||
267 | </extension> | ||
268 | <extension | ||
269 | point="org.eclipse.ui.propertyPages"> | ||
270 | <page | ||
271 | category="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
272 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage" | ||
273 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage.compiler.propertyPage" | ||
274 | name="Compiler"> | ||
275 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage"/> | ||
276 | <enabledWhen> | ||
277 | <adapt type="org.eclipse.core.resources.IProject"/> | ||
278 | </enabledWhen> | ||
279 | <filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/> | ||
280 | </page> | ||
281 | </extension> | ||
282 | |||
283 | <!-- Quick Outline --> | ||
284 | <extension | ||
285 | point="org.eclipse.ui.handlers"> | ||
286 | <handler | ||
287 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler" | ||
288 | commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"> | ||
289 | <activeWhen> | ||
290 | <reference | ||
291 | definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
292 | </reference> | ||
293 | </activeWhen> | ||
294 | </handler> | ||
295 | </extension> | ||
296 | <extension | ||
297 | point="org.eclipse.ui.commands"> | ||
298 | <command | ||
299 | description="Open the quick outline." | ||
300 | id="org.eclipse.xtext.ui.editor.outline.QuickOutline" | ||
301 | name="Quick Outline"> | ||
302 | </command> | ||
303 | </extension> | ||
304 | <extension point="org.eclipse.ui.menus"> | ||
305 | <menuContribution | ||
306 | locationURI="popup:#TextEditorContext?after=group.open"> | ||
307 | <command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline" | ||
308 | style="push" | ||
309 | tooltip="Open Quick Outline"> | ||
310 | <visibleWhen checkEnabled="false"> | ||
311 | <reference definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"/> | ||
312 | </visibleWhen> | ||
313 | </command> | ||
314 | </menuContribution> | ||
315 | </extension> | ||
316 | <!-- quickfix marker resolution generator for hu.bme.mit.inf.dslreasoner.SmtLanguage --> | ||
317 | <extension | ||
318 | point="org.eclipse.ui.ide.markerResolution"> | ||
319 | <markerResolutionGenerator | ||
320 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" | ||
321 | markerType="hu.bme.mit.inf.dslreasoner.ui.smtlanguage.check.fast"> | ||
322 | <attribute | ||
323 | name="FIXABLE_KEY" | ||
324 | value="true"> | ||
325 | </attribute> | ||
326 | </markerResolutionGenerator> | ||
327 | <markerResolutionGenerator | ||
328 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" | ||
329 | markerType="hu.bme.mit.inf.dslreasoner.ui.smtlanguage.check.normal"> | ||
330 | <attribute | ||
331 | name="FIXABLE_KEY" | ||
332 | value="true"> | ||
333 | </attribute> | ||
334 | </markerResolutionGenerator> | ||
335 | <markerResolutionGenerator | ||
336 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator" | ||
337 | markerType="hu.bme.mit.inf.dslreasoner.ui.smtlanguage.check.expensive"> | ||
338 | <attribute | ||
339 | name="FIXABLE_KEY" | ||
340 | value="true"> | ||
341 | </attribute> | ||
342 | </markerResolutionGenerator> | ||
343 | </extension> | ||
344 | <!-- Rename Refactoring --> | ||
345 | <extension point="org.eclipse.ui.handlers"> | ||
346 | <handler | ||
347 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler" | ||
348 | commandId="org.eclipse.xtext.ui.refactoring.RenameElement"> | ||
349 | <activeWhen> | ||
350 | <reference | ||
351 | definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
352 | </reference> | ||
353 | </activeWhen> | ||
354 | </handler> | ||
355 | </extension> | ||
356 | <extension point="org.eclipse.ui.menus"> | ||
357 | <menuContribution | ||
358 | locationURI="popup:#TextEditorContext?after=group.edit"> | ||
359 | <command commandId="org.eclipse.xtext.ui.refactoring.RenameElement" | ||
360 | style="push"> | ||
361 | <visibleWhen checkEnabled="false"> | ||
362 | <reference | ||
363 | definitionId="hu.bme.mit.inf.dslreasoner.SmtLanguage.Editor.opened"> | ||
364 | </reference> | ||
365 | </visibleWhen> | ||
366 | </command> | ||
367 | </menuContribution> | ||
368 | </extension> | ||
369 | <extension point="org.eclipse.ui.preferencePages"> | ||
370 | <page | ||
371 | category="hu.bme.mit.inf.dslreasoner.SmtLanguage" | ||
372 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage" | ||
373 | id="hu.bme.mit.inf.dslreasoner.SmtLanguage.refactoring" | ||
374 | name="Refactoring"> | ||
375 | <keywordReference id="hu.bme.mit.inf.dslreasoner.ui.keyword_SmtLanguage"/> | ||
376 | </page> | ||
377 | </extension> | ||
378 | |||
379 | <extension point="org.eclipse.compare.contentViewers"> | ||
380 | <viewer id="hu.bme.mit.inf.dslreasoner.SmtLanguage.compare.contentViewers" | ||
381 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator" | ||
382 | extensions="smt2"> | ||
383 | </viewer> | ||
384 | </extension> | ||
385 | <extension point="org.eclipse.compare.contentMergeViewers"> | ||
386 | <viewer id="hu.bme.mit.inf.dslreasoner.SmtLanguage.compare.contentMergeViewers" | ||
387 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator" | ||
388 | extensions="smt2" label="SmtLanguage Compare"> | ||
389 | </viewer> | ||
390 | </extension> | ||
391 | <extension point="org.eclipse.ui.editors.documentProviders"> | ||
392 | <provider id="hu.bme.mit.inf.dslreasoner.SmtLanguage.editors.documentProviders" | ||
393 | class="hu.bme.mit.inf.dslreasoner.ui.SmtLanguageExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider" | ||
394 | extensions="smt2"> | ||
395 | </provider> | ||
396 | </extension> | ||
397 | |||
398 | </plugin> | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/SmtLanguageUiModule.java b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/SmtLanguageUiModule.java new file mode 100644 index 00000000..371ccec5 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/SmtLanguageUiModule.java | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.ui; | ||
5 | |||
6 | import org.eclipse.ui.plugin.AbstractUIPlugin; | ||
7 | |||
8 | /** | ||
9 | * Use this class to register components to be used within the IDE. | ||
10 | */ | ||
11 | public class SmtLanguageUiModule extends hu.bme.mit.inf.dslreasoner.ui.AbstractSmtLanguageUiModule { | ||
12 | public SmtLanguageUiModule(AbstractUIPlugin plugin) { | ||
13 | super(plugin); | ||
14 | } | ||
15 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/contentassist/SmtLanguageProposalProvider.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/contentassist/SmtLanguageProposalProvider.xtend new file mode 100644 index 00000000..b00cbdfa --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/contentassist/SmtLanguageProposalProvider.xtend | |||
@@ -0,0 +1,12 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.ui.contentassist | ||
5 | |||
6 | import hu.bme.mit.inf.dslreasoner.ui.contentassist.AbstractSmtLanguageProposalProvider | ||
7 | |||
8 | /** | ||
9 | * see http://www.eclipse.org/Xtext/documentation.html#contentAssist on how to customize content assistant | ||
10 | */ | ||
11 | class SmtLanguageProposalProvider extends AbstractSmtLanguageProposalProvider { | ||
12 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/labeling/SmtLanguageDescriptionLabelProvider.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/labeling/SmtLanguageDescriptionLabelProvider.xtend new file mode 100644 index 00000000..1aa3189f --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/labeling/SmtLanguageDescriptionLabelProvider.xtend | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.ui.labeling | ||
5 | |||
6 | //import org.eclipse.xtext.resource.IEObjectDescription | ||
7 | |||
8 | /** | ||
9 | * Provides labels for a IEObjectDescriptions and IResourceDescriptions. | ||
10 | * | ||
11 | * see http://www.eclipse.org/Xtext/documentation.html#labelProvider | ||
12 | */ | ||
13 | class SmtLanguageDescriptionLabelProvider extends org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider { | ||
14 | |||
15 | // Labels and icons can be computed like this: | ||
16 | |||
17 | // override text(IEObjectDescription ele) { | ||
18 | // ele.name.toString | ||
19 | // } | ||
20 | // | ||
21 | // override image(IEObjectDescription ele) { | ||
22 | // ele.EClass.name + '.gif' | ||
23 | // } | ||
24 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/labeling/SmtLanguageLabelProvider.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/labeling/SmtLanguageLabelProvider.xtend new file mode 100644 index 00000000..3d26adea --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/labeling/SmtLanguageLabelProvider.xtend | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.ui.labeling | ||
5 | |||
6 | import com.google.inject.Inject | ||
7 | |||
8 | /** | ||
9 | * Provides labels for a EObjects. | ||
10 | * | ||
11 | * see http://www.eclipse.org/Xtext/documentation.html#labelProvider | ||
12 | */ | ||
13 | class SmtLanguageLabelProvider extends org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider { | ||
14 | |||
15 | @Inject | ||
16 | new(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider delegate) { | ||
17 | super(delegate); | ||
18 | } | ||
19 | |||
20 | // Labels and icons can be computed like this: | ||
21 | |||
22 | // def text(Greeting ele) { | ||
23 | // 'A greeting to ' + ele.name | ||
24 | // } | ||
25 | // | ||
26 | // def image(Greeting ele) { | ||
27 | // 'Greeting.gif' | ||
28 | // } | ||
29 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/outline/SmtLanguageOutlineTreeProvider.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/outline/SmtLanguageOutlineTreeProvider.xtend new file mode 100644 index 00000000..3ad5725a --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/outline/SmtLanguageOutlineTreeProvider.xtend | |||
@@ -0,0 +1,13 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.ui.outline | ||
5 | |||
6 | /** | ||
7 | * Customization of the default outline structure. | ||
8 | * | ||
9 | * see http://www.eclipse.org/Xtext/documentation.html#outline | ||
10 | */ | ||
11 | class SmtLanguageOutlineTreeProvider extends org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider { | ||
12 | |||
13 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/quickfix/SmtLanguageQuickfixProvider.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/quickfix/SmtLanguageQuickfixProvider.xtend new file mode 100644 index 00000000..7fae2761 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language.ui/src/hu/bme/mit/inf/dslreasoner/ui/quickfix/SmtLanguageQuickfixProvider.xtend | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.ui.quickfix | ||
5 | |||
6 | //import org.eclipse.xtext.ui.editor.quickfix.Fix | ||
7 | //import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionAcceptor | ||
8 | //import org.eclipse.xtext.validation.Issue | ||
9 | |||
10 | /** | ||
11 | * Custom quickfixes. | ||
12 | * | ||
13 | * see http://www.eclipse.org/Xtext/documentation.html#quickfixes | ||
14 | */ | ||
15 | class SmtLanguageQuickfixProvider extends org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider { | ||
16 | |||
17 | // @Fix(MyDslValidator::INVALID_NAME) | ||
18 | // def capitalizeName(Issue issue, IssueResolutionAcceptor acceptor) { | ||
19 | // acceptor.accept(issue, 'Capitalize name', 'Capitalize the name.', 'upcase.png') [ | ||
20 | // context | | ||
21 | // val xtextDocument = context.xtextDocument | ||
22 | // val firstLetter = xtextDocument.get(issue.offset, 1) | ||
23 | // xtextDocument.replace(issue.offset, 1, firstLetter.toUpperCase) | ||
24 | // ] | ||
25 | // } | ||
26 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.classpath b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.classpath new file mode 100644 index 00000000..1287f96c --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.classpath | |||
@@ -0,0 +1,9 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <classpath> | ||
3 | <classpathentry kind="src" path="src"/> | ||
4 | <classpathentry kind="src" path="src-gen"/> | ||
5 | <classpathentry kind="src" path="xtend-gen"/> | ||
6 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | ||
7 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
8 | <classpathentry kind="output" path="bin"/> | ||
9 | </classpath> | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.gitignore b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.gitignore new file mode 100644 index 00000000..8ae4e44d --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.gitignore | |||
@@ -0,0 +1,4 @@ | |||
1 | /bin/ | ||
2 | /src-gen/ | ||
3 | /vql-gen/ | ||
4 | /xtend-gen/ | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.launch/Generate Language Infrastructure (hu.bme.mit.inf.dslreasoner.smt.language).launch b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.launch/Generate Language Infrastructure (hu.bme.mit.inf.dslreasoner.smt.language).launch new file mode 100644 index 00000000..e448edbe --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.launch/Generate Language Infrastructure (hu.bme.mit.inf.dslreasoner.smt.language).launch | |||
@@ -0,0 +1,17 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | <launchConfiguration type="org.eclipse.emf.mwe2.launch.Mwe2LaunchConfigurationType"> | ||
3 | <stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <launchConfigurationWorkingSet factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1299248699643_13" label="working set" name="working set"> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/hu.bme.mit.inf.dslreasoner.smt.language" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/hu.bme.mit.inf.dslreasoner.smt.language.generator" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/hu.bme.mit.inf.dslreasoner.smt.language.tests" type="4"/> <item factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/hu.bme.mit.inf.dslreasoner.smt.language.ui" type="4"/> </launchConfigurationWorkingSet>}"/> | ||
4 | <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> | ||
5 | <listEntry value="/hu.bme.mit.inf.dslreasoner.smt.language"/> | ||
6 | </listAttribute> | ||
7 | <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> | ||
8 | <listEntry value="4"/> | ||
9 | </listAttribute> | ||
10 | <listAttribute key="org.eclipse.debug.ui.favoriteGroups"> | ||
11 | <listEntry value="org.eclipse.debug.ui.launchGroup.run"/> | ||
12 | </listAttribute> | ||
13 | <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher"/> | ||
14 | <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="src/hu/bme/mit/inf/dslreasoner/GenerateSmtLanguage.mwe2"/> | ||
15 | <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="hu.bme.mit.inf.dslreasoner.smt.language"/> | ||
16 | <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx512m"/> | ||
17 | </launchConfiguration> | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.project b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.project new file mode 100644 index 00000000..b4b09620 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.project | |||
@@ -0,0 +1,34 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <projectDescription> | ||
3 | <name>hu.bme.mit.inf.dslreasoner.smt.language</name> | ||
4 | <comment></comment> | ||
5 | <projects> | ||
6 | </projects> | ||
7 | <buildSpec> | ||
8 | <buildCommand> | ||
9 | <name>org.eclipse.jdt.core.javabuilder</name> | ||
10 | <arguments> | ||
11 | </arguments> | ||
12 | </buildCommand> | ||
13 | <buildCommand> | ||
14 | <name>org.eclipse.pde.ManifestBuilder</name> | ||
15 | <arguments> | ||
16 | </arguments> | ||
17 | </buildCommand> | ||
18 | <buildCommand> | ||
19 | <name>org.eclipse.pde.SchemaBuilder</name> | ||
20 | <arguments> | ||
21 | </arguments> | ||
22 | </buildCommand> | ||
23 | <buildCommand> | ||
24 | <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
25 | <arguments> | ||
26 | </arguments> | ||
27 | </buildCommand> | ||
28 | </buildSpec> | ||
29 | <natures> | ||
30 | <nature>org.eclipse.jdt.core.javanature</nature> | ||
31 | <nature>org.eclipse.pde.PluginNature</nature> | ||
32 | <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
33 | </natures> | ||
34 | </projectDescription> | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.settings/org.eclipse.core.resources.prefs b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..4824b802 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.settings/org.eclipse.core.resources.prefs | |||
@@ -0,0 +1,2 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | encoding/<project>=UTF-8 | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.settings/org.eclipse.jdt.core.prefs b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..295926d9 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/.settings/org.eclipse.jdt.core.prefs | |||
@@ -0,0 +1,7 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
4 | org.eclipse.jdt.core.compiler.compliance=1.8 | ||
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
7 | org.eclipse.jdt.core.compiler.source=1.8 | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/META-INF/MANIFEST.MF b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/META-INF/MANIFEST.MF new file mode 100644 index 00000000..ec8f78ce --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/META-INF/MANIFEST.MF | |||
@@ -0,0 +1,37 @@ | |||
1 | Manifest-Version: 1.0 | ||
2 | Bundle-ManifestVersion: 2 | ||
3 | Bundle-Name: hu.bme.mit.inf.dslreasoner.smt.language | ||
4 | Bundle-Vendor: My Company | ||
5 | Bundle-Version: 1.0.0.qualifier | ||
6 | Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.smt.language; singleton:=true | ||
7 | Bundle-ActivationPolicy: lazy | ||
8 | Require-Bundle: org.eclipse.xtext;visibility:=reexport, | ||
9 | org.eclipse.xtext.xbase;resolution:=optional;visibility:=reexport, | ||
10 | org.eclipse.xtext.generator;resolution:=optional, | ||
11 | org.apache.commons.logging;bundle-version="1.0.4";resolution:=optional, | ||
12 | org.eclipse.emf.codegen.ecore;resolution:=optional, | ||
13 | org.eclipse.emf.mwe.utils;resolution:=optional, | ||
14 | org.eclipse.emf.mwe2.launch;resolution:=optional, | ||
15 | org.eclipse.xtext.util, | ||
16 | org.eclipse.emf.ecore, | ||
17 | org.eclipse.emf.common, | ||
18 | org.antlr.runtime, | ||
19 | org.eclipse.xtext.common.types, | ||
20 | org.objectweb.asm;bundle-version="[5.0.1,6.0.0)";resolution:=optional, | ||
21 | org.eclipse.xtext.xbase.lib | ||
22 | Import-Package: org.apache.log4j, | ||
23 | org.eclipse.xtext.xbase.lib | ||
24 | Bundle-RequiredExecutionEnvironment: J2SE-1.5 | ||
25 | Export-Package: hu.bme.mit.inf.dslreasoner, | ||
26 | hu.bme.mit.inf.dslreasoner.services, | ||
27 | hu.bme.mit.inf.dslreasoner.smtLanguage, | ||
28 | hu.bme.mit.inf.dslreasoner.smtLanguage.impl, | ||
29 | hu.bme.mit.inf.dslreasoner.smtLanguage.util, | ||
30 | hu.bme.mit.inf.dslreasoner.serializer, | ||
31 | hu.bme.mit.inf.dslreasoner.parser.antlr, | ||
32 | hu.bme.mit.inf.dslreasoner.parser.antlr.internal, | ||
33 | hu.bme.mit.inf.dslreasoner.validation, | ||
34 | hu.bme.mit.inf.dslreasoner.scoping, | ||
35 | hu.bme.mit.inf.dslreasoner.generator, | ||
36 | hu.bme.mit.inf.dslreasoner.formatting | ||
37 | |||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/build.properties b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/build.properties new file mode 100644 index 00000000..07a42688 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/build.properties | |||
@@ -0,0 +1,7 @@ | |||
1 | source.. = src/,\ | ||
2 | src-gen/,\ | ||
3 | xtend-gen/ | ||
4 | bin.includes = model/,\ | ||
5 | META-INF/,\ | ||
6 | .,\ | ||
7 | plugin.xml \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/model/generated/SmtLanguage.ecore b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/model/generated/SmtLanguage.ecore new file mode 100644 index 00000000..e49cb530 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/model/generated/SmtLanguage.ecore | |||
@@ -0,0 +1,304 @@ | |||
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="smtLanguage" nsURI="http://www.bme.hu/mit/inf/dslreasoner/SmtLanguage" | ||
4 | nsPrefix="smtLanguage"> | ||
5 | <eClassifiers xsi:type="ecore:EClass" name="SMTDocument"> | ||
6 | <eStructuralFeatures xsi:type="ecore:EReference" name="input" eType="#//SMTInput" | ||
7 | containment="true"/> | ||
8 | <eStructuralFeatures xsi:type="ecore:EReference" name="output" eType="#//SMTOutput" | ||
9 | containment="true"/> | ||
10 | </eClassifiers> | ||
11 | <eClassifiers xsi:type="ecore:EClass" name="SMTInput"> | ||
12 | <eStructuralFeatures xsi:type="ecore:EReference" name="options" upperBound="-1" | ||
13 | eType="#//SMTOption" containment="true"/> | ||
14 | <eStructuralFeatures xsi:type="ecore:EReference" name="typeDeclarations" upperBound="-1" | ||
15 | eType="#//SMTType" containment="true"/> | ||
16 | <eStructuralFeatures xsi:type="ecore:EReference" name="functionDeclarations" upperBound="-1" | ||
17 | eType="#//SMTFunctionDeclaration" containment="true"/> | ||
18 | <eStructuralFeatures xsi:type="ecore:EReference" name="functionDefinition" upperBound="-1" | ||
19 | eType="#//SMTFunctionDefinition" containment="true"/> | ||
20 | <eStructuralFeatures xsi:type="ecore:EReference" name="assertions" upperBound="-1" | ||
21 | eType="#//SMTAssertion" containment="true"/> | ||
22 | <eStructuralFeatures xsi:type="ecore:EReference" name="satCommand" eType="#//SMTSatCommand" | ||
23 | containment="true"/> | ||
24 | <eStructuralFeatures xsi:type="ecore:EReference" name="getModelCommand" eType="#//SMTGetModelCommand" | ||
25 | containment="true"/> | ||
26 | </eClassifiers> | ||
27 | <eClassifiers xsi:type="ecore:EClass" name="SMTOutput"> | ||
28 | <eStructuralFeatures xsi:type="ecore:EReference" name="satResult" eType="#//SMTResult" | ||
29 | containment="true"/> | ||
30 | <eStructuralFeatures xsi:type="ecore:EReference" name="getModelResult" eType="#//SMTResult" | ||
31 | containment="true"/> | ||
32 | <eStructuralFeatures xsi:type="ecore:EReference" name="statistics" eType="#//SMTStatisticsSection" | ||
33 | containment="true"/> | ||
34 | </eClassifiers> | ||
35 | <eClassifiers xsi:type="ecore:EClass" name="SMTOption"> | ||
36 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
37 | <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="#//SMTAtomicTerm" | ||
38 | containment="true"/> | ||
39 | </eClassifiers> | ||
40 | <eClassifiers xsi:type="ecore:EClass" name="SMTType"> | ||
41 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
42 | </eClassifiers> | ||
43 | <eClassifiers xsi:type="ecore:EClass" name="SMTEnumLiteral" eSuperTypes="#//SMTSymbolicDeclaration"/> | ||
44 | <eClassifiers xsi:type="ecore:EClass" name="SMTEnumeratedTypeDeclaration" eSuperTypes="#//SMTType"> | ||
45 | <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1" | ||
46 | eType="#//SMTEnumLiteral" containment="true"/> | ||
47 | </eClassifiers> | ||
48 | <eClassifiers xsi:type="ecore:EClass" name="SMTSetTypeDeclaration" eSuperTypes="#//SMTType"/> | ||
49 | <eClassifiers xsi:type="ecore:EClass" name="SMTTypeReference"/> | ||
50 | <eClassifiers xsi:type="ecore:EClass" name="SMTComplexTypeReference" eSuperTypes="#//SMTTypeReference"> | ||
51 | <eStructuralFeatures xsi:type="ecore:EReference" name="referred" eType="#//SMTType"/> | ||
52 | </eClassifiers> | ||
53 | <eClassifiers xsi:type="ecore:EClass" name="SMTPrimitiveTypeReference" eSuperTypes="#//SMTTypeReference"/> | ||
54 | <eClassifiers xsi:type="ecore:EClass" name="SMTIntTypeReference" eSuperTypes="#//SMTPrimitiveTypeReference"/> | ||
55 | <eClassifiers xsi:type="ecore:EClass" name="SMTBoolTypeReference" eSuperTypes="#//SMTPrimitiveTypeReference"/> | ||
56 | <eClassifiers xsi:type="ecore:EClass" name="SMTRealTypeReference" eSuperTypes="#//SMTPrimitiveTypeReference"/> | ||
57 | <eClassifiers xsi:type="ecore:EClass" name="SMTFunctionDeclaration" eSuperTypes="#//SMTSymbolicDeclaration"> | ||
58 | <eStructuralFeatures xsi:type="ecore:EReference" name="parameters" upperBound="-1" | ||
59 | eType="#//SMTTypeReference" containment="true"/> | ||
60 | <eStructuralFeatures xsi:type="ecore:EReference" name="range" eType="#//SMTTypeReference" | ||
61 | containment="true"/> | ||
62 | </eClassifiers> | ||
63 | <eClassifiers xsi:type="ecore:EClass" name="SMTFunctionDefinition" eSuperTypes="#//SMTSymbolicDeclaration"> | ||
64 | <eStructuralFeatures xsi:type="ecore:EReference" name="parameters" upperBound="-1" | ||
65 | eType="#//SMTSortedVariable" containment="true"/> | ||
66 | <eStructuralFeatures xsi:type="ecore:EReference" name="range" eType="#//SMTTypeReference" | ||
67 | containment="true"/> | ||
68 | <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="#//SMTTerm" | ||
69 | containment="true"/> | ||
70 | </eClassifiers> | ||
71 | <eClassifiers xsi:type="ecore:EClass" name="SMTTerm"/> | ||
72 | <eClassifiers xsi:type="ecore:EClass" name="SMTSymbolicDeclaration"> | ||
73 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
74 | </eClassifiers> | ||
75 | <eClassifiers xsi:type="ecore:EClass" name="SMTSymbolicValue" eSuperTypes="#//SMTTerm"> | ||
76 | <eStructuralFeatures xsi:type="ecore:EReference" name="symbolicReference" eType="#//SMTSymbolicDeclaration"/> | ||
77 | <eStructuralFeatures xsi:type="ecore:EReference" name="parameterSubstitutions" | ||
78 | upperBound="-1" eType="#//SMTTerm" containment="true"/> | ||
79 | </eClassifiers> | ||
80 | <eClassifiers xsi:type="ecore:EClass" name="SMTAtomicTerm" eSuperTypes="#//SMTTerm"/> | ||
81 | <eClassifiers xsi:type="ecore:EClass" name="SMTIntLiteral" eSuperTypes="#//SMTAtomicTerm"> | ||
82 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> | ||
83 | </eClassifiers> | ||
84 | <eClassifiers xsi:type="ecore:EClass" name="SMTBoolLiteral" eSuperTypes="#//SMTAtomicTerm"> | ||
85 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | ||
86 | </eClassifiers> | ||
87 | <eClassifiers xsi:type="ecore:EClass" name="SMTRealLiteral" eSuperTypes="#//SMTAtomicTerm"> | ||
88 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBigDecimal"/> | ||
89 | </eClassifiers> | ||
90 | <eClassifiers xsi:type="ecore:EClass" name="SMTSortedVariable" eSuperTypes="#//SMTSymbolicDeclaration"> | ||
91 | <eStructuralFeatures xsi:type="ecore:EReference" name="range" eType="#//SMTTypeReference" | ||
92 | containment="true"/> | ||
93 | </eClassifiers> | ||
94 | <eClassifiers xsi:type="ecore:EClass" name="SMTQuantifiedExpression" eSuperTypes="#//SMTTerm"> | ||
95 | <eStructuralFeatures xsi:type="ecore:EReference" name="quantifiedVariables" upperBound="-1" | ||
96 | eType="#//SMTSortedVariable" containment="true"/> | ||
97 | <eStructuralFeatures xsi:type="ecore:EReference" name="expression" eType="#//SMTTerm" | ||
98 | containment="true"/> | ||
99 | <eStructuralFeatures xsi:type="ecore:EReference" name="pattern" eType="#//SMTTerm" | ||
100 | containment="true"/> | ||
101 | </eClassifiers> | ||
102 | <eClassifiers xsi:type="ecore:EClass" name="SMTExists" eSuperTypes="#//SMTQuantifiedExpression"/> | ||
103 | <eClassifiers xsi:type="ecore:EClass" name="SMTForall" eSuperTypes="#//SMTQuantifiedExpression"/> | ||
104 | <eClassifiers xsi:type="ecore:EClass" name="SMTBoolOperation" eSuperTypes="#//SMTTerm"/> | ||
105 | <eClassifiers xsi:type="ecore:EClass" name="SMTAnd" eSuperTypes="#//SMTBoolOperation"> | ||
106 | <eStructuralFeatures xsi:type="ecore:EReference" name="operands" upperBound="-1" | ||
107 | eType="#//SMTTerm" containment="true"/> | ||
108 | </eClassifiers> | ||
109 | <eClassifiers xsi:type="ecore:EClass" name="SMTOr" eSuperTypes="#//SMTBoolOperation"> | ||
110 | <eStructuralFeatures xsi:type="ecore:EReference" name="operands" upperBound="-1" | ||
111 | eType="#//SMTTerm" containment="true"/> | ||
112 | </eClassifiers> | ||
113 | <eClassifiers xsi:type="ecore:EClass" name="SMTImpl" eSuperTypes="#//SMTBoolOperation"> | ||
114 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//SMTTerm" | ||
115 | containment="true"/> | ||
116 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//SMTTerm" | ||
117 | containment="true"/> | ||
118 | </eClassifiers> | ||
119 | <eClassifiers xsi:type="ecore:EClass" name="SMTNot" eSuperTypes="#//SMTBoolOperation"> | ||
120 | <eStructuralFeatures xsi:type="ecore:EReference" name="operand" eType="#//SMTTerm" | ||
121 | containment="true"/> | ||
122 | </eClassifiers> | ||
123 | <eClassifiers xsi:type="ecore:EClass" name="SMTIff" eSuperTypes="#//SMTBoolOperation"> | ||
124 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//SMTTerm" | ||
125 | containment="true"/> | ||
126 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//SMTTerm" | ||
127 | containment="true"/> | ||
128 | </eClassifiers> | ||
129 | <eClassifiers xsi:type="ecore:EClass" name="SMTITE" eSuperTypes="#//SMTTerm"> | ||
130 | <eStructuralFeatures xsi:type="ecore:EReference" name="condition" eType="#//SMTTerm" | ||
131 | containment="true"/> | ||
132 | <eStructuralFeatures xsi:type="ecore:EReference" name="if" eType="#//SMTTerm" | ||
133 | containment="true"/> | ||
134 | <eStructuralFeatures xsi:type="ecore:EReference" name="else" eType="#//SMTTerm" | ||
135 | containment="true"/> | ||
136 | </eClassifiers> | ||
137 | <eClassifiers xsi:type="ecore:EClass" name="SMTLet" eSuperTypes="#//SMTTerm"> | ||
138 | <eStructuralFeatures xsi:type="ecore:EReference" name="inlineConstantDefinitions" | ||
139 | upperBound="-1" eType="#//SMTInlineConstantDefinition" containment="true"/> | ||
140 | <eStructuralFeatures xsi:type="ecore:EReference" name="term" eType="#//SMTTerm" | ||
141 | containment="true"/> | ||
142 | </eClassifiers> | ||
143 | <eClassifiers xsi:type="ecore:EClass" name="SMTInlineConstantDefinition" eSuperTypes="#//SMTSymbolicDeclaration"> | ||
144 | <eStructuralFeatures xsi:type="ecore:EReference" name="definition" eType="#//SMTTerm" | ||
145 | containment="true"/> | ||
146 | </eClassifiers> | ||
147 | <eClassifiers xsi:type="ecore:EClass" name="SMTRelation" eSuperTypes="#//SMTTerm"/> | ||
148 | <eClassifiers xsi:type="ecore:EClass" name="SMTEquals" eSuperTypes="#//SMTRelation"> | ||
149 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//SMTTerm" | ||
150 | containment="true"/> | ||
151 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//SMTTerm" | ||
152 | containment="true"/> | ||
153 | </eClassifiers> | ||
154 | <eClassifiers xsi:type="ecore:EClass" name="SMTDistinct" eSuperTypes="#//SMTRelation"> | ||
155 | <eStructuralFeatures xsi:type="ecore:EReference" name="operands" upperBound="-1" | ||
156 | eType="#//SMTTerm" containment="true"/> | ||
157 | </eClassifiers> | ||
158 | <eClassifiers xsi:type="ecore:EClass" name="SMTLT" eSuperTypes="#//SMTRelation"> | ||
159 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//SMTTerm" | ||
160 | containment="true"/> | ||
161 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//SMTTerm" | ||
162 | containment="true"/> | ||
163 | </eClassifiers> | ||
164 | <eClassifiers xsi:type="ecore:EClass" name="SMTMT" eSuperTypes="#//SMTRelation"> | ||
165 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//SMTTerm" | ||
166 | containment="true"/> | ||
167 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//SMTTerm" | ||
168 | containment="true"/> | ||
169 | </eClassifiers> | ||
170 | <eClassifiers xsi:type="ecore:EClass" name="SMTLEQ" eSuperTypes="#//SMTRelation"> | ||
171 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//SMTTerm" | ||
172 | containment="true"/> | ||
173 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//SMTTerm" | ||
174 | containment="true"/> | ||
175 | </eClassifiers> | ||
176 | <eClassifiers xsi:type="ecore:EClass" name="SMTMEQ" eSuperTypes="#//SMTRelation"> | ||
177 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//SMTTerm" | ||
178 | containment="true"/> | ||
179 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//SMTTerm" | ||
180 | containment="true"/> | ||
181 | </eClassifiers> | ||
182 | <eClassifiers xsi:type="ecore:EClass" name="SMTIntOperation" eSuperTypes="#//SMTTerm"> | ||
183 | <eStructuralFeatures xsi:type="ecore:EReference" name="leftOperand" eType="#//SMTTerm" | ||
184 | containment="true"/> | ||
185 | <eStructuralFeatures xsi:type="ecore:EReference" name="rightOperand" eType="#//SMTTerm" | ||
186 | containment="true"/> | ||
187 | </eClassifiers> | ||
188 | <eClassifiers xsi:type="ecore:EClass" name="SMTPlus" eSuperTypes="#//SMTIntOperation"/> | ||
189 | <eClassifiers xsi:type="ecore:EClass" name="SMTMinus" eSuperTypes="#//SMTIntOperation"/> | ||
190 | <eClassifiers xsi:type="ecore:EClass" name="SMTMultiply" eSuperTypes="#//SMTIntOperation"/> | ||
191 | <eClassifiers xsi:type="ecore:EClass" name="SMTDivison" eSuperTypes="#//SMTIntOperation"/> | ||
192 | <eClassifiers xsi:type="ecore:EClass" name="SMTDiv" eSuperTypes="#//SMTIntOperation"/> | ||
193 | <eClassifiers xsi:type="ecore:EClass" name="SMTMod" eSuperTypes="#//SMTIntOperation"/> | ||
194 | <eClassifiers xsi:type="ecore:EClass" name="SMTAssertion"> | ||
195 | <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="#//SMTTerm" | ||
196 | containment="true"/> | ||
197 | </eClassifiers> | ||
198 | <eClassifiers xsi:type="ecore:EClass" name="SMTCardinalityConstraint"> | ||
199 | <eStructuralFeatures xsi:type="ecore:EReference" name="type" eType="#//SMTTypeReference" | ||
200 | containment="true"/> | ||
201 | <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1" | ||
202 | eType="#//SMTSymbolicValue" containment="true"/> | ||
203 | </eClassifiers> | ||
204 | <eClassifiers xsi:type="ecore:EClass" name="SMTSatCommand"/> | ||
205 | <eClassifiers xsi:type="ecore:EClass" name="SMTSimpleSatCommand" eSuperTypes="#//SMTSatCommand"/> | ||
206 | <eClassifiers xsi:type="ecore:EClass" name="SMTComplexSatCommand" eSuperTypes="#//SMTSatCommand"> | ||
207 | <eStructuralFeatures xsi:type="ecore:EReference" name="method" eType="#//SMTReasoningTactic" | ||
208 | containment="true"/> | ||
209 | </eClassifiers> | ||
210 | <eClassifiers xsi:type="ecore:EClass" name="SMTGetModelCommand"/> | ||
211 | <eClassifiers xsi:type="ecore:EClass" name="SMTReasoningTactic"/> | ||
212 | <eClassifiers xsi:type="ecore:EClass" name="SMTBuiltinTactic" eSuperTypes="#//SMTReasoningTactic"> | ||
213 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
214 | </eClassifiers> | ||
215 | <eClassifiers xsi:type="ecore:EClass" name="SMTReasoningCombinator" eSuperTypes="#//SMTReasoningTactic"/> | ||
216 | <eClassifiers xsi:type="ecore:EClass" name="SMTAndThenCombinator" eSuperTypes="#//SMTReasoningCombinator"> | ||
217 | <eStructuralFeatures xsi:type="ecore:EReference" name="tactics" upperBound="-1" | ||
218 | eType="#//SMTReasoningTactic" containment="true"/> | ||
219 | </eClassifiers> | ||
220 | <eClassifiers xsi:type="ecore:EClass" name="SMTOrElseCombinator" eSuperTypes="#//SMTReasoningCombinator"> | ||
221 | <eStructuralFeatures xsi:type="ecore:EReference" name="tactics" upperBound="-1" | ||
222 | eType="#//SMTReasoningTactic" containment="true"/> | ||
223 | </eClassifiers> | ||
224 | <eClassifiers xsi:type="ecore:EClass" name="SMTParOrCombinator" eSuperTypes="#//SMTReasoningCombinator"> | ||
225 | <eStructuralFeatures xsi:type="ecore:EReference" name="tactics" upperBound="-1" | ||
226 | eType="#//SMTReasoningTactic" containment="true"/> | ||
227 | </eClassifiers> | ||
228 | <eClassifiers xsi:type="ecore:EClass" name="SMTParThenCombinator" eSuperTypes="#//SMTReasoningCombinator"> | ||
229 | <eStructuralFeatures xsi:type="ecore:EReference" name="preProcessingTactic" eType="#//SMTReasoningTactic" | ||
230 | containment="true"/> | ||
231 | <eStructuralFeatures xsi:type="ecore:EReference" name="paralellyPostpricessingTactic" | ||
232 | eType="#//SMTReasoningTactic" containment="true"/> | ||
233 | </eClassifiers> | ||
234 | <eClassifiers xsi:type="ecore:EClass" name="SMTTryForCombinator" eSuperTypes="#//SMTReasoningCombinator"> | ||
235 | <eStructuralFeatures xsi:type="ecore:EReference" name="tactic" eType="#//SMTReasoningTactic" | ||
236 | containment="true"/> | ||
237 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="time" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> | ||
238 | </eClassifiers> | ||
239 | <eClassifiers xsi:type="ecore:EClass" name="SMTIfCombinator" eSuperTypes="#//SMTReasoningCombinator"> | ||
240 | <eStructuralFeatures xsi:type="ecore:EReference" name="probe" eType="#//ReasoningProbe" | ||
241 | containment="true"/> | ||
242 | <eStructuralFeatures xsi:type="ecore:EReference" name="ifTactic" eType="#//SMTReasoningTactic" | ||
243 | containment="true"/> | ||
244 | <eStructuralFeatures xsi:type="ecore:EReference" name="elseTactic" eType="#//SMTReasoningTactic" | ||
245 | containment="true"/> | ||
246 | </eClassifiers> | ||
247 | <eClassifiers xsi:type="ecore:EClass" name="SMTWhenCombinator" eSuperTypes="#//SMTReasoningCombinator"> | ||
248 | <eStructuralFeatures xsi:type="ecore:EReference" name="probe" eType="#//ReasoningProbe" | ||
249 | containment="true"/> | ||
250 | <eStructuralFeatures xsi:type="ecore:EReference" name="tactic" eType="#//SMTReasoningTactic" | ||
251 | containment="true"/> | ||
252 | </eClassifiers> | ||
253 | <eClassifiers xsi:type="ecore:EClass" name="SMTFailIfCombinator" eSuperTypes="#//SMTReasoningCombinator"> | ||
254 | <eStructuralFeatures xsi:type="ecore:EReference" name="probe" eType="#//ReasoningProbe" | ||
255 | containment="true"/> | ||
256 | </eClassifiers> | ||
257 | <eClassifiers xsi:type="ecore:EClass" name="SMTUsingParamCombinator" eSuperTypes="#//SMTReasoningCombinator"> | ||
258 | <eStructuralFeatures xsi:type="ecore:EReference" name="tactic" eType="#//SMTReasoningTactic" | ||
259 | containment="true"/> | ||
260 | <eStructuralFeatures xsi:type="ecore:EReference" name="parameters" upperBound="-1" | ||
261 | eType="#//ReasoningTacticParameter" containment="true"/> | ||
262 | </eClassifiers> | ||
263 | <eClassifiers xsi:type="ecore:EClass" name="ReasoningProbe"> | ||
264 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
265 | </eClassifiers> | ||
266 | <eClassifiers xsi:type="ecore:EClass" name="ReasoningTacticParameter"> | ||
267 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
268 | <eStructuralFeatures xsi:type="ecore:EReference" name="value" eType="#//SMTAtomicTerm" | ||
269 | containment="true"/> | ||
270 | </eClassifiers> | ||
271 | <eClassifiers xsi:type="ecore:EClass" name="SMTResult"/> | ||
272 | <eClassifiers xsi:type="ecore:EClass" name="SMTErrorResult" eSuperTypes="#//SMTResult"> | ||
273 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="message" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
274 | </eClassifiers> | ||
275 | <eClassifiers xsi:type="ecore:EClass" name="SMTUnsupportedResult" eSuperTypes="#//SMTResult"> | ||
276 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="command" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
277 | </eClassifiers> | ||
278 | <eClassifiers xsi:type="ecore:EClass" name="SMTSatResult" eSuperTypes="#//SMTResult"> | ||
279 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="sat" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | ||
280 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="unsat" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | ||
281 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="unknown" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | ||
282 | </eClassifiers> | ||
283 | <eClassifiers xsi:type="ecore:EClass" name="SMTModelResult" eSuperTypes="#//SMTResult"> | ||
284 | <eStructuralFeatures xsi:type="ecore:EReference" name="newFunctionDeclarations" | ||
285 | upperBound="-1" eType="#//SMTFunctionDeclaration" containment="true"/> | ||
286 | <eStructuralFeatures xsi:type="ecore:EReference" name="typeDefinitions" upperBound="-1" | ||
287 | eType="#//SMTCardinalityConstraint" containment="true"/> | ||
288 | <eStructuralFeatures xsi:type="ecore:EReference" name="newFunctionDefinitions" | ||
289 | upperBound="-1" eType="#//SMTFunctionDefinition" containment="true"/> | ||
290 | </eClassifiers> | ||
291 | <eClassifiers xsi:type="ecore:EClass" name="SMTStatisticValue"> | ||
292 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
293 | </eClassifiers> | ||
294 | <eClassifiers xsi:type="ecore:EClass" name="SMTStatisticIntValue" eSuperTypes="#//SMTStatisticValue"> | ||
295 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> | ||
296 | </eClassifiers> | ||
297 | <eClassifiers xsi:type="ecore:EClass" name="SMTStatisticDoubleValue" eSuperTypes="#//SMTStatisticValue"> | ||
298 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBigDecimal"/> | ||
299 | </eClassifiers> | ||
300 | <eClassifiers xsi:type="ecore:EClass" name="SMTStatisticsSection"> | ||
301 | <eStructuralFeatures xsi:type="ecore:EReference" name="values" upperBound="-1" | ||
302 | eType="#//SMTStatisticValue" containment="true"/> | ||
303 | </eClassifiers> | ||
304 | </ecore:EPackage> | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/model/generated/SmtLanguage.genmodel b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/model/generated/SmtLanguage.genmodel new file mode 100644 index 00000000..500f4dae --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/model/generated/SmtLanguage.genmodel | |||
@@ -0,0 +1,238 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" | ||
3 | xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/hu.bme.mit.inf.dslreasoner.smt.language/src-gen" | ||
4 | editDirectory="/hu.bme.mit.inf.dslreasoner.smt.language.edit/src" editorDirectory="/hu.bme.mit.inf.dslreasoner.smt.language.editor/src" | ||
5 | modelPluginID="hu.bme.mit.inf.dslreasoner.smt.language" forceOverwrite="true" | ||
6 | modelName="SmtLanguage" updateClasspath="false" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" | ||
7 | complianceLevel="5.0" copyrightFields="false" editPluginID="hu.bme.mit.inf.dslreasoner.smt.language.edit" | ||
8 | editorPluginID="hu.bme.mit.inf.dslreasoner.smt.language.editor" runtimeVersion="2.10"> | ||
9 | <genPackages prefix="SmtLanguage" basePackage="hu.bme.mit.inf.dslreasoner" disposableProviderFactory="true" | ||
10 | fileExtensions="smt2" ecorePackage="SmtLanguage.ecore#/"> | ||
11 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTDocument"> | ||
12 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTDocument/input"/> | ||
13 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTDocument/output"/> | ||
14 | </genClasses> | ||
15 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTInput"> | ||
16 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTInput/options"/> | ||
17 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTInput/typeDeclarations"/> | ||
18 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTInput/functionDeclarations"/> | ||
19 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTInput/functionDefinition"/> | ||
20 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTInput/assertions"/> | ||
21 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTInput/satCommand"/> | ||
22 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTInput/getModelCommand"/> | ||
23 | </genClasses> | ||
24 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTOutput"> | ||
25 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTOutput/satResult"/> | ||
26 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTOutput/getModelResult"/> | ||
27 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTOutput/statistics"/> | ||
28 | </genClasses> | ||
29 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTOption"> | ||
30 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTOption/name"/> | ||
31 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTOption/value"/> | ||
32 | </genClasses> | ||
33 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTType"> | ||
34 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTType/name"/> | ||
35 | </genClasses> | ||
36 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTEnumLiteral"/> | ||
37 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTEnumeratedTypeDeclaration"> | ||
38 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTEnumeratedTypeDeclaration/elements"/> | ||
39 | </genClasses> | ||
40 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTSetTypeDeclaration"/> | ||
41 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTTypeReference"/> | ||
42 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTComplexTypeReference"> | ||
43 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTComplexTypeReference/referred"/> | ||
44 | </genClasses> | ||
45 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTPrimitiveTypeReference"/> | ||
46 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTIntTypeReference"/> | ||
47 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTBoolTypeReference"/> | ||
48 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTRealTypeReference"/> | ||
49 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTFunctionDeclaration"> | ||
50 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTFunctionDeclaration/parameters"/> | ||
51 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTFunctionDeclaration/range"/> | ||
52 | </genClasses> | ||
53 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTFunctionDefinition"> | ||
54 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTFunctionDefinition/parameters"/> | ||
55 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTFunctionDefinition/range"/> | ||
56 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTFunctionDefinition/value"/> | ||
57 | </genClasses> | ||
58 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTTerm"/> | ||
59 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTSymbolicDeclaration"> | ||
60 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTSymbolicDeclaration/name"/> | ||
61 | </genClasses> | ||
62 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTSymbolicValue"> | ||
63 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTSymbolicValue/symbolicReference"/> | ||
64 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTSymbolicValue/parameterSubstitutions"/> | ||
65 | </genClasses> | ||
66 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTAtomicTerm"/> | ||
67 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTIntLiteral"> | ||
68 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTIntLiteral/value"/> | ||
69 | </genClasses> | ||
70 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTBoolLiteral"> | ||
71 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTBoolLiteral/value"/> | ||
72 | </genClasses> | ||
73 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTRealLiteral"> | ||
74 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTRealLiteral/value"/> | ||
75 | </genClasses> | ||
76 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTSortedVariable"> | ||
77 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTSortedVariable/range"/> | ||
78 | </genClasses> | ||
79 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTQuantifiedExpression"> | ||
80 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTQuantifiedExpression/quantifiedVariables"/> | ||
81 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTQuantifiedExpression/expression"/> | ||
82 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTQuantifiedExpression/pattern"/> | ||
83 | </genClasses> | ||
84 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTExists"/> | ||
85 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTForall"/> | ||
86 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTBoolOperation"/> | ||
87 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTAnd"> | ||
88 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTAnd/operands"/> | ||
89 | </genClasses> | ||
90 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTOr"> | ||
91 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTOr/operands"/> | ||
92 | </genClasses> | ||
93 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTImpl"> | ||
94 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTImpl/leftOperand"/> | ||
95 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTImpl/rightOperand"/> | ||
96 | </genClasses> | ||
97 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTNot"> | ||
98 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTNot/operand"/> | ||
99 | </genClasses> | ||
100 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTIff"> | ||
101 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTIff/leftOperand"/> | ||
102 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTIff/rightOperand"/> | ||
103 | </genClasses> | ||
104 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTITE"> | ||
105 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTITE/condition"/> | ||
106 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTITE/if"/> | ||
107 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTITE/else"/> | ||
108 | </genClasses> | ||
109 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTLet"> | ||
110 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTLet/inlineConstantDefinitions"/> | ||
111 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTLet/term"/> | ||
112 | </genClasses> | ||
113 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTInlineConstantDefinition"> | ||
114 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTInlineConstantDefinition/definition"/> | ||
115 | </genClasses> | ||
116 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTRelation"/> | ||
117 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTEquals"> | ||
118 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTEquals/leftOperand"/> | ||
119 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTEquals/rightOperand"/> | ||
120 | </genClasses> | ||
121 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTDistinct"> | ||
122 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTDistinct/operands"/> | ||
123 | </genClasses> | ||
124 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTLT"> | ||
125 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTLT/leftOperand"/> | ||
126 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTLT/rightOperand"/> | ||
127 | </genClasses> | ||
128 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTMT"> | ||
129 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTMT/leftOperand"/> | ||
130 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTMT/rightOperand"/> | ||
131 | </genClasses> | ||
132 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTLEQ"> | ||
133 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTLEQ/leftOperand"/> | ||
134 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTLEQ/rightOperand"/> | ||
135 | </genClasses> | ||
136 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTMEQ"> | ||
137 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTMEQ/leftOperand"/> | ||
138 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTMEQ/rightOperand"/> | ||
139 | </genClasses> | ||
140 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTIntOperation"> | ||
141 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTIntOperation/leftOperand"/> | ||
142 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTIntOperation/rightOperand"/> | ||
143 | </genClasses> | ||
144 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTPlus"/> | ||
145 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTMinus"/> | ||
146 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTMultiply"/> | ||
147 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTDivison"/> | ||
148 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTDiv"/> | ||
149 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTMod"/> | ||
150 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTAssertion"> | ||
151 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTAssertion/value"/> | ||
152 | </genClasses> | ||
153 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTCardinalityConstraint"> | ||
154 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTCardinalityConstraint/type"/> | ||
155 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTCardinalityConstraint/elements"/> | ||
156 | </genClasses> | ||
157 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTSatCommand"/> | ||
158 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTSimpleSatCommand"/> | ||
159 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTComplexSatCommand"> | ||
160 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTComplexSatCommand/method"/> | ||
161 | </genClasses> | ||
162 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTGetModelCommand"/> | ||
163 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTReasoningTactic"/> | ||
164 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTBuiltinTactic"> | ||
165 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTBuiltinTactic/name"/> | ||
166 | </genClasses> | ||
167 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTReasoningCombinator"/> | ||
168 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTAndThenCombinator"> | ||
169 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTAndThenCombinator/tactics"/> | ||
170 | </genClasses> | ||
171 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTOrElseCombinator"> | ||
172 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTOrElseCombinator/tactics"/> | ||
173 | </genClasses> | ||
174 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTParOrCombinator"> | ||
175 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTParOrCombinator/tactics"/> | ||
176 | </genClasses> | ||
177 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTParThenCombinator"> | ||
178 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTParThenCombinator/preProcessingTactic"/> | ||
179 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTParThenCombinator/paralellyPostpricessingTactic"/> | ||
180 | </genClasses> | ||
181 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTTryForCombinator"> | ||
182 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTTryForCombinator/tactic"/> | ||
183 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTTryForCombinator/time"/> | ||
184 | </genClasses> | ||
185 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTIfCombinator"> | ||
186 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTIfCombinator/probe"/> | ||
187 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTIfCombinator/ifTactic"/> | ||
188 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTIfCombinator/elseTactic"/> | ||
189 | </genClasses> | ||
190 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTWhenCombinator"> | ||
191 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTWhenCombinator/probe"/> | ||
192 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTWhenCombinator/tactic"/> | ||
193 | </genClasses> | ||
194 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTFailIfCombinator"> | ||
195 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTFailIfCombinator/probe"/> | ||
196 | </genClasses> | ||
197 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTUsingParamCombinator"> | ||
198 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTUsingParamCombinator/tactic"/> | ||
199 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTUsingParamCombinator/parameters"/> | ||
200 | </genClasses> | ||
201 | <genClasses ecoreClass="SmtLanguage.ecore#//ReasoningProbe"> | ||
202 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//ReasoningProbe/name"/> | ||
203 | </genClasses> | ||
204 | <genClasses ecoreClass="SmtLanguage.ecore#//ReasoningTacticParameter"> | ||
205 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//ReasoningTacticParameter/name"/> | ||
206 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//ReasoningTacticParameter/value"/> | ||
207 | </genClasses> | ||
208 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTResult"/> | ||
209 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTErrorResult"> | ||
210 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTErrorResult/message"/> | ||
211 | </genClasses> | ||
212 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTUnsupportedResult"> | ||
213 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTUnsupportedResult/command"/> | ||
214 | </genClasses> | ||
215 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTSatResult"> | ||
216 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTSatResult/sat"/> | ||
217 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTSatResult/unsat"/> | ||
218 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTSatResult/unknown"/> | ||
219 | </genClasses> | ||
220 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTModelResult"> | ||
221 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTModelResult/newFunctionDeclarations"/> | ||
222 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTModelResult/typeDefinitions"/> | ||
223 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTModelResult/newFunctionDefinitions"/> | ||
224 | </genClasses> | ||
225 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTStatisticValue"> | ||
226 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTStatisticValue/name"/> | ||
227 | </genClasses> | ||
228 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTStatisticIntValue"> | ||
229 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTStatisticIntValue/value"/> | ||
230 | </genClasses> | ||
231 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTStatisticDoubleValue"> | ||
232 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute SmtLanguage.ecore#//SMTStatisticDoubleValue/value"/> | ||
233 | </genClasses> | ||
234 | <genClasses ecoreClass="SmtLanguage.ecore#//SMTStatisticsSection"> | ||
235 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference SmtLanguage.ecore#//SMTStatisticsSection/values"/> | ||
236 | </genClasses> | ||
237 | </genPackages> | ||
238 | </genmodel:GenModel> | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/plugin.xml b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/plugin.xml new file mode 100644 index 00000000..fea6dabe --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/plugin.xml | |||
@@ -0,0 +1,16 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <?eclipse version="3.0"?> | ||
3 | |||
4 | <plugin> | ||
5 | |||
6 | <extension point="org.eclipse.emf.ecore.generated_package"> | ||
7 | <package | ||
8 | uri = "http://www.bme.hu/mit/inf/dslreasoner/SmtLanguage" | ||
9 | class = "hu.bme.mit.inf.dslreasoner.smtLanguage.SmtLanguagePackage" | ||
10 | genModel = "model/generated/SmtLanguage.genmodel" /> | ||
11 | |||
12 | </extension> | ||
13 | |||
14 | |||
15 | |||
16 | </plugin> | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/plugin.xml_gen b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/plugin.xml_gen new file mode 100644 index 00000000..3665b60a --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/plugin.xml_gen | |||
@@ -0,0 +1,16 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <?eclipse version="3.0"?> | ||
3 | |||
4 | <plugin> | ||
5 | |||
6 | <extension point="org.eclipse.emf.ecore.generated_package"> | ||
7 | <package | ||
8 | uri = "http://www.bme.hu/mit/inf/dslreasoner/SmtLanguage" | ||
9 | class = "hu.bme.mit.inf.dslreasoner.smtLanguage.SmtLanguagePackage" | ||
10 | genModel = "model/generated/SmtLanguage.genmodel" /> | ||
11 | |||
12 | </extension> | ||
13 | |||
14 | |||
15 | |||
16 | </plugin> | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/GenerateSmtLanguage.mwe2 b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/GenerateSmtLanguage.mwe2 new file mode 100644 index 00000000..e27dbd64 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/GenerateSmtLanguage.mwe2 | |||
@@ -0,0 +1,133 @@ | |||
1 | module hu.bme.mit.inf.dslreasoner.GenerateSmtLanguage | ||
2 | |||
3 | import org.eclipse.emf.mwe.utils.* | ||
4 | import org.eclipse.xtext.generator.* | ||
5 | import org.eclipse.xtext.ui.generator.* | ||
6 | |||
7 | var grammarURI = "classpath:/hu/bme/mit/inf/dslreasoner/SmtLanguage.xtext" | ||
8 | var fileExtensions = "smt2" | ||
9 | var projectName = "hu.bme.mit.inf.dslreasoner.smt.language" | ||
10 | var runtimeProject = "../${projectName}" | ||
11 | var generateXtendStub = true | ||
12 | var encoding = "UTF-8" | ||
13 | |||
14 | Workflow { | ||
15 | bean = StandaloneSetup { | ||
16 | scanClassPath = true | ||
17 | platformUri = "${runtimeProject}/.." | ||
18 | // The following two lines can be removed, if Xbase is not used. | ||
19 | registerGeneratedEPackage = "org.eclipse.xtext.xbase.XbasePackage" | ||
20 | registerGenModelFile = "platform:/resource/org.eclipse.xtext.xbase/model/Xbase.genmodel" | ||
21 | } | ||
22 | |||
23 | component = DirectoryCleaner { | ||
24 | directory = "${runtimeProject}/src-gen" | ||
25 | } | ||
26 | |||
27 | component = DirectoryCleaner { | ||
28 | directory = "${runtimeProject}/model/generated" | ||
29 | } | ||
30 | |||
31 | component = DirectoryCleaner { | ||
32 | directory = "${runtimeProject}.ui/src-gen" | ||
33 | } | ||
34 | |||
35 | component = DirectoryCleaner { | ||
36 | directory = "${runtimeProject}.tests/src-gen" | ||
37 | } | ||
38 | |||
39 | component = Generator { | ||
40 | pathRtProject = runtimeProject | ||
41 | pathUiProject = "${runtimeProject}.ui" | ||
42 | //pathTestProject = "${runtimeProject}.tests" | ||
43 | projectNameRt = projectName | ||
44 | projectNameUi = "${projectName}.ui" | ||
45 | encoding = encoding | ||
46 | language = auto-inject { | ||
47 | uri = grammarURI | ||
48 | |||
49 | // Java API to access grammar elements (required by several other fragments) | ||
50 | fragment = grammarAccess.GrammarAccessFragment auto-inject {} | ||
51 | |||
52 | // generates Java API for the generated EPackages | ||
53 | fragment = ecore.EMFGeneratorFragment auto-inject {} | ||
54 | |||
55 | // the old serialization component | ||
56 | // fragment = parseTreeConstructor.ParseTreeConstructorFragment auto-inject {} | ||
57 | |||
58 | // serializer 2.0 | ||
59 | fragment = serializer.SerializerFragment auto-inject { | ||
60 | generateStub = false | ||
61 | } | ||
62 | |||
63 | // a custom ResourceFactory for use with EMF | ||
64 | fragment = resourceFactory.ResourceFactoryFragment auto-inject {} | ||
65 | |||
66 | // The antlr parser generator fragment. | ||
67 | fragment = parser.antlr.XtextAntlrGeneratorFragment auto-inject { | ||
68 | // options = { | ||
69 | // backtrack = true | ||
70 | // } | ||
71 | } | ||
72 | |||
73 | // Xtend-based API for validation | ||
74 | fragment = validation.ValidatorFragment auto-inject { | ||
75 | // composedCheck = "org.eclipse.xtext.validation.ImportUriValidator" | ||
76 | // composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator" | ||
77 | } | ||
78 | |||
79 | // old scoping and exporting API | ||
80 | // fragment = scoping.ImportURIScopingFragment auto-inject {} | ||
81 | // fragment = exporting.SimpleNamesFragment auto-inject {} | ||
82 | |||
83 | // scoping and exporting API | ||
84 | fragment = scoping.ImportNamespacesScopingFragment auto-inject {} | ||
85 | fragment = exporting.QualifiedNamesFragment auto-inject {} | ||
86 | fragment = builder.BuilderIntegrationFragment auto-inject {} | ||
87 | |||
88 | // generator API | ||
89 | fragment = generator.GeneratorFragment auto-inject {} | ||
90 | |||
91 | // formatter API | ||
92 | fragment = formatting.FormatterFragment auto-inject {} | ||
93 | |||
94 | // labeling API | ||
95 | fragment = labeling.LabelProviderFragment auto-inject {} | ||
96 | |||
97 | // outline API | ||
98 | fragment = outline.OutlineTreeProviderFragment auto-inject {} | ||
99 | fragment = outline.QuickOutlineFragment auto-inject {} | ||
100 | |||
101 | // quickfix API | ||
102 | fragment = quickfix.QuickfixProviderFragment auto-inject {} | ||
103 | |||
104 | // content assist API | ||
105 | fragment = contentAssist.ContentAssistFragment auto-inject {} | ||
106 | |||
107 | // generates a more lightweight Antlr parser and lexer tailored for content assist | ||
108 | fragment = parser.antlr.XtextAntlrUiGeneratorFragment auto-inject {} | ||
109 | |||
110 | // generates junit test support classes into Generator#pathTestProject | ||
111 | //fragment = junit.Junit4Fragment auto-inject {} | ||
112 | |||
113 | // rename refactoring | ||
114 | fragment = refactoring.RefactorElementNameFragment auto-inject {} | ||
115 | |||
116 | // provides the necessary bindings for java types integration | ||
117 | fragment = types.TypesGeneratorFragment auto-inject {} | ||
118 | |||
119 | // generates the required bindings only if the grammar inherits from Xbase | ||
120 | fragment = xbase.XbaseGeneratorFragment auto-inject {} | ||
121 | |||
122 | // generates the required bindings only if the grammar inherits from Xtype | ||
123 | fragment = xbase.XtypeGeneratorFragment auto-inject {} | ||
124 | |||
125 | // provides a preference page for template proposals | ||
126 | fragment = templates.CodetemplatesGeneratorFragment auto-inject {} | ||
127 | |||
128 | // provides a compare view | ||
129 | fragment = compare.CompareFragment auto-inject {} | ||
130 | } | ||
131 | } | ||
132 | } | ||
133 | |||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/SmtLanguage.xtext b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/SmtLanguage.xtext new file mode 100644 index 00000000..320e1cfe --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/SmtLanguage.xtext | |||
@@ -0,0 +1,222 @@ | |||
1 | grammar hu.bme.mit.inf.dslreasoner.SmtLanguage with org.eclipse.xtext.common.Terminals | ||
2 | |||
3 | generate smtLanguage "http://www.bme.hu/mit/inf/dslreasoner/SmtLanguage" | ||
4 | |||
5 | import "http://www.eclipse.org/emf/2002/Ecore" as ecore | ||
6 | |||
7 | SMTDocument: | ||
8 | input=SMTInput | ||
9 | ( | ||
10 | '--------------' | ||
11 | output=SMTOutput | ||
12 | )?; | ||
13 | |||
14 | SMTInput: | ||
15 | (options += SMTOption)* | ||
16 | ( | ||
17 | typeDeclarations+=SMTType | | ||
18 | functionDeclarations+=SMTFunctionDeclaration | | ||
19 | functionDefinition+=SMTFunctionDefinition | | ||
20 | assertions += SMTAssertion | ||
21 | )* | ||
22 | satCommand = SMTSatCommand | ||
23 | getModelCommand = SMTGetModelCommand; | ||
24 | |||
25 | SMTOutput:( | ||
26 | (satResult = SMTResult | ||
27 | getModelResult = SMTResult) | 'timeout' {SMTOutput}) | ||
28 | statistics=SMTStatisticsSection?; | ||
29 | |||
30 | ////////////////////////////////// | ||
31 | // SMT terminals | ||
32 | ////////////////////////////////// | ||
33 | |||
34 | terminal SL_COMMENT : ';' !('\n'|'\r')* ('\r'? '\n')?; | ||
35 | |||
36 | terminal ID : ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'-'|'!'|'0'..'9')*; | ||
37 | // ('a'..'z'|'A'..'Z'|'_'/*|'+'|'-'|'/'|'*'|'='|'%'|'?'|'!'|'.'|'$'|'~'|'&'/*|'^'*/|'<'|'>'/*|'@'*/) | ||
38 | // ('a'..'z'|'A'..'Z'|'_'/*|'+'|'-'|'/'|'*'|'='|'%'|'?'|'!'|'.'|'$'|'~'|'&'/*|'^'|*/'<'|'>'/*|'@'*/|'0'..'9')* | ||
39 | SMTID: ID; | ||
40 | |||
41 | terminal PROPERTYNAME : ':' + ID; | ||
42 | terminal REAL returns ecore::EBigDecimal: INT '.' INT; | ||
43 | |||
44 | ////////////////////////////////// | ||
45 | // Options | ||
46 | ////////////////////////////////// | ||
47 | SMTOption: '(' 'set-option' name = PROPERTYNAME value = SMTAtomicTerm ')'; | ||
48 | |||
49 | ////////////////////////////////// | ||
50 | // Type declarations | ||
51 | ////////////////////////////////// | ||
52 | SMTType: SMTEnumeratedTypeDeclaration | SMTSetTypeDeclaration; | ||
53 | |||
54 | SMTEnumLiteral: name = SMTID; | ||
55 | SMTEnumeratedTypeDeclaration: '(' 'declare-datatypes' '(' ')' '(' '(' name = SMTID elements+=SMTEnumLiteral+ ')' ')' ')'; | ||
56 | SMTSetTypeDeclaration: '(' 'declare-sort' name = SMTID ')'; | ||
57 | |||
58 | SMTTypeReference: SMTComplexTypeReference | SMTPrimitiveTypeReference; | ||
59 | SMTComplexTypeReference: referred = [SMTType]; | ||
60 | SMTPrimitiveTypeReference: SMTIntTypeReference | SMTBoolTypeReference | SMTRealTypeReference; | ||
61 | |||
62 | SMTIntTypeReference: {SMTIntTypeReference} "Int"; | ||
63 | SMTBoolTypeReference: {SMTBoolTypeReference} "Bool"; | ||
64 | SMTRealTypeReference: {SMTRealTypeReference} "Real"; | ||
65 | |||
66 | ////////////////////////////////// | ||
67 | // Functions and constants | ||
68 | ////////////////////////////////// | ||
69 | |||
70 | SMTFunctionDeclaration: '(' 'declare-fun' name = SMTID '(' parameters+=SMTTypeReference* ')' range = SMTTypeReference ')'; | ||
71 | |||
72 | /*DeclaredFunctionDefinition: | ||
73 | '(' 'define-fun' declaration=[Function] '(' parameters+=SortedVariable* ')' range = TypeReference value = Term ')';*/ | ||
74 | |||
75 | SMTFunctionDefinition: | ||
76 | '(' 'define-fun' name=SMTID '(' parameters+=SMTSortedVariable* ')' range = SMTTypeReference value = SMTTerm ')'; | ||
77 | |||
78 | |||
79 | ////////////////////////////////// | ||
80 | // Expressions | ||
81 | ////////////////////////////////// | ||
82 | SMTTerm: | ||
83 | SMTSymbolicValue| | ||
84 | SMTAtomicTerm | | ||
85 | SMTBoolOperation | | ||
86 | SMTIntOperation | | ||
87 | SMTITE | | ||
88 | SMTLet | | ||
89 | SMTRelation | | ||
90 | SMTQuantifiedExpression; | ||
91 | |||
92 | SMTSymbolicDeclaration: SMTFunctionDeclaration | SMTFunctionDefinition | SMTSortedVariable | SMTEnumLiteral | SMTInlineConstantDefinition; | ||
93 | |||
94 | SMTSymbolicValue: | ||
95 | '(' symbolicReference = [SMTSymbolicDeclaration] ( parameterSubstitutions += SMTTerm )+ ')' | | ||
96 | symbolicReference = [SMTSymbolicDeclaration]; | ||
97 | |||
98 | SMTAtomicTerm: SMTIntLiteral | SMTBoolLiteral | SMTRealLiteral; | ||
99 | SMTIntLiteral: value=INT; | ||
100 | BOOLEANTERMINAL returns ecore::EBoolean: 'true' | 'false'; | ||
101 | SMTBoolLiteral: value=BOOLEANTERMINAL; | ||
102 | SMTRealLiteral: value=REAL; | ||
103 | |||
104 | // Quantified operations | ||
105 | SMTSortedVariable: '(' name = SMTID range = SMTTypeReference ')'; | ||
106 | //QuantifiedVariableValue: variable = [QuantifiedVariable]; | ||
107 | |||
108 | SMTQuantifiedExpression: SMTExists | SMTForall; | ||
109 | SMTExists: '(' 'exists' '(' (quantifiedVariables += SMTSortedVariable)+ ')' | ||
110 | (expression=SMTTerm | ('(' '!' expression = SMTTerm ':pattern' '(' pattern = SMTTerm ')' ')')) ')' | ||
111 | ; | ||
112 | SMTForall: '(' 'forall' '(' (quantifiedVariables += SMTSortedVariable)+ ')' | ||
113 | (expression=SMTTerm | ('(' '!' expression = SMTTerm ':pattern' '(' pattern = SMTTerm ')' ')')) ')' | ||
114 | ; | ||
115 | |||
116 | // Boolean operations | ||
117 | SMTBoolOperation: SMTAnd | SMTOr | SMTImpl | SMTNot | SMTIff; | ||
118 | SMTAnd: '(' 'and' operands+=SMTTerm+ ')'; | ||
119 | SMTOr: '(' 'or' operands+=SMTTerm+ ')'; | ||
120 | SMTImpl: '(' '=>' leftOperand=SMTTerm rightOperand=SMTTerm ')'; | ||
121 | SMTNot: '(' 'not' operand=SMTTerm ')'; | ||
122 | SMTIff: '(' 'iff' leftOperand=SMTTerm rightOperand=SMTTerm ')'; | ||
123 | |||
124 | // If-then-else | ||
125 | SMTITE: '(' 'ite' condition = SMTTerm if=SMTTerm else = SMTTerm ')'; | ||
126 | |||
127 | //Let | ||
128 | SMTLet: '(' 'let' '(' (inlineConstantDefinitions+=SMTInlineConstantDefinition)+ ')' term=SMTTerm ')'; | ||
129 | SMTInlineConstantDefinition: | ||
130 | '(' name=SMTID definition=SMTTerm ')' | ||
131 | ; | ||
132 | |||
133 | // Relations | ||
134 | SMTRelation: SMTEquals | SMTDistinct | SMTLT | SMTMT | SMTLEQ | SMTMEQ; | ||
135 | SMTEquals: '(' '=' leftOperand=SMTTerm rightOperand=SMTTerm ')'; | ||
136 | SMTDistinct: '(' 'distinct' operands+=SMTTerm+ ')'; | ||
137 | SMTLT: '(' '<' leftOperand=SMTTerm rightOperand=SMTTerm ')'; | ||
138 | SMTMT: '(' '>' leftOperand=SMTTerm rightOperand=SMTTerm ')'; | ||
139 | SMTLEQ: '(' '<=' leftOperand=SMTTerm rightOperand=SMTTerm ')'; | ||
140 | SMTMEQ: '(' '>=' leftOperand=SMTTerm rightOperand=SMTTerm ')'; | ||
141 | |||
142 | // Int operations | ||
143 | SMTIntOperation: SMTPlus | SMTMinus | SMTMultiply | SMTDivison | SMTDiv | SMTMod; | ||
144 | SMTPlus: '(' '+' leftOperand=SMTTerm rightOperand=SMTTerm ')'; | ||
145 | SMTMinus: '(' '-' leftOperand=SMTTerm (rightOperand=SMTTerm)? ')'; | ||
146 | SMTMultiply: '(' '*' leftOperand=SMTTerm rightOperand=SMTTerm ')'; | ||
147 | SMTDivison: '(' '/' leftOperand=SMTTerm rightOperand=SMTTerm ')'; | ||
148 | SMTDiv: '(' 'div' leftOperand=SMTTerm rightOperand=SMTTerm ')'; | ||
149 | SMTMod: '(' 'mod' leftOperand=SMTTerm rightOperand=SMTTerm ')'; | ||
150 | |||
151 | ////////////////////////////////// | ||
152 | // Assertion | ||
153 | ////////////////////////////////// | ||
154 | SMTAssertion: '(' 'assert' value=SMTTerm ')'; | ||
155 | SMTCardinalityConstraint: | ||
156 | '(' 'forall' '(' '(' ID type=SMTTypeReference ')' ')' | ||
157 | (('(' 'or'('(' '=' ID elements+=SMTSymbolicValue ')')* ')') | // With multiple element | ||
158 | ('(' '=' ID elements+=SMTSymbolicValue ')')) //With single element | ||
159 | ')' | ||
160 | ; | ||
161 | |||
162 | ////////////////////////////////// | ||
163 | // Goals | ||
164 | ////////////////////////////////// | ||
165 | SMTSatCommand: SMTSimpleSatCommand | SMTComplexSatCommand; | ||
166 | SMTSimpleSatCommand : '(' 'check-sat' {SMTSimpleSatCommand} ')'; | ||
167 | SMTComplexSatCommand: '(' 'check-sat-using' method = SMTReasoningTactic ')'; | ||
168 | SMTGetModelCommand: '(' 'get-model' {SMTGetModelCommand} ')'; | ||
169 | |||
170 | SMTReasoningTactic: SMTBuiltinTactic | SMTReasoningCombinator; | ||
171 | SMTBuiltinTactic: name = ID; | ||
172 | SMTReasoningCombinator: | ||
173 | SMTAndThenCombinator | SMTOrElseCombinator | SMTParOrCombinator | SMTParThenCombinator | SMTTryForCombinator | | ||
174 | SMTIfCombinator | SMTWhenCombinator | SMTFailIfCombinator | SMTUsingParamCombinator | ||
175 | ; | ||
176 | // executes the given tactics sequencially. | ||
177 | SMTAndThenCombinator: '(' 'and-then' (tactics+=SMTReasoningTactic)+ ')'; | ||
178 | // tries the given tactics in sequence until one of them succeeds. | ||
179 | SMTOrElseCombinator: '(' 'or-else' (tactics+=SMTReasoningTactic)+ ')'; | ||
180 | // executes the given tactics in parallel until one of them succeeds. | ||
181 | SMTParOrCombinator: '(' 'par-or' (tactics+=SMTReasoningTactic)+ ')'; | ||
182 | // executes tactic1 and then tactic2 to every subgoal produced by tactic1. All subgoals are processed in parallel. | ||
183 | SMTParThenCombinator: '(' 'par-then' preProcessingTactic=SMTReasoningTactic paralellyPostpricessingTactic = SMTReasoningTactic ')'; | ||
184 | // excutes the given tactic for at most <num> milliseconds, it fails if the execution takes more than <num> milliseconds. | ||
185 | SMTTryForCombinator: '(' 'try-for' tactic=SMTReasoningTactic time=INT ')'; | ||
186 | // if <probe> evaluates to true, then execute the first tactic. Otherwise execute the second. | ||
187 | SMTIfCombinator: '(' 'if' probe=ReasoningProbe ifTactic=SMTReasoningTactic elseTactic=SMTReasoningTactic ')'; | ||
188 | // shorthand for (if <probe> <tactic> skip). | ||
189 | SMTWhenCombinator: '(' 'when' probe=ReasoningProbe tactic=SMTReasoningTactic ')'; | ||
190 | // fail if <probe> evaluates to true. | ||
191 | SMTFailIfCombinator: '(' 'fail-if' probe=ReasoningProbe ')'; | ||
192 | //executes the given tactic using the given attributes, where <attribute> ::= <keyword> <value>. ! is a syntax sugar for using-params. | ||
193 | SMTUsingParamCombinator: '(' ('using-params' | '!') tactic=SMTReasoningTactic (parameters+=ReasoningTacticParameter)* ')'; | ||
194 | |||
195 | ReasoningProbe: name=ID; | ||
196 | ReasoningTacticParameter: name=PROPERTYNAME value=SMTAtomicTerm; | ||
197 | |||
198 | ////////////////////////////////// | ||
199 | // Result | ||
200 | ////////////////////////////////// | ||
201 | |||
202 | SMTResult: SMTUnsupportedResult | SMTSatResult | SMTModelResult | SMTErrorResult; | ||
203 | SMTErrorResult: '(' 'error' message = STRING ')'; | ||
204 | SMTUnsupportedResult: 'unsupported' ';' command=ID; | ||
205 | SMTSatResult: sat?='sat' | unsat?='unsat' | unknown?='unknown'; | ||
206 | SMTModelResult: {SMTModelResult} '(' 'model' | ||
207 | ( | ||
208 | newFunctionDeclarations+=SMTFunctionDeclaration | | ||
209 | typeDefinitions+=SMTCardinalityConstraint | | ||
210 | newFunctionDefinitions+=SMTFunctionDefinition | ||
211 | )* | ||
212 | ')'; | ||
213 | |||
214 | ////////////////////////////////// | ||
215 | // Statistics | ||
216 | ////////////////////////////////// | ||
217 | //IntOrReal returns ecore::EDouble: INT | REAL; | ||
218 | |||
219 | SMTStatisticValue: SMTStatisticIntValue | SMTStatisticDoubleValue; | ||
220 | SMTStatisticIntValue: name = PROPERTYNAME value=INT; | ||
221 | SMTStatisticDoubleValue: name = PROPERTYNAME value = REAL; | ||
222 | SMTStatisticsSection: '(' {SMTStatisticsSection} values += SMTStatisticValue* ')'; \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/SmtLanguageRuntimeModule.java b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/SmtLanguageRuntimeModule.java new file mode 100644 index 00000000..dabb0c29 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/SmtLanguageRuntimeModule.java | |||
@@ -0,0 +1,11 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner; | ||
5 | |||
6 | /** | ||
7 | * Use this class to register components to be used at runtime / without the Equinox extension registry. | ||
8 | */ | ||
9 | public class SmtLanguageRuntimeModule extends hu.bme.mit.inf.dslreasoner.AbstractSmtLanguageRuntimeModule { | ||
10 | |||
11 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/SmtLanguageStandaloneSetup.java b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/SmtLanguageStandaloneSetup.java new file mode 100644 index 00000000..ed297373 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/SmtLanguageStandaloneSetup.java | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner; | ||
5 | |||
6 | /** | ||
7 | * Initialization support for running Xtext languages | ||
8 | * without equinox extension registry | ||
9 | */ | ||
10 | public class SmtLanguageStandaloneSetup extends SmtLanguageStandaloneSetupGenerated{ | ||
11 | |||
12 | public static void doSetup() { | ||
13 | new SmtLanguageStandaloneSetup().createInjectorAndDoEMFRegistration(); | ||
14 | } | ||
15 | } | ||
16 | |||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/formatting/SmtLanguageFormatter.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/formatting/SmtLanguageFormatter.xtend new file mode 100644 index 00000000..9e3e3943 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/formatting/SmtLanguageFormatter.xtend | |||
@@ -0,0 +1,34 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.formatting | ||
2 | |||
3 | import org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter | ||
4 | import org.eclipse.xtext.formatting.impl.FormattingConfig | ||
5 | import hu.bme.mit.inf.dslreasoner.services.SmtLanguageGrammarAccess | ||
6 | |||
7 | |||
8 | /** | ||
9 | * This class contains custom formatting description. | ||
10 | * | ||
11 | * see : http://www.eclipse.org/Xtext/documentation.html#formatting | ||
12 | * on how and when to use it | ||
13 | * | ||
14 | * Also see {@link org.eclipse.xtext.xtext.XtextFormattingTokenSerializer} as an example | ||
15 | */ | ||
16 | class SmtLanguageFormatter extends AbstractDeclarativeFormatter { | ||
17 | |||
18 | // @Inject extension SmtLanguageGrammarAccess | ||
19 | |||
20 | override protected void configureFormatting(FormattingConfig c) { | ||
21 | val f = getGrammarAccess as SmtLanguageGrammarAccess | ||
22 | c.setAutoLinewrap(100000); | ||
23 | for(pair : f.findKeywordPairs("(",")")) { | ||
24 | c.setNoSpace().after(pair.getFirst()); | ||
25 | c.setNoSpace().before(pair.getSecond()); | ||
26 | } | ||
27 | c.setLinewrap.after(f.SMTAssertionRule) | ||
28 | c.setLinewrap.after(f.SMTFunctionDeclarationRule) | ||
29 | c.setLinewrap.after(f.SMTFunctionDefinitionRule) | ||
30 | c.setLinewrap.after(f.SMTEnumeratedTypeDeclarationRule) | ||
31 | c.setLinewrap.after(f.SMTSetTypeDeclarationRule) | ||
32 | c.setLinewrap.after(f.SMTOptionRule) | ||
33 | } | ||
34 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/generator/SmtLanguageGenerator.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/generator/SmtLanguageGenerator.xtend new file mode 100644 index 00000000..e61c082e --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/generator/SmtLanguageGenerator.xtend | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.generator | ||
5 | |||
6 | import org.eclipse.emf.ecore.resource.Resource | ||
7 | import org.eclipse.xtext.generator.IGenerator | ||
8 | import org.eclipse.xtext.generator.IFileSystemAccess | ||
9 | |||
10 | /** | ||
11 | * Generates code from your model files on save. | ||
12 | * | ||
13 | * see http://www.eclipse.org/Xtext/documentation.html#TutorialCodeGeneration | ||
14 | */ | ||
15 | class SmtLanguageGenerator implements IGenerator { | ||
16 | |||
17 | override void doGenerate(Resource resource, IFileSystemAccess fsa) { | ||
18 | // fsa.generateFile('greetings.txt', 'People to greet: ' + | ||
19 | // resource.allContents | ||
20 | // .filter(typeof(Greeting)) | ||
21 | // .map[name] | ||
22 | // .join(', ')) | ||
23 | } | ||
24 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/scoping/SmtLanguageScopeProvider.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/scoping/SmtLanguageScopeProvider.xtend new file mode 100644 index 00000000..e93e0543 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/scoping/SmtLanguageScopeProvider.xtend | |||
@@ -0,0 +1,138 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.scoping | ||
5 | |||
6 | import java.util.Set | ||
7 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSortedVariable | ||
8 | import org.eclipse.emf.ecore.EObject | ||
9 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTQuantifiedExpression | ||
10 | import java.util.Collections | ||
11 | import java.util.HashSet | ||
12 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTInlineConstantDefinition | ||
13 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTLet | ||
14 | import java.util.Collection | ||
15 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTFunctionDefinition | ||
16 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSymbolicValue | ||
17 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTDocument | ||
18 | import org.eclipse.xtext.scoping.IScope | ||
19 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSymbolicDeclaration | ||
20 | import org.eclipse.emf.ecore.EReference | ||
21 | import java.util.HashMap | ||
22 | import java.util.Map | ||
23 | import org.eclipse.xtext.scoping.Scopes | ||
24 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTModelResult | ||
25 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTComplexTypeReference | ||
26 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTEnumLiteral | ||
27 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTEnumeratedTypeDeclaration | ||
28 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTFunctionDeclaration | ||
29 | |||
30 | /** | ||
31 | * This class contains custom scoping description. | ||
32 | * | ||
33 | * see : http://www.eclipse.org/Xtext/documentation.html#scoping | ||
34 | * on how and when to use it | ||
35 | * | ||
36 | */ | ||
37 | class SmtLanguageScopeProvider extends org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider { | ||
38 | /** | ||
39 | * Search for the first instance of containerType up in the containment hierarchy. | ||
40 | * @param containerType | ||
41 | * @param from | ||
42 | * @return | ||
43 | */ | ||
44 | @SuppressWarnings("unchecked") | ||
45 | def private <ContainerType> ContainerType getTop(Class<ContainerType> containerType, EObject from){ | ||
46 | var actualLevel = from.eContainer(); | ||
47 | while(actualLevel!=null){ | ||
48 | if(containerType.isInstance(actualLevel)) { return actualLevel as ContainerType} | ||
49 | else { actualLevel = actualLevel.eContainer() } | ||
50 | } | ||
51 | return null; | ||
52 | } | ||
53 | |||
54 | def private Set<SMTSortedVariable> getQuantifiedVariables(EObject from) { | ||
55 | //The most inner quantified variables are in this expression: | ||
56 | val quantifiedExpression = getTop(typeof(SMTQuantifiedExpression), from); | ||
57 | if(quantifiedExpression==null) return Collections.emptySet(); | ||
58 | |||
59 | //The variables can be referred by a symbolic reference | ||
60 | val Set<SMTSortedVariable> result = new HashSet(quantifiedExpression.getQuantifiedVariables()); | ||
61 | //The variables can defined in an outer quantifier | ||
62 | result.addAll(getQuantifiedVariables(quantifiedExpression)); | ||
63 | //println(result.map[name].join(",")) | ||
64 | return result; | ||
65 | } | ||
66 | |||
67 | def private Set<SMTInlineConstantDefinition> getInlineConstantDefinitions(EObject from) { | ||
68 | //The most inner quantified variables are in this expression: | ||
69 | val let = getTop(typeof(SMTLet), from); | ||
70 | if(let==null) return Collections.emptySet(); | ||
71 | |||
72 | //The variables can be referred by a symbolic reference | ||
73 | val result = new HashSet(let.getInlineConstantDefinitions()); | ||
74 | //The variables can defined in an outer quantifier | ||
75 | result.addAll(getInlineConstantDefinitions(let)); | ||
76 | return result; | ||
77 | } | ||
78 | |||
79 | def private Collection<SMTSortedVariable> getParameters(SMTSymbolicValue from) { | ||
80 | val functionDefinition = getTop(typeof(SMTFunctionDefinition), from); | ||
81 | if(functionDefinition!=null) { | ||
82 | return functionDefinition.getParameters(); | ||
83 | } | ||
84 | else return Collections.emptySet(); | ||
85 | } | ||
86 | |||
87 | def private Set<SMTEnumLiteral> getFiniteElements(SMTSymbolicValue value) { | ||
88 | val Set<SMTEnumLiteral> result = new HashSet(); | ||
89 | val document = getTop(typeof(SMTDocument),value) | ||
90 | for(type : document.input.getTypeDeclarations().filter(typeof(SMTEnumeratedTypeDeclaration))) { | ||
91 | result.addAll(type.getElements()); | ||
92 | } | ||
93 | return result; | ||
94 | } | ||
95 | |||
96 | def private Set<SMTSymbolicDeclaration> getFunctions(SMTSymbolicValue value) { | ||
97 | val document = getTop(typeof(SMTDocument),value); | ||
98 | val input = document.input | ||
99 | var SMTModelResult output = null; | ||
100 | if(document.output != null && document.output.getModelResult instanceof SMTModelResult) { | ||
101 | output = document.output.getModelResult as SMTModelResult | ||
102 | } | ||
103 | |||
104 | val Map<String, SMTFunctionDeclaration> declarations = new HashMap | ||
105 | val Set<SMTFunctionDefinition> definitions =new HashSet | ||
106 | |||
107 | input.functionDeclarations.forEach[declarations.put(it.name,it)] | ||
108 | if(output != null) { | ||
109 | output.newFunctionDeclarations.forEach[declarations.put(it.name,it)] | ||
110 | } | ||
111 | input.functionDefinition.filter[!declarations.containsKey(it.name)].forEach[definitions += it] | ||
112 | if(output != null) { | ||
113 | output.newFunctionDefinitions.filter[!declarations.containsKey(it.name)].forEach[definitions += it] | ||
114 | } | ||
115 | |||
116 | val referrables = new HashSet<SMTSymbolicDeclaration>; | ||
117 | referrables.addAll(declarations.values) | ||
118 | referrables.addAll(definitions) | ||
119 | return referrables | ||
120 | } | ||
121 | |||
122 | def public IScope scope_SMTSymbolicValue_symbolicReference(SMTSymbolicValue value, EReference ref) { | ||
123 | val Set<SMTSymbolicDeclaration> referrables = new HashSet; | ||
124 | |||
125 | referrables.addAll(value.getFiniteElements) | ||
126 | referrables.addAll(value.getParameters) | ||
127 | referrables.addAll(value.getFunctions) | ||
128 | referrables.addAll(value.getQuantifiedVariables) | ||
129 | referrables.addAll(value.getInlineConstantDefinitions) | ||
130 | |||
131 | return Scopes.scopeFor(referrables); | ||
132 | } | ||
133 | |||
134 | // Any type defined in the input section can be referred. | ||
135 | def public IScope scope_SMTComplexTypeReference_referred(SMTComplexTypeReference reference, EReference ref){ | ||
136 | return Scopes.scopeFor(getTop(typeof(SMTDocument),reference).input.typeDeclarations) | ||
137 | } | ||
138 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/validation/SmtLanguageValidator.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/validation/SmtLanguageValidator.xtend new file mode 100644 index 00000000..2ae6130f --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.language/src/hu/bme/mit/inf/dslreasoner/validation/SmtLanguageValidator.xtend | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * generated by Xtext | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.validation | ||
5 | //import org.eclipse.xtext.validation.Check | ||
6 | |||
7 | /** | ||
8 | * Custom validation rules. | ||
9 | * | ||
10 | * see http://www.eclipse.org/Xtext/documentation.html#validation | ||
11 | */ | ||
12 | class SmtLanguageValidator extends AbstractSmtLanguageValidator { | ||
13 | |||
14 | // public static val INVALID_NAME = 'invalidName' | ||
15 | // | ||
16 | // @Check | ||
17 | // def checkGreetingStartsWithCapital(Greeting greeting) { | ||
18 | // if (!Character.isUpperCase(greeting.name.charAt(0))) { | ||
19 | // warning('Name should start with a capital', | ||
20 | // MyDslPackage.Literals.GREETING__NAME, | ||
21 | // INVALID_NAME) | ||
22 | // } | ||
23 | // } | ||
24 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/.classpath b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/.classpath new file mode 100644 index 00000000..7e444723 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/.classpath | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <classpath> | ||
3 | <classpathentry kind="src" path="xtend-gen"/> | ||
4 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | ||
5 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
6 | <classpathentry kind="src" path="src"/> | ||
7 | <classpathentry kind="output" path="bin"/> | ||
8 | </classpath> | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/.gitignore b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/.gitignore new file mode 100644 index 00000000..8ae4e44d --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/.gitignore | |||
@@ -0,0 +1,4 @@ | |||
1 | /bin/ | ||
2 | /src-gen/ | ||
3 | /vql-gen/ | ||
4 | /xtend-gen/ | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/.project b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/.project new file mode 100644 index 00000000..00f0576a --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/.project | |||
@@ -0,0 +1,34 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <projectDescription> | ||
3 | <name>hu.bme.mit.inf.dslreasoner.smt.reasoner</name> | ||
4 | <comment></comment> | ||
5 | <projects> | ||
6 | </projects> | ||
7 | <buildSpec> | ||
8 | <buildCommand> | ||
9 | <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
10 | <arguments> | ||
11 | </arguments> | ||
12 | </buildCommand> | ||
13 | <buildCommand> | ||
14 | <name>org.eclipse.jdt.core.javabuilder</name> | ||
15 | <arguments> | ||
16 | </arguments> | ||
17 | </buildCommand> | ||
18 | <buildCommand> | ||
19 | <name>org.eclipse.pde.ManifestBuilder</name> | ||
20 | <arguments> | ||
21 | </arguments> | ||
22 | </buildCommand> | ||
23 | <buildCommand> | ||
24 | <name>org.eclipse.pde.SchemaBuilder</name> | ||
25 | <arguments> | ||
26 | </arguments> | ||
27 | </buildCommand> | ||
28 | </buildSpec> | ||
29 | <natures> | ||
30 | <nature>org.eclipse.pde.PluginNature</nature> | ||
31 | <nature>org.eclipse.jdt.core.javanature</nature> | ||
32 | <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
33 | </natures> | ||
34 | </projectDescription> | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/.settings/org.eclipse.jdt.core.prefs b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..295926d9 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/.settings/org.eclipse.jdt.core.prefs | |||
@@ -0,0 +1,7 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
4 | org.eclipse.jdt.core.compiler.compliance=1.8 | ||
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
7 | org.eclipse.jdt.core.compiler.source=1.8 | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/META-INF/MANIFEST.MF b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/META-INF/MANIFEST.MF new file mode 100644 index 00000000..a7f26476 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/META-INF/MANIFEST.MF | |||
@@ -0,0 +1,12 @@ | |||
1 | Manifest-Version: 1.0 | ||
2 | Bundle-ManifestVersion: 2 | ||
3 | Bundle-Name: Solver | ||
4 | Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
5 | Bundle-Version: 1.0.0.qualifier | ||
6 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
7 | Require-Bundle: hu.bme.mit.inf.dslreasoner.smt.language;bundle-version="1.0.0", | ||
8 | hu.bme.mit.inf.dslreasoner.logic.model;bundle-version="1.0.0", | ||
9 | org.eclipse.viatra.query.runtime;bundle-version="1.5.0", | ||
10 | org.eclipse.viatra.query.runtime.base.itc;bundle-version="1.5.0", | ||
11 | org.eclipse.viatra.query.tooling.core;bundle-version="1.5.0" | ||
12 | Export-Package: hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/build.properties b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/build.properties new file mode 100644 index 00000000..d6c49e5c --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/build.properties | |||
@@ -0,0 +1,5 @@ | |||
1 | source.. = src/,\ | ||
2 | xtend-gen/ | ||
3 | output.. = bin/ | ||
4 | bin.includes = META-INF/,\ | ||
5 | . | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2SMT_TypeMapperInterpretation.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2SMT_TypeMapperInterpretation.xtend new file mode 100644 index 00000000..44708f44 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2SMT_TypeMapperInterpretation.xtend | |||
@@ -0,0 +1,36 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
5 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSymbolicDeclaration | ||
6 | import java.util.List | ||
7 | import java.util.Map | ||
8 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
9 | |||
10 | class Logic2SMT_TypeMapperInterpretation { | ||
11 | |||
12 | val Map<Type, ? extends List<DefinedElement>> type2Elements | ||
13 | val Map<DefinedElement, ValueType> logic2smt | ||
14 | val Map<SMTSymbolicDeclaration, DefinedElement> smt2logic | ||
15 | |||
16 | public new( | ||
17 | Map<Type, ? extends List<DefinedElement>> type2Elements, | ||
18 | Map<DefinedElement, ValueType> logic2smt, | ||
19 | Map<SMTSymbolicDeclaration, DefinedElement> smt2logic) { | ||
20 | this.type2Elements = type2Elements | ||
21 | this.logic2smt = logic2smt | ||
22 | this.smt2logic = smt2logic | ||
23 | } | ||
24 | |||
25 | public def getElements(Type type) { | ||
26 | return type2Elements.get(type) | ||
27 | } | ||
28 | |||
29 | public def ValueType logicElement2Smt(DefinedElement element) { | ||
30 | return element.lookup(this.logic2smt) | ||
31 | } | ||
32 | |||
33 | public def smtElement2Logic(SMTSymbolicDeclaration element) { | ||
34 | return element.lookup(this.smt2logic) | ||
35 | } | ||
36 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2SmtMapper.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2SmtMapper.xtend new file mode 100644 index 00000000..aad43716 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2SmtMapper.xtend | |||
@@ -0,0 +1,1055 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.And | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Assertion | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolLiteral | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolTypeReference | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDeclaration | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDefinition | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Distinct | ||
14 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Divison | ||
15 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Equals | ||
16 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Exists | ||
17 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Forall | ||
18 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Function | ||
19 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDeclaration | ||
20 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDefinition | ||
21 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IfThenElse | ||
22 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Iff | ||
23 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Impl | ||
24 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.InstanceOf | ||
25 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntLiteral | ||
26 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntTypeReference | ||
27 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LessOrEqualThan | ||
28 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LessThan | ||
29 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Minus | ||
30 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Mod | ||
31 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.MoreOrEqualThan | ||
32 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.MoreThan | ||
33 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Multiply | ||
34 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Not | ||
35 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Or | ||
36 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Plus | ||
37 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.QuantifiedExpression | ||
38 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealLiteral | ||
39 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealTypeReference | ||
40 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
41 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
42 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition | ||
43 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.SymbolicValue | ||
44 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Term | ||
45 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Variable | ||
46 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
47 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTAnd | ||
48 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTAssertion | ||
49 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTBoolTypeReference | ||
50 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTComplexTypeReference | ||
51 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTDocument | ||
52 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTInput | ||
53 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTIntTypeReference | ||
54 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTOr | ||
55 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTQuantifiedExpression | ||
56 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTRealTypeReference | ||
57 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTReasoningTactic | ||
58 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSortedVariable | ||
59 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSymbolicValue | ||
60 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTTerm | ||
61 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTType | ||
62 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SmtLanguageFactory | ||
63 | import java.util.ArrayList | ||
64 | import java.util.HashMap | ||
65 | import java.util.LinkedHashMap | ||
66 | import java.util.LinkedList | ||
67 | import java.util.List | ||
68 | import java.util.Map | ||
69 | import org.eclipse.emf.ecore.EObject | ||
70 | import org.eclipse.emf.ecore.util.EcoreUtil | ||
71 | import org.eclipse.xtend.lib.annotations.Accessors | ||
72 | import org.eclipse.xtext.xbase.lib.Functions.Function0 | ||
73 | import org.eclipse.xtext.xbase.lib.Functions.Function1 | ||
74 | import org.eclipse.xtext.xbase.lib.Functions.Function2 | ||
75 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
76 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTFunctionDefinition | ||
77 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.ContainmentHierarchy | ||
78 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicProblemBuilder | ||
79 | |||
80 | class Logic2SmtMapper{ | ||
81 | val extension SmtLanguageFactory factory = SmtLanguageFactory.eINSTANCE | ||
82 | val Logic2SmtMapper_UnfoldingSupport unfolder = new Logic2SmtMapper_UnfoldingSupport | ||
83 | @Accessors val Logic2Smt_TypeMapper typeMapper; | ||
84 | |||
85 | LogicProblemBuilder b | ||
86 | |||
87 | new(Logic2Smt_TypeMapper typeMapper) { | ||
88 | this.typeMapper = typeMapper | ||
89 | } | ||
90 | |||
91 | public def TracedOutput<SMTDocument, Logic2SmtMapperTrace> transformProblem(LogicProblem problem, TypeScopes scope, SMTReasoningTactic strategy) { | ||
92 | val documentInput = createSMTInput => [getModelCommand = createSMTGetModelCommand] | ||
93 | if(strategy == null) documentInput.satCommand = createSMTSimpleSatCommand | ||
94 | else documentInput.satCommand = createSMTComplexSatCommand => [it.method = EcoreUtil.copy(strategy)] | ||
95 | |||
96 | val document = createSMTDocument => [input = documentInput] | ||
97 | val trace = new Logic2SmtMapperTrace => [ | ||
98 | it.forwardMapper = this | ||
99 | it.problem = problem | ||
100 | ] | ||
101 | // Trafo | ||
102 | this.typeMapper.transformTypes(documentInput,problem,trace, scope) | ||
103 | problem.functions.filter(FunctionDeclaration).forEach[it.transformFunctionDeclaration(documentInput,trace)] | ||
104 | problem.functions.filter(FunctionDefinition) .forEach[it.transformFunctionDefinition(documentInput,trace)] | ||
105 | problem.relations.filter(RelationDeclaration).forEach[it.transformRelationDeclaration(documentInput,trace)] | ||
106 | problem.relations.filter(RelationDefinition) .forEach[it.transformRelationDefinition(documentInput,trace)] | ||
107 | problem.constants.filter(ConstantDeclaration).forEach[it.transformConstantDeclaration(documentInput,trace)] | ||
108 | problem.constants.filter(ConstantDefinition) .forEach[it.transformConstantDefinition(documentInput,trace)] | ||
109 | |||
110 | problem.relations.filter(RelationDefinition).forEach[it.transformRelationDefinition_definition(documentInput,trace)] | ||
111 | documentInput.assertions += problem.assertions.map[transformAssertion(trace)] | ||
112 | // End trafo | ||
113 | |||
114 | document.input.assertions.forEach[it.value.nameAllUnnamedVariable] | ||
115 | document.input.functionDefinition.forEach[it.value.nameAllUnnamedVariable] | ||
116 | document.cleanDocument | ||
117 | return new TracedOutput(document,trace) | ||
118 | } | ||
119 | |||
120 | private def toID(String name) {name.split("\\s+").join("!") } | ||
121 | |||
122 | private def nameAllUnnamedVariable(SMTTerm root) { | ||
123 | var index = 1 | ||
124 | val unnamedVariables = root.eAllContents.filter(SMTSortedVariable).filter[it.name == null].toList | ||
125 | for(unnamedVariable : unnamedVariables) { | ||
126 | unnamedVariable.name = '''var«index++»''' | ||
127 | } | ||
128 | } | ||
129 | |||
130 | // def protected maxIntegerRageDefiniton(SMTInput documentInput) { | ||
131 | // val upperlimit = createSMTFunctionDeclaration | ||
132 | // } | ||
133 | |||
134 | def dispatch protected List<TypeConstraint> transformTypeReference(BoolTypeReference boolTypeReference, Logic2SmtMapperTrace trace) { | ||
135 | return #[new TypeConstraint(createSMTBoolTypeReference,null)] | ||
136 | } | ||
137 | def dispatch protected List<TypeConstraint> transformTypeReference(IntTypeReference intTypeReference, Logic2SmtMapperTrace trace) { | ||
138 | return #[new TypeConstraint(createSMTIntTypeReference,null)] | ||
139 | } | ||
140 | def dispatch protected List<TypeConstraint> transformTypeReference(RealTypeReference realTypeReference, Logic2SmtMapperTrace trace) { | ||
141 | return #[new TypeConstraint(createSMTRealTypeReference,null)] | ||
142 | } | ||
143 | def dispatch protected List<TypeConstraint> transformTypeReference(ComplexTypeReference complexTypeReference, Logic2SmtMapperTrace trace) { | ||
144 | return typeMapper.transformTypeReference(complexTypeReference.referred,trace) | ||
145 | } | ||
146 | |||
147 | /////////////////////////////////////////////////////// | ||
148 | // Definitions | ||
149 | /////////////////////////////////////////////////////// | ||
150 | |||
151 | def transformFunctionDeclaration(FunctionDeclaration function, SMTInput input, Logic2SmtMapperTrace trace) { | ||
152 | val parameterTypeCombinations = unfolder.getPermutations(function.parameters.map[x|transformTypeReference(x,trace)]) | ||
153 | val rangeTypeCombinations = function.range.transformTypeReference(trace) | ||
154 | |||
155 | if(rangeTypeCombinations.size == 1) { | ||
156 | val rangeType = rangeTypeCombinations.head | ||
157 | // Map it as function | ||
158 | var index = 1 | ||
159 | for(combination : parameterTypeCombinations) { | ||
160 | val nameWithIndex = if (parameterTypeCombinations.size > 1) | ||
161 | toID('''function «function.name.toID» «index++»''') | ||
162 | else | ||
163 | toID('''function «function.name.toID»''') | ||
164 | |||
165 | createFunctionDeclaration(function,nameWithIndex,combination,rangeType,true, input,trace) | ||
166 | } | ||
167 | } else { | ||
168 | // Map it as a relation | ||
169 | var index = 1 | ||
170 | for(combination : parameterTypeCombinations) { | ||
171 | val type2function = new HashMap | ||
172 | for(rangeType : rangeTypeCombinations) { | ||
173 | val nameWithIndex = toID('''function «function.name.toID» «index++»''') | ||
174 | val f = createFunctionDeclaration(function,nameWithIndex,combination,rangeType,false,input,trace) | ||
175 | type2function.put(rangeType,f) | ||
176 | } | ||
177 | // for all rangeTypes, there is | ||
178 | // 1. at least one range type that satisfies the relation | ||
179 | input.assertions+=createSMTAssertion => [ | ||
180 | it.value = createSMTForall => [f| | ||
181 | var paramIndex = 1 | ||
182 | for(param : combination) { | ||
183 | val paramName = '''p«paramIndex++»''' | ||
184 | val variable = createSMTSortedVariable => [ | ||
185 | it.name = paramName | ||
186 | it.range = param.type | ||
187 | ] | ||
188 | f.quantifiedVariables += variable | ||
189 | } | ||
190 | f.expression = createSMTOr => [ | ||
191 | operands+=rangeTypeCombinations.map[t| | ||
192 | createSMTExists => [ | ||
193 | val v = createSMTSortedVariable => [ | ||
194 | it.name = "r" | ||
195 | it.range = EcoreUtil.copy(t.type) | ||
196 | ] | ||
197 | it.quantifiedVariables += v | ||
198 | it.expression = createSMTSymbolicValue => [ | ||
199 | it.symbolicReference = type2function.get(t) | ||
200 | it.parameterSubstitutions += f.quantifiedVariables.map[fv| | ||
201 | createSMTSymbolicValue => [it.symbolicReference = fv] | ||
202 | ] | ||
203 | it.parameterSubstitutions += createSMTSymbolicValue => [it.symbolicReference = v] | ||
204 | ] | ||
205 | ] | ||
206 | ] | ||
207 | ] | ||
208 | ] | ||
209 | ] | ||
210 | // 2. at most one range type that satisfies the relation | ||
211 | // TODO a | ||
212 | } | ||
213 | } | ||
214 | } | ||
215 | |||
216 | private def createFunctionDeclaration( | ||
217 | Function function, | ||
218 | String nameWithIndex, | ||
219 | List<TypeConstraint> combination, | ||
220 | TypeConstraint rangeType, | ||
221 | boolean useFunction, | ||
222 | SMTInput input, | ||
223 | Logic2SmtMapperTrace trace | ||
224 | ) { | ||
225 | val smtFunction = if(useFunction) { | ||
226 | createSMTFunctionDeclaration => [ | ||
227 | it.name = nameWithIndex | ||
228 | it.parameters += combination.map[it.type] | ||
229 | it.range = rangeType.type | ||
230 | ] | ||
231 | } else { | ||
232 | createSMTFunctionDeclaration => [ | ||
233 | it.name = nameWithIndex | ||
234 | it.parameters += combination.map[it.type] | ||
235 | it.parameters += rangeType.type | ||
236 | it.range = createSMTBoolTypeReference | ||
237 | ] | ||
238 | } | ||
239 | |||
240 | val descriptor = new Descriptor<Function>((combination+#[rangeType]).toList.map[ | ||
241 | TypeDescriptor.createFromTypeReference(it.type)],function) | ||
242 | trace.functionMap.put(descriptor,smtFunction) | ||
243 | input.functionDeclarations += smtFunction | ||
244 | trace.functionUnfolding.put(function,#[descriptor]) | ||
245 | |||
246 | if(!useFunction) { | ||
247 | input.assertions += createSMTAssertion => [ | ||
248 | it.value = createSMTForall => [f| | ||
249 | var pi = 0 | ||
250 | for(param : combination) { | ||
251 | val variable = createSMTSortedVariable | ||
252 | variable.name = "p"+pi.toString | ||
253 | variable.range = EcoreUtil.copy(combination.get(pi).type) | ||
254 | f.quantifiedVariables+=variable | ||
255 | pi++ | ||
256 | } | ||
257 | val resultParam1 = createSMTSortedVariable => [ | ||
258 | it.name = "res1" | ||
259 | it.range = EcoreUtil.copy(rangeType.type) | ||
260 | ] | ||
261 | f.quantifiedVariables+=resultParam1 | ||
262 | val resultParam2 = createSMTSortedVariable => [ | ||
263 | it.name = "res2" | ||
264 | it.range = EcoreUtil.copy(rangeType.type) | ||
265 | ] | ||
266 | f.quantifiedVariables+=resultParam2 | ||
267 | f.expression = createSMTImpl => [ | ||
268 | it.leftOperand = createSMTAnd => [ | ||
269 | it.operands += createSMTSymbolicValue => [ | ||
270 | it.symbolicReference = smtFunction | ||
271 | it.parameterSubstitutions += (0..<combination.size).map[x| | ||
272 | createSMTSymbolicValue => [it.symbolicReference = f.quantifiedVariables.get(x)]] | ||
273 | it.parameterSubstitutions += createSMTSymbolicValue => [it.symbolicReference = resultParam1] | ||
274 | ] | ||
275 | it.operands += createSMTSymbolicValue => [ | ||
276 | it.symbolicReference = smtFunction | ||
277 | it.parameterSubstitutions += (0..<combination.size).map[x| | ||
278 | createSMTSymbolicValue => [it.symbolicReference = f.quantifiedVariables.get(x)]] | ||
279 | it.parameterSubstitutions += createSMTSymbolicValue => [it.symbolicReference = resultParam2] | ||
280 | ] | ||
281 | ] | ||
282 | it.rightOperand = createSMTEquals => [ | ||
283 | it.leftOperand = createSMTSymbolicValue => [it.symbolicReference = resultParam1] | ||
284 | it.rightOperand = createSMTSymbolicValue => [it.symbolicReference = resultParam2] | ||
285 | ] | ||
286 | ] | ||
287 | ] | ||
288 | ] | ||
289 | } | ||
290 | |||
291 | if(rangeType.constraint != null) { | ||
292 | input.assertions += createSMTAssertion => [ | ||
293 | it.value = createSMTForall => [f| | ||
294 | var pi = 0 | ||
295 | for(param : combination) { | ||
296 | val variable = createSMTSortedVariable | ||
297 | variable.name = "p"+pi.toString | ||
298 | variable.range = EcoreUtil.copy(combination.get(pi).type) | ||
299 | f.quantifiedVariables+=variable | ||
300 | pi++ | ||
301 | } | ||
302 | val resultParam = createSMTSortedVariable => [ | ||
303 | it.name = "res" | ||
304 | it.range = EcoreUtil.copy(rangeType.type) | ||
305 | ] | ||
306 | f.quantifiedVariables += resultParam | ||
307 | f.expression = createSMTImpl => [ | ||
308 | it.leftOperand = if(useFunction) | ||
309 | { | ||
310 | createSMTEquals => [ | ||
311 | leftOperand = createSMTSymbolicValue => [ | ||
312 | it.symbolicReference = smtFunction | ||
313 | it.parameterSubstitutions += (0..<combination.size).map[x| | ||
314 | createSMTSymbolicValue => [it.symbolicReference = f.quantifiedVariables.get(x)] | ||
315 | ] | ||
316 | ] | ||
317 | rightOperand = createSMTSymbolicValue => [it.symbolicReference = resultParam] | ||
318 | ] | ||
319 | } else { | ||
320 | createSMTSymbolicValue => [ | ||
321 | it.symbolicReference = smtFunction | ||
322 | it.parameterSubstitutions += (0..<combination.size).map[x| | ||
323 | createSMTSymbolicValue => [it.symbolicReference = f.quantifiedVariables.get(x)]] | ||
324 | it.parameterSubstitutions += createSMTSymbolicValue => [it.symbolicReference = resultParam] | ||
325 | ] | ||
326 | } | ||
327 | it.rightOperand = rangeType.constraint.apply(resultParam) | ||
328 | ] | ||
329 | ] | ||
330 | ] | ||
331 | } | ||
332 | return smtFunction | ||
333 | } | ||
334 | |||
335 | def transformFunctionDefinition(FunctionDefinition function, SMTInput input, Logic2SmtMapperTrace trace) { | ||
336 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
337 | } | ||
338 | |||
339 | def protected transformRelationDeclaration(RelationDeclaration relation, SMTInput input, Logic2SmtMapperTrace trace) { | ||
340 | val parameterTypeCombinations = unfolder.getPermutations(relation.parameters.map[x|transformTypeReference(x,trace)]) | ||
341 | var relationIndex = 1 | ||
342 | val unfolding = new ArrayList(parameterTypeCombinations.size) | ||
343 | for(parameterTypeCombination : parameterTypeCombinations) { | ||
344 | /// Create a name for the relation | ||
345 | val nameWithIndex = if (parameterTypeCombinations.size > 1) | ||
346 | toID('''relation «relation.name.toID» «relationIndex++»''') | ||
347 | else | ||
348 | toID('''relation «relation.name.toID»''') | ||
349 | |||
350 | // Adding an unfolded relation | ||
351 | val smtRelation = createSMTFunctionDeclaration => [ | ||
352 | name = nameWithIndex | ||
353 | parameters+= parameterTypeCombination.map[typeConstraint | EcoreUtil.copy(typeConstraint.type)] | ||
354 | range = createSMTBoolTypeReference | ||
355 | ] | ||
356 | val Descriptor<Relation> descriptor = new Descriptor<Relation>(parameterTypeCombination.map[ | ||
357 | TypeDescriptor.createFromTypeReference(it.type)],relation) | ||
358 | trace.relationMap.put(descriptor,smtRelation) | ||
359 | input.functionDeclarations += smtRelation | ||
360 | unfolding += descriptor | ||
361 | |||
362 | // If there is a type constraint | ||
363 | if(parameterTypeCombination.exists[it.constraint != null]) { | ||
364 | // create a constraint that specifies that the relation contains elemenents with the required properties | ||
365 | val and = createSMTAnd | ||
366 | val rel = createSMTSymbolicValue => [it.symbolicReference = smtRelation] | ||
367 | val forall = createSMTForall => [ | ||
368 | it.expression = createSMTImpl => [ | ||
369 | it.leftOperand = rel | ||
370 | it.rightOperand = and | ||
371 | ] | ||
372 | ] | ||
373 | var paramIndex = 0 | ||
374 | for(param : parameterTypeCombination) { | ||
375 | val paramName = '''p«paramIndex++»''' | ||
376 | val variable = createSMTSortedVariable => [ | ||
377 | it.name = paramName | ||
378 | it.range = param.type | ||
379 | ] | ||
380 | forall.quantifiedVariables += variable | ||
381 | rel.parameterSubstitutions += createSMTSymbolicValue => [it.symbolicReference = variable] | ||
382 | if(param.constraint != null) { | ||
383 | and.operands+=param.constraint.apply(variable) | ||
384 | } | ||
385 | } | ||
386 | input.assertions += createSMTAssertion => [ | ||
387 | it.value = forall | ||
388 | ] | ||
389 | } | ||
390 | } | ||
391 | trace.relationUnfolding.put(relation,unfolding) | ||
392 | } | ||
393 | def protected transformRelationDefinition(RelationDefinition relation, SMTInput input, Logic2SmtMapperTrace trace) { | ||
394 | val parameterTypeCombinations = unfolder.getPermutations(relation.variables.map[x|transformTypeReference(x.range,trace)]).toList | ||
395 | var relationIndex = 1 | ||
396 | val unfolding = new ArrayList(parameterTypeCombinations.size) | ||
397 | for(parameterTypeCombination : parameterTypeCombinations) { | ||
398 | /// Create a name for the relation | ||
399 | val nameWithIndex = if (parameterTypeCombinations.size > 1) | ||
400 | toID('''relation «relation.name.toID» «relationIndex++»''') | ||
401 | else | ||
402 | toID('''relation «relation.name.toID»''') | ||
403 | |||
404 | // creating an unfolded relation | ||
405 | val smtRelation = createSMTFunctionDefinition => [ | ||
406 | name = nameWithIndex | ||
407 | range = createSMTBoolTypeReference | ||
408 | ] | ||
409 | /* | ||
410 | // adding variables as parameters | ||
411 | val Map<Variable, SMTSortedVariable> variables = new HashMap | ||
412 | var paramIndex = 0 | ||
413 | val constraintList = new LinkedList | ||
414 | for(param : parameterTypeCombination) { | ||
415 | val paramName = relation.variables.get(paramIndex).name.toID | ||
416 | val variable = createSMTSortedVariable => [ | ||
417 | it.name = paramName | ||
418 | it.range = param.type | ||
419 | ] | ||
420 | |||
421 | smtRelation.parameters+=variable | ||
422 | variables.put(relation.variables.get(paramIndex),variable) | ||
423 | if(param.constraint != null) { | ||
424 | constraintList+=param.constraint.apply(variable) | ||
425 | } | ||
426 | paramIndex++ | ||
427 | } | ||
428 | val definition = transformTerm(relation.value,trace,variables) | ||
429 | if(constraintList.empty) { | ||
430 | smtRelation.value = definition.expectLogic.value | ||
431 | } else if(constraintList.size == 1) { | ||
432 | smtRelation.value = createSMTAnd => [ | ||
433 | it.operands += constraintList.head | ||
434 | it.operands += definition.expectLogic.value | ||
435 | ] | ||
436 | } else { | ||
437 | smtRelation.value = createSMTAnd => [ | ||
438 | it.operands += createSMTAnd => [operands += constraintList] | ||
439 | it.operands += definition.expectLogic.value | ||
440 | ] | ||
441 | } | ||
442 | */ | ||
443 | // | ||
444 | val Descriptor<Relation> descriptor = new Descriptor<Relation>(parameterTypeCombination.map[ | ||
445 | TypeDescriptor.createFromTypeReference(it.type)],relation) | ||
446 | trace.relationMap.put(descriptor,smtRelation) | ||
447 | input.functionDefinition += smtRelation | ||
448 | unfolding += descriptor | ||
449 | } | ||
450 | trace.relationUnfolding.put(relation,unfolding) | ||
451 | } | ||
452 | def transformRelationDefinition_definition(RelationDefinition relation, SMTInput input, Logic2SmtMapperTrace trace) { | ||
453 | val parameterTypeCombinations = unfolder.getPermutations(relation.variables.map[x|transformTypeReference(x.range,trace)]).toList | ||
454 | for(parameterTypeCombination : parameterTypeCombinations) { | ||
455 | val Descriptor<Relation> descriptor = new Descriptor<Relation>(parameterTypeCombination.map[ | ||
456 | TypeDescriptor.createFromTypeReference(it.type)],relation) | ||
457 | val smtRelation = descriptor.lookup(trace.relationMap) as SMTFunctionDefinition | ||
458 | |||
459 | // adding variables as parameters | ||
460 | val Map<Variable, SMTSortedVariable> variables = new HashMap | ||
461 | var paramIndex = 0 | ||
462 | val constraintList = new LinkedList | ||
463 | for(param : parameterTypeCombination) { | ||
464 | val paramName = relation.variables.get(paramIndex).name.toID | ||
465 | val variable = createSMTSortedVariable => [ | ||
466 | it.name = paramName | ||
467 | it.range = param.type | ||
468 | ] | ||
469 | |||
470 | smtRelation.parameters+=variable | ||
471 | variables.put(relation.variables.get(paramIndex),variable) | ||
472 | if(param.constraint != null) { | ||
473 | constraintList+=param.constraint.apply(variable) | ||
474 | } | ||
475 | paramIndex++ | ||
476 | } | ||
477 | val definition = transformTerm(relation.value,trace,variables) | ||
478 | if(constraintList.empty) { | ||
479 | smtRelation.value = definition.expectLogic.value | ||
480 | } else if(constraintList.size == 1) { | ||
481 | smtRelation.value = createSMTAnd => [ | ||
482 | it.operands += constraintList.head | ||
483 | it.operands += definition.expectLogic.value | ||
484 | ] | ||
485 | } else { | ||
486 | smtRelation.value = createSMTAnd => [ | ||
487 | it.operands += createSMTAnd => [operands += constraintList] | ||
488 | it.operands += definition.expectLogic.value | ||
489 | ] | ||
490 | } | ||
491 | } | ||
492 | } | ||
493 | |||
494 | def transformConstantDeclaration(ConstantDeclaration constant,SMTInput input, Logic2SmtMapperTrace trace) { | ||
495 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
496 | } | ||
497 | |||
498 | def transformConstantDefinition(ConstantDefinition constant, SMTInput input, Logic2SmtMapperTrace trace) { | ||
499 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
500 | } | ||
501 | |||
502 | |||
503 | def protected SMTAssertion transformAssertion(Assertion assertion, Logic2SmtMapperTrace trace) { | ||
504 | val a = assertion.value.transformTerm(trace,emptyMap) | ||
505 | createSMTAssertion => [value = a.expectLogic.value] | ||
506 | } | ||
507 | |||
508 | /////////////////////////////////////////////////////// | ||
509 | // Logic -> Logic value transformation | ||
510 | /////////////////////////////////////////////////////// | ||
511 | |||
512 | /////////////////////////////////////////////////////// | ||
513 | // Literals | ||
514 | /////////////////////////////////////////////////////// | ||
515 | def dispatch protected TransformedSubterm transformTerm(BoolLiteral literal, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
516 | new LogicSubterm(createSMTBoolLiteral => [value = literal.value]) } | ||
517 | def dispatch protected TransformedSubterm transformTerm(IntLiteral literal, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
518 | if(literal.value>=0) { new NumericSubterm(#[],#[],createSMTIntLiteral => [value = literal.value])} | ||
519 | else {new NumericSubterm(#[],#[],createSMTMinus => [ leftOperand = (createSMTIntLiteral => [value = - (literal.value) ] ) ]) } } | ||
520 | def dispatch protected TransformedSubterm transformTerm(RealLiteral literal, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
521 | new NumericSubterm(#[],#[],createSMTRealLiteral => [value = literal.value]) } | ||
522 | |||
523 | /////////////////////////////////////////////////////// | ||
524 | // NumericOperators | ||
525 | /////////////////////////////////////////////////////// | ||
526 | def dispatch protected TransformedSubterm transformTerm(Plus plus, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
527 | return transformBinaryNumericOperator( | ||
528 | plus.leftOperand,plus.rightOperand, | ||
529 | [l,r|createSMTPlus => [ leftOperand = l rightOperand = r ]], | ||
530 | trace,variables) | ||
531 | } | ||
532 | def dispatch protected TransformedSubterm transformTerm(Minus minus, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
533 | return transformBinaryNumericOperator( | ||
534 | minus.leftOperand,minus.rightOperand, | ||
535 | [l,r|createSMTMinus => [ leftOperand = l rightOperand = r ]], | ||
536 | trace,variables) | ||
537 | } | ||
538 | def dispatch protected TransformedSubterm transformTerm(Multiply multiply, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
539 | return transformBinaryNumericOperator( | ||
540 | multiply.leftOperand,multiply.rightOperand, | ||
541 | [l,r|createSMTMultiply => [ leftOperand = l rightOperand = r ]], | ||
542 | trace,variables) | ||
543 | } | ||
544 | def dispatch protected TransformedSubterm transformTerm(Divison div, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
545 | return transformBinaryNumericOperator( | ||
546 | div.leftOperand,div.rightOperand, | ||
547 | [l,r|createSMTDiv => [ leftOperand = l rightOperand = r ]], | ||
548 | trace,variables) | ||
549 | } | ||
550 | def dispatch protected TransformedSubterm transformTerm(Mod mod, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
551 | return transformBinaryNumericOperator( | ||
552 | mod.leftOperand,mod.rightOperand, | ||
553 | [l,r|createSMTMod => [ leftOperand = l rightOperand = r ]], | ||
554 | trace,variables) | ||
555 | } | ||
556 | |||
557 | def protected TransformedSubterm transformBinaryNumericOperator( | ||
558 | Term leftOperand, | ||
559 | Term rightOperand, | ||
560 | Function2<SMTTerm,SMTTerm,SMTTerm> combinator, | ||
561 | Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) | ||
562 | { | ||
563 | val left = leftOperand. transformTerm(trace,variables).expectNumber.getPossibleValues | ||
564 | val right = rightOperand.transformTerm(trace,variables).expectNumber.getPossibleValues | ||
565 | val values = new ArrayList(left.size * right.size) | ||
566 | for(combination : TransformedSubterm.allCombinations(left,right)) { | ||
567 | val l = combination.get(0) | ||
568 | val r = combination.get(1) | ||
569 | values += new SubtermOption( | ||
570 | #[l,r],#[],#[], | ||
571 | combinator.apply(l.expression, r.expression), | ||
572 | TypeDescriptor.numericTypeDescriptor_Instance | ||
573 | ) | ||
574 | } | ||
575 | return new NumericSubterm(values) | ||
576 | } | ||
577 | |||
578 | /////////////////////////////////////////////////////// | ||
579 | // LogicOperators | ||
580 | /////////////////////////////////////////////////////// | ||
581 | def dispatch protected TransformedSubterm transformTerm(Not not, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
582 | val operand = not.operand.transformTerm(trace,variables).expectLogic | ||
583 | new LogicSubterm(createSMTNot => [operand = operand.value]) } | ||
584 | def dispatch protected TransformedSubterm transformTerm(And and, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
585 | transformBinaryLogicOperator2(and.operands,[x|createSMTAnd => [operands += x]],trace,variables) } | ||
586 | def dispatch protected TransformedSubterm transformTerm(Or or, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
587 | transformBinaryLogicOperator2(or.operands,[x|createSMTOr => [operands += x]],trace,variables) } | ||
588 | def dispatch protected TransformedSubterm transformTerm(Impl impl, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
589 | transformBinaryLogicOperator1(impl.leftOperand,impl.rightOperand,[l,r|createSMTImpl =>[leftOperand = l rightOperand = r]],trace,variables) } | ||
590 | def dispatch protected TransformedSubterm transformTerm(Iff iff, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
591 | transformBinaryLogicOperator1(iff.leftOperand,iff.rightOperand,[l,r|createSMTIff => [leftOperand = l rightOperand = r]],trace,variables)} | ||
592 | |||
593 | /** | ||
594 | * Logic combinator with two values | ||
595 | */ | ||
596 | def protected transformBinaryLogicOperator1( | ||
597 | Term leftOperand, Term rightOperand, | ||
598 | Function2<SMTTerm,SMTTerm,SMTTerm> combinator, | ||
599 | Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
600 | val left = leftOperand.transformTerm(trace,variables).expectLogic | ||
601 | val right = rightOperand.transformTerm(trace,variables).expectLogic | ||
602 | return new LogicSubterm(combinator.apply(left.value, right.value)) | ||
603 | } | ||
604 | /** | ||
605 | * Logic combinator with multiple values | ||
606 | */ | ||
607 | def protected transformBinaryLogicOperator2( | ||
608 | Iterable<? extends Term> operands, | ||
609 | Function1<Iterable<? extends SMTTerm>,SMTTerm> combinator, | ||
610 | Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
611 | val smtOperands = operands.map[transformTerm(trace,variables).expectLogic.value] | ||
612 | return new LogicSubterm(combinator.apply(smtOperands)) | ||
613 | } | ||
614 | |||
615 | /////////////////////////////////////////////////////// | ||
616 | // Numeric -> Logic | ||
617 | /////////////////////////////////////////////////////// | ||
618 | def dispatch protected TransformedSubterm transformTerm(MoreThan moreThan, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
619 | transformNumericComparison(moreThan.leftOperand,moreThan.rightOperand, [l,r|createSMTMT => [ leftOperand = l rightOperand = r ]],trace,variables)} | ||
620 | def dispatch protected TransformedSubterm transformTerm(LessThan lessThan, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
621 | transformNumericComparison(lessThan.leftOperand,lessThan.rightOperand, [l,r|createSMTLT => [ leftOperand = l rightOperand = r ]],trace,variables)} | ||
622 | def dispatch protected TransformedSubterm transformTerm(MoreOrEqualThan moreThan, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
623 | transformNumericComparison(moreThan.leftOperand,moreThan.rightOperand, [l,r|createSMTMEQ => [ leftOperand = l rightOperand = r ]],trace,variables)} | ||
624 | def dispatch protected TransformedSubterm transformTerm(LessOrEqualThan lessThan, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
625 | transformNumericComparison(lessThan.leftOperand,lessThan.rightOperand, [l,r|createSMTLEQ => [ leftOperand = l rightOperand = r ]],trace,variables)} | ||
626 | |||
627 | def protected transformNumericComparison(Term leftOperand, Term rightOperand, Function2<SMTTerm,SMTTerm,SMTTerm> combinator, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables){ | ||
628 | val left = leftOperand.transformTerm(trace,variables).getPossibleValues | ||
629 | val right = rightOperand.transformTerm(trace,variables).getPossibleValues | ||
630 | val values = new ArrayList(left.size * right.size) | ||
631 | for(combination : TransformedSubterm.allCombinations(left,right)) { | ||
632 | val l = combination.get(0) | ||
633 | val r = combination.get(1) | ||
634 | values += LogicSubterm::resolveToLogic(#[l,r],combinator.apply(l.expression, r.expression)) | ||
635 | } | ||
636 | val res = createSMTOr =>[operands += values] | ||
637 | return new LogicSubterm(res) | ||
638 | } | ||
639 | |||
640 | /////////////////////////////////////////////////////// | ||
641 | // Equals and Distinct | ||
642 | /////////////////////////////////////////////////////// | ||
643 | |||
644 | def dispatch protected TransformedSubterm transformTerm(Equals equals, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
645 | val left = equals.leftOperand.transformTerm(trace,variables) | ||
646 | val rightX = equals.rightOperand.transformTerm(trace,variables) | ||
647 | if(left instanceof LogicSubterm) { | ||
648 | val right = rightX.expectLogic | ||
649 | new LogicSubterm(createSMTEquals => [ | ||
650 | leftOperand = left.value | ||
651 | rightOperand = right.value ]) | ||
652 | } else if(left instanceof NumericSubterm) { | ||
653 | val right = rightX.expectNumber | ||
654 | val leftOperands = left.possibleValues | ||
655 | val rightOperands = right.possibleValues | ||
656 | val values = new ArrayList(leftOperands.size * rightOperands.size) | ||
657 | for(combination : TransformedSubterm.allCombinations(left.possibleValues,right.possibleValues)) { | ||
658 | val l = combination.get(0) | ||
659 | val r = combination.get(1) | ||
660 | values += TransformedSubterm.resolveToLogic(#[l,r], | ||
661 | createSMTEquals => [ | ||
662 | leftOperand = combination.get(0).expression | ||
663 | rightOperand = combination.get(1).expression]) | ||
664 | } | ||
665 | return new LogicSubterm(createSMTOr =>[operands += values]) | ||
666 | } else if(left instanceof ComplexSubterm){ | ||
667 | val right = rightX as ComplexSubterm | ||
668 | |||
669 | val values = new LinkedList | ||
670 | for(combination : TransformedSubterm.allCombinations(left.possibleValues,right.possibleValues)) { | ||
671 | val l = combination.get(0) | ||
672 | val r = combination.get(1) | ||
673 | if(l.type.complexType == r.type.complexType) { | ||
674 | values += TransformedSubterm.resolveToLogic(#[l,r],createSMTEquals => [ | ||
675 | leftOperand = l.expression | ||
676 | rightOperand = r.expression ]) | ||
677 | } /*else dont add*/ | ||
678 | } | ||
679 | |||
680 | if(values.size == 0) { | ||
681 | return new LogicSubterm(createSMTBoolLiteral => [it.value = false]) | ||
682 | } else if(values.size == 1) { | ||
683 | return new LogicSubterm(values.head) | ||
684 | } else { | ||
685 | return new LogicSubterm(createSMTOr => [operands += values]) | ||
686 | } | ||
687 | } | ||
688 | } | ||
689 | |||
690 | def dispatch protected TransformedSubterm transformTerm(Distinct distinct, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
691 | val o = distinct.operands.map[transformTerm(trace,variables)] | ||
692 | if(o.empty) { | ||
693 | throw new IllegalArgumentException('''empty distinct''') | ||
694 | } else if(o.size == 1) { | ||
695 | // 1 element is always distinct | ||
696 | new LogicSubterm(createSMTBoolLiteral => [it.value = true]) | ||
697 | } else { | ||
698 | val head = o.head | ||
699 | if(head instanceof LogicSubterm) { | ||
700 | return new LogicSubterm(createSMTDistinct => [ | ||
701 | it.operands += o.map[expectLogic.value]]) | ||
702 | } else if(head instanceof NumericSubterm) { | ||
703 | val numbers = o.map[expectNumber.possibleValues] | ||
704 | val distincts = new LinkedList | ||
705 | for(combination : TransformedSubterm.allCombinations(numbers)) { | ||
706 | distincts += LogicSubterm::resolveToLogic(combination,createSMTDistinct => [operands += combination.map[it.expression]]) | ||
707 | } | ||
708 | new LogicSubterm(createSMTOr => [it.operands += distincts]) | ||
709 | } else { | ||
710 | val objects = o.map[possibleValues] | ||
711 | val distincts = new LinkedList | ||
712 | for(combination : TransformedSubterm.allCombinations(objects)) { | ||
713 | val Map<SMTType,LinkedList<SubtermOption>> type2Terms = new LinkedHashMap; | ||
714 | for(param:combination) { | ||
715 | val type = param.type.complexType | ||
716 | val value = param | ||
717 | var LinkedList<SubtermOption> list; | ||
718 | if(type2Terms.containsKey(type)) { | ||
719 | list = type2Terms.get(type) | ||
720 | } else { | ||
721 | list = new LinkedList | ||
722 | type2Terms.put(type,list) | ||
723 | } | ||
724 | list+=value | ||
725 | } | ||
726 | |||
727 | val groups = type2Terms.values.map[elementList| | ||
728 | if(elementList.size == 1) return null | ||
729 | else return LogicSubterm.resolveToLogic(elementList,createSMTDistinct => [it.operands += elementList.map[expression]]) | ||
730 | ].filterNull | ||
731 | if(groups.empty) { | ||
732 | // One of the group is trivially satisfied | ||
733 | return new LogicSubterm(createSMTBoolLiteral => [it.value = true]) | ||
734 | } else { | ||
735 | val and = createSMTAnd => [operands += groups] | ||
736 | distincts.add(and) | ||
737 | } | ||
738 | } | ||
739 | if(distincts.size == 1) { | ||
740 | return new LogicSubterm(distincts.head) | ||
741 | } else { | ||
742 | return new LogicSubterm(createSMTOr => [it.operands += distincts]) | ||
743 | } | ||
744 | } | ||
745 | } | ||
746 | } | ||
747 | |||
748 | /////////////////////////////////////////////////////// | ||
749 | // Quantifiers | ||
750 | /////////////////////////////////////////////////////// | ||
751 | |||
752 | def dispatch protected TransformedSubterm transformTerm(Forall forall, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
753 | new LogicSubterm(transformQuantifiedExpression(forall,trace,variables, | ||
754 | [createSMTForall], | ||
755 | [q|createSMTAnd=>[operands+=q]], | ||
756 | [precondition,expression|createSMTImpl=>[leftOperand=precondition rightOperand=expression]])) | ||
757 | } | ||
758 | def dispatch protected TransformedSubterm transformTerm(Exists exists, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
759 | new LogicSubterm(transformQuantifiedExpression(exists,trace,variables, | ||
760 | [createSMTExists], | ||
761 | [q|createSMTOr=>[operands+=q]], | ||
762 | [precondition,expression|createSMTAnd=>[operands+=precondition operands+=expression]])) | ||
763 | } | ||
764 | |||
765 | def protected SMTTerm transformQuantifiedExpression( | ||
766 | QuantifiedExpression q, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables, | ||
767 | Function0<SMTQuantifiedExpression> constructor, | ||
768 | Function1<Iterable<SMTQuantifiedExpression>,SMTTerm> combinator, | ||
769 | Function2<SMTTerm,SMTTerm,SMTTerm> preconditionCombinator | ||
770 | ) { | ||
771 | val permutations = unfolder.getPermutations(q.quantifiedVariables.map[it.range.transformTypeReference(trace)]) | ||
772 | val ArrayList<SMTQuantifiedExpression> unfoldedQuantification = new ArrayList(permutations.size) | ||
773 | |||
774 | for(permutation : permutations) { | ||
775 | val allVariables = new HashMap(variables) | ||
776 | val newSMTVariables = new ArrayList(q.quantifiedVariables.size) | ||
777 | val typePrecondition = new ArrayList<SMTTerm>(q.quantifiedVariables.size) | ||
778 | |||
779 | for(variableIndex: 0..<q.quantifiedVariables.size) { | ||
780 | val logicVariable = q.quantifiedVariables.get(variableIndex) | ||
781 | val elementInPermutation = permutation.get(variableIndex) | ||
782 | |||
783 | val newSMTVariable = createSMTSortedVariable => [ | ||
784 | name = logicVariable.name.toID | ||
785 | range = elementInPermutation.type | ||
786 | ] | ||
787 | allVariables.put(logicVariable, newSMTVariable) | ||
788 | newSMTVariables+=newSMTVariable | ||
789 | if(elementInPermutation.constraint != null) { | ||
790 | typePrecondition += elementInPermutation.constraint.apply(newSMTVariable) | ||
791 | } | ||
792 | } | ||
793 | |||
794 | val expressionOfQuantifiedFormula = | ||
795 | if(typePrecondition.isEmpty) | ||
796 | q.expression.transformTerm(trace,allVariables).expectLogic.value | ||
797 | else if(typePrecondition.size == 1) | ||
798 | preconditionCombinator.apply( | ||
799 | typePrecondition.head, | ||
800 | q.expression.transformTerm(trace,allVariables).expectLogic.value) | ||
801 | else | ||
802 | preconditionCombinator.apply( | ||
803 | createSMTAnd => [it.operands += typePrecondition], | ||
804 | q.expression.transformTerm(trace,allVariables).expectLogic.value) | ||
805 | |||
806 | unfoldedQuantification += constructor.apply => [ | ||
807 | quantifiedVariables += newSMTVariables | ||
808 | expression = expressionOfQuantifiedFormula | ||
809 | ] | ||
810 | |||
811 | // if(newSMTVariables.exists[it.range == null]) { | ||
812 | // println(newSMTVariables.filter[it.range == null].map[name]) | ||
813 | // } | ||
814 | } | ||
815 | |||
816 | if(permutations.size == 1) return unfoldedQuantification.head | ||
817 | else return combinator.apply(unfoldedQuantification) | ||
818 | } | ||
819 | |||
820 | /////////////////////////////////////////////////////// | ||
821 | // If - Then - Else | ||
822 | /////////////////////////////////////////////////////// | ||
823 | def dispatch protected TransformedSubterm transformTerm(IfThenElse ite, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
824 | val condition = ite.condition.transformTerm(trace,variables).expectLogic.value | ||
825 | val positiveTerm = ite.ifTrue.transformTerm(trace,variables) | ||
826 | val positives = positiveTerm.possibleValues | ||
827 | val negativeTerm = ite.ifFalse.transformTerm(trace,variables) | ||
828 | val negatives = negativeTerm.possibleValues | ||
829 | // Simple ITE | ||
830 | if(positives.size == 1 && negatives.size == 1 && positives.head.type == negatives.head.type) { | ||
831 | val t = positives.head.type | ||
832 | if(t.isLogic) { | ||
833 | return new LogicSubterm(createSMTITE => [ | ||
834 | it.condition = condition | ||
835 | it.^if = positives.head.expression | ||
836 | it.^else = negatives.head.expression]) | ||
837 | } else if(t.isNumeric) { | ||
838 | return new NumericSubterm( | ||
839 | (positives.head.variables + negatives.head.variables).toList, | ||
840 | (positives.head.preconditions + negatives.head.preconditions).toList, | ||
841 | createSMTITE => [ | ||
842 | it.condition = condition | ||
843 | it.^if = positives.head.expression | ||
844 | it.^else = negatives.head.expression | ||
845 | ]) | ||
846 | } else { | ||
847 | return new ComplexSubterm( | ||
848 | (positives.head.variables + negatives.head.variables).toList, | ||
849 | (positives.head.preconditions + negatives.head.preconditions).toList, | ||
850 | createSMTITE => [ | ||
851 | it.condition = condition | ||
852 | it.^if = positives.head.expression | ||
853 | it.^else = negatives.head.expression], | ||
854 | t | ||
855 | ) | ||
856 | } | ||
857 | // else the ite need to be unfolded | ||
858 | } else { | ||
859 | if(positiveTerm instanceof LogicSubterm) { | ||
860 | throw new AssertionError('''If the subterm has logic value it should be transformed as "Simple ITE""''') | ||
861 | } else if (positiveTerm instanceof NumericSubterm){ | ||
862 | return new NumericSubterm(unfoldIte(positives, condition, negatives)) | ||
863 | } else { | ||
864 | return new ComplexSubterm(unfoldIte(positives, condition, negatives)) | ||
865 | } | ||
866 | } | ||
867 | } | ||
868 | |||
869 | private def List<SubtermOption> unfoldIte(List<SubtermOption> positives, SMTTerm condition, List<SubtermOption> negatives) { | ||
870 | (positives.map[ | ||
871 | new SubtermOption(#[it],#[],#[condition],it.expression,it.type) | ||
872 | ] + | ||
873 | negatives.map[ | ||
874 | new SubtermOption(#[it],#[],#[createSMTNot => [it.operand = condition]],it.expression,it.type) | ||
875 | ]).toList | ||
876 | } | ||
877 | |||
878 | /////////////////////////////////////////////////////// | ||
879 | // instanceof | ||
880 | /////////////////////////////////////////////////////// | ||
881 | |||
882 | def dispatch protected TransformedSubterm transformTerm(InstanceOf i, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
883 | val value = i.value.transformTerm(trace,variables) | ||
884 | val range = i.range | ||
885 | if(range instanceof BoolTypeReference) { | ||
886 | return new LogicSubterm(createSMTBoolLiteral=>[it.value = (value instanceof LogicSubterm)]) | ||
887 | } else if(range instanceof IntTypeReference || range instanceof RealTypeReference) { | ||
888 | return new LogicSubterm(createSMTBoolLiteral=>[it.value = (value instanceof NumericSubterm)]) | ||
889 | } else { | ||
890 | val requestedTypes = this.typeMapper.transformTypeReference((range as ComplexTypeReference).referred,trace) | ||
891 | val possileValues = value.possibleValues | ||
892 | val options = new ArrayList(requestedTypes.size) | ||
893 | for(typeConstraint : requestedTypes) { | ||
894 | val possibleValue = possileValues.filter[it.type.complexType == (typeConstraint.type as SMTComplexTypeReference).referred].head | ||
895 | if(possibleValue != null) { | ||
896 | val x = if(typeConstraint.constraint != null ) { | ||
897 | if(possibleValue.expression instanceof SMTSymbolicValue && (possibleValue.expression as SMTSymbolicValue).symbolicReference instanceof SMTSortedVariable) { | ||
898 | val referred = (possibleValue.expression as SMTSymbolicValue).symbolicReference as SMTSortedVariable | ||
899 | typeConstraint.constraint.apply(referred) | ||
900 | } else { | ||
901 | createSMTForall => [ | ||
902 | val v = createSMTSortedVariable => [it.range = EcoreUtil.copy(typeConstraint.type)] | ||
903 | it.quantifiedVariables += v | ||
904 | it.expression = createSMTImpl => [ | ||
905 | leftOperand = createSMTEquals => [ | ||
906 | it.leftOperand = possibleValue.expression | ||
907 | it.rightOperand = createSMTSymbolicValue => [it.symbolicReference = v] | ||
908 | ] | ||
909 | rightOperand = typeConstraint.constraint.apply(v) | ||
910 | ] | ||
911 | ] | ||
912 | } | ||
913 | } else if(typeConstraint.constraint == null) { | ||
914 | createSMTBoolLiteral => [it.value = true] | ||
915 | } | ||
916 | options += LogicSubterm::resolveToLogic(#[possibleValue],x) | ||
917 | } | ||
918 | } | ||
919 | |||
920 | if(options.size == 0) { | ||
921 | return new LogicSubterm(createSMTBoolLiteral=>[it.value = false]) | ||
922 | } else if(options.size == 1) { | ||
923 | return new LogicSubterm(options.head) | ||
924 | } else { | ||
925 | return new LogicSubterm(createSMTOr => [it.operands += options]) | ||
926 | } | ||
927 | } | ||
928 | |||
929 | } | ||
930 | |||
931 | /////////////////////////////////////////////////////// | ||
932 | // SymbolicReference | ||
933 | /////////////////////////////////////////////////////// | ||
934 | |||
935 | def dispatch protected TransformedSubterm transformTerm(SymbolicValue symbolicValue, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
936 | val referred = symbolicValue.symbolicReference | ||
937 | val params = symbolicValue.parameterSubstitutions | ||
938 | return transformSymbolicReference(referred,params,trace,variables) | ||
939 | } | ||
940 | |||
941 | def dispatch protected TransformedSubterm transformSymbolicReference(Relation referred, List<Term> parameterSubstitution, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
942 | val parameters = parameterSubstitution.map[transformTerm(it,trace,variables)] | ||
943 | val list = new LinkedList | ||
944 | for(combination : TransformedSubterm.allCombinations(parameters.map[it.possibleValues])) { | ||
945 | val descriptor = new Descriptor(combination.map[it.type],referred) | ||
946 | val targetRelation = descriptor.lookup(trace.relationMap) | ||
947 | if(targetRelation == null) { | ||
948 | throw new AssertionError('''target relation should not be null (yet)''') | ||
949 | |||
950 | } else { | ||
951 | list += TransformedSubterm.resolveToLogic(combination,createSMTSymbolicValue => [ | ||
952 | it.symbolicReference = targetRelation | ||
953 | it.parameterSubstitutions += combination.map[it.expression] | ||
954 | ]) | ||
955 | } | ||
956 | } | ||
957 | |||
958 | if(list.size == 1) { | ||
959 | return new LogicSubterm(list.head) | ||
960 | } else { | ||
961 | return new LogicSubterm(createSMTOr => [ operands += list ]) | ||
962 | } | ||
963 | } | ||
964 | |||
965 | |||
966 | def dispatch protected TransformedSubterm transformSymbolicReference(Function referred, List<Term> parameterSubstitution, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
967 | throw new UnsupportedOperationException | ||
968 | } | ||
969 | |||
970 | def dispatch protected TransformedSubterm transformSymbolicReference(Variable referred, List<Term> parameterSubstitution, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
971 | if(!variables.containsKey(referred)) { | ||
972 | val container = referred.eContainer | ||
973 | println("X" + container) | ||
974 | for(v : variables.keySet) { | ||
975 | println(v) | ||
976 | println("in " +v.eContainer) | ||
977 | } | ||
978 | return null | ||
979 | } | ||
980 | val v = referred.lookup(variables) | ||
981 | |||
982 | val expression = createSMTSymbolicValue => [it.symbolicReference = v] | ||
983 | if(v.range instanceof SMTBoolTypeReference) { | ||
984 | return new LogicSubterm(expression) | ||
985 | } else if(v.range instanceof SMTIntTypeReference || v.range instanceof SMTRealTypeReference) { | ||
986 | return new NumericSubterm(#[],#[],expression) | ||
987 | } else { | ||
988 | return new ComplexSubterm(#[],#[],expression, | ||
989 | new TypeDescriptor((v.range as SMTComplexTypeReference).referred)); | ||
990 | } | ||
991 | } | ||
992 | |||
993 | def dispatch protected TransformedSubterm transformSymbolicReference(DefinedElement referred, List<Term> parameterSubstitution, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
994 | this.typeMapper.transformSymbolicReference(referred,trace) | ||
995 | } | ||
996 | |||
997 | def dispatch protected TransformedSubterm transformSymbolicReference(Void referred, List<Term> parameterSubstitution, Logic2SmtMapperTrace trace, Map<Variable, SMTSortedVariable> variables) { | ||
998 | throw new NullPointerException('''unfilled symbolic reference!''') | ||
999 | } | ||
1000 | |||
1001 | /////////// | ||
1002 | |||
1003 | /*def transformContainment(SMTDocument document, ContainmentHierarchy h, Logic2SmtMapperTrace trace) { | ||
1004 | val containmentRelation_oo = createSMTFunctionDefinition=>[ | ||
1005 | it.name="containment!oo" | ||
1006 | it.range=createSMTBoolTypeReference | ||
1007 | val child = createSMTSortedVariable => [ | ||
1008 | it.name = | ||
1009 | ] | ||
1010 | ] | ||
1011 | }*/ | ||
1012 | |||
1013 | /////////// | ||
1014 | |||
1015 | def cleanDocument(SMTDocument document) { | ||
1016 | val content = document.eAllContents.toList | ||
1017 | for(object:content) { | ||
1018 | for(containmentReference : object.eClass.EAllReferences.filter[containment]) { | ||
1019 | val child = object.eGet(containmentReference) { | ||
1020 | if(child!=null) { | ||
1021 | if(containmentReference.isMany) { | ||
1022 | val list = child as List<EObject> | ||
1023 | for(index : 0..<list.size) { | ||
1024 | val single = list.get(index) | ||
1025 | val newSingle = replaceWith(single) | ||
1026 | if(newSingle!=null) { | ||
1027 | list.set(index,newSingle) | ||
1028 | } | ||
1029 | } | ||
1030 | } else { | ||
1031 | val single = child as EObject | ||
1032 | val newSingle = replaceWith(single) | ||
1033 | if(newSingle!=null) { | ||
1034 | object.eSet(containmentReference,newSingle) | ||
1035 | } | ||
1036 | } | ||
1037 | } | ||
1038 | } | ||
1039 | } | ||
1040 | } | ||
1041 | } | ||
1042 | def private dispatch replaceWith(SMTOr or) { | ||
1043 | if(or.operands.empty) { | ||
1044 | return createSMTBoolLiteral => [it.value = false] | ||
1045 | } else return null | ||
1046 | } | ||
1047 | def private dispatch replaceWith(SMTAnd and) { | ||
1048 | if(and.operands.empty) { | ||
1049 | return createSMTBoolLiteral => [it.value = true] | ||
1050 | } else return null | ||
1051 | } | ||
1052 | def private dispatch replaceWith(EObject object) { | ||
1053 | null | ||
1054 | } | ||
1055 | } \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2SmtMapperTrace.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2SmtMapperTrace.xtend new file mode 100644 index 00000000..69111a11 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2SmtMapperTrace.xtend | |||
@@ -0,0 +1,23 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Constant | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Function | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
7 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSymbolicDeclaration | ||
8 | import java.util.HashMap | ||
9 | import java.util.List | ||
10 | import java.util.Map | ||
11 | |||
12 | class Logic2SmtMapperTrace { | ||
13 | public var LogicProblem problem | ||
14 | public var Logic2SmtMapper forwardMapper | ||
15 | public var Logic2Smt_TypeMapperTrace typeMapperTrace | ||
16 | |||
17 | public val Map<Relation,List<Descriptor<Relation>>> relationUnfolding = new HashMap | ||
18 | public val Map<Descriptor<Relation>,SMTSymbolicDeclaration> relationMap = new HashMap | ||
19 | public val Map<Function,List<Descriptor<Function>>> functionUnfolding = new HashMap | ||
20 | public val Map<Descriptor<Function>,SMTSymbolicDeclaration> functionMap = new HashMap | ||
21 | public val Map<Function,List<Descriptor<Constant>>> constantUnfolding = new HashMap | ||
22 | public val Map<Descriptor<Constant>,SMTSymbolicDeclaration> constantMap = new HashMap | ||
23 | } \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2SmtMapper_UnfoldingSupport.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2SmtMapper_UnfoldingSupport.xtend new file mode 100644 index 00000000..8c2d5dad --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2SmtMapper_UnfoldingSupport.xtend | |||
@@ -0,0 +1,33 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
2 | |||
3 | //import hu.bme.mit.inf.dslreasoner.smtLanguage.SmtLanguageFactory | ||
4 | import java.util.ArrayList | ||
5 | import java.util.List | ||
6 | |||
7 | class Logic2SmtMapper_UnfoldingSupport { | ||
8 | //val extension SmtLanguageFactory factory = SmtLanguageFactory.eINSTANCE | ||
9 | |||
10 | def List<List<TypeConstraint>> getPermutations(List<List<TypeConstraint>> lists) { | ||
11 | if(lists.size == 1) { | ||
12 | val elements = lists.head | ||
13 | val result = new ArrayList(elements.size) | ||
14 | for(element: elements){ | ||
15 | result.add(#[element.copy]) | ||
16 | } | ||
17 | return result | ||
18 | } else { | ||
19 | val permuteThis = lists.head | ||
20 | val withThat = getPermutations(lists.tail.toList) | ||
21 | val result = new ArrayList(permuteThis.size*withThat.size) | ||
22 | for(h:permuteThis) { | ||
23 | for(t:withThat) { | ||
24 | val l = new ArrayList(withThat.size+1) | ||
25 | l+=h.copy | ||
26 | l.addAll(t.map[copy]) | ||
27 | result.add(l) | ||
28 | } | ||
29 | } | ||
30 | return result | ||
31 | } | ||
32 | } | ||
33 | } \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2Smt_TypeMapper.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2Smt_TypeMapper.xtend new file mode 100644 index 00000000..71cfd0e0 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2Smt_TypeMapper.xtend | |||
@@ -0,0 +1,38 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
7 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTDocument | ||
8 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTInput | ||
9 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSortedVariable | ||
10 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTTerm | ||
11 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTTypeReference | ||
12 | import java.util.List | ||
13 | import org.eclipse.emf.ecore.util.EcoreUtil | ||
14 | import org.eclipse.xtend.lib.annotations.Data | ||
15 | import org.eclipse.xtext.xbase.lib.Functions.Function1 | ||
16 | |||
17 | interface Logic2Smt_TypeMapper { | ||
18 | def void transformTypes( | ||
19 | SMTInput document, LogicProblem problem, Logic2SmtMapperTrace trace, TypeScopes scopes) | ||
20 | |||
21 | def List<TypeConstraint> transformTypeReference(Type type, Logic2SmtMapperTrace trace) | ||
22 | def TransformedSubterm transformSymbolicReference(DefinedElement referred, Logic2SmtMapperTrace trace) | ||
23 | def Logic2SMT_TypeMapperInterpretation getTypeInterpretation(LogicProblem problem,SMTDocument document,SmtModelInterpretation interpretation, Logic2SmtMapperTrace trace) | ||
24 | } | ||
25 | |||
26 | @Data | ||
27 | class TypeConstraint { | ||
28 | SMTTypeReference type | ||
29 | Function1<SMTSortedVariable,SMTTerm> constraint | ||
30 | |||
31 | def public copy() { | ||
32 | return new TypeConstraint(EcoreUtil.copy(this.type),this.constraint) | ||
33 | } | ||
34 | } | ||
35 | |||
36 | interface Logic2Smt_TypeMapperTrace{ | ||
37 | def Logic2Smt_TypeMapperTrace copy(SMTInput newModel) | ||
38 | } \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2Smt_TypeMapper_FilteredTypes.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2Smt_TypeMapper_FilteredTypes.xtend new file mode 100644 index 00000000..c9bafa6c --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2Smt_TypeMapper_FilteredTypes.xtend | |||
@@ -0,0 +1,501 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.patterns.PossibleDynamicTypeMatcher | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.patterns.SupertypeStarMatcher | ||
12 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTComplexTypeReference | ||
13 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTDocument | ||
14 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTEnumLiteral | ||
15 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTEnumeratedTypeDeclaration | ||
16 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTFunctionDeclaration | ||
17 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTFunctionDefinition | ||
18 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTInput | ||
19 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTModelResult | ||
20 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSetTypeDeclaration | ||
21 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSymbolicDeclaration | ||
22 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTTerm | ||
23 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTType | ||
24 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SmtLanguageFactory | ||
25 | import java.util.ArrayList | ||
26 | import java.util.HashMap | ||
27 | import java.util.LinkedList | ||
28 | import java.util.List | ||
29 | import java.util.Map | ||
30 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine | ||
31 | import org.eclipse.viatra.query.runtime.emf.EMFScope | ||
32 | import org.eclipse.xtext.xbase.lib.Functions.Function0 | ||
33 | import org.eclipse.xtext.xbase.lib.Functions.Function1 | ||
34 | |||
35 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
36 | |||
37 | class Logic2Smt_TypeMapperTrace_FilteredTypes implements Logic2Smt_TypeMapperTrace{ | ||
38 | public var Map<Type, SMTType> independentClasses = new HashMap | ||
39 | /** | ||
40 | * SMT type for the new objects | ||
41 | */ | ||
42 | public var SMTType newObjects | ||
43 | /** | ||
44 | * SMT type for the existing objects | ||
45 | */ | ||
46 | public var SMTEnumeratedTypeDeclaration oldObjects | ||
47 | /** | ||
48 | * existing element -> SMT literal map | ||
49 | */ | ||
50 | public var Map<DefinedElement, SMTEnumLiteral> elementMap = new HashMap | ||
51 | |||
52 | public var SMTEnumeratedTypeDeclaration oldObjectTypes | ||
53 | public var Map<Type, SMTEnumLiteral> oldObjectTypeMap = new HashMap | ||
54 | public var SMTFunctionDefinition oldObjectTypeFunction | ||
55 | public var Map<Type, SMTFunctionDefinition> oldObjectTypePredicates = new HashMap | ||
56 | |||
57 | public var SMTEnumeratedTypeDeclaration newObjectTypes | ||
58 | public var Map<Type, SMTEnumLiteral> newObjectTypeMap = new HashMap | ||
59 | public var SMTFunctionDeclaration newObjectTypeFunction | ||
60 | public var Map<Type, SMTFunctionDefinition> newObjectTypePredicates = new HashMap | ||
61 | |||
62 | override copy(SMTInput newModel) { | ||
63 | val a = this | ||
64 | val b = new Logic2Smt_TypeMapperTrace_FilteredTypes | ||
65 | |||
66 | b.independentClasses = a.independentClasses.copyMap(newModel.typeDeclarations,[name]) | ||
67 | |||
68 | b.newObjects = newModel.typeDeclarations.filter[it.name == a.newObjects.name].head | ||
69 | b.oldObjects = newModel.typeDeclarations.filter[it.name == a.oldObjects.name].head as SMTEnumeratedTypeDeclaration | ||
70 | b.elementMap = a.elementMap.copyMap(b.oldObjects.elements,[name]) | ||
71 | |||
72 | b.oldObjectTypes = newModel.typeDeclarations.filter[it.name == a.newObjects.name].head as SMTEnumeratedTypeDeclaration | ||
73 | b.oldObjectTypeMap = a.oldObjectTypeMap.copyMap(b.oldObjectTypes.elements,[name]) | ||
74 | b.oldObjectTypeFunction = newModel.functionDefinition.filter[it.name == a.oldObjectTypeFunction.name].head | ||
75 | b.oldObjectTypePredicates = a.oldObjectTypePredicates.copyMap(newModel.functionDefinition,[name]) | ||
76 | |||
77 | b.newObjectTypes = newModel.typeDeclarations.filter[it.name == a.newObjectTypes.name].head as SMTEnumeratedTypeDeclaration | ||
78 | b.newObjectTypeMap = a.newObjectTypeMap.copyMap(b.newObjectTypes.elements,[name]) | ||
79 | b.newObjectTypeFunction = newModel.functionDeclarations.filter[it.name == a.newObjectTypeFunction.name].head | ||
80 | b.newObjectTypePredicates = a.newObjectTypePredicates.copyMap(newModel.functionDefinition,[name]) | ||
81 | |||
82 | return b | ||
83 | } | ||
84 | } | ||
85 | |||
86 | class Logic2Smt_TypeMapper_FilteredTypes implements Logic2Smt_TypeMapper { | ||
87 | val extension SmtLanguageFactory factory = SmtLanguageFactory.eINSTANCE | ||
88 | val LogiclanguageFactory factory2 = LogiclanguageFactory.eINSTANCE | ||
89 | |||
90 | private def toID(List<String> names) {names.join("!") } | ||
91 | private def toID(String name) {name.split("\\s+").toID} | ||
92 | |||
93 | override transformTypes(SMTInput document, LogicProblem problem, Logic2SmtMapperTrace trace, TypeScopes scopes) { | ||
94 | val typeTrace = new Logic2Smt_TypeMapperTrace_FilteredTypes | ||
95 | trace.typeMapperTrace = typeTrace | ||
96 | val engine = ViatraQueryEngine.on(new EMFScope(problem)) | ||
97 | |||
98 | val independentTypes = problem.types.filter(TypeDefinition).filter[isIndependentType] | ||
99 | |||
100 | val connectedTypes = problem.types.filter[!isIndependentType] | ||
101 | val connectedElements = problem.elements.filter[!isIndependentElement] | ||
102 | |||
103 | val connectedTypesWithoutDefintypesWithoutDefinedSupertype = connectedTypes.filter(TypeDeclaration).filter[!hasDefinedSupertype].toList | ||
104 | val hasOldElements = !connectedElements.empty | ||
105 | val hasNewElements = !connectedTypesWithoutDefintypesWithoutDefinedSupertype.empty | ||
106 | |||
107 | // 0. map the simple types | ||
108 | this.transformIndependentTypes(independentTypes,trace) | ||
109 | |||
110 | // 1. Has old elements => create supertype for it | ||
111 | if(hasOldElements) { | ||
112 | this.transformDefinedElements(connectedElements, trace,document) | ||
113 | } | ||
114 | // 2. Has new types => create a supertype for it | ||
115 | if(hasNewElements) { | ||
116 | this.transformUndefinedElements(scopes,trace,document) | ||
117 | } | ||
118 | // 3. Adding type definitions of the types | ||
119 | // 3.1: Type definition to old elements | ||
120 | if(hasOldElements) { | ||
121 | this.transformOldTypes(connectedTypes, connectedElements, trace, document, engine) | ||
122 | } | ||
123 | // 3.2: Type definition to new elements | ||
124 | if(hasNewElements) { | ||
125 | this.transformNewTypes(connectedTypesWithoutDefintypesWithoutDefinedSupertype,trace,document,engine); | ||
126 | } | ||
127 | } | ||
128 | |||
129 | private def isIndependentType(Type t) { | ||
130 | val res = (t instanceof TypeDefinition) && t.supertypes.empty && t.subtypes.empty | ||
131 | return res | ||
132 | } | ||
133 | private def isIndependentElement(DefinedElement e) { | ||
134 | val types = e.definedInType | ||
135 | return types.size == 1 && types.head.isIndependentType | ||
136 | } | ||
137 | |||
138 | protected def transformIndependentTypes(Iterable<TypeDefinition> types,Logic2SmtMapperTrace trace) { | ||
139 | for(type: types) { | ||
140 | val independentSMTType = createSMTEnumeratedTypeDeclaration => [ | ||
141 | name = toID(#["oldType",type.name]) | ||
142 | ] | ||
143 | trace.typeTrace.independentClasses.put(type,independentSMTType) | ||
144 | for(element : type.elements) { | ||
145 | val enumLiteral = createSMTEnumLiteral => [it.name = toID(#["oldElement",element.name])] | ||
146 | independentSMTType.elements += enumLiteral | ||
147 | trace.typeTrace.elementMap.put(element,enumLiteral) | ||
148 | } | ||
149 | } | ||
150 | } | ||
151 | |||
152 | protected def transformDefinedElements(Iterable<DefinedElement> oldElements, Logic2SmtMapperTrace trace, SMTInput document) { | ||
153 | val List<SMTEnumLiteral> literals = new ArrayList(oldElements.size) | ||
154 | for(element : oldElements) { | ||
155 | val elementName ='''oldElement «element.name»''' | ||
156 | val literal = createSMTEnumLiteral => [name = elementName.toID] | ||
157 | literals += literal | ||
158 | trace.typeTrace.elementMap.put(element,literal) | ||
159 | } | ||
160 | trace.typeTrace.oldObjects = createSMTEnumeratedTypeDeclaration => | ||
161 | [name = "oldObjects" it.elements += literals] | ||
162 | document.typeDeclarations += trace.typeTrace.oldObjects | ||
163 | } | ||
164 | |||
165 | protected def transformUndefinedElements(TypeScopes scopes, Logic2SmtMapperTrace trace, SMTInput document) { | ||
166 | var SMTType newObjects | ||
167 | if(scopes.maxNewElements == -1) { | ||
168 | newObjects = createSMTSetTypeDeclaration => [ | ||
169 | name = "newObjects" | ||
170 | ] | ||
171 | } else { | ||
172 | val newElements = new ArrayList(scopes.maxNewElements) | ||
173 | for(index : (1..<scopes.maxNewElements+1)) { | ||
174 | val literal = createSMTEnumLiteral => [ | ||
175 | name = #["newElement",index.toString].toID | ||
176 | ] | ||
177 | newElements += literal | ||
178 | } | ||
179 | newObjects = createSMTEnumeratedTypeDeclaration => [ | ||
180 | name = "newObjects" | ||
181 | it.elements += newElements | ||
182 | ] | ||
183 | } | ||
184 | trace.typeTrace.newObjects = newObjects | ||
185 | document.typeDeclarations += newObjects | ||
186 | } | ||
187 | |||
188 | protected def transformOldTypes(Iterable<Type> oldTypes,Iterable<DefinedElement> oldElements, Logic2SmtMapperTrace trace, SMTInput document, ViatraQueryEngine engine) { | ||
189 | val possibleTypeMatcher = PossibleDynamicTypeMatcher.on(engine) | ||
190 | val supertypeStarMatcher = SupertypeStarMatcher.on(engine) | ||
191 | // val possibleTypes = new LinkedList | ||
192 | // if(hasDefinedElement) possibleTypes += typesWithDefinedSupertype | ||
193 | // if(hasUndefinedElement) possibleTypes += typesWithoutDefinedSupertype | ||
194 | // val possibleConcreteTypes = possibleTypes.filter[!it.isIsAbstract] | ||
195 | // val possibleConcreteTypes = possibleTypeMatcher.allValuesOfdynamic | ||
196 | |||
197 | // 3.1.1. cretate a type for old types | ||
198 | val possibleConcreteTypeLiterals = new ArrayList() | ||
199 | for(possibleConcreteType: oldTypes.filter[!isIsAbstract]) { | ||
200 | val typeName = '''oldType «possibleConcreteType.name»''' | ||
201 | val literal = createSMTEnumLiteral => [name = typeName.toID] | ||
202 | trace.typeTrace.oldObjectTypeMap.put(possibleConcreteType,literal) | ||
203 | possibleConcreteTypeLiterals+=literal | ||
204 | } | ||
205 | val oldObjectTypes = createSMTEnumeratedTypeDeclaration => [ | ||
206 | it.name = "oldTypes" | ||
207 | it.elements += possibleConcreteTypeLiterals | ||
208 | ] | ||
209 | trace.typeTrace.oldObjectTypes = oldObjectTypes | ||
210 | document.typeDeclarations += oldObjectTypes | ||
211 | |||
212 | // 3.1.2 for each object, create a constant for its possible dynamic type | ||
213 | val Map<DefinedElement,SMTFunctionDeclaration> possibleTypesOfElement = new HashMap | ||
214 | val Map<DefinedElement,Type> onlyPossibleType = new HashMap | ||
215 | for(object: oldElements) { | ||
216 | val types = possibleTypeMatcher.getAllValuesOfdynamic(null,object) | ||
217 | if(types.size == 1) { | ||
218 | onlyPossibleType.put(object,types.head) | ||
219 | } else { // including 0 or more than 1 | ||
220 | // create a constant declaration | ||
221 | val typeOfObjectConstant = createSMTFunctionDeclaration => [ | ||
222 | it.name = toID(#["typeDecisions",toID(object.name)]) | ||
223 | it.range = createSMTComplexTypeReference => [ | ||
224 | it.referred = trace.typeTrace.oldObjectTypes | ||
225 | ] | ||
226 | ] | ||
227 | document.functionDeclarations += typeOfObjectConstant | ||
228 | possibleTypesOfElement.put(object,typeOfObjectConstant) | ||
229 | // add assertions to the constant to select valid values | ||
230 | document.assertions += createSMTAssertion => [ | ||
231 | val options = types.map[type | createSMTEquals => [ | ||
232 | it.leftOperand = createSMTSymbolicValue => [it.symbolicReference = typeOfObjectConstant] | ||
233 | it.rightOperand = createSMTSymbolicValue => [it.symbolicReference = type.lookup(trace.typeTrace.oldObjectTypeMap)] | ||
234 | ]] | ||
235 | it.value = if(options.empty) { | ||
236 | createSMTBoolLiteral => [it.value = false] | ||
237 | } else { | ||
238 | createSMTOr=>[operands += options] | ||
239 | } | ||
240 | ] | ||
241 | } | ||
242 | } | ||
243 | |||
244 | // 3.1.2 create a function: old elements -> old types | ||
245 | val oldTypeFunction = createSMTFunctionDefinition => [ | ||
246 | it.name = "oldTypeFunction" | ||
247 | val o = createSMTSortedVariable => [ | ||
248 | it.name = "o" | ||
249 | it.range= createSMTComplexTypeReference => [it.referred = trace.typeTrace.oldObjects] | ||
250 | ] | ||
251 | it.parameters += o | ||
252 | it.range = createSMTComplexTypeReference => [it.referred = trace.typeTrace.oldObjectTypes] | ||
253 | it.value = unfoldITE(oldElements, | ||
254 | [createSMTSymbolicValue => [it.symbolicReference = o]], | ||
255 | [DefinedElement e | createSMTSymbolicValue => [it.symbolicReference = e.lookup(trace.typeTrace.elementMap)]], | ||
256 | [DefinedElement e | | ||
257 | if(onlyPossibleType.containsKey(e)) { | ||
258 | return createSMTSymbolicValue => [ | ||
259 | symbolicReference = e.lookup(onlyPossibleType).lookup(trace.typeTrace.oldObjectTypeMap) ] | ||
260 | } else { | ||
261 | return createSMTSymbolicValue => [ | ||
262 | symbolicReference = e.lookup(possibleTypesOfElement) | ||
263 | ] | ||
264 | } | ||
265 | ] | ||
266 | ) | ||
267 | ] | ||
268 | trace.typeTrace.oldObjectTypeFunction = oldTypeFunction | ||
269 | document.functionDefinition += oldTypeFunction | ||
270 | |||
271 | // 3.1.3 create a predicate for each type: old object -> {true, false} | ||
272 | for(oldType: oldTypes) { | ||
273 | val oldTypePredicate = createSMTFunctionDefinition | ||
274 | oldTypePredicate.name = toID(#["oldTypePredicate",oldType.name.toID]) | ||
275 | val param = createSMTSortedVariable => [ | ||
276 | name = "o" | ||
277 | range = createSMTComplexTypeReference => [referred = trace.typeTrace.oldObjects] | ||
278 | ] | ||
279 | oldTypePredicate.parameters += param | ||
280 | oldTypePredicate.range = createSMTBoolTypeReference | ||
281 | val values = new LinkedList | ||
282 | for(concreteSupbtype : supertypeStarMatcher.getAllValuesOfsubtype(oldType).filter[!isIsAbstract]) { | ||
283 | val typeOfO = createSMTSymbolicValue => [ | ||
284 | it.symbolicReference = oldTypeFunction | ||
285 | it.parameterSubstitutions += createSMTSymbolicValue => [it.symbolicReference = param] | ||
286 | ] | ||
287 | val valueOfConcreteSupbtype = createSMTSymbolicValue => [ | ||
288 | it.symbolicReference = concreteSupbtype.lookup(trace.typeTrace.oldObjectTypeMap) | ||
289 | ] | ||
290 | values += createSMTEquals => [ | ||
291 | it.leftOperand = typeOfO | ||
292 | it.rightOperand = valueOfConcreteSupbtype | ||
293 | ] | ||
294 | } | ||
295 | oldTypePredicate.value = createSMTOr=>[it.operands +=values] | ||
296 | |||
297 | document.functionDefinition += oldTypePredicate | ||
298 | trace.typeTrace.oldObjectTypePredicates.put(oldType,oldTypePredicate) | ||
299 | } | ||
300 | } | ||
301 | |||
302 | protected def transformNewTypes( | ||
303 | Iterable<TypeDeclaration> typesWithoutDefinedSupertype, | ||
304 | Logic2SmtMapperTrace trace, SMTInput document, ViatraQueryEngine engine) | ||
305 | { | ||
306 | val supertypeStarMatcher = SupertypeStarMatcher.on(engine) | ||
307 | val possibleTypes = typesWithoutDefinedSupertype | ||
308 | val possibleConcreteTypes = possibleTypes.filter[!it.isIsAbstract].toList | ||
309 | |||
310 | // 3.2.1. cretate a type for new types | ||
311 | val possibleConcreteTypeLiterals = new ArrayList() | ||
312 | for(possibleConcreteType: possibleConcreteTypes) { | ||
313 | val typeName = '''newType «possibleConcreteType.name»''' | ||
314 | val literal = createSMTEnumLiteral => [name = typeName.toID] | ||
315 | trace.typeTrace.newObjectTypeMap.put(possibleConcreteType,literal) | ||
316 | possibleConcreteTypeLiterals+=literal | ||
317 | } | ||
318 | val newObjectTypes = createSMTEnumeratedTypeDeclaration => [ | ||
319 | it.name = "newTypes" | ||
320 | it.elements += possibleConcreteTypeLiterals | ||
321 | ] | ||
322 | trace.typeTrace.newObjectTypes = newObjectTypes | ||
323 | document.typeDeclarations += newObjectTypes | ||
324 | |||
325 | // 3.2.2 create a function: new elements -> new types | ||
326 | val newTypeFunction = createSMTFunctionDeclaration => [ | ||
327 | it.name = "newTypeFunction" | ||
328 | it.parameters += createSMTComplexTypeReference => [it.referred = trace.typeTrace.newObjects] | ||
329 | it.range = createSMTComplexTypeReference => [it.referred = trace.typeTrace.newObjectTypes] | ||
330 | ] | ||
331 | trace.typeTrace.newObjectTypeFunction = newTypeFunction | ||
332 | document.functionDeclarations += newTypeFunction | ||
333 | |||
334 | // 3.1.3 create a predicate for each type: new type -> {true, false} | ||
335 | for(newType: possibleTypes) { | ||
336 | val newTypePredicate = createSMTFunctionDefinition | ||
337 | newTypePredicate.name = toID(#["newTypePredicate",newType.name.toID]) | ||
338 | val param = createSMTSortedVariable => [ | ||
339 | name = "o" | ||
340 | range = createSMTComplexTypeReference => [referred = trace.typeTrace.newObjects] | ||
341 | ] | ||
342 | newTypePredicate.parameters += param | ||
343 | newTypePredicate.range = createSMTBoolTypeReference | ||
344 | val values = new LinkedList | ||
345 | for(concreteSupbtype : supertypeStarMatcher.getAllValuesOfsubtype(newType).filter[!isIsAbstract]) { | ||
346 | if(possibleConcreteTypes.contains(concreteSupbtype)) { | ||
347 | val typeOfO = createSMTSymbolicValue => [ | ||
348 | it.symbolicReference = newTypeFunction | ||
349 | it.parameterSubstitutions += createSMTSymbolicValue => [it.symbolicReference = param] | ||
350 | ] | ||
351 | if(!trace.typeTrace.newObjectTypeMap.containsKey(concreteSupbtype)) { | ||
352 | println("gebasz") | ||
353 | } | ||
354 | val valueOfConcreteSupbtype = createSMTSymbolicValue => [ | ||
355 | it.symbolicReference = concreteSupbtype.lookup(trace.typeTrace.newObjectTypeMap) | ||
356 | ] | ||
357 | values+= createSMTEquals => [ | ||
358 | it.leftOperand = typeOfO | ||
359 | it.rightOperand = valueOfConcreteSupbtype | ||
360 | ] | ||
361 | } | ||
362 | } | ||
363 | newTypePredicate.value = createSMTOr=>[it.operands +=values] | ||
364 | |||
365 | document.functionDefinition += newTypePredicate | ||
366 | trace.typeTrace.newObjectTypePredicates.put(newType,newTypePredicate) | ||
367 | } | ||
368 | } | ||
369 | |||
370 | private def Logic2Smt_TypeMapperTrace_FilteredTypes getTypeTrace(Logic2SmtMapperTrace trace) { | ||
371 | val typeTrace = trace.typeMapperTrace | ||
372 | if(typeTrace instanceof Logic2Smt_TypeMapperTrace_FilteredTypes) { | ||
373 | return typeTrace | ||
374 | } else { | ||
375 | throw new IllegalArgumentException('''Unknown trace type: «typeTrace.class.name»''') | ||
376 | } | ||
377 | } | ||
378 | |||
379 | private def boolean hasDefinedSupertype(Type type) { | ||
380 | if(type instanceof TypeDefinition) { | ||
381 | return true | ||
382 | } else { | ||
383 | if(type.supertypes.empty) return false | ||
384 | else return type.supertypes.exists[it.hasDefinedSupertype] | ||
385 | } | ||
386 | } | ||
387 | |||
388 | def private <T> SMTTerm unfoldITE(Iterable<T> options, Function0<SMTTerm> input, Function1<T,SMTTerm> conditionOfOption, Function1<T,SMTTerm> outputForOption) { | ||
389 | if(options.size == 1) { | ||
390 | return outputForOption.apply(options.head) | ||
391 | } else { | ||
392 | return createSMTITE => [ | ||
393 | it.condition = createSMTEquals => [ | ||
394 | leftOperand = input.apply | ||
395 | rightOperand = conditionOfOption.apply(options.head) | ||
396 | ] | ||
397 | it.^if = outputForOption.apply(options.head) | ||
398 | it.^else = unfoldITE(options.tail,input,conditionOfOption,outputForOption) | ||
399 | ] | ||
400 | } | ||
401 | } | ||
402 | |||
403 | override transformSymbolicReference(DefinedElement referred,Logic2SmtMapperTrace trace) { | ||
404 | val x = referred.lookup(trace.typeTrace.elementMap) | ||
405 | new ComplexSubterm(#[],#[], | ||
406 | createSMTSymbolicValue => [it.symbolicReference = x], | ||
407 | new TypeDescriptor(x.eContainer as SMTEnumeratedTypeDeclaration) | ||
408 | ) | ||
409 | } | ||
410 | |||
411 | override transformTypeReference(Type type, Logic2SmtMapperTrace trace) { | ||
412 | val list = new ArrayList | ||
413 | |||
414 | if(trace.typeTrace.oldObjectTypePredicates.containsKey(type)) { | ||
415 | list += new TypeConstraint( | ||
416 | createSMTComplexTypeReference => [it.referred = trace.typeTrace.oldObjects], | ||
417 | [x|createSMTSymbolicValue => [ | ||
418 | it.symbolicReference = trace.typeTrace.oldObjectTypePredicates.get(type) | ||
419 | it.parameterSubstitutions += createSMTSymbolicValue => [it.symbolicReference = x]]] | ||
420 | ) | ||
421 | } | ||
422 | if(trace.typeTrace.newObjectTypePredicates.containsKey(type)) { | ||
423 | list += new TypeConstraint( | ||
424 | createSMTComplexTypeReference => [it.referred = trace.typeTrace.newObjects], | ||
425 | [x|createSMTSymbolicValue => [ | ||
426 | it.symbolicReference = trace.typeTrace.newObjectTypePredicates.get(type) | ||
427 | it.parameterSubstitutions += createSMTSymbolicValue => [it.symbolicReference = x]]] | ||
428 | ) | ||
429 | } | ||
430 | if(trace.typeTrace.independentClasses.containsKey(type)) { | ||
431 | list += new TypeConstraint( | ||
432 | createSMTComplexTypeReference => [it.referred = type.lookup(trace.typeTrace.independentClasses)], | ||
433 | null | ||
434 | ) | ||
435 | } | ||
436 | |||
437 | if(list.empty) throw new AssertionError('''Typereference to type is «type.name» empty''') | ||
438 | if(list.exists[it.type == null]){ | ||
439 | throw new AssertionError('''Typereference to null!''') | ||
440 | } | ||
441 | return list | ||
442 | } | ||
443 | |||
444 | override getTypeInterpretation(LogicProblem problem, SMTDocument document, SmtModelInterpretation interpretation, Logic2SmtMapperTrace trace) { | ||
445 | val model = document.output.getModelResult as SMTModelResult | ||
446 | val newTypeDec = trace.typeTrace.newObjects | ||
447 | var List<ValueType> newElements = null | ||
448 | |||
449 | if(newTypeDec instanceof SMTSetTypeDeclaration) { | ||
450 | val newElementType = model.typeDefinitions.filter[ | ||
451 | (it.type as SMTComplexTypeReference).referred == newTypeDec | ||
452 | ].head | ||
453 | newElements = newElementType.elements.map[new ValueType(new TypeDescriptor(newTypeDec),it.symbolicReference)] | ||
454 | } else if(newTypeDec instanceof SMTEnumeratedTypeDeclaration) { | ||
455 | newElements = newTypeDec.elements.map[new ValueType(new TypeDescriptor(newTypeDec),it)] | ||
456 | } else throw new IllegalArgumentException('''Unknown type : «newTypeDec.class.name»''') | ||
457 | |||
458 | val Map<DefinedElement, ValueType> logic2smt = new HashMap<DefinedElement,ValueType> | ||
459 | val Map<SMTSymbolicDeclaration, DefinedElement> smt2logic = new HashMap<SMTSymbolicDeclaration,DefinedElement> | ||
460 | |||
461 | var index = 1; | ||
462 | for(newElement : newElements) { | ||
463 | val n = '''new «index++»''' | ||
464 | val logic = factory2.createDefinedElement => [it.name = n] | ||
465 | logic2smt.put(logic,newElement) | ||
466 | smt2logic.put(newElement.value as SMTSymbolicDeclaration,logic) | ||
467 | } | ||
468 | for(oldElement : problem.elements) { | ||
469 | val declaration = trace.typeTrace.oldObjectTypeMap.get(oldElement) | ||
470 | logic2smt.put(oldElement,new ValueType(new TypeDescriptor(trace.typeTrace.oldObjects),declaration)) | ||
471 | smt2logic.put(declaration,oldElement) | ||
472 | } | ||
473 | |||
474 | val engine = ViatraQueryEngine.on(new EMFScope(problem)) | ||
475 | val supertypeStarMatcher = SupertypeStarMatcher.on(engine) | ||
476 | |||
477 | val type2Elements = (trace.typeTrace.oldObjectTypeMap.keySet + | ||
478 | trace.typeTrace.newObjectTypeMap.keySet) | ||
479 | .toInvertedMap[new LinkedList<DefinedElement>] | ||
480 | |||
481 | val inverseOldTypeMap = trace.typeTrace.oldObjectTypeMap.bijectiveInverse | ||
482 | for(oldElement: trace.typeTrace.elementMap.values) { | ||
483 | val type = interpretation.queryEngine.resolveFunctionDefinition( | ||
484 | trace.typeTrace.oldObjectTypeFunction,#[oldElement]) as SMTEnumLiteral | ||
485 | val dynamicType = type.lookup(inverseOldTypeMap) | ||
486 | val supertypes = supertypeStarMatcher.getAllValuesOfsupertype(dynamicType) | ||
487 | supertypes.forEach[type2Elements.get(it) += oldElement.lookup(smt2logic)] | ||
488 | } | ||
489 | |||
490 | val inverseNewTypeMap = trace.typeTrace.newObjectTypeMap.bijectiveInverse | ||
491 | for(newElement: newElements.map[value as SMTSymbolicDeclaration]) { | ||
492 | val type = interpretation.queryEngine.resolveFunctionDeclaration( | ||
493 | trace.typeTrace.newObjectTypeFunction,#[newElement]) as SMTEnumLiteral | ||
494 | val dynamicType = type.lookup(inverseNewTypeMap) | ||
495 | val supertypes = supertypeStarMatcher.getAllValuesOfsupertype(dynamicType) | ||
496 | supertypes.forEach[type2Elements.get(it) += newElement.lookup(smt2logic)] | ||
497 | } | ||
498 | |||
499 | return new Logic2SMT_TypeMapperInterpretation(type2Elements,logic2smt,smt2logic) | ||
500 | } | ||
501 | } \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2Smt_TypeMapper_FilteredTypesSimple.xtend_ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2Smt_TypeMapper_FilteredTypesSimple.xtend_ new file mode 100644 index 00000000..79fc38e6 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2Smt_TypeMapper_FilteredTypesSimple.xtend_ | |||
@@ -0,0 +1,463 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTType | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
5 | import java.util.HashMap | ||
6 | import java.util.Map | ||
7 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTInput | ||
8 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTFunctionDefinition | ||
9 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTEnumLiteral | ||
10 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTEnumeratedTypeDeclaration | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
12 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
14 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes | ||
15 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTDocument | ||
16 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SmtLanguageFactory | ||
17 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory | ||
18 | import java.util.List | ||
19 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | ||
20 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine | ||
21 | import org.eclipse.viatra.query.runtime.emf.EMFScope | ||
22 | |||
23 | class Logic2Smt_TypeMapperTrace_FilteredTypesSimple implements Logic2Smt_TypeMapperTrace{ | ||
24 | public var Map<Type, SMTType> independentClasses = new HashMap | ||
25 | /** | ||
26 | * SMT type for the new objects | ||
27 | */ | ||
28 | public var SMTEnumeratedTypeDeclaration objects | ||
29 | /** | ||
30 | * existing element -> SMT literal map | ||
31 | */ | ||
32 | public var Map<DefinedElement, SMTEnumLiteral> elementMap = new HashMap | ||
33 | |||
34 | public var SMTEnumeratedTypeDeclaration objectTypes | ||
35 | public var Map<Type, SMTEnumLiteral> objectTypeMap = new HashMap | ||
36 | public var SMTFunctionDefinition objectTypeFunction | ||
37 | public var Map<Type, SMTFunctionDefinition> objectTypePredicates = new HashMap | ||
38 | |||
39 | override copy(SMTInput newModel) { | ||
40 | val a = this | ||
41 | val b = new Logic2Smt_TypeMapperTrace_FilteredTypesSimple | ||
42 | |||
43 | b.independentClasses = a.independentClasses.copyMap(newModel.typeDeclarations,[name]) | ||
44 | |||
45 | b.objects = newModel.typeDeclarations.filter[it.name == a.objects.name].head as SMTEnumeratedTypeDeclaration | ||
46 | b.elementMap = a.elementMap.copyMap(b.objects.elements,[name]) | ||
47 | |||
48 | b.objectTypes = newModel.typeDeclarations.filter[it.name == a.objects.name].head as SMTEnumeratedTypeDeclaration | ||
49 | b.objectTypeMap = a.objectTypeMap.copyMap(b.objectTypes.elements,[name]) | ||
50 | b.objectTypeFunction = newModel.functionDefinition.filter[it.name == a.objectTypeFunction.name].head | ||
51 | b.objectTypePredicates = a.objectTypePredicates.copyMap(newModel.functionDefinition,[name]) | ||
52 | |||
53 | return b | ||
54 | } | ||
55 | } | ||
56 | |||
57 | class Logic2Smt_TypeMapper_FilteredTypesSimple implements Logic2Smt_TypeMapper{ | ||
58 | val extension SmtLanguageFactory factory = SmtLanguageFactory.eINSTANCE | ||
59 | val LogiclanguageFactory factory2 = LogiclanguageFactory.eINSTANCE | ||
60 | |||
61 | private def toID(List<String> names) {names.join("!") } | ||
62 | private def toID(String name) {name.split("\\s+").toID} | ||
63 | |||
64 | override transformTypes(SMTInput document, LogicProblem problem, Logic2SmtMapperTrace trace, TypeScopes scopes) { | ||
65 | val typeTrace = new Logic2Smt_TypeMapperTrace_FilteredTypes | ||
66 | trace.typeMapperTrace = typeTrace | ||
67 | val engine = ViatraQueryEngine.on(new EMFScope(problem)) | ||
68 | |||
69 | val independentTypes = problem.types.filter(TypeDefinition).filter[isIndependentType] | ||
70 | |||
71 | val connectedTypes = problem.types.filter[!isIndependentType] | ||
72 | val connectedElements = problem.elements.filter[!isIndependentElement] | ||
73 | |||
74 | // 0. map the simple types | ||
75 | this.transformIndependentTypes(independentTypes,trace) | ||
76 | |||
77 | // 1. Has old elements => create supertype for it | ||
78 | |||
79 | this.transformDefinedElements(connectedElements, trace,document) | ||
80 | this.transformUndefinedElements(scopes,trace,document) | ||
81 | |||
82 | |||
83 | this.transforTypes(connectedTypes, connectedElements, trace, document, engine) | ||
84 | // 3.2: Type definition to new elements | ||
85 | if(hasNewElements) { | ||
86 | this.transformNewTypes(connectedTypesWithoutDefintypesWithoutDefinedSupertype,trace,document,engine); | ||
87 | } | ||
88 | } | ||
89 | |||
90 | private def isIndependentType(Type t) { | ||
91 | val res = (t instanceof TypeDefinition) && t.supertypes.empty && t.subtypes.empty | ||
92 | return res | ||
93 | } | ||
94 | private def isIndependentElement(DefinedElement e) { | ||
95 | val types = e.definedInType | ||
96 | return types.size == 1 && types.head.isIndependentType | ||
97 | } | ||
98 | |||
99 | protected def transformIndependentTypes(Iterable<TypeDefinition> types,Logic2SmtMapperTrace trace) { | ||
100 | for(type: types) { | ||
101 | val independentSMTType = createSMTEnumeratedTypeDeclaration => [ | ||
102 | name = toID(#["oldType",type.name]) | ||
103 | ] | ||
104 | trace.typeTrace.independentClasses.put(type,independentSMTType) | ||
105 | for(element : type.elements) { | ||
106 | val enumLiteral = createSMTEnumLiteral => [it.name = toID(#["oldElement",element.name])] | ||
107 | independentSMTType.elements += enumLiteral | ||
108 | trace.typeTrace.elementMap.put(element,enumLiteral) | ||
109 | } | ||
110 | } | ||
111 | } | ||
112 | |||
113 | protected def transformDefinedElements(Iterable<DefinedElement> oldElements, Logic2SmtMapperTrace trace, SMTInput document) { | ||
114 | val List<SMTEnumLiteral> literals = new ArrayList(oldElements.size) | ||
115 | for(element : oldElements) { | ||
116 | val elementName ='''oldElement «element.name»''' | ||
117 | val literal = createSMTEnumLiteral => [name = elementName.toID] | ||
118 | literals += literal | ||
119 | trace.typeTrace.elementMap.put(element,literal) | ||
120 | } | ||
121 | trace.typeTrace.oldObjects = createSMTEnumeratedTypeDeclaration => | ||
122 | [name = "oldObjects" it.elements += literals] | ||
123 | document.typeDeclarations += trace.typeTrace.oldObjects | ||
124 | } | ||
125 | |||
126 | protected def transformUndefinedElements(TypeScopes scopes, Logic2SmtMapperTrace trace, SMTInput document) { | ||
127 | var SMTType newObjects | ||
128 | if(scopes.maxNewElements == -1) { | ||
129 | newObjects = createSMTSetTypeDeclaration => [ | ||
130 | name = "newObjects" | ||
131 | ] | ||
132 | } else { | ||
133 | val newElements = new ArrayList(scopes.maxNewElements) | ||
134 | for(index : (1..<scopes.maxNewElements+1)) { | ||
135 | val literal = createSMTEnumLiteral => [ | ||
136 | name = #["newElement",index.toString].toID | ||
137 | ] | ||
138 | newElements += literal | ||
139 | } | ||
140 | newObjects = createSMTEnumeratedTypeDeclaration => [ | ||
141 | name = "newObjects" | ||
142 | it.elements += newElements | ||
143 | ] | ||
144 | } | ||
145 | trace.typeTrace.newObjects = newObjects | ||
146 | document.typeDeclarations += newObjects | ||
147 | } | ||
148 | |||
149 | protected def transformOldTypes(Iterable<Type> oldTypes,Iterable<DefinedElement> oldElements, Logic2SmtMapperTrace trace, SMTInput document, ViatraQueryEngine engine) { | ||
150 | val possibleTypeMatcher = PossibleDynamicTypeMatcher.on(engine) | ||
151 | val supertypeStarMatcher = SupertypeStarMatcher.on(engine) | ||
152 | // val possibleTypes = new LinkedList | ||
153 | // if(hasDefinedElement) possibleTypes += typesWithDefinedSupertype | ||
154 | // if(hasUndefinedElement) possibleTypes += typesWithoutDefinedSupertype | ||
155 | // val possibleConcreteTypes = possibleTypes.filter[!it.isIsAbstract] | ||
156 | // val possibleConcreteTypes = possibleTypeMatcher.allValuesOfdynamic | ||
157 | |||
158 | // 3.1.1. cretate a type for old types | ||
159 | val possibleConcreteTypeLiterals = new ArrayList() | ||
160 | for(possibleConcreteType: oldTypes.filter[!isIsAbstract]) { | ||
161 | val typeName = '''oldType «possibleConcreteType.name»''' | ||
162 | val literal = createSMTEnumLiteral => [name = typeName.toID] | ||
163 | trace.typeTrace.oldObjectTypeMap.put(possibleConcreteType,literal) | ||
164 | possibleConcreteTypeLiterals+=literal | ||
165 | } | ||
166 | val oldObjectTypes = createSMTEnumeratedTypeDeclaration => [ | ||
167 | it.name = "oldTypes" | ||
168 | it.elements += possibleConcreteTypeLiterals | ||
169 | ] | ||
170 | trace.typeTrace.oldObjectTypes = oldObjectTypes | ||
171 | document.typeDeclarations += oldObjectTypes | ||
172 | |||
173 | // 3.1.2 for each object, create a constant for its possible dynamic type | ||
174 | val Map<DefinedElement,SMTFunctionDeclaration> possibleTypesOfElement = new HashMap | ||
175 | val Map<DefinedElement,Type> onlyPossibleType = new HashMap | ||
176 | for(object: oldElements) { | ||
177 | val types = possibleTypeMatcher.getAllValuesOfdynamic(null,object) | ||
178 | if(types.size == 1) { | ||
179 | onlyPossibleType.put(object,types.head) | ||
180 | } else { // including 0 or more than 1 | ||
181 | // create a constant declaration | ||
182 | val typeOfObjectConstant = createSMTFunctionDeclaration => [ | ||
183 | it.name = toID(#["typeDecisions",toID(object.name)]) | ||
184 | it.range = createSMTComplexTypeReference => [ | ||
185 | it.referred = trace.typeTrace.oldObjectTypes | ||
186 | ] | ||
187 | ] | ||
188 | document.functionDeclarations += typeOfObjectConstant | ||
189 | possibleTypesOfElement.put(object,typeOfObjectConstant) | ||
190 | // add assertions to the constant to select valid values | ||
191 | document.assertions += createSMTAssertion => [ | ||
192 | val options = types.map[type | createSMTEquals => [ | ||
193 | it.leftOperand = createSMTSymbolicValue => [it.symbolicReference = typeOfObjectConstant] | ||
194 | it.rightOperand = createSMTSymbolicValue => [it.symbolicReference = type.lookup(trace.typeTrace.oldObjectTypeMap)] | ||
195 | ]] | ||
196 | it.value = if(options.empty) { | ||
197 | createSMTBoolLiteral => [it.value = false] | ||
198 | } else { | ||
199 | createSMTOr=>[operands += options] | ||
200 | } | ||
201 | ] | ||
202 | } | ||
203 | } | ||
204 | |||
205 | // 3.1.2 create a function: old elements -> old types | ||
206 | val oldTypeFunction = createSMTFunctionDefinition => [ | ||
207 | it.name = "oldTypeFunction" | ||
208 | val o = createSMTSortedVariable => [ | ||
209 | it.name = "o" | ||
210 | it.range= createSMTComplexTypeReference => [it.referred = trace.typeTrace.oldObjects] | ||
211 | ] | ||
212 | it.parameters += o | ||
213 | it.range = createSMTComplexTypeReference => [it.referred = trace.typeTrace.oldObjectTypes] | ||
214 | it.value = unfoldITE(oldElements, | ||
215 | [createSMTSymbolicValue => [it.symbolicReference = o]], | ||
216 | [DefinedElement e | createSMTSymbolicValue => [it.symbolicReference = e.lookup(trace.typeTrace.elementMap)]], | ||
217 | [DefinedElement e | | ||
218 | if(onlyPossibleType.containsKey(e)) { | ||
219 | return createSMTSymbolicValue => [ | ||
220 | symbolicReference = e.lookup(onlyPossibleType).lookup(trace.typeTrace.oldObjectTypeMap) ] | ||
221 | } else { | ||
222 | return createSMTSymbolicValue => [ | ||
223 | symbolicReference = e.lookup(possibleTypesOfElement) | ||
224 | ] | ||
225 | } | ||
226 | ] | ||
227 | ) | ||
228 | ] | ||
229 | trace.typeTrace.oldObjectTypeFunction = oldTypeFunction | ||
230 | document.functionDefinition += oldTypeFunction | ||
231 | |||
232 | // 3.1.3 create a predicate for each type: old object -> {true, false} | ||
233 | for(oldType: oldTypes) { | ||
234 | val oldTypePredicate = createSMTFunctionDefinition | ||
235 | oldTypePredicate.name = toID(#["oldTypePredicate",oldType.name.toID]) | ||
236 | val param = createSMTSortedVariable => [ | ||
237 | name = "o" | ||
238 | range = createSMTComplexTypeReference => [referred = trace.typeTrace.oldObjects] | ||
239 | ] | ||
240 | oldTypePredicate.parameters += param | ||
241 | oldTypePredicate.range = createSMTBoolTypeReference | ||
242 | val values = new LinkedList | ||
243 | for(concreteSupbtype : supertypeStarMatcher.getAllValuesOfsubtype(oldType).filter[!isIsAbstract]) { | ||
244 | val typeOfO = createSMTSymbolicValue => [ | ||
245 | it.symbolicReference = oldTypeFunction | ||
246 | it.parameterSubstitutions += createSMTSymbolicValue => [it.symbolicReference = param] | ||
247 | ] | ||
248 | val valueOfConcreteSupbtype = createSMTSymbolicValue => [ | ||
249 | it.symbolicReference = concreteSupbtype.lookup(trace.typeTrace.oldObjectTypeMap) | ||
250 | ] | ||
251 | values += createSMTEquals => [ | ||
252 | it.leftOperand = typeOfO | ||
253 | it.rightOperand = valueOfConcreteSupbtype | ||
254 | ] | ||
255 | } | ||
256 | oldTypePredicate.value = createSMTOr=>[it.operands +=values] | ||
257 | |||
258 | document.functionDefinition += oldTypePredicate | ||
259 | trace.typeTrace.oldObjectTypePredicates.put(oldType,oldTypePredicate) | ||
260 | } | ||
261 | } | ||
262 | |||
263 | protected def transformNewTypes( | ||
264 | Iterable<TypeDeclaration> typesWithoutDefinedSupertype, | ||
265 | Logic2SmtMapperTrace trace, SMTInput document, ViatraQueryEngine engine) | ||
266 | { | ||
267 | val supertypeStarMatcher = SupertypeStarMatcher.on(engine) | ||
268 | val possibleTypes = typesWithoutDefinedSupertype | ||
269 | val possibleConcreteTypes = possibleTypes.filter[!it.isIsAbstract].toList | ||
270 | |||
271 | // 3.2.1. cretate a type for new types | ||
272 | val possibleConcreteTypeLiterals = new ArrayList() | ||
273 | for(possibleConcreteType: possibleConcreteTypes) { | ||
274 | val typeName = '''newType «possibleConcreteType.name»''' | ||
275 | val literal = createSMTEnumLiteral => [name = typeName.toID] | ||
276 | trace.typeTrace.newObjectTypeMap.put(possibleConcreteType,literal) | ||
277 | possibleConcreteTypeLiterals+=literal | ||
278 | } | ||
279 | val newObjectTypes = createSMTEnumeratedTypeDeclaration => [ | ||
280 | it.name = "newTypes" | ||
281 | it.elements += possibleConcreteTypeLiterals | ||
282 | ] | ||
283 | trace.typeTrace.newObjectTypes = newObjectTypes | ||
284 | document.typeDeclarations += newObjectTypes | ||
285 | |||
286 | // 3.2.2 create a function: new elements -> new types | ||
287 | val newTypeFunction = createSMTFunctionDeclaration => [ | ||
288 | it.name = "newTypeFunction" | ||
289 | it.parameters += createSMTComplexTypeReference => [it.referred = trace.typeTrace.newObjects] | ||
290 | it.range = createSMTComplexTypeReference => [it.referred = trace.typeTrace.newObjectTypes] | ||
291 | ] | ||
292 | trace.typeTrace.newObjectTypeFunction = newTypeFunction | ||
293 | document.functionDeclarations += newTypeFunction | ||
294 | |||
295 | // 3.1.3 create a predicate for each type: new type -> {true, false} | ||
296 | for(newType: possibleTypes) { | ||
297 | val newTypePredicate = createSMTFunctionDefinition | ||
298 | newTypePredicate.name = toID(#["newTypePredicate",newType.name.toID]) | ||
299 | val param = createSMTSortedVariable => [ | ||
300 | name = "o" | ||
301 | range = createSMTComplexTypeReference => [referred = trace.typeTrace.newObjects] | ||
302 | ] | ||
303 | newTypePredicate.parameters += param | ||
304 | newTypePredicate.range = createSMTBoolTypeReference | ||
305 | val values = new LinkedList | ||
306 | for(concreteSupbtype : supertypeStarMatcher.getAllValuesOfsubtype(newType).filter[!isIsAbstract]) { | ||
307 | if(possibleConcreteTypes.contains(concreteSupbtype)) { | ||
308 | val typeOfO = createSMTSymbolicValue => [ | ||
309 | it.symbolicReference = newTypeFunction | ||
310 | it.parameterSubstitutions += createSMTSymbolicValue => [it.symbolicReference = param] | ||
311 | ] | ||
312 | if(!trace.typeTrace.newObjectTypeMap.containsKey(concreteSupbtype)) { | ||
313 | println("gebasz") | ||
314 | } | ||
315 | val valueOfConcreteSupbtype = createSMTSymbolicValue => [ | ||
316 | it.symbolicReference = concreteSupbtype.lookup(trace.typeTrace.newObjectTypeMap) | ||
317 | ] | ||
318 | values+= createSMTEquals => [ | ||
319 | it.leftOperand = typeOfO | ||
320 | it.rightOperand = valueOfConcreteSupbtype | ||
321 | ] | ||
322 | } | ||
323 | } | ||
324 | newTypePredicate.value = createSMTOr=>[it.operands +=values] | ||
325 | |||
326 | document.functionDefinition += newTypePredicate | ||
327 | trace.typeTrace.newObjectTypePredicates.put(newType,newTypePredicate) | ||
328 | } | ||
329 | } | ||
330 | |||
331 | private def Logic2Smt_TypeMapperTrace_FilteredTypes getTypeTrace(Logic2SmtMapperTrace trace) { | ||
332 | val typeTrace = trace.typeMapperTrace | ||
333 | if(typeTrace instanceof Logic2Smt_TypeMapperTrace_FilteredTypes) { | ||
334 | return typeTrace | ||
335 | } else { | ||
336 | throw new IllegalArgumentException('''Unknown trace type: «typeTrace.class.name»''') | ||
337 | } | ||
338 | } | ||
339 | |||
340 | private def boolean hasDefinedSupertype(Type type) { | ||
341 | if(type instanceof TypeDefinition) { | ||
342 | return true | ||
343 | } else { | ||
344 | if(type.supertypes.empty) return false | ||
345 | else return type.supertypes.exists[it.hasDefinedSupertype] | ||
346 | } | ||
347 | } | ||
348 | |||
349 | def private <T> SMTTerm unfoldITE(Iterable<T> options, Function0<SMTTerm> input, Function1<T,SMTTerm> conditionOfOption, Function1<T,SMTTerm> outputForOption) { | ||
350 | if(options.size == 1) { | ||
351 | return outputForOption.apply(options.head) | ||
352 | } else { | ||
353 | return createSMTITE => [ | ||
354 | it.condition = createSMTEquals => [ | ||
355 | leftOperand = input.apply | ||
356 | rightOperand = conditionOfOption.apply(options.head) | ||
357 | ] | ||
358 | it.^if = outputForOption.apply(options.head) | ||
359 | it.^else = unfoldITE(options.tail,input,conditionOfOption,outputForOption) | ||
360 | ] | ||
361 | } | ||
362 | } | ||
363 | |||
364 | override transformSymbolicReference(DefinedElement referred,Logic2SmtMapperTrace trace) { | ||
365 | val x = referred.lookup(trace.typeTrace.elementMap) | ||
366 | new ComplexSubterm(#[],#[], | ||
367 | createSMTSymbolicValue => [it.symbolicReference = x], | ||
368 | new TypeDescriptor(x.eContainer as SMTEnumeratedTypeDeclaration) | ||
369 | ) | ||
370 | } | ||
371 | |||
372 | override transformTypeReference(Type type, Logic2SmtMapperTrace trace) { | ||
373 | val list = new ArrayList | ||
374 | |||
375 | if(trace.typeTrace.oldObjectTypePredicates.containsKey(type)) { | ||
376 | list += new TypeConstraint( | ||
377 | createSMTComplexTypeReference => [it.referred = trace.typeTrace.oldObjects], | ||
378 | [x|createSMTSymbolicValue => [ | ||
379 | it.symbolicReference = trace.typeTrace.oldObjectTypePredicates.get(type) | ||
380 | it.parameterSubstitutions += createSMTSymbolicValue => [it.symbolicReference = x]]] | ||
381 | ) | ||
382 | } | ||
383 | if(trace.typeTrace.newObjectTypePredicates.containsKey(type)) { | ||
384 | list += new TypeConstraint( | ||
385 | createSMTComplexTypeReference => [it.referred = trace.typeTrace.newObjects], | ||
386 | [x|createSMTSymbolicValue => [ | ||
387 | it.symbolicReference = trace.typeTrace.newObjectTypePredicates.get(type) | ||
388 | it.parameterSubstitutions += createSMTSymbolicValue => [it.symbolicReference = x]]] | ||
389 | ) | ||
390 | } | ||
391 | if(trace.typeTrace.independentClasses.containsKey(type)) { | ||
392 | list += new TypeConstraint( | ||
393 | createSMTComplexTypeReference => [it.referred = type.lookup(trace.typeTrace.independentClasses)], | ||
394 | null | ||
395 | ) | ||
396 | } | ||
397 | |||
398 | if(list.empty) throw new AssertionError('''Typereference to type is «type.name» empty''') | ||
399 | if(list.exists[it.type == null]){ | ||
400 | throw new AssertionError('''Typereference to null!''') | ||
401 | } | ||
402 | return list | ||
403 | } | ||
404 | |||
405 | override getTypeInterpretation(LogicProblem problem, SMTDocument document, SmtModelInterpretation interpretation, Logic2SmtMapperTrace trace) { | ||
406 | val model = document.output.getModelResult as SMTModelResult | ||
407 | val newTypeDec = trace.typeTrace.newObjects | ||
408 | var List<ValueType> newElements = null | ||
409 | |||
410 | if(newTypeDec instanceof SMTSetTypeDeclaration) { | ||
411 | val newElementType = model.typeDefinitions.filter[ | ||
412 | (it.type as SMTComplexTypeReference).referred == newTypeDec | ||
413 | ].head | ||
414 | newElements = newElementType.elements.map[new ValueType(new TypeDescriptor(newTypeDec),it.symbolicReference)] | ||
415 | } else if(newTypeDec instanceof SMTEnumeratedTypeDeclaration) { | ||
416 | newElements = newTypeDec.elements.map[new ValueType(new TypeDescriptor(newTypeDec),it)] | ||
417 | } else throw new IllegalArgumentException('''Unknown type : «newTypeDec.class.name»''') | ||
418 | |||
419 | val Map<DefinedElement, ValueType> logic2smt = new HashMap<DefinedElement,ValueType> | ||
420 | val Map<SMTSymbolicDeclaration, DefinedElement> smt2logic = new HashMap<SMTSymbolicDeclaration,DefinedElement> | ||
421 | |||
422 | var index = 1; | ||
423 | for(newElement : newElements) { | ||
424 | val n = '''new «index++»''' | ||
425 | val logic = factory2.createDefinedElement => [it.name = n] | ||
426 | logic2smt.put(logic,newElement) | ||
427 | smt2logic.put(newElement.value as SMTSymbolicDeclaration,logic) | ||
428 | } | ||
429 | for(oldElement : problem.elements) { | ||
430 | val declaration = trace.typeTrace.oldObjectTypeMap.get(oldElement) | ||
431 | logic2smt.put(oldElement,new ValueType(new TypeDescriptor(trace.typeTrace.oldObjects),declaration)) | ||
432 | smt2logic.put(declaration,oldElement) | ||
433 | } | ||
434 | |||
435 | val engine = ViatraQueryEngine.on(new EMFScope(problem)) | ||
436 | val supertypeStarMatcher = SupertypeStarMatcher.on(engine) | ||
437 | |||
438 | val type2Elements = (trace.typeTrace.oldObjectTypeMap.keySet + | ||
439 | trace.typeTrace.newObjectTypeMap.keySet) | ||
440 | .toInvertedMap[new LinkedList<DefinedElement>] | ||
441 | |||
442 | val inverseOldTypeMap = trace.typeTrace.oldObjectTypeMap.bijectiveInverse | ||
443 | for(oldElement: trace.typeTrace.elementMap.values) { | ||
444 | val type = interpretation.queryEngine.resolveFunctionDefinition( | ||
445 | trace.typeTrace.oldObjectTypeFunction,#[oldElement]) as SMTEnumLiteral | ||
446 | val dynamicType = type.lookup(inverseOldTypeMap) | ||
447 | val supertypes = supertypeStarMatcher.getAllValuesOfsupertype(dynamicType) | ||
448 | supertypes.forEach[type2Elements.get(it) += oldElement.lookup(smt2logic)] | ||
449 | } | ||
450 | |||
451 | val inverseNewTypeMap = trace.typeTrace.newObjectTypeMap.bijectiveInverse | ||
452 | for(newElement: newElements.map[value as SMTSymbolicDeclaration]) { | ||
453 | val type = interpretation.queryEngine.resolveFunctionDeclaration( | ||
454 | trace.typeTrace.newObjectTypeFunction,#[newElement]) as SMTEnumLiteral | ||
455 | val dynamicType = type.lookup(inverseNewTypeMap) | ||
456 | val supertypes = supertypeStarMatcher.getAllValuesOfsupertype(dynamicType) | ||
457 | supertypes.forEach[type2Elements.get(it) += newElement.lookup(smt2logic)] | ||
458 | } | ||
459 | |||
460 | return new Logic2SMT_TypeMapperInterpretation(type2Elements,logic2smt,smt2logic) | ||
461 | } | ||
462 | |||
463 | } \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2Smt_TypeMapper_Horizontal.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2Smt_TypeMapper_Horizontal.xtend new file mode 100644 index 00000000..a5abbb44 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Logic2Smt_TypeMapper_Horizontal.xtend | |||
@@ -0,0 +1,63 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTInput | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
8 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTDocument | ||
9 | import java.util.List | ||
10 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SmtLanguageFactory | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | ||
12 | |||
13 | class Logic2Smt_TypeMapperTrace_Horizontal implements Logic2Smt_TypeMapperTrace{ | ||
14 | |||
15 | override copy(SMTInput newModel) { | ||
16 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
17 | } | ||
18 | } | ||
19 | |||
20 | class Logic2Smt_TypeMapper_Horizontal implements Logic2Smt_TypeMapper { | ||
21 | val extension SmtLanguageFactory factory = SmtLanguageFactory.eINSTANCE | ||
22 | |||
23 | private def toID(List<String> names) {names.join("!") } | ||
24 | |||
25 | override transformTypes(SMTInput document, LogicProblem problem, Logic2SmtMapperTrace trace, TypeScopes scopes) { | ||
26 | val typeTrace = new Logic2Smt_TypeMapperTrace_Horizontal | ||
27 | trace.typeMapperTrace = typeTrace | ||
28 | |||
29 | // mapping of known elements | ||
30 | |||
31 | } | ||
32 | |||
33 | private def Logic2Smt_TypeMapperTrace_Horizontal getTypeTrace(Logic2SmtMapperTrace trace) { | ||
34 | val typeTrace = trace.typeMapperTrace | ||
35 | if(typeTrace instanceof Logic2Smt_TypeMapperTrace_Horizontal) { | ||
36 | return typeTrace | ||
37 | } else { | ||
38 | throw new IllegalArgumentException('''Unknown trace type: «typeTrace.class.name»''') | ||
39 | } | ||
40 | } | ||
41 | |||
42 | private def boolean hasDefinedSupertype(Type type) { | ||
43 | if(type instanceof TypeDefinition) { | ||
44 | return true | ||
45 | } else { | ||
46 | if(type.supertypes.empty) return false | ||
47 | else return type.supertypes.exists[it.hasDefinedSupertype] | ||
48 | } | ||
49 | } | ||
50 | |||
51 | override transformTypeReference(Type type, Logic2SmtMapperTrace trace) { | ||
52 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
53 | } | ||
54 | |||
55 | override transformSymbolicReference(DefinedElement referred, Logic2SmtMapperTrace trace) { | ||
56 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
57 | } | ||
58 | |||
59 | override getTypeInterpretation(LogicProblem problem, SMTDocument document, SmtModelInterpretation interpretation, Logic2SmtMapperTrace trace) { | ||
60 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
61 | } | ||
62 | |||
63 | } \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/SMTSolver.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/SMTSolver.xtend new file mode 100644 index 00000000..d371b89e --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/SMTSolver.xtend | |||
@@ -0,0 +1,49 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.SmtLanguageStandaloneSetupGenerated | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicSolverConfiguration | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult | ||
8 | import hu.bme.mit.inf.dslreasoner.smt.reasoner.builder.SmtSolverHandler | ||
9 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTDocument | ||
10 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SmtLanguagePackage | ||
11 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace | ||
12 | import org.eclipse.emf.ecore.util.EcoreUtil | ||
13 | |||
14 | class SMTSolver extends LogicReasoner{ | ||
15 | |||
16 | public new() { | ||
17 | SmtLanguagePackage.eINSTANCE.eClass | ||
18 | val x = new SmtLanguageStandaloneSetupGenerated | ||
19 | x.createInjectorAndDoEMFRegistration | ||
20 | } | ||
21 | |||
22 | val forwardMapper = new Logic2SmtMapper(new Logic2Smt_TypeMapper_FilteredTypes); | ||
23 | val backMapper = new Smt2LogicMapper; | ||
24 | val handler = new SmtSolverHandler | ||
25 | |||
26 | override solve(LogicProblem problem, LogicSolverConfiguration configuration, ReasonerWorkspace workspace) { | ||
27 | if(configuration instanceof SmtSolverConfiguration) { | ||
28 | val transformationStart = System.currentTimeMillis | ||
29 | val transformationResult = forwardMapper.transformProblem(problem,configuration.typeScopes,configuration.strategy) | ||
30 | val SMTDocument inputModel= transformationResult.output | ||
31 | val trace = transformationResult.trace | ||
32 | val input = workspace.writeModel(inputModel,"problem.smt2") | ||
33 | val transformationTime = System.currentTimeMillis-transformationStart | ||
34 | val solverTimeStart = System.currentTimeMillis | ||
35 | handler.callSolver(input,configuration) | ||
36 | val solverTime = System.currentTimeMillis - solverTimeStart | ||
37 | val outputModel = workspace.reloadModel(typeof(SMTDocument), "problem.smt2") | ||
38 | EcoreUtil.resolveAll(outputModel) | ||
39 | workspace.deactivateModel("problem.smt2") | ||
40 | return backMapper.transformOutput(problem,outputModel.output,trace, transformationTime, solverTime) | ||
41 | } else throw new IllegalArgumentException('''The configuration have to be an «SmtSolverConfiguration.simpleName»!''') | ||
42 | } | ||
43 | |||
44 | override getInterpretation(ModelResult modelResult) { | ||
45 | val representation = modelResult.representation as SMTDocument | ||
46 | val trace = modelResult.trace as Logic2SmtMapperTrace | ||
47 | return new SmtModelInterpretation(trace.problem,representation,trace.forwardMapper,trace) | ||
48 | } | ||
49 | } \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Smt2LogicMapper.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Smt2LogicMapper.xtend new file mode 100644 index 00000000..cbabc7b0 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/Smt2LogicMapper.xtend | |||
@@ -0,0 +1,71 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTOutput | ||
4 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTStatisticsSection | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicresultFactory | ||
6 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTStatisticIntValue | ||
7 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTStatisticDoubleValue | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
9 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTErrorResult | ||
10 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSatResult | ||
11 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTUnsupportedResult | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasonerException | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult | ||
14 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTStatisticValue | ||
15 | import java.math.BigDecimal | ||
16 | |||
17 | class Smt2LogicMapper { | ||
18 | val extension LogicresultFactory resultFactory = LogicresultFactory.eINSTANCE | ||
19 | |||
20 | public def transformOutput(LogicProblem problem, SMTOutput output, Logic2SmtMapperTrace trace, long transformationTime, long solverTime) { | ||
21 | val satResult = output.satResult | ||
22 | if(satResult === null) { // Timeout | ||
23 | return createInsuficientResourcesResult => [ init(problem,output,transformationTime,solverTime) it.resourceName = "time"] | ||
24 | } else { | ||
25 | if(satResult instanceof SMTErrorResult) { | ||
26 | return createErrorResult => [init(problem,output,transformationTime,solverTime) message = satResult.message] | ||
27 | } else if(satResult instanceof SMTUnsupportedResult) { | ||
28 | return createUndecidableResult => [init(problem,output,transformationTime,solverTime)] | ||
29 | } else if(satResult instanceof SMTSatResult) { | ||
30 | if(satResult.sat) { | ||
31 | return createModelResult => [ | ||
32 | init(problem,output,transformationTime,solverTime) | ||
33 | representation += output.eContainer | ||
34 | it.trace = trace | ||
35 | ] | ||
36 | } else if(satResult.unsat) { | ||
37 | return createInconsistencyResult => [init(problem,output,transformationTime,solverTime)] | ||
38 | } else if(satResult.unknown) { | ||
39 | return createUndecidableResult => [init(problem,output,transformationTime,solverTime)] | ||
40 | } | ||
41 | } else throw new LogicReasonerException("The solver resulted with unknown result.") | ||
42 | } | ||
43 | } | ||
44 | |||
45 | private def init(LogicResult result,LogicProblem problem, SMTOutput output, long transformationTime, long solverTime) { | ||
46 | result.problem = problem | ||
47 | result.statistics = output.statistics.transformStatistics(transformationTime,solverTime) | ||
48 | } | ||
49 | |||
50 | protected def transformStatistics(SMTStatisticsSection section, long transformationTime, long solverTime) { | ||
51 | createStatistics => [ | ||
52 | it.transformationTime = transformationTime.intValue | ||
53 | it.solverTime = solverTime.intValue | ||
54 | |||
55 | val memorySection = section.values.filter[it.name==":memory"].head | ||
56 | if(memorySection != null) { | ||
57 | it.solverMemory = ((memorySection as SMTStatisticDoubleValue).value.add(BigDecimal.valueOf(0.5))).intValue | ||
58 | } | ||
59 | entries += section.values.map[transformEntry] | ||
60 | ] | ||
61 | } | ||
62 | |||
63 | protected def dispatch transformEntry(SMTStatisticIntValue entry) { | ||
64 | createIntStatisticEntry => [name = entry.exportName value = entry.value] } | ||
65 | protected def dispatch transformEntry(SMTStatisticDoubleValue entry) { | ||
66 | createRealStatisticEntry => [name = entry.exportName value = entry.value.doubleValue] } | ||
67 | |||
68 | private def exportName(SMTStatisticValue value) { | ||
69 | return value.name.replaceFirst(":","") | ||
70 | } | ||
71 | } \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/SmtModelInterpretation.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/SmtModelInterpretation.xtend new file mode 100644 index 00000000..fb0739ab --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/SmtModelInterpretation.xtend | |||
@@ -0,0 +1,167 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicModelInterpretation | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDeclaration | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDeclaration | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
11 | import hu.bme.mit.inf.dslreasoner.smt.reasoner.builder.SmtModelQueryEngine | ||
12 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTDocument | ||
13 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTInput | ||
14 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSymbolicDeclaration | ||
15 | import org.eclipse.xtend.lib.annotations.Accessors | ||
16 | import org.eclipse.xtend.lib.annotations.Data | ||
17 | |||
18 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
19 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTFunctionDeclaration | ||
20 | |||
21 | @Data | ||
22 | class ValueType { | ||
23 | TypeDescriptor descriptor | ||
24 | Object value | ||
25 | } | ||
26 | |||
27 | class SmtModelInterpretation implements LogicModelInterpretation { | ||
28 | //val extension LogiclanguageFactory factory = LogiclanguageFactory.eINSTANCE | ||
29 | @Accessors(PUBLIC_GETTER) val SmtModelQueryEngine queryEngine; | ||
30 | |||
31 | // Trace info | ||
32 | val Logic2SmtMapperTrace newTrace; | ||
33 | val Logic2SMT_TypeMapperInterpretation typeInterpretation | ||
34 | |||
35 | /** | ||
36 | * Creates a model builder which queries a logic structure. | ||
37 | * @param document The whole SMT2 document. | ||
38 | * @param trace The trace of the [Logic problem -> SMT problem] mapping | ||
39 | */ | ||
40 | new(LogicProblem problem, SMTDocument document, Logic2SmtMapper forwardMapper, Logic2SmtMapperTrace forwardTrace) { | ||
41 | //document.input.typeDeclarations.forEach[typeNames.put(it.name,it)] | ||
42 | |||
43 | this.queryEngine = new SmtModelQueryEngine(document) | ||
44 | this.newTrace = initialiseNewTrace(document,forwardTrace) | ||
45 | this.typeInterpretation = forwardMapper.typeMapper.getTypeInterpretation(problem,document,this,newTrace) | ||
46 | } | ||
47 | |||
48 | /** | ||
49 | * Creates a new trace from the logic model to the new smt file by using the old trace. | ||
50 | */ | ||
51 | def protected Logic2SmtMapperTrace initialiseNewTrace(SMTDocument document, Logic2SmtMapperTrace oldTrace) { | ||
52 | val i = document.input | ||
53 | |||
54 | val res = new Logic2SmtMapperTrace => [ typeMapperTrace = oldTrace.typeMapperTrace.copy(i) ] | ||
55 | |||
56 | for(entry : oldTrace.relationUnfolding.entrySet) { | ||
57 | val rel = entry.key | ||
58 | val descriptors = entry.value.map[old | | ||
59 | new Descriptor<Relation>( | ||
60 | old.parameterTypes.map[copyTypeDescriptor(i)], | ||
61 | old.relation) | ||
62 | ] | ||
63 | res.relationUnfolding.put(rel,descriptors) | ||
64 | } | ||
65 | |||
66 | for(entry : oldTrace.relationMap.entrySet) { | ||
67 | val desc = new Descriptor<Relation>( | ||
68 | entry.key.parameterTypes.map[copyTypeDescriptor(i)], | ||
69 | entry.key.relation) | ||
70 | val fun = i.functionDeclarations.filter[it.name == entry.value.name].head | ||
71 | res.relationMap.put(desc,fun) | ||
72 | } | ||
73 | |||
74 | return res | ||
75 | } | ||
76 | |||
77 | def private copyTypeDescriptor(TypeDescriptor original, SMTInput i) { | ||
78 | if(original.complexType == null) return original | ||
79 | else { | ||
80 | val newType = i.typeDeclarations.filter[it.name == original.complexType.name].head | ||
81 | new TypeDescriptor(newType) | ||
82 | } | ||
83 | } | ||
84 | |||
85 | /*def protected initialiseTypes(SMTDocument document) { | ||
86 | val model = document.output.getModelResult as SMTModelResult | ||
87 | val smtUndefinedType2LogicType = this.newTrace.typeDeclarationMap.bijectiveInverse | ||
88 | |||
89 | for(cardinalityConstraint : model.typeDefinitions) { | ||
90 | val targetType = (cardinalityConstraint.type as SMTComplexTypeReference).referred as SMTSetTypeDeclaration | ||
91 | val List<DefinedElement> elementCollection = new LinkedList | ||
92 | for(element : cardinalityConstraint.elements.map[symbolicReference]) { | ||
93 | if(element instanceof SMTFunctionDeclaration) { | ||
94 | val definedElementRepresentation = createDefinedElement => [name += element.name.split("!")] | ||
95 | newElement2Constants.put(definedElementRepresentation,element) | ||
96 | newConstants2Elements.put(element,definedElementRepresentation) | ||
97 | } else{ | ||
98 | throw new UnsupportedOperationException( | ||
99 | "Unresolvable reference in cardinality constraint: " + element.class.name + ": " + element.name) | ||
100 | } | ||
101 | } | ||
102 | undefinedTypeDefinitions.put(targetType.lookup(smtUndefinedType2LogicType),elementCollection); | ||
103 | } | ||
104 | }*/ | ||
105 | |||
106 | def private dispatch ValueType logicLiteral2SmtLiteral(Integer literal) { | ||
107 | new ValueType(TypeDescriptor::numericTypeDescriptor_Instance, literal) | ||
108 | } | ||
109 | def private dispatch ValueType logicLiteral2SmtLiteral(Boolean literal) { | ||
110 | new ValueType(TypeDescriptor::logicTypeDescriptor_Instance, literal) | ||
111 | } | ||
112 | def private dispatch ValueType logicLiteral2SmtLiteral(DefinedElement literal) { | ||
113 | this.typeInterpretation.logicElement2Smt(literal) | ||
114 | } | ||
115 | |||
116 | // def private dispatch Object smt2Literal2LogicLiteral(Integer literal) { literal } | ||
117 | // def private dispatch Object smt2Literal2LogicLiteral(Boolean literal) { literal } | ||
118 | // def private dispatch Object smt2Literal2LogicLiteral(SMTSymbolicDeclaration literal) { | ||
119 | // this.typeInterpretation.smtElement2Logic(literal) | ||
120 | // } | ||
121 | |||
122 | override getElements(Type type) { | ||
123 | return this.typeInterpretation.getElements(type) | ||
124 | } | ||
125 | |||
126 | override getInterpretation(FunctionDeclaration function, Object[] parameterSubstitution) { | ||
127 | /*queryEngine.resolveFunctionDeclaration( | ||
128 | function.lookup(newTrace.functionDeclarationMap), | ||
129 | parameterSubstitution.map[logicLiteral2SmtLiteral] | ||
130 | ).smt2Literal2LogicLiteral*/ | ||
131 | throw new UnsupportedOperationException | ||
132 | } | ||
133 | |||
134 | override getInterpretation(RelationDeclaration relation, Object[] parameterSubstitution) { | ||
135 | val transformedParameters = parameterSubstitution.map[logicLiteral2SmtLiteral] | ||
136 | |||
137 | val smtFunction = new Descriptor<Relation>( | ||
138 | transformedParameters.map[descriptor], | ||
139 | relation) | ||
140 | .lookup(newTrace.relationMap) | ||
141 | |||
142 | val result = queryEngine.resolveFunctionDeclaration( | ||
143 | smtFunction as SMTFunctionDeclaration, | ||
144 | transformedParameters.map[value] | ||
145 | ) as Boolean | ||
146 | |||
147 | return result | ||
148 | } | ||
149 | |||
150 | override getInterpretation(ConstantDeclaration constant) { | ||
151 | /*queryEngine.resolveFunctionDeclaration( | ||
152 | constant.lookup(newTrace.constantDeclarationMap), | ||
153 | Collections.EMPTY_LIST | ||
154 | ).smt2Literal2LogicLiteral*/ | ||
155 | throw new UnsupportedOperationException | ||
156 | } | ||
157 | |||
158 | override getMaximalInteger() { | ||
159 | 100 | ||
160 | //throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
161 | } | ||
162 | |||
163 | override getMinimalInteger() { | ||
164 | -100 | ||
165 | //throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
166 | } | ||
167 | } \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/SmtSolverConfiguration.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/SmtSolverConfiguration.xtend new file mode 100644 index 00000000..2a926cb6 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/SmtSolverConfiguration.xtend | |||
@@ -0,0 +1,9 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicSolverConfiguration | ||
4 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTReasoningTactic | ||
5 | |||
6 | class SmtSolverConfiguration extends LogicSolverConfiguration{ | ||
7 | public boolean fixRandomSeed = false | ||
8 | public SMTReasoningTactic strategy = null | ||
9 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/TransformedSubterm.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/TransformedSubterm.xtend new file mode 100644 index 00000000..48952288 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/TransformedSubterm.xtend | |||
@@ -0,0 +1,183 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSortedVariable | ||
4 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSymbolicValue | ||
5 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTTerm | ||
6 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SmtLanguageFactory | ||
7 | import java.util.ArrayList | ||
8 | import java.util.List | ||
9 | import java.util.Map | ||
10 | import org.eclipse.emf.ecore.EObject | ||
11 | import org.eclipse.emf.ecore.util.EcoreUtil | ||
12 | import org.eclipse.xtend.lib.annotations.Data | ||
13 | import java.util.HashMap | ||
14 | import java.util.LinkedList | ||
15 | |||
16 | abstract class TransformedSubterm { | ||
17 | val static extension SmtLanguageFactory factory = SmtLanguageFactory.eINSTANCE | ||
18 | def LogicSubterm expectLogic() | ||
19 | def NumericSubterm expectNumber() | ||
20 | |||
21 | def List<SubtermOption> getPossibleValues() | ||
22 | |||
23 | public static def List<List<SubtermOption>> allCombinations(List<SubtermOption>... possibleValues) { | ||
24 | return allCombinations(possibleValues.toList) | ||
25 | } | ||
26 | public static def List<List<SubtermOption>> allCombinations(Iterable<List<SubtermOption>> possibleValues) { | ||
27 | if(possibleValues.size == 1) { | ||
28 | return possibleValues.head.map[x|#[x.copy]] | ||
29 | } else { | ||
30 | val head = possibleValues.head | ||
31 | val tails = possibleValues.tail.allCombinations | ||
32 | val res = new ArrayList(tails.size * head.size) | ||
33 | for(headElement : head) { | ||
34 | for(tail : tails) { | ||
35 | val combination = new ArrayList(tail.size+1) | ||
36 | combination.add(headElement) | ||
37 | combination.addAll(tail.map[copy]) | ||
38 | res.add(combination) | ||
39 | } | ||
40 | } | ||
41 | return res | ||
42 | } | ||
43 | } | ||
44 | |||
45 | public static def resolveToLogic(List<SubtermOption> subterms, SMTTerm value) { | ||
46 | val allDefinitions = subterms.map[it.variables].flatten | ||
47 | val allPreconditions = subterms.map[it.preconditions].flatten | ||
48 | val preconditionedExpression = if(allPreconditions.empty) { | ||
49 | value | ||
50 | } else { | ||
51 | createSMTAnd => [it.operands += allPreconditions it.operands += value] | ||
52 | } | ||
53 | val quantifiedExpression = if(allDefinitions.empty) { | ||
54 | preconditionedExpression | ||
55 | } else { | ||
56 | createSMTForall => [ | ||
57 | it.quantifiedVariables += allDefinitions | ||
58 | it.expression = preconditionedExpression] | ||
59 | } | ||
60 | return quantifiedExpression | ||
61 | } | ||
62 | } | ||
63 | |||
64 | @Data class SubtermOption { | ||
65 | List<SMTSortedVariable> variables | ||
66 | List<SMTTerm> preconditions | ||
67 | SMTTerm expression | ||
68 | TypeDescriptor type | ||
69 | |||
70 | public new( | ||
71 | List<SMTSortedVariable> variables, | ||
72 | List<SMTTerm> preconditions, | ||
73 | SMTTerm expression, | ||
74 | TypeDescriptor type) | ||
75 | { | ||
76 | this.variables = variables | ||
77 | this.preconditions = preconditions | ||
78 | this.expression = expression | ||
79 | this.type = type | ||
80 | } | ||
81 | |||
82 | public new( | ||
83 | List<SubtermOption> previousSubterms, | ||
84 | List<SMTSortedVariable> newVariables, | ||
85 | List<SMTTerm> newPreconditions, | ||
86 | SMTTerm newExpression, | ||
87 | TypeDescriptor newType) | ||
88 | { | ||
89 | val old2New = new HashMap | ||
90 | variables = new LinkedList | ||
91 | for(variable : previousSubterms.map[getVariables].flatten) { | ||
92 | val newVariable = EcoreUtil.copy(variable) | ||
93 | old2New.put(variable,newVariable) | ||
94 | variables+=newVariable | ||
95 | } | ||
96 | |||
97 | preconditions = new LinkedList | ||
98 | preconditions += previousSubterms.map[getPreconditions].flatten.map[x|EcoreUtil.copy(x)] | ||
99 | preconditions += newPreconditions.map[x|EcoreUtil.copy(x)] | ||
100 | preconditions.forEach[relinkAllVariableReference(old2New)] | ||
101 | |||
102 | expression = EcoreUtil.copy(newExpression) | ||
103 | relinkAllVariableReference(expression,old2New) | ||
104 | |||
105 | type = newType | ||
106 | } | ||
107 | |||
108 | public def copy() { | ||
109 | val old2New = variables.toInvertedMap[EcoreUtil.copy(it)] | ||
110 | val newPreconditions = preconditions.map[EcoreUtil.copy(it)] | ||
111 | newPreconditions.forEach[it.relinkAllVariableReference(old2New)] | ||
112 | val newExpression = EcoreUtil.copy(expression) | ||
113 | return new SubtermOption(variables.map[old2New.get(it)],newPreconditions,newExpression,type) | ||
114 | } | ||
115 | |||
116 | def private relinkAllVariableReference(EObject root,Map<SMTSortedVariable, SMTSortedVariable> map) { | ||
117 | if(root instanceof SMTSymbolicValue) root.relinkVariableReference(map) | ||
118 | root.eAllContents().filter(SMTSymbolicValue).forEach[relinkVariableReference(map)] | ||
119 | } | ||
120 | def private relinkVariableReference(SMTSymbolicValue target,Map<SMTSortedVariable, SMTSortedVariable> map) { | ||
121 | if(map.containsKey(target.symbolicReference)) { | ||
122 | target.symbolicReference = map.get(target.symbolicReference) | ||
123 | } | ||
124 | } | ||
125 | } | ||
126 | |||
127 | @Data | ||
128 | class LogicSubterm extends TransformedSubterm{ | ||
129 | |||
130 | SMTTerm value | ||
131 | override expectLogic() {return this} | ||
132 | override expectNumber() { throw new AssertionError("A term is not a number") } | ||
133 | |||
134 | public new(SMTTerm expression) | ||
135 | { | ||
136 | this.value = expression | ||
137 | } | ||
138 | override getPossibleValues() { | ||
139 | #[new SubtermOption(#[],#[],value,TypeDescriptor::logicTypeDescriptor_Instance)] | ||
140 | } | ||
141 | } | ||
142 | |||
143 | @Data | ||
144 | class NumericSubterm extends TransformedSubterm { | ||
145 | List<SubtermOption> values | ||
146 | |||
147 | public new( | ||
148 | List<SMTSortedVariable> variables, | ||
149 | List<SMTTerm> preconditions, | ||
150 | SMTTerm expression) { | ||
151 | this.values = #[new SubtermOption(variables,preconditions,expression,TypeDescriptor.numericTypeDescriptor_Instance)] | ||
152 | } | ||
153 | public new(List<SubtermOption> values) { | ||
154 | this.values = values | ||
155 | } | ||
156 | |||
157 | override expectLogic() { throw new AssertionError("A term is not a logic value") } | ||
158 | override expectNumber() { return this } | ||
159 | |||
160 | override getPossibleValues() { | ||
161 | values | ||
162 | } | ||
163 | } | ||
164 | |||
165 | @Data | ||
166 | class ComplexSubterm extends TransformedSubterm { | ||
167 | List<SubtermOption> options | ||
168 | override expectLogic() { throw new AssertionError("A term is not a logic value") } | ||
169 | override expectNumber() { throw new AssertionError("A term is not a number") } | ||
170 | public new(List<SMTSortedVariable> variables, | ||
171 | List<SMTTerm> preconditions, | ||
172 | SMTTerm expression, | ||
173 | TypeDescriptor type) | ||
174 | { | ||
175 | this.options = #[new SubtermOption(variables,preconditions,expression,type)] | ||
176 | } | ||
177 | public new(List<SubtermOption> subterms) { | ||
178 | this.options = subterms | ||
179 | } | ||
180 | override getPossibleValues() { | ||
181 | this.options | ||
182 | } | ||
183 | } | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/TypeDescriptor.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/TypeDescriptor.xtend new file mode 100644 index 00000000..1aa5cf04 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/TypeDescriptor.xtend | |||
@@ -0,0 +1,44 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTBoolTypeReference | ||
4 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTComplexTypeReference | ||
5 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTIntTypeReference | ||
6 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTRealTypeReference | ||
7 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTType | ||
8 | import java.util.List | ||
9 | import org.eclipse.xtend.lib.annotations.Accessors | ||
10 | import org.eclipse.xtend.lib.annotations.Data | ||
11 | |||
12 | @Data | ||
13 | class Descriptor<T> { | ||
14 | List<TypeDescriptor> parameterTypes | ||
15 | T relation | ||
16 | } | ||
17 | |||
18 | @Data | ||
19 | class TypeDescriptor { | ||
20 | val boolean logic | ||
21 | val boolean numeric | ||
22 | val SMTType complexType | ||
23 | |||
24 | @Accessors(PUBLIC_GETTER) | ||
25 | static val LogicTypeDescriptor_Instance = new TypeDescriptor(true,false,null) | ||
26 | @Accessors(PUBLIC_GETTER) | ||
27 | static val NumericTypeDescriptor_Instance = new TypeDescriptor(false,true,null) | ||
28 | |||
29 | private new(boolean logic, boolean numeric, SMTType complexType) { | ||
30 | this.logic = logic | ||
31 | this.numeric = numeric | ||
32 | this.complexType = complexType | ||
33 | } | ||
34 | public new(SMTType complexType) { | ||
35 | this.logic = false | ||
36 | this.numeric = false | ||
37 | this.complexType = complexType | ||
38 | } | ||
39 | |||
40 | def static dispatch createFromTypeReference(SMTBoolTypeReference ref) { return TypeDescriptor::LogicTypeDescriptor_Instance} | ||
41 | def static dispatch createFromTypeReference(SMTIntTypeReference ref) { return TypeDescriptor::NumericTypeDescriptor_Instance} | ||
42 | def static dispatch createFromTypeReference(SMTRealTypeReference ref) { return TypeDescriptor::NumericTypeDescriptor_Instance} | ||
43 | def static dispatch createFromTypeReference(SMTComplexTypeReference ref) { return new TypeDescriptor(false,false,ref.referred)} | ||
44 | } \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/builder/SmtModelQueryEngine.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/builder/SmtModelQueryEngine.xtend new file mode 100644 index 00000000..a259d103 --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/builder/SmtModelQueryEngine.xtend | |||
@@ -0,0 +1,314 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner.builder | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTAnd | ||
4 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTBoolLiteral | ||
5 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTBoolTypeReference | ||
6 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTComplexTypeReference | ||
7 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTDocument | ||
8 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTEnumLiteral | ||
9 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTEnumeratedTypeDeclaration | ||
10 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTEquals | ||
11 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTFunctionDeclaration | ||
12 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTFunctionDefinition | ||
13 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTITE | ||
14 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTInput | ||
15 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTIntLiteral | ||
16 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTIntTypeReference | ||
17 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTMinus | ||
18 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTModelResult | ||
19 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTOutput | ||
20 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSortedVariable | ||
21 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTSymbolicValue | ||
22 | import hu.bme.mit.inf.dslreasoner.smtLanguage.SMTTerm | ||
23 | import java.util.HashMap | ||
24 | import java.util.List | ||
25 | import java.util.Map | ||
26 | |||
27 | class SmtModelQueryEngine { | ||
28 | private Map<SMTFunctionDeclaration, SMTFunctionDefinition> functionDeclarationToDefinitions = | ||
29 | new HashMap<SMTFunctionDeclaration, SMTFunctionDefinition> | ||
30 | |||
31 | private val SMTInput input; | ||
32 | private val SMTOutput output | ||
33 | |||
34 | new(SMTDocument model) { | ||
35 | val nameToFunctionDefiniton = new HashMap<String, SMTFunctionDefinition> | ||
36 | input = model.input | ||
37 | var SMTModelResult modelResult = null | ||
38 | |||
39 | output = model.output | ||
40 | if(output!=null) { | ||
41 | val result = output.getModelResult | ||
42 | if(result instanceof SMTModelResult) { | ||
43 | modelResult = result as SMTModelResult | ||
44 | } | ||
45 | } | ||
46 | |||
47 | input.functionDefinition. | ||
48 | forEach[x|nameToFunctionDefiniton.put(x.name,x)] | ||
49 | if(modelResult!=null) | ||
50 | modelResult.newFunctionDefinitions. | ||
51 | forEach[x|nameToFunctionDefiniton.put(x.name,x)] | ||
52 | |||
53 | input.functionDeclarations. | ||
54 | forEach[x|functionDeclarationToDefinitions.put(x,x.name.lookup(nameToFunctionDefiniton))] | ||
55 | if(modelResult!=null) | ||
56 | modelResult.newFunctionDeclarations. | ||
57 | forEach[x|functionDeclarationToDefinitions.put(x,x.name.lookup(nameToFunctionDefiniton))] | ||
58 | } | ||
59 | |||
60 | def protected <KEY_TYPE,VALUE_TYPE> VALUE_TYPE lookup(KEY_TYPE key, Map<? extends KEY_TYPE,? extends VALUE_TYPE> map) { | ||
61 | return map.get(key) | ||
62 | } | ||
63 | |||
64 | def protected dispatch getDefaultValue(SMTIntTypeReference reference) { 0 } | ||
65 | def protected dispatch getDefaultValue(SMTBoolTypeReference reference) { false } | ||
66 | def protected dispatch getDefaultValue(SMTComplexTypeReference reference) { | ||
67 | val type = reference.referred | ||
68 | if(type instanceof SMTEnumeratedTypeDeclaration) return type.elements.head | ||
69 | else { | ||
70 | val definition = (output.getModelResult as SMTModelResult).typeDefinitions.filter[it.type == type].head | ||
71 | return definition.elements.head | ||
72 | } | ||
73 | } | ||
74 | |||
75 | def protected isTerminal( | ||
76 | SMTTerm term, | ||
77 | Map<SMTSortedVariable,Object> substitution) | ||
78 | { | ||
79 | /* | ||
80 | * An undefined function is a terminal. | ||
81 | */ | ||
82 | if(term instanceof SMTSymbolicValue) { | ||
83 | val symbolicValue = term as SMTSymbolicValue | ||
84 | |||
85 | if(symbolicValue.symbolicReference instanceof SMTFunctionDeclaration) | ||
86 | { | ||
87 | val function = symbolicValue.symbolicReference as SMTFunctionDeclaration; | ||
88 | val hasDefinition = functionDeclarationToDefinitions.get(function) != null | ||
89 | return ! hasDefinition | ||
90 | } | ||
91 | else return false | ||
92 | } | ||
93 | /* | ||
94 | * A finite element is a terminal. | ||
95 | */ | ||
96 | else if(term instanceof SMTEnumLiteral) | ||
97 | return true | ||
98 | else return false | ||
99 | } | ||
100 | def protected resolveTerminal( | ||
101 | SMTTerm terminal, | ||
102 | Map<SMTSortedVariable,Object> substitution) | ||
103 | { | ||
104 | if(terminal instanceof SMTEnumLiteral) { | ||
105 | return terminal; | ||
106 | } | ||
107 | else if(terminal instanceof SMTSymbolicValue) { | ||
108 | val symbolicValue = terminal as SMTSymbolicValue | ||
109 | if(symbolicValue.symbolicReference instanceof SMTFunctionDeclaration) | ||
110 | { | ||
111 | val function = symbolicValue.symbolicReference as SMTFunctionDeclaration; | ||
112 | return function | ||
113 | } | ||
114 | } | ||
115 | } | ||
116 | |||
117 | def public Object resolveFunctionDeclaration( | ||
118 | SMTFunctionDeclaration declaration, | ||
119 | List<Object> params) | ||
120 | { | ||
121 | |||
122 | val definition = declaration.lookup(functionDeclarationToDefinitions) | ||
123 | if(definition == null) return declaration.range.defaultValue | ||
124 | else return definition.resolveFunctionDefinition(params) | ||
125 | } | ||
126 | def public Object resolveFunctionDefinition( | ||
127 | SMTFunctionDefinition definition, | ||
128 | List<Object> params) | ||
129 | { | ||
130 | if(params.nullOrEmpty && definition.parameters.nullOrEmpty) { | ||
131 | return definition.resolveFunctionDefinition(emptyMap) | ||
132 | } | ||
133 | else if(params.size!=definition.parameters.size) | ||
134 | throw new IllegalArgumentException( | ||
135 | "Incorrect number of parameters!") | ||
136 | else { | ||
137 | val substitution = new HashMap<SMTSortedVariable,Object> | ||
138 | if(! definition.parameters.nullOrEmpty) { | ||
139 | for(i : 0..definition.parameters.size-1) { | ||
140 | substitution.put( | ||
141 | definition.parameters.get(i), | ||
142 | params.get(i)) | ||
143 | } | ||
144 | } | ||
145 | val result=definition.resolveFunctionDefinition(substitution) | ||
146 | //System::out.println(definition.name+"("+params.map[toString] + ") = " + result) | ||
147 | return result | ||
148 | } | ||
149 | } | ||
150 | def protected Object resolveFunctionDefinition( | ||
151 | SMTFunctionDefinition definition, | ||
152 | Map<SMTSortedVariable,Object> substitution) | ||
153 | { | ||
154 | definition.value.resolveValue(substitution) | ||
155 | } | ||
156 | |||
157 | def protected isBoolLiteral(SMTTerm term, Map<SMTSortedVariable,Object> substitution) { | ||
158 | term instanceof SMTBoolLiteral | ||
159 | } | ||
160 | def protected resolveBoolLiteral(SMTTerm boolValue, Map<SMTSortedVariable,Object> substitution) { | ||
161 | return (boolValue as SMTBoolLiteral).^value | ||
162 | } | ||
163 | |||
164 | def protected isIntLiteral(SMTTerm term, Map<SMTSortedVariable,Object> substitution) { | ||
165 | term instanceof SMTIntLiteral || | ||
166 | (term instanceof SMTMinus && (term as SMTMinus).rightOperand==null) | ||
167 | } | ||
168 | def protected resolveIntLiteral(SMTTerm intValue, Map<SMTSortedVariable,Object> substitution) { | ||
169 | if(intValue instanceof SMTIntLiteral) return (intValue as SMTIntLiteral).^value | ||
170 | else return -((intValue as SMTMinus).leftOperand as SMTIntLiteral).value | ||
171 | } | ||
172 | |||
173 | def protected isParameterValue( | ||
174 | SMTTerm term, | ||
175 | Map<SMTSortedVariable,Object> substitution) | ||
176 | { | ||
177 | if(term instanceof SMTSymbolicValue) { | ||
178 | return substitution.containsKey((term as SMTSymbolicValue).symbolicReference) | ||
179 | } | ||
180 | else return false | ||
181 | } | ||
182 | def protected Object resolveParameterValue( | ||
183 | SMTTerm term, | ||
184 | Map<SMTSortedVariable,Object> substitution) | ||
185 | { | ||
186 | return substitution.get((term as SMTSymbolicValue).symbolicReference); | ||
187 | } | ||
188 | |||
189 | def protected isITE( | ||
190 | SMTTerm term, | ||
191 | Map<SMTSortedVariable,Object> substitution) | ||
192 | { | ||
193 | return term instanceof SMTITE; | ||
194 | } | ||
195 | def protected resolveITE( | ||
196 | SMTTerm term, | ||
197 | Map<SMTSortedVariable,Object> substitution) | ||
198 | { | ||
199 | val ite = term as SMTITE | ||
200 | val condition = ite.condition.resolveValue(substitution) as Boolean | ||
201 | |||
202 | if(condition){ | ||
203 | return resolveValue(ite.^if,substitution) | ||
204 | }else{ | ||
205 | return resolveValue(ite.^else,substitution) | ||
206 | } | ||
207 | } | ||
208 | |||
209 | def protected isAnd(SMTTerm term, Map<SMTSortedVariable,Object> substitution) { | ||
210 | term instanceof SMTAnd | ||
211 | } | ||
212 | def protected resolveAnd(SMTTerm term, Map<SMTSortedVariable,Object> substitution) { | ||
213 | val and = term as SMTAnd | ||
214 | for(operand : and.operands) { | ||
215 | val operandValue = operand.resolveValue(substitution) as Boolean | ||
216 | if(!operandValue) return false | ||
217 | } | ||
218 | return true | ||
219 | } | ||
220 | |||
221 | def protected isEquals( | ||
222 | SMTTerm operand, | ||
223 | Map<SMTSortedVariable,Object> substitution) | ||
224 | { | ||
225 | return operand instanceof SMTEquals | ||
226 | } | ||
227 | def protected resolveEquals(SMTTerm term, Map<SMTSortedVariable,Object> substitution){ | ||
228 | val equals = term as SMTEquals | ||
229 | val left = equals.leftOperand.resolveValue(substitution) | ||
230 | val right = equals.rightOperand.resolveValue(substitution) | ||
231 | val res = left.equals(right) | ||
232 | return res | ||
233 | } | ||
234 | |||
235 | def protected isFiniteElementReference(SMTTerm term, Map<SMTSortedVariable,Object> substitution) { | ||
236 | if(term instanceof SMTSymbolicValue) { | ||
237 | if((term as SMTSymbolicValue).symbolicReference instanceof SMTEnumLiteral) { | ||
238 | return true | ||
239 | } | ||
240 | } | ||
241 | return false; | ||
242 | } | ||
243 | def protected resolveFiniteElementReference(SMTTerm term, Map<SMTSortedVariable,Object> substitution) { | ||
244 | (term as SMTSymbolicValue).symbolicReference | ||
245 | } | ||
246 | |||
247 | def protected isFunctionCall(SMTTerm term, Map<SMTSortedVariable,Object> substitution) { | ||
248 | if(term instanceof SMTSymbolicValue) { | ||
249 | val functionCall = (term as SMTSymbolicValue).symbolicReference | ||
250 | return functionCall instanceof SMTFunctionDeclaration || functionCall instanceof SMTFunctionDefinition | ||
251 | } | ||
252 | return false; | ||
253 | } | ||
254 | def protected resolveFunctionCall(SMTTerm term, Map<SMTSortedVariable,Object> substitution) { | ||
255 | if(term.isTerminal(substitution)) | ||
256 | { | ||
257 | return term.resolveTerminal(substitution); | ||
258 | } | ||
259 | else{ | ||
260 | val functionCall = term as SMTSymbolicValue | ||
261 | var SMTFunctionDefinition calledFunction; | ||
262 | var SMTFunctionDeclaration calledDeclaration; | ||
263 | if(functionCall.symbolicReference instanceof SMTFunctionDeclaration) { | ||
264 | calledDeclaration = functionCall.symbolicReference as SMTFunctionDeclaration | ||
265 | calledFunction = functionCall.symbolicReference.lookup(functionDeclarationToDefinitions)} | ||
266 | else { | ||
267 | calledDeclaration = null; | ||
268 | calledFunction = functionCall.symbolicReference as SMTFunctionDefinition | ||
269 | } | ||
270 | |||
271 | val newSubstitution = new HashMap<SMTSortedVariable,Object> | ||
272 | if(! calledFunction.parameters.nullOrEmpty) { | ||
273 | for(i : 0..calledFunction.parameters.size-1) { | ||
274 | newSubstitution.put( | ||
275 | calledFunction.parameters.get(i), | ||
276 | functionCall.parameterSubstitutions.get(i).resolveValue(substitution) | ||
277 | ) | ||
278 | } | ||
279 | } | ||
280 | return calledFunction.resolveFunctionDefinition(newSubstitution) | ||
281 | } | ||
282 | } | ||
283 | |||
284 | def protected Object resolveValue( | ||
285 | SMTTerm value, | ||
286 | Map<SMTSortedVariable,Object> substitution) | ||
287 | { | ||
288 | if(value instanceof SMTSymbolicValue){ | ||
289 | (value as SMTSymbolicValue).symbolicReference | ||
290 | } | ||
291 | |||
292 | if(value.isTerminal(substitution)) { | ||
293 | return value.resolveTerminal(substitution) | ||
294 | }else if(value.isBoolLiteral(substitution)){ | ||
295 | return resolveBoolLiteral(value, substitution) | ||
296 | }else if(value.isIntLiteral(substitution)){ | ||
297 | return resolveIntLiteral(value, substitution) | ||
298 | }else if(value.isParameterValue(substitution)) { | ||
299 | return resolveParameterValue(value,substitution) | ||
300 | }else if(value.isITE(substitution)){ | ||
301 | return resolveITE(value, substitution) | ||
302 | }else if(value.isAnd(substitution)) { | ||
303 | return resolveAnd(value,substitution) | ||
304 | }else if(value.isEquals(substitution)) { | ||
305 | return resolveEquals(value,substitution) | ||
306 | }else if(value.isFiniteElementReference(substitution)) { | ||
307 | return resolveFiniteElementReference(value,substitution) | ||
308 | }else if(value.isFunctionCall(substitution)) { | ||
309 | return resolveFunctionCall(value,substitution) | ||
310 | }else{ | ||
311 | throw new IllegalArgumentException("Can not resolve this term: " + value) | ||
312 | } | ||
313 | } | ||
314 | } \ No newline at end of file | ||
diff --git a/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/builder/SmtSolverHandler.xtend b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/builder/SmtSolverHandler.xtend new file mode 100644 index 00000000..38ae1dae --- /dev/null +++ b/Solvers/SMT-Solver/hu.bme.mit.inf.dslreasoner.smt.reasoner/src/hu/bme/mit/inf/dslreasoner/smt/reasoner/builder/SmtSolverHandler.xtend | |||
@@ -0,0 +1,64 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.smt.reasoner.builder | ||
2 | |||
3 | import org.eclipse.emf.common.util.URI | ||
4 | import java.io.InputStream | ||
5 | import java.io.IOException | ||
6 | import java.io.FileWriter | ||
7 | import java.io.File | ||
8 | import java.io.BufferedReader | ||
9 | import java.io.InputStreamReader | ||
10 | import org.eclipse.emf.common.CommonPlugin | ||
11 | import hu.bme.mit.inf.dslreasoner.smt.reasoner.SmtSolverConfiguration | ||
12 | |||
13 | class SmtSolverException extends Exception{ | ||
14 | new(String s) { super(s) } | ||
15 | new(String s, Exception e) { super(s,e) } | ||
16 | } | ||
17 | |||
18 | class SmtSolverHandler { | ||
19 | public def callSolver(URI resourceURI, SmtSolverConfiguration configuration) { | ||
20 | val URI smtUri = CommonPlugin.resolve(resourceURI) | ||
21 | val File smtFile = new File(smtUri.toFileString()) | ||
22 | |||
23 | val params = | ||
24 | '''/smt2 /st« | ||
25 | IF configuration.runtimeLimit != SmtSolverConfiguration::Unlimited» /T:«configuration.runtimeLimit»«ENDIF»« | ||
26 | IF configuration.memoryLimit != SmtSolverConfiguration::Unlimited» /memory:«configuration.memoryLimit»«ENDIF»« | ||
27 | IF configuration.fixRandomSeed» /rs:0«ENDIF | ||
28 | » «smtFile.path»''' | ||
29 | |||
30 | val Runtime runTime = Runtime.getRuntime() | ||
31 | |||
32 | try { | ||
33 | val process = runTime.exec(configuration.solverPath + " " + params) | ||
34 | |||
35 | val FileWriter writer = new FileWriter(smtFile,true) | ||
36 | writer.append("\n--------------\n") | ||
37 | appendStream(writer, process.getInputStream()) | ||
38 | printStream(process.getErrorStream()) | ||
39 | writer.close | ||
40 | } catch (IOException e) { | ||
41 | throw new SmtSolverException( | ||
42 | "Error during the input/output handling of the reasoner.", e) | ||
43 | } | ||
44 | |||
45 | return resourceURI | ||
46 | } | ||
47 | |||
48 | def private void printStream(InputStream inputStream) throws IOException { | ||
49 | val BufferedReader input = new BufferedReader(new InputStreamReader(inputStream)) | ||
50 | var int line = -1 | ||
51 | while ((line = input.read()) != -1) { | ||
52 | System.out.print(line as char) | ||
53 | } | ||
54 | input.close() | ||
55 | } | ||
56 | |||
57 | def private appendStream(FileWriter writer, InputStream inputStream) throws IOException { | ||
58 | val BufferedReader input = new BufferedReader(new InputStreamReader(inputStream)) | ||
59 | var int line = -1 | ||
60 | while ((line = input.read()) != -1) { | ||
61 | writer.append(line as char) | ||
62 | } | ||
63 | } | ||
64 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.classpath b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.classpath new file mode 100644 index 00000000..d9c5bef5 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.classpath | |||
@@ -0,0 +1,11 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <classpath> | ||
3 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | ||
4 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
5 | <classpathentry kind="src" path="src"/> | ||
6 | <classpathentry kind="src" path="xtend-gen"/> | ||
7 | <classpathentry kind="src" path="patterns"/> | ||
8 | <classpathentry kind="src" path="vql-gen"/> | ||
9 | <classpathentry kind="src" path="src-gen/"/> | ||
10 | <classpathentry kind="output" path="bin"/> | ||
11 | </classpath> | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.gitignore b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.gitignore new file mode 100644 index 00000000..8ae4e44d --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.gitignore | |||
@@ -0,0 +1,4 @@ | |||
1 | /bin/ | ||
2 | /src-gen/ | ||
3 | /vql-gen/ | ||
4 | /xtend-gen/ | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.project b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.project new file mode 100644 index 00000000..386eda9e --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.project | |||
@@ -0,0 +1,40 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <projectDescription> | ||
3 | <name>hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra</name> | ||
4 | <comment></comment> | ||
5 | <projects> | ||
6 | </projects> | ||
7 | <buildSpec> | ||
8 | <buildCommand> | ||
9 | <name>org.eclipse.viatra.query.tooling.ui.projectbuilder</name> | ||
10 | <arguments> | ||
11 | </arguments> | ||
12 | </buildCommand> | ||
13 | <buildCommand> | ||
14 | <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
15 | <arguments> | ||
16 | </arguments> | ||
17 | </buildCommand> | ||
18 | <buildCommand> | ||
19 | <name>org.eclipse.jdt.core.javabuilder</name> | ||
20 | <arguments> | ||
21 | </arguments> | ||
22 | </buildCommand> | ||
23 | <buildCommand> | ||
24 | <name>org.eclipse.pde.ManifestBuilder</name> | ||
25 | <arguments> | ||
26 | </arguments> | ||
27 | </buildCommand> | ||
28 | <buildCommand> | ||
29 | <name>org.eclipse.pde.SchemaBuilder</name> | ||
30 | <arguments> | ||
31 | </arguments> | ||
32 | </buildCommand> | ||
33 | </buildSpec> | ||
34 | <natures> | ||
35 | <nature>org.eclipse.pde.PluginNature</nature> | ||
36 | <nature>org.eclipse.jdt.core.javanature</nature> | ||
37 | <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
38 | <nature>org.eclipse.viatra.query.projectnature</nature> | ||
39 | </natures> | ||
40 | </projectDescription> | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.settings/org.eclipse.jdt.core.prefs b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..295926d9 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.settings/org.eclipse.jdt.core.prefs | |||
@@ -0,0 +1,7 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
4 | org.eclipse.jdt.core.compiler.compliance=1.8 | ||
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
7 | org.eclipse.jdt.core.compiler.source=1.8 | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.settings/org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguage.prefs b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.settings/org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguage.prefs new file mode 100644 index 00000000..5b3dcb93 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/.settings/org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguage.prefs | |||
@@ -0,0 +1,27 @@ | |||
1 | BuilderConfiguration.is_project_specific=true | ||
2 | autobuilding=true | ||
3 | eclipse.preferences.version=1 | ||
4 | generateGeneratedAnnotation=false | ||
5 | generateSuppressWarnings=true | ||
6 | generatedAnnotationComment= | ||
7 | includeDateInGenerated=false | ||
8 | outlet.DEFAULT_OUTPUT.cleanDirectory=false | ||
9 | outlet.DEFAULT_OUTPUT.cleanupDerived=true | ||
10 | outlet.DEFAULT_OUTPUT.createDirectory=true | ||
11 | outlet.DEFAULT_OUTPUT.derived=true | ||
12 | outlet.DEFAULT_OUTPUT.directory=./vql-gen | ||
13 | outlet.DEFAULT_OUTPUT.hideLocalSyntheticVariables=true | ||
14 | outlet.DEFAULT_OUTPUT.installDslAsPrimarySource=false | ||
15 | outlet.DEFAULT_OUTPUT.keepLocalHistory=true | ||
16 | outlet.DEFAULT_OUTPUT.override=true | ||
17 | outlet.DEFAULT_OUTPUT.sourceFolder.patterns.directory= | ||
18 | outlet.DEFAULT_OUTPUT.sourceFolder.patterns.ignore= | ||
19 | outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.directory= | ||
20 | outlet.DEFAULT_OUTPUT.sourceFolder.src-gen.ignore= | ||
21 | outlet.DEFAULT_OUTPUT.sourceFolder.src.directory= | ||
22 | outlet.DEFAULT_OUTPUT.sourceFolder.src.ignore= | ||
23 | outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.directory= | ||
24 | outlet.DEFAULT_OUTPUT.sourceFolder.xtend-gen.ignore= | ||
25 | outlet.DEFAULT_OUTPUT.userOutputPerSourceFolder= | ||
26 | targetJavaVersion=JAVA5 | ||
27 | useJavaCompilerCompliance=true | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/META-INF/MANIFEST.MF b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/META-INF/MANIFEST.MF new file mode 100644 index 00000000..8f0e037a --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/META-INF/MANIFEST.MF | |||
@@ -0,0 +1,26 @@ | |||
1 | Manifest-Version: 1.0 | ||
2 | Bundle-ManifestVersion: 2 | ||
3 | Bundle-Name: Logic2viatra | ||
4 | Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatraquery;singleton:=true | ||
5 | Bundle-Version: 1.0.0.qualifier | ||
6 | Export-Package: hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra, | ||
7 | hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries, | ||
8 | hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.util | ||
9 | Require-Bundle: hu.bme.mit.inf.dslreasoner.logic.model;bundle-version="1.0.0", | ||
10 | hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage;bundle-version="1.0.0", | ||
11 | hu.bme.mit.inf.dslreasoner.ecore2logic;bundle-version="1.0.0", | ||
12 | hu.bme.mit.inf.dslreasoner.viatra2logic;bundle-version="1.0.0", | ||
13 | com.google.guava, | ||
14 | org.eclipse.xtext.xbase.lib, | ||
15 | org.eclipse.xtend.lib, | ||
16 | org.eclipse.xtend.lib.macro, | ||
17 | org.eclipse.viatra.query.runtime;bundle-version="1.5.0", | ||
18 | org.eclipse.viatra.query.runtime.base.itc;bundle-version="1.5.0", | ||
19 | org.eclipse.viatra.query.patternlanguage;bundle-version="1.5.0", | ||
20 | org.eclipse.viatra.query.patternlanguage.emf;bundle-version="1.5.0", | ||
21 | com.google.inject;bundle-version="3.0.0", | ||
22 | org.eclipse.xtext;bundle-version="2.10.0", | ||
23 | org.eclipse.viatra.transformation.runtime.emf;bundle-version="1.5.0", | ||
24 | org.eclipse.xtext.xbase;bundle-version="2.10.0" | ||
25 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
26 | Import-Package: org.apache.log4j | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/build.properties b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/build.properties new file mode 100644 index 00000000..585df5ce --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/build.properties | |||
@@ -0,0 +1,9 @@ | |||
1 | bin.includes = META-INF/,\ | ||
2 | .,\ | ||
3 | plugin.xml | ||
4 | source.. = src/,\ | ||
5 | patterns/,\ | ||
6 | vql-gen/,\ | ||
7 | xtend-gen/,\ | ||
8 | src-gen/ | ||
9 | output.. = bin/ | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/patterns/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/queries/TypeAnalysis.vql b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/patterns/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/queries/TypeAnalysis.vql new file mode 100644 index 00000000..ebab542c --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/patterns/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/queries/TypeAnalysis.vql | |||
@@ -0,0 +1,223 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries | ||
2 | |||
3 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
4 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
5 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
6 | |||
7 | /** | ||
8 | * Direct supertypes of a type. | ||
9 | */ | ||
10 | private pattern supertypeDirect(subtype : Type, supertype : Type) { | ||
11 | Type.supertypes(subtype, supertype); | ||
12 | } | ||
13 | |||
14 | /** | ||
15 | * All supertypes of a type. | ||
16 | */ | ||
17 | |||
18 | private pattern supertypePlus(subtype: Type, supertype: Type) { | ||
19 | find supertypeDirect+(subtype,supertype); | ||
20 | } | ||
21 | |||
22 | private pattern supertypeStar(subtype: Type, supertype: Type) { | ||
23 | subtype == supertype; | ||
24 | } or { | ||
25 | find supertypePlus(subtype,supertype); | ||
26 | } | ||
27 | |||
28 | pattern hasDefinedSupertype(type:Type) { | ||
29 | find supertypeStar(type,superType); | ||
30 | TypeDefinition(superType); | ||
31 | } | ||
32 | |||
33 | pattern dontHaveDefinedSupertype(type:TypeDeclaration) { | ||
34 | neg find hasDefinedSupertype(type); | ||
35 | } | ||
36 | |||
37 | /////////////////////// | ||
38 | // New element types | ||
39 | /////////////////////// | ||
40 | |||
41 | /** | ||
42 | * A new element can has 'type' as a dynamic type iff | ||
43 | * (1) 'type' is concrete and | ||
44 | * (2) 'type' does not have defined supertype | ||
45 | * (including the case when 'type' itself is defined). | ||
46 | */ | ||
47 | private pattern possibleNewElementDynamicType(type:TypeDeclaration) { | ||
48 | Type.isAbstract(type,false); | ||
49 | find dontHaveDefinedSupertype(type); | ||
50 | } | ||
51 | ///** | ||
52 | // * The type of a new element can be refined from 'previous' to 'refined'. | ||
53 | // */ | ||
54 | //private pattern newElementTypeRefinementPath(previous:TypeDeclaration, refined:TypeDeclaration) { | ||
55 | // find possibleNewElementDynamicType(previous); | ||
56 | // find possibleNewElementDynamicType(refined); | ||
57 | // find supertypePlus(refined,previous); | ||
58 | //} | ||
59 | |||
60 | /** | ||
61 | * New element can be created with type 'type' iff it can has 'type' as a dynamic type. | ||
62 | */ | ||
63 | pattern newElementTypeConstructor(type:TypeDeclaration) { | ||
64 | find possibleNewElementDynamicType(type); | ||
65 | } | ||
66 | |||
67 | /** | ||
68 | * New element can be refined to type 'refined' iff | ||
69 | * (1) type is concrete | ||
70 | * (2) the new type cover each existing type of the previous state, i.e. | ||
71 | * (2') it does not have type that: | ||
72 | */ | ||
73 | |||
74 | pattern newElementTypeRefinementTarget(refined: TypeDeclaration) { | ||
75 | find possibleNewElementDynamicType(refined); | ||
76 | } | ||
77 | |||
78 | private pattern incompatibleType(type:TypeDeclaration, incompatible:TypeDeclaration) { | ||
79 | LogicProblem.types(problem,type); | ||
80 | LogicProblem.types(problem,incompatible); | ||
81 | neg find supertypeStar(type, incompatible); | ||
82 | } | ||
83 | |||
84 | pattern incompatibleSuperType(type:TypeDeclaration, incompatibleType1:TypeDeclaration, incompatibleType2:TypeDeclaration) { | ||
85 | find incompatibleType(type, incompatibleType1); | ||
86 | find incompatibleType(type, incompatibleType2); | ||
87 | find supertypePlus(incompatibleType1, incompatibleType2); | ||
88 | } | ||
89 | |||
90 | pattern incompatibleTopType(type:TypeDeclaration, incompatible:TypeDeclaration) { | ||
91 | find incompatibleType(type, incompatible); | ||
92 | neg find incompatibleSuperType(type, incompatible, _); | ||
93 | } | ||
94 | |||
95 | pattern newElementTypeRefinementNegativeConstraint(refined:TypeDeclaration, inhibitor:TypeDeclaration) { | ||
96 | find incompatibleTopType(refined, inhibitor); | ||
97 | } or { | ||
98 | find possibleNewElementDynamicType(refined); | ||
99 | refined == inhibitor; | ||
100 | } | ||
101 | |||
102 | pattern newElementMayTypeNegativeConstraint(mayType: TypeDeclaration, inhibitor: TypeDeclaration) { | ||
103 | find incompatibleTopType(mayType, inhibitor); | ||
104 | } | ||
105 | |||
106 | /////////////////////// | ||
107 | // Old element types | ||
108 | /////////////////////// | ||
109 | |||
110 | //TODO old element types | ||
111 | |||
112 | //private pattern typeInterpretation(problem:LogicProblem, interpetation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialTypeInterpratation) { | ||
113 | // find interpretation(problem,interpetation); | ||
114 | // LogicProblem.types(problem,type); | ||
115 | // PartialInterpretation.partialtypeinterpratation(interpetation,typeInterpretation); | ||
116 | // PartialTypeInterpratation.interpretationOf(typeInterpretation,type); | ||
117 | //} | ||
118 | // | ||
119 | //pattern directInstanceOf(problem:LogicProblem, interpetation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
120 | // find interpretation(problem,interpetation); | ||
121 | // find mustExist(problem,interpetation,element); | ||
122 | // LogicProblem.types(problem,type); | ||
123 | // TypeDefinition.elements(type,element); | ||
124 | //} or { | ||
125 | // find mustExist(problem,interpetation,element); | ||
126 | // find typeInterpretation(problem,interpetation,type,typeInterpretation); | ||
127 | // PartialTypeInterpratation.elements(typeInterpretation,element); | ||
128 | //} | ||
129 | // | ||
130 | // | ||
131 | // | ||
132 | ///// Complex type reasoning patterns /// | ||
133 | //// | ||
134 | //// In a valid type system, for each element e there is exactly one type T where | ||
135 | //// 1: T(e) - but we dont know this for type declaration | ||
136 | //// 2: For the dynamic type D and another type T, where D(e) && D-->T, T(e) is true. | ||
137 | //// 2e: A type hierarchy is invalid, if there is a supertype T for a dynamic type D which does no contains e: | ||
138 | //// D(e) && D-->T && !T(e) | ||
139 | //// 3: There is no T' that T'->T and T'(e) | ||
140 | //// 3e: A type hierarcy is invalid, if there is a type T for a dynamic type D, which contains e, but not subtype of T: | ||
141 | //// D(e) && ![T--->D] && T(e) | ||
142 | //// 4: T is not abstract | ||
143 | //// Such type T is called Dynamic type of e, while other types are called static types. | ||
144 | //// | ||
145 | //// The following patterns checks the possible dynamic types for an element | ||
146 | // | ||
147 | //pattern wellformedType(problem: LogicProblem, interpretation:PartialInterpretation, dynamic:Type, element:DefinedElement) { | ||
148 | // // 1: T(e) | ||
149 | // find directInstanceOf(problem,interpretation,element,dynamic); | ||
150 | // // 2e is not true: D(e) && D-->T && !T(e) | ||
151 | // neg find dynamicTypeNotSubtypeOfADefinition(problem,interpretation,element,dynamic); | ||
152 | // // 3e is not true: D(e) && ![T--->D] && T(e) | ||
153 | // neg find dynamicTypeIsSubtypeOfANonDefinition(problem,interpretation,element,dynamic); | ||
154 | // // 4: T is not abstract | ||
155 | // Type.isAbstract(dynamic,false); | ||
156 | //} | ||
157 | // | ||
158 | //pattern possibleDynamicType(problem: LogicProblem, interpretation:PartialInterpretation, dynamic:Type, element:DefinedElement) | ||
159 | //// case 1: element is defined at least once | ||
160 | //{ | ||
161 | // LogicProblem.types(problem,dynamic); | ||
162 | // // select a random definition 'randomType' | ||
163 | // find directInstanceOf(problem,interpretation,element,randomType); | ||
164 | // // dynamic is a subtype of 'randomType' | ||
165 | // find supertypeStar(dynamic,randomType); | ||
166 | // // 2e is not true: D(e) && D-->T && !T(e) | ||
167 | // neg find dynamicTypeNotSubtypeOfADefinition(problem,interpretation,element,dynamic); | ||
168 | // // 3e is not true: D(e) && ![T--->D] && T(e) | ||
169 | // neg find dynamicTypeIsSubtypeOfANonDefinition(problem,interpretation,element,dynamic); | ||
170 | // // 4: T is not abstract | ||
171 | // Type.isAbstract(dynamic,false); | ||
172 | //} or | ||
173 | //// case 2: element is not defined anywhere | ||
174 | //{ | ||
175 | // find mayExist(problem,interpretation,element); | ||
176 | // // there is no definition | ||
177 | // neg find directInstanceOf(problem,interpretation,element,_); | ||
178 | // // 2e is not true: D(e) && D-->T && !T(e) | ||
179 | // // because non of the definition contains element, the type cannot have defined supertype | ||
180 | // LogicProblem.types(problem,dynamic); | ||
181 | // PartialInterpretation.problem(interpretation,problem); | ||
182 | // neg find typeWithDefinedSupertype(dynamic); | ||
183 | // // 3e is not true: D(e) && ![T--->D] && T(e) | ||
184 | // // because there is no definition, dynamic covers all definition | ||
185 | // // 4: T is not abstract | ||
186 | // Type.isAbstract(dynamic,false); | ||
187 | //} | ||
188 | // | ||
189 | ///** | ||
190 | // * supertype -------> element <------- otherSupertype | ||
191 | // * A A | ||
192 | // * | | | ||
193 | // * wrongDynamic -----------------------------X | ||
194 | // */ | ||
195 | //private pattern dynamicTypeNotSubtypeOfADefinition(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, wrongDynamic : Type) { | ||
196 | // find directInstanceOf(problem,interpretation,element,supertype); | ||
197 | // find directInstanceOf(problem,interpretation,element,otherSupertype); | ||
198 | // find supertypeStar(wrongDynamic,supertype); | ||
199 | // neg find supertypeStar(wrongDynamic,otherSupertype); | ||
200 | //} | ||
201 | // | ||
202 | // | ||
203 | ///** | ||
204 | // * supertype -------> element <---X--- otherSupertype | ||
205 | // * A A | ||
206 | // * | | | ||
207 | // * wrongDynamic -----------------------------+ | ||
208 | // */ | ||
209 | //private pattern dynamicTypeIsSubtypeOfANonDefinition(problem: LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, wrongDynamic:Type) { | ||
210 | // find directInstanceOf(problem,interpretation,element,supertype); | ||
211 | // neg find elementInTypeDefinition(element,otherSupertype); | ||
212 | // find supertypeStar(wrongDynamic, supertype); | ||
213 | // find supertypeStar(wrongDynamic, otherSupertype); | ||
214 | //} | ||
215 | // | ||
216 | //private pattern elementInTypeDefinition(element:DefinedElement, definition:TypeDefinition) { | ||
217 | // TypeDefinition.elements(definition,element); | ||
218 | //} | ||
219 | // | ||
220 | //private pattern typeWithDefinedSupertype(type:TypeDeclaration) { | ||
221 | // find supertypeStar(type,definedSupertype); | ||
222 | // TypeDefinition(definedSupertype); | ||
223 | //} | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/plugin.xml b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/plugin.xml new file mode 100644 index 00000000..05e00983 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/plugin.xml | |||
@@ -0,0 +1,14 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?><plugin> | ||
2 | <extension id="hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.TypeAnalysis" point="org.eclipse.viatra.query.runtime.queryspecification"> | ||
3 | <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.TypeAnalysis" id="hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.TypeAnalysis"> | ||
4 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.hasDefinedSupertype"/> | ||
5 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.dontHaveDefinedSupertype"/> | ||
6 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.newElementTypeConstructor"/> | ||
7 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.newElementTypeRefinementTarget"/> | ||
8 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.incompatibleSuperType"/> | ||
9 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.incompatibleTopType"/> | ||
10 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.newElementTypeRefinementNegativeConstraint"/> | ||
11 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.newElementMayTypeNegativeConstraint"/> | ||
12 | </group> | ||
13 | </extension> | ||
14 | </plugin> | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/Modality.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/Modality.java new file mode 100644 index 00000000..d2132cea --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/Modality.java | |||
@@ -0,0 +1,22 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra; | ||
2 | |||
3 | public enum Modality { | ||
4 | MUST, MAY, CURRENT; | ||
5 | public boolean isMust() { | ||
6 | return this == MUST; | ||
7 | } | ||
8 | public boolean isMay() { | ||
9 | return this == MAY; | ||
10 | } | ||
11 | public boolean isCurrent() { | ||
12 | return this == CURRENT; | ||
13 | } | ||
14 | public boolean isMustOrCurrent() { | ||
15 | return isMust() || isCurrent(); | ||
16 | } | ||
17 | public Modality getDual() { | ||
18 | if(this.isCurrent()) return CURRENT; | ||
19 | else if(this.isMust())return MAY; | ||
20 | else return MUST; | ||
21 | } | ||
22 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend new file mode 100644 index 00000000..1653226d --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend | |||
@@ -0,0 +1,78 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternProvider | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.rules.GoalConstraintProvider | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.rules.RefinementRuleProvider | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
10 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace | ||
11 | import java.util.Collection | ||
12 | import java.util.LinkedHashMap | ||
13 | import java.util.List | ||
14 | import org.eclipse.viatra.query.runtime.api.GenericPatternMatch | ||
15 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification | ||
16 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | ||
17 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | ||
18 | import org.eclipse.viatra.transformation.runtime.emf.rules.batch.BatchTransformationRule | ||
19 | import org.eclipse.xtend.lib.annotations.Data | ||
20 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | ||
21 | |||
22 | class ModelGenerationStatistics { | ||
23 | public var long transformationExecutionTime = 0 | ||
24 | synchronized def addExecutionTime(long amount) { | ||
25 | transformationExecutionTime+=amount | ||
26 | } | ||
27 | public var long PreliminaryTypeAnalisisTime = 0 | ||
28 | } | ||
29 | @Data class ModelGenerationMethod { | ||
30 | ModelGenerationStatistics statistics | ||
31 | |||
32 | Collection<? extends BatchTransformationRule<?,?>> objectRefinementRules | ||
33 | Collection<? extends BatchTransformationRule<?,?>> relationRefinementRules | ||
34 | |||
35 | List<MultiplicityGoalConstraintCalculator> unfinishedMultiplicities | ||
36 | Collection<? extends IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> unfinishedWF | ||
37 | |||
38 | Collection<? extends IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> invalidWF | ||
39 | } | ||
40 | enum TypeInferenceMethod { | ||
41 | Generic, PreliminaryAnalysis | ||
42 | } | ||
43 | |||
44 | class ModelGenerationMethodProvider { | ||
45 | private val PatternProvider patternProvider = new PatternProvider | ||
46 | private val RefinementRuleProvider refinementRuleProvider = new RefinementRuleProvider | ||
47 | private val GoalConstraintProvider goalConstraintProvider = new GoalConstraintProvider | ||
48 | |||
49 | public def ModelGenerationMethod createModelGenerationMethod( | ||
50 | LogicProblem logicProblem, | ||
51 | PartialInterpretation emptySolution, | ||
52 | Iterable<PQuery> existingQueries, | ||
53 | ReasonerWorkspace workspace, | ||
54 | boolean nameNewElements, | ||
55 | TypeInferenceMethod typeInferenceMethod | ||
56 | ) { | ||
57 | val statistics = new ModelGenerationStatistics | ||
58 | val queries = patternProvider.generateQueries(logicProblem,emptySolution,statistics,existingQueries,workspace,typeInferenceMethod) | ||
59 | |||
60 | val //LinkedHashMap<Pair<Relation, ? extends Type>, BatchTransformationRule<GenericPatternMatch, ViatraQueryMatcher<GenericPatternMatch>>> | ||
61 | objectRefinementRules = refinementRuleProvider.createObjectRefinementRules(queries,nameNewElements,statistics) | ||
62 | val relationRefinementRules = refinementRuleProvider.createRelationRefinementRules(queries,statistics) | ||
63 | |||
64 | val unfinishedMultiplicities = goalConstraintProvider.getUnfinishedMultiplicityQueries(queries) | ||
65 | val unfinishedWF = queries.getUnfinishedWFQueries.values | ||
66 | |||
67 | val invalidWF = queries.getInvalidWFQueries.values | ||
68 | |||
69 | return new ModelGenerationMethod( | ||
70 | statistics, | ||
71 | objectRefinementRules.values, | ||
72 | relationRefinementRules.values, | ||
73 | unfinishedMultiplicities, | ||
74 | unfinishedWF, | ||
75 | invalidWF | ||
76 | ) | ||
77 | } | ||
78 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/MultiplicityGoalConstraintCalculator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/MultiplicityGoalConstraintCalculator.xtend new file mode 100644 index 00000000..e05160d0 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/MultiplicityGoalConstraintCalculator.xtend | |||
@@ -0,0 +1,46 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra | ||
2 | |||
3 | import org.eclipse.emf.common.notify.Notifier | ||
4 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification | ||
5 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine | ||
6 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | ||
7 | import org.eclipse.viatra.query.runtime.emf.EMFScope | ||
8 | |||
9 | class MultiplicityGoalConstraintCalculator { | ||
10 | val String targetRelationName; | ||
11 | val IQuerySpecification<?> querySpecification; | ||
12 | var ViatraQueryMatcher<?> matcher; | ||
13 | |||
14 | public new(String targetRelationName, IQuerySpecification<?> querySpecification) { | ||
15 | this.targetRelationName = targetRelationName | ||
16 | this.querySpecification = querySpecification | ||
17 | this.matcher = null | ||
18 | } | ||
19 | |||
20 | public new(MultiplicityGoalConstraintCalculator other) { | ||
21 | this.targetRelationName = other.targetRelationName | ||
22 | this.querySpecification = other.querySpecification | ||
23 | this.matcher = null | ||
24 | } | ||
25 | |||
26 | def public getName() { | ||
27 | targetRelationName | ||
28 | } | ||
29 | |||
30 | def public init(Notifier notifier) { | ||
31 | val engine = ViatraQueryEngine.on(new EMFScope(notifier)) | ||
32 | matcher = querySpecification.getMatcher(engine) | ||
33 | } | ||
34 | |||
35 | def public calculateValue() { | ||
36 | var res = 0 | ||
37 | val allMatches = this.matcher.allMatches | ||
38 | for(match : allMatches) { | ||
39 | //println(targetRelationName+ " missing multiplicity: "+match.get(3)) | ||
40 | val missingMultiplicity = match.get(4) as Integer | ||
41 | res += missingMultiplicity | ||
42 | } | ||
43 | //println(targetRelationName+ " all missing multiplicities: "+res) | ||
44 | return res | ||
45 | } | ||
46 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/TypeAnalysis.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/TypeAnalysis.xtend new file mode 100644 index 00000000..395aba85 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/TypeAnalysis.xtend | |||
@@ -0,0 +1,92 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra | ||
2 | |||
3 | import org.eclipse.xtend.lib.annotations.Data | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
5 | import java.util.List | ||
6 | import java.util.Map | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
9 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine | ||
10 | import org.eclipse.viatra.query.runtime.emf.EMFScope | ||
11 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.NewElementTypeConstructorMatcher | ||
12 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.NewElementTypeRefinementTargetMatcher | ||
13 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.NewElementTypeRefinementNegativeConstraintMatcher | ||
14 | import java.util.ArrayList | ||
15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.DontHaveDefinedSupertypeMatcher | ||
16 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
17 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
18 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries.NewElementMayTypeNegativeConstraintMatcher | ||
19 | |||
20 | @Data class TypeRefinementPrecondition { | ||
21 | Type targetType | ||
22 | List<? extends Type> inhibitorTypes | ||
23 | } | ||
24 | |||
25 | /** | ||
26 | * Collection of all possible element creation and type refinement rules for defined and undefined elements. | ||
27 | */ | ||
28 | @Data class TypeAnalysisResult { | ||
29 | ///////////////// | ||
30 | // New elements | ||
31 | ///////////////// | ||
32 | /** | ||
33 | * New elements can be created using with the following types. | ||
34 | */ | ||
35 | List<? extends Type> possibleNewDynamicTypes | ||
36 | /** | ||
37 | * <b>(A,B)</b> in <b>possibleNewTypeRefinements</b>: a new element <b>x</b> can be refined to A <=> <b>x</b> has all types listed in B. | ||
38 | */ | ||
39 | List<TypeRefinementPrecondition> possibleNewTypeRefinements | ||
40 | /** | ||
41 | * A new element may have type A if it already has types | ||
42 | */ | ||
43 | Map<? extends Type,TypeRefinementPrecondition> mayNewTypePreconditions | ||
44 | |||
45 | ///////////////// | ||
46 | // Old elements | ||
47 | ///////////////// | ||
48 | |||
49 | /** | ||
50 | * <b>(A,B)</b> in <b>possibleNewTypeRefinements</b>: a new element <b>x</b> can be refined to A <=> <b>x</b> has all types listed in B. | ||
51 | */ | ||
52 | Map<DefinedElement,TypeRefinementPrecondition> possibleOldTypeRefinements | ||
53 | /** | ||
54 | * A new element may have type A if it already has types | ||
55 | */ | ||
56 | Map<? extends Type,Map<DefinedElement,TypeRefinementPrecondition>> mayOldTypePreconditions | ||
57 | } | ||
58 | |||
59 | class TypeAnalysis { | ||
60 | |||
61 | def TypeAnalysisResult performTypeAnalysis(LogicProblem problem, PartialInterpretation interpretation) { | ||
62 | val viatraEngine = ViatraQueryEngine.on(new EMFScope(problem)) | ||
63 | val negativeMatcher = NewElementTypeRefinementNegativeConstraintMatcher.on(viatraEngine) | ||
64 | |||
65 | val possibleNewDynamicTypes = NewElementTypeConstructorMatcher.on(viatraEngine).allValuesOftype | ||
66 | |||
67 | val possibleNewTypeRefinementTargets = NewElementTypeRefinementTargetMatcher.on(viatraEngine).allValuesOfrefined | ||
68 | val possibleNewTypeRefinements = new ArrayList | ||
69 | for(possibleNewTypeRefinementTarget : possibleNewTypeRefinementTargets) { | ||
70 | val inhibitorTypes = negativeMatcher.getAllValuesOfinhibitor(possibleNewTypeRefinementTarget) | ||
71 | possibleNewTypeRefinements += new TypeRefinementPrecondition( | ||
72 | possibleNewTypeRefinementTarget, | ||
73 | inhibitorTypes.toList) | ||
74 | } | ||
75 | |||
76 | val possibleTypes = DontHaveDefinedSupertypeMatcher.on(viatraEngine).allValuesOftype | ||
77 | val newElementMayTypeMatcher = NewElementMayTypeNegativeConstraintMatcher.on(viatraEngine) | ||
78 | |||
79 | val mayNewTypePreconditions = possibleTypes.toInvertedMap[type | | ||
80 | val inhibitorTypes = newElementMayTypeMatcher.getAllValuesOfinhibitor(type as TypeDeclaration) | ||
81 | return new TypeRefinementPrecondition(type,inhibitorTypes.toList) | ||
82 | ] | ||
83 | |||
84 | return new TypeAnalysisResult( | ||
85 | possibleNewDynamicTypes.toList, | ||
86 | possibleNewTypeRefinements, | ||
87 | mayNewTypePreconditions, | ||
88 | emptyMap, | ||
89 | emptyMap | ||
90 | ) | ||
91 | } | ||
92 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/ContainmentIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/ContainmentIndexer.xtend new file mode 100644 index 00000000..02e58c9b --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/ContainmentIndexer.xtend | |||
@@ -0,0 +1,41 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
4 | import java.util.Collection | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
6 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | ||
7 | import java.util.Map | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
9 | |||
10 | class ContainmentIndexer { | ||
11 | val PatternGenerator base; | ||
12 | |||
13 | new(PatternGenerator base) { | ||
14 | this.base = base | ||
15 | } | ||
16 | |||
17 | def isContainmentRelation(Relation relation, LogicProblem problem) { | ||
18 | problem.containmentHierarchies.exists[it.containmentRelations.contains(relation)] | ||
19 | } | ||
20 | |||
21 | def transformContainment(LogicProblem problem, Collection<Relation> relations,Map<String,PQuery> fqn2PQuery) | ||
22 | ''' | ||
23 | private pattern mustContains2(source: DefinedElement, target: DefinedElement) { | ||
24 | find mustContains4(_,_,source,target); | ||
25 | } | ||
26 | |||
27 | private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, | ||
28 | source: DefinedElement, target: DefinedElement) | ||
29 | «FOR reference : relations.filter[isContainmentRelation(problem)] SEPARATOR 'or\n'» | ||
30 | { «base.referRelation(reference,"source","target",Modality.MUST,fqn2PQuery)» } | ||
31 | «ENDFOR» | ||
32 | |||
33 | private pattern mustTransitiveContains(source,target) { | ||
34 | find mustContains2+(source,target); | ||
35 | } | ||
36 | ''' | ||
37 | def referMustContaint(String source, String target) | ||
38 | '''find mustContains4(problem,interpretation,«source»,«target»);''' | ||
39 | def referTransitiveMustContains(String source, String target) | ||
40 | '''find mustTransitiveContains(source,target);''' | ||
41 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeIndexer.xtend new file mode 100644 index 00000000..fbbd9fb5 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeIndexer.xtend | |||
@@ -0,0 +1,194 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
5 | import org.eclipse.emf.ecore.EClass | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult | ||
9 | |||
10 | class GenericTypeIndexer implements TypeIndexer { | ||
11 | val PatternGenerator base; | ||
12 | |||
13 | new(PatternGenerator base) { | ||
14 | this.base = base | ||
15 | } | ||
16 | override requiresTypeAnalysis() { false } | ||
17 | |||
18 | public override getRequiredQueries() ''' | ||
19 | private pattern newELement(interpretation: PartialInterpretation, element: DefinedElement) { | ||
20 | PartialInterpretation.newElements(interpretation,element); | ||
21 | } | ||
22 | |||
23 | private pattern typeInterpretation(problem:LogicProblem, interpetation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialTypeInterpratation) { | ||
24 | find interpretation(problem,interpetation); | ||
25 | LogicProblem.types(problem,type); | ||
26 | PartialInterpretation.partialtypeinterpratation(interpetation,typeInterpretation); | ||
27 | PartialTypeInterpratation.interpretationOf(typeInterpretation,type); | ||
28 | } | ||
29 | |||
30 | private pattern directInstanceOf(problem:LogicProblem, interpetation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
31 | find interpretation(problem,interpetation); | ||
32 | find mustExist(problem,interpetation,element); | ||
33 | LogicProblem.types(problem,type); | ||
34 | TypeDefinition.elements(type,element); | ||
35 | } or { | ||
36 | find mustExist(problem,interpetation,element); | ||
37 | find typeInterpretation(problem,interpetation,type,typeInterpretation); | ||
38 | PartialTypeInterpratation.elements(typeInterpretation,element); | ||
39 | } | ||
40 | |||
41 | /** | ||
42 | * Direct supertypes of a type. | ||
43 | */ | ||
44 | private pattern supertypeDirect(subtype : Type, supertype : Type) { | ||
45 | Type.supertypes(subtype, supertype); | ||
46 | } | ||
47 | |||
48 | /** | ||
49 | * All supertypes of a type. | ||
50 | */ | ||
51 | private pattern supertypeStar(subtype: Type, supertype: Type) { | ||
52 | subtype == supertype; | ||
53 | } or { | ||
54 | find supertypeDirect+(subtype,supertype); | ||
55 | } | ||
56 | |||
57 | /// Complex type reasoning patterns /// | ||
58 | // | ||
59 | // In a valid type system, for each element e there is exactly one type T where | ||
60 | // 1: T(e) - but we dont know this for type declaration | ||
61 | // 2: For the dynamic type D and another type T, where D(e) && D-->T, T(e) is true. | ||
62 | // 2e: A type hierarchy is invalid, if there is a supertype T for a dynamic type D which does no contains e: | ||
63 | // D(e) && D-->T && !T(e) | ||
64 | // 3: There is no T' that T'->T and T'(e) | ||
65 | // 3e: A type hierarcy is invalid, if there is a type T for a dynamic type D, which contains e, but not subtype of T: | ||
66 | // D(e) && ![T--->D] && T(e) | ||
67 | // 4: T is not abstract | ||
68 | // Such type T is called Dynamic type of e, while other types are called static types. | ||
69 | // | ||
70 | // The following patterns checks the possible dynamic types for an element | ||
71 | |||
72 | private pattern wellformedType(problem: LogicProblem, interpretation:PartialInterpretation, dynamic:Type, element:DefinedElement) { | ||
73 | // 1: T(e) | ||
74 | find directInstanceOf(problem,interpretation,element,dynamic); | ||
75 | // 2e is not true: D(e) && D-->T && !T(e) | ||
76 | neg find dynamicTypeNotSubtypeOfADefinition(problem,interpretation,element,dynamic); | ||
77 | // 3e is not true: D(e) && ![T--->D] && T(e) | ||
78 | neg find dynamicTypeIsSubtypeOfANonDefinition(problem,interpretation,element,dynamic); | ||
79 | // 4: T is not abstract | ||
80 | Type.isAbstract(dynamic,false); | ||
81 | } | ||
82 | |||
83 | private pattern possibleDynamicType(problem: LogicProblem, interpretation:PartialInterpretation, dynamic:Type, element:DefinedElement) | ||
84 | // case 1: element is defined at least once | ||
85 | { | ||
86 | LogicProblem.types(problem,dynamic); | ||
87 | // select a random definition 'randomType' | ||
88 | find directInstanceOf(problem,interpretation,element,randomType); | ||
89 | // dynamic is a subtype of 'randomType' | ||
90 | find supertypeStar(dynamic,randomType); | ||
91 | // 2e is not true: D(e) && D-->T && !T(e) | ||
92 | neg find dynamicTypeNotSubtypeOfADefinition(problem,interpretation,element,dynamic); | ||
93 | // 3e is not true: D(e) && ![T--->D] && T(e) | ||
94 | neg find dynamicTypeIsSubtypeOfANonDefinition(problem,interpretation,element,dynamic); | ||
95 | // 4: T is not abstract | ||
96 | Type.isAbstract(dynamic,false); | ||
97 | } or | ||
98 | // case 2: element is not defined anywhere | ||
99 | { | ||
100 | find mayExist(problem,interpretation,element); | ||
101 | // there is no definition | ||
102 | neg find directInstanceOf(problem,interpretation,element,_); | ||
103 | // 2e is not true: D(e) && D-->T && !T(e) | ||
104 | // because non of the definition contains element, the type cannot have defined supertype | ||
105 | LogicProblem.types(problem,dynamic); | ||
106 | PartialInterpretation.problem(interpretation,problem); | ||
107 | neg find typeWithDefinedSupertype(dynamic); | ||
108 | // 3e is not true: D(e) && ![T--->D] && T(e) | ||
109 | // because there is no definition, dynamic covers all definition | ||
110 | // 4: T is not abstract | ||
111 | Type.isAbstract(dynamic,false); | ||
112 | } | ||
113 | |||
114 | /** | ||
115 | * supertype -------> element <------- otherSupertype | ||
116 | * A A | ||
117 | * | | | ||
118 | * wrongDynamic -----------------------------X | ||
119 | */ | ||
120 | private pattern dynamicTypeNotSubtypeOfADefinition(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, wrongDynamic : Type) { | ||
121 | find directInstanceOf(problem,interpretation,element,supertype); | ||
122 | find directInstanceOf(problem,interpretation,element,otherSupertype); | ||
123 | find supertypeStar(wrongDynamic,supertype); | ||
124 | neg find supertypeStar(wrongDynamic,otherSupertype); | ||
125 | } | ||
126 | |||
127 | /** | ||
128 | * supertype -------> element <---X--- otherSupertype | ||
129 | * A A | ||
130 | * | | | ||
131 | * wrongDynamic -----------------------------+ | ||
132 | */ | ||
133 | private pattern dynamicTypeIsSubtypeOfANonDefinition(problem: LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, wrongDynamic:Type) { | ||
134 | find directInstanceOf(problem,interpretation,element,supertype); | ||
135 | neg find elementInTypeDefinition(element,otherSupertype); | ||
136 | TypeDefinition(otherSupertype); | ||
137 | find supertypeStar(wrongDynamic, supertype); | ||
138 | find supertypeStar(wrongDynamic, otherSupertype); | ||
139 | } | ||
140 | |||
141 | private pattern elementInTypeDefinition(element:DefinedElement, definition:TypeDefinition) { | ||
142 | TypeDefinition.elements(definition,element); | ||
143 | } | ||
144 | |||
145 | private pattern typeWithDefinedSupertype(type:Type) { | ||
146 | find supertypeStar(type,definedSupertype); | ||
147 | TypeDefinition(definedSupertype); | ||
148 | } | ||
149 | ''' | ||
150 | |||
151 | public override generateInstanceOfQueries(LogicProblem problem, PartialInterpretation emptySolution,TypeAnalysisResult typeAnalysisResult) { | ||
152 | ''' | ||
153 | «FOR type:problem.types» | ||
154 | «problem.generateMustInstenceOf(type)» | ||
155 | «problem.generateMayInstanceOf(type)» | ||
156 | «ENDFOR» | ||
157 | ''' | ||
158 | } | ||
159 | |||
160 | private def patternName(Type type, Modality modality) | ||
161 | '''«modality.toString.toLowerCase»InstanceOf«base.canonizeName(type.name)»''' | ||
162 | |||
163 | private def generateMustInstenceOf(LogicProblem problem, Type type) { | ||
164 | ''' | ||
165 | /** | ||
166 | * An element must be an instance of type "«type.name»". | ||
167 | */ | ||
168 | private pattern «patternName(type,Modality.MUST)»(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
169 | Type.name(type,"«type.name»"); | ||
170 | find directInstanceOf(problem,interpretation,element,type); | ||
171 | } | ||
172 | ''' | ||
173 | } | ||
174 | |||
175 | private def generateMayInstanceOf(LogicProblem problem, Type type) { | ||
176 | ''' | ||
177 | /** | ||
178 | * An element may be an instance of type "«type.name»". | ||
179 | */ | ||
180 | private pattern «patternName(type,Modality.MAY)»(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
181 | Type.name(type,"«type.name»"); | ||
182 | find possibleDynamicType(problem,interpretation,dynamic,element); | ||
183 | find supertypeStar(dynamic,type); | ||
184 | } | ||
185 | ''' | ||
186 | } | ||
187 | |||
188 | public override referInstanceOf(Type type, Modality modality, String variableName) { | ||
189 | '''find «patternName(type,modality)»(problem,interpretation,«variableName»);''' | ||
190 | } | ||
191 | public override referInstanceOf(EClass type, Modality modality, String variableName) { | ||
192 | '''find «modality.toString.toLowerCase»InstanceOf«base.canonizeName('''class «type.name»''')»(problem,interpretation,«variableName»);''' | ||
193 | } | ||
194 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeRefinementGenerator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeRefinementGenerator.xtend new file mode 100644 index 00000000..4b7af959 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeRefinementGenerator.xtend | |||
@@ -0,0 +1,102 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.InverseRelationAssertion | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult | ||
10 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
11 | import java.util.HashMap | ||
12 | |||
13 | class GenericTypeRefinementGenerator extends TypeRefinementGenerator { | ||
14 | public new(PatternGenerator base) { | ||
15 | super(base) | ||
16 | } | ||
17 | override requiresTypeAnalysis() { false } | ||
18 | |||
19 | override generateRefineObjectQueries(LogicProblem p, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) { | ||
20 | val containment = p.containmentHierarchies.head | ||
21 | val newObjectTypes = p.types.filter(TypeDeclaration).filter[!isAbstract] | ||
22 | val inverseRelations = new HashMap | ||
23 | p.annotations.filter(InverseRelationAssertion).forEach[ | ||
24 | inverseRelations.put(it.inverseA,it.inverseB) | ||
25 | inverseRelations.put(it.inverseB,it.inverseA) | ||
26 | ] | ||
27 | return ''' | ||
28 | «FOR type:newObjectTypes» | ||
29 | «IF(containment.typesOrderedInHierarchy.contains(type))» | ||
30 | «FOR containmentRelation : containment.containmentRelations.filter[canBeContainedByRelation(it,type)]» | ||
31 | «IF inverseRelations.containsKey(containmentRelation)» | ||
32 | pattern «this.patternName(containmentRelation,inverseRelations.get(containmentRelation),type)»( | ||
33 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
34 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation ,typeInterpretation:PartialTypeInterpratation, | ||
35 | container:DefinedElement) | ||
36 | { | ||
37 | find interpretation(problem,interpretation); | ||
38 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
39 | PartialTypeInterpratation.interpretationOf.name(typeInterpretation,"«type.name»"); | ||
40 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
41 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"«containmentRelation.name»"); | ||
42 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
43 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"«inverseRelations.get(containmentRelation).name»"); | ||
44 | «base.typeIndexer.referInstanceOf((containmentRelation.parameters.get(0) as ComplexTypeReference).referred,Modality.MUST,"container")» | ||
45 | «base.typeIndexer.referInstanceOf(type,Modality.MAY,"newObject")» | ||
46 | «base.relationDeclarationIndexer.referRelation(containmentRelation as RelationDeclaration,"container","newObject",Modality.MAY)» | ||
47 | find mustExist(problem, interpretation, container); | ||
48 | neg find mustExist(problem, interpretation, newObject); | ||
49 | } | ||
50 | «ELSE» | ||
51 | pattern «this.patternName(containmentRelation,null,type)»( | ||
52 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
53 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialTypeInterpratation, | ||
54 | container:DefinedElement) | ||
55 | { | ||
56 | find interpretation(problem,interpretation); | ||
57 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
58 | PartialTypeInterpratation.interpretationOf.name(typeInterpretation,"«type.name»"); | ||
59 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
60 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"«containmentRelation.name»"); | ||
61 | «base.typeIndexer.referInstanceOf((containmentRelation.parameters.get(0) as ComplexTypeReference).referred,Modality.MUST,"container")» | ||
62 | «base.typeIndexer.referInstanceOf(type,Modality.MAY,"newObject")» | ||
63 | «base.relationDeclarationIndexer.referRelation(containmentRelation as RelationDeclaration,"container","newObject",Modality.MAY)» | ||
64 | find mustExist(problem, interpretation, container); | ||
65 | neg find mustExist(problem, interpretation, newObject); | ||
66 | } | ||
67 | «ENDIF» | ||
68 | «ENDFOR» | ||
69 | «ELSE» | ||
70 | pattern createObject_«this.patternName(null,null,type)»( | ||
71 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
72 | typeInterpretation:PartialTypeInterpratation) | ||
73 | { | ||
74 | find interpretation(problem,interpretation); | ||
75 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
76 | PartialTypeInterpratation.interpretationOf.name(type,"«type.name»"); | ||
77 | «base.typeIndexer.referInstanceOf(type,Modality.MAY,"newObject")» | ||
78 | find mayExist(problem, interpretation, newObject); | ||
79 | neg find mustExist(problem, interpretation, newObject); | ||
80 | } | ||
81 | «ENDIF» | ||
82 | «ENDFOR» | ||
83 | ''' | ||
84 | } | ||
85 | |||
86 | override generateRefineTypeQueries(LogicProblem p, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) { | ||
87 | return ''' | ||
88 | «FOR type : p.types.filter(TypeDeclaration).filter[!it.isAbstract]» | ||
89 | pattern refineTypeTo_«base.canonizeName(type.name)»(problem:LogicProblem, interpretation:PartialInterpretation, object: DefinedElement) { | ||
90 | find interpretation(problem,interpretation); | ||
91 | find mustExist(problem, interpretation, object); | ||
92 | «base.typeIndexer.referInstanceOf(type,Modality.MAY,"object")» | ||
93 | neg «base.typeIndexer.referInstanceOf(type,Modality.MUST,"object")» | ||
94 | } | ||
95 | «ENDFOR» | ||
96 | ''' | ||
97 | } | ||
98 | |||
99 | override getRefineTypeQueryNames(LogicProblem p, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) { | ||
100 | p.types.filter(TypeDeclaration).toInvertedMap['''refineTypeTo_«base.canonizeName(it.name)»'''] | ||
101 | } | ||
102 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/InvalidIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/InvalidIndexer.xtend new file mode 100644 index 00000000..d9ede2a8 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/InvalidIndexer.xtend | |||
@@ -0,0 +1,53 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
4 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransformedViatraWellformednessConstraint | ||
5 | import java.util.Map | ||
6 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | ||
7 | |||
8 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.lookup | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition | ||
10 | import java.util.LinkedHashMap | ||
11 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
12 | |||
13 | class InvalidIndexer { | ||
14 | val PatternGenerator patternGenerator | ||
15 | |||
16 | public new(PatternGenerator patternGenerator) { | ||
17 | this.patternGenerator = patternGenerator | ||
18 | } | ||
19 | |||
20 | public def getWFQueryName(RelationDefinition query) '''invalidWFQuery_«patternGenerator.canonizeName(query.name)»''' | ||
21 | |||
22 | public def generateInvalidatedByWfQueries(LogicProblem problem, Map<String,PQuery> fqn2PQuery) { | ||
23 | val wfQueries = problem.assertions.map[it.annotations] | ||
24 | .flatten | ||
25 | .filter(TransformedViatraWellformednessConstraint) | ||
26 | .map[it.query] | ||
27 | ''' | ||
28 | «FOR wfQuery: wfQueries» | ||
29 | pattern invalidatedBy_«patternGenerator.canonizeName(wfQuery.target.name)»(problem:LogicProblem, interpretation:PartialInterpretation, | ||
30 | «FOR param : wfQuery.patternFullyQualifiedName.lookup(fqn2PQuery).parameters SEPARATOR ', '»var_«param.name»«ENDFOR») | ||
31 | { | ||
32 | «patternGenerator.relationDefinitionIndexer.referPattern( | ||
33 | wfQuery.patternFullyQualifiedName.lookup(fqn2PQuery), | ||
34 | wfQuery.patternFullyQualifiedName.lookup(fqn2PQuery).parameters.map['''var_«it.name»'''], | ||
35 | Modality.MUST, | ||
36 | true,false)» | ||
37 | } | ||
38 | «ENDFOR» | ||
39 | ''' | ||
40 | } | ||
41 | |||
42 | public def getInvalidateByWfQueryNames(LogicProblem problem) { | ||
43 | val wfQueries = problem.assertions.map[it.annotations] | ||
44 | .flatten | ||
45 | .filter(TransformedViatraWellformednessConstraint) | ||
46 | .map[it.query] | ||
47 | val map = new LinkedHashMap | ||
48 | for(wfQuery : wfQueries) { | ||
49 | map.put(wfQuery.target, '''invalidatedBy_«patternGenerator.canonizeName(wfQuery.target.name)»''') | ||
50 | } | ||
51 | return map | ||
52 | } | ||
53 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend new file mode 100644 index 00000000..291b605b --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend | |||
@@ -0,0 +1,244 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition | ||
5 | import java.util.Map | ||
6 | import org.eclipse.emf.ecore.EReference | ||
7 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | ||
8 | import org.eclipse.xtend.lib.annotations.Accessors | ||
9 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery | ||
10 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
12 | import org.eclipse.emf.ecore.EAttribute | ||
13 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
14 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeInferenceMethod | ||
16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult | ||
17 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.LowerMultiplicityAssertion | ||
18 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransformedViatraWellformednessConstraint | ||
19 | import java.util.HashMap | ||
20 | import java.util.HashSet | ||
21 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.InverseRelationAssertion | ||
22 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
23 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.DefinedByDerivedFeature | ||
24 | |||
25 | class PatternGenerator { | ||
26 | @Accessors(PUBLIC_GETTER) val TypeIndexer typeIndexer //= new TypeIndexer(this) | ||
27 | @Accessors(PUBLIC_GETTER) val RelationDeclarationIndexer relationDeclarationIndexer = new RelationDeclarationIndexer(this) | ||
28 | @Accessors(PUBLIC_GETTER) val RelationDefinitionIndexer relationDefinitionIndexer = new RelationDefinitionIndexer(this) | ||
29 | @Accessors(PUBLIC_GETTER) val ContainmentIndexer containmentIndexer = new ContainmentIndexer(this) | ||
30 | @Accessors(PUBLIC_GETTER) val InvalidIndexer invalidIndexer = new InvalidIndexer(this) | ||
31 | @Accessors(PUBLIC_GETTER) val UnfinishedIndexer unfinishedIndexer = new UnfinishedIndexer(this) | ||
32 | @Accessors(PUBLIC_GETTER) val TypeRefinementGenerator typeRefinementGenerator //= new RefinementGenerator(this) | ||
33 | @Accessors(PUBLIC_GETTER) val RelationRefinementGenerator relationRefinementGenerator = new RelationRefinementGenerator(this) | ||
34 | |||
35 | public new(TypeInferenceMethod typeInferenceMethod) { | ||
36 | if(typeInferenceMethod == TypeInferenceMethod.Generic) { | ||
37 | this.typeIndexer = new GenericTypeIndexer(this) | ||
38 | this.typeRefinementGenerator = new GenericTypeRefinementGenerator(this) | ||
39 | } else if(typeInferenceMethod == TypeInferenceMethod.PreliminaryAnalysis) { | ||
40 | this.typeIndexer = new TypeIndexerWithPreliminaryTypeAnalysis(this) | ||
41 | this.typeRefinementGenerator = new TypeRefinementWithPreliminaryTypeAnalysis(this) | ||
42 | } else { | ||
43 | this.typeIndexer = null | ||
44 | this.typeRefinementGenerator = null | ||
45 | throw new IllegalArgumentException('''Unknown type indexing technique : «typeInferenceMethod.name»''') | ||
46 | } | ||
47 | } | ||
48 | |||
49 | public def requiresTypeAnalysis() { | ||
50 | typeIndexer.requiresTypeAnalysis || typeRefinementGenerator.requiresTypeAnalysis | ||
51 | } | ||
52 | |||
53 | public dispatch def referRelation( | ||
54 | RelationDeclaration referred, | ||
55 | String sourceVariable, | ||
56 | String targetVariable, | ||
57 | Modality modality, | ||
58 | Map<String,PQuery> fqn2PQuery) | ||
59 | { | ||
60 | return this.relationDeclarationIndexer.referRelation(referred,sourceVariable,targetVariable,modality) | ||
61 | } | ||
62 | public dispatch def referRelation( | ||
63 | RelationDefinition referred, | ||
64 | String sourceVariable, | ||
65 | String targetVariable, | ||
66 | Modality modality, | ||
67 | Map<String,PQuery> fqn2PQuery) | ||
68 | { | ||
69 | val pattern = referred.annotations.filter(TransfomedViatraQuery).head.patternFullyQualifiedName.lookup(fqn2PQuery) | ||
70 | return this.relationDefinitionIndexer.referPattern(pattern,#[sourceVariable,targetVariable],modality,true,false) | ||
71 | } | ||
72 | |||
73 | def public referRelationByName(EReference reference, | ||
74 | String sourceVariable, | ||
75 | String targetVariable, | ||
76 | Modality modality) | ||
77 | { | ||
78 | '''find «modality.name.toLowerCase»InRelation«canonizeName('''inreference «reference.name» «reference.EContainingClass.name»''') | ||
79 | »(problem,interpretation,«sourceVariable»,«targetVariable»);''' | ||
80 | } | ||
81 | |||
82 | def public CharSequence referAttributeByName(EAttribute attribute, | ||
83 | String sourceVariable, | ||
84 | String targetVariable, | ||
85 | Modality modality) | ||
86 | { | ||
87 | throw new UnsupportedOperationException | ||
88 | } | ||
89 | |||
90 | public def canonizeName(String name) { | ||
91 | name.split(' ').join('_') | ||
92 | } | ||
93 | |||
94 | public def lowerMultiplicities(LogicProblem problem) { | ||
95 | problem.assertions.map[annotations].flatten.filter(LowerMultiplicityAssertion).filter[!it.relation.isDerived] | ||
96 | } | ||
97 | public def wfQueries(LogicProblem problem) { | ||
98 | problem.assertions.map[it.annotations] | ||
99 | .flatten | ||
100 | .filter(TransformedViatraWellformednessConstraint) | ||
101 | .map[it.query] | ||
102 | } | ||
103 | public def getContainments(LogicProblem p) { | ||
104 | return p.containmentHierarchies.head.containmentRelations | ||
105 | } | ||
106 | public def getInverseRelations(LogicProblem p) { | ||
107 | val inverseRelations = new HashMap | ||
108 | p.annotations.filter(InverseRelationAssertion).forEach[ | ||
109 | inverseRelations.put(it.inverseA,it.inverseB) | ||
110 | inverseRelations.put(it.inverseB,it.inverseA) | ||
111 | ] | ||
112 | return inverseRelations | ||
113 | } | ||
114 | public def isRepresentative(Relation relation, Relation inverse) { | ||
115 | if(inverse == null) { | ||
116 | return true | ||
117 | } else { | ||
118 | relation.name.compareTo(inverse.name)<1 | ||
119 | } | ||
120 | } | ||
121 | |||
122 | public def isDerived(Relation relation) { | ||
123 | relation.annotations.exists[it instanceof DefinedByDerivedFeature] | ||
124 | } | ||
125 | public def getDerivedDefinition(RelationDeclaration relation) { | ||
126 | relation.annotations.filter(DefinedByDerivedFeature).head.query | ||
127 | } | ||
128 | |||
129 | public def transformBaseProperties( | ||
130 | LogicProblem problem, | ||
131 | PartialInterpretation emptySolution, | ||
132 | Map<String,PQuery> fqn2PQuery, | ||
133 | TypeAnalysisResult typeAnalysisResult | ||
134 | ) { | ||
135 | |||
136 | return ''' | ||
137 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
138 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" | ||
139 | import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" | ||
140 | |||
141 | ////////// | ||
142 | // 0. Util | ||
143 | ////////// | ||
144 | private pattern interpretation(problem:LogicProblem, interpetation:PartialInterpretation) { | ||
145 | PartialInterpretation.problem(interpetation,problem); | ||
146 | } | ||
147 | |||
148 | ///////////////////////// | ||
149 | // 0.1 Existance | ||
150 | ///////////////////////// | ||
151 | private pattern mustExist(problem:LogicProblem, interpetation:PartialInterpretation, element:DefinedElement) { | ||
152 | find interpretation(problem,interpetation); | ||
153 | LogicProblem.elements(problem,element); | ||
154 | } or { | ||
155 | find interpretation(problem,interpetation); | ||
156 | PartialInterpretation.newElements(interpetation,element); | ||
157 | } | ||
158 | |||
159 | private pattern mayExist(problem:LogicProblem, interpetation:PartialInterpretation, element:DefinedElement) { | ||
160 | find mustExist(problem,interpetation,element); | ||
161 | } or { | ||
162 | find interpretation(problem,interpetation); | ||
163 | neg find closeWorld(interpetation); | ||
164 | PartialInterpretation.openWorldElementPrototype(interpetation,element); | ||
165 | } | ||
166 | |||
167 | private pattern closeWorld(interpetation:PartialInterpretation) { | ||
168 | PartialInterpretation.maxNewElements(interpetation,0); | ||
169 | } | ||
170 | |||
171 | //////////////////////// | ||
172 | // 0.2 Equivalence | ||
173 | //////////////////////// | ||
174 | pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { | ||
175 | find mayExist(problem,interpretation,a); | ||
176 | find mayExist(problem,interpretation,b); | ||
177 | a == b; | ||
178 | } | ||
179 | |||
180 | //////////////////////// | ||
181 | // 0.3 Required Patterns by TypeIndexer | ||
182 | //////////////////////// | ||
183 | «typeIndexer.requiredQueries» | ||
184 | |||
185 | ////////// | ||
186 | // 1. Problem-Specific Base Indexers | ||
187 | ////////// | ||
188 | // 1.1 Type Indexers | ||
189 | ////////// | ||
190 | «typeIndexer.generateInstanceOfQueries(problem,emptySolution,typeAnalysisResult)» | ||
191 | |||
192 | ////////// | ||
193 | // 1.2 Relation Declaration Indexers | ||
194 | ////////// | ||
195 | «relationDeclarationIndexer.generateRelationIndexers(problem,problem.relations.filter(RelationDeclaration),fqn2PQuery)» | ||
196 | |||
197 | ////////// | ||
198 | // 1.3 Relation Definition Indexers | ||
199 | ////////// | ||
200 | «relationDefinitionIndexer.generateRelationDefinitions(problem,problem.relations.filter(RelationDefinition),fqn2PQuery)» | ||
201 | |||
202 | ////////// | ||
203 | // 1.4 Containment Indexer | ||
204 | ////////// | ||
205 | «containmentIndexer.transformContainment(problem,problem.relations,fqn2PQuery)» | ||
206 | |||
207 | ////////// | ||
208 | // 2. Invalidation Indexers | ||
209 | ////////// | ||
210 | // 2.1 Invalidated by WF Queries | ||
211 | ////////// | ||
212 | «invalidIndexer.generateInvalidatedByWfQueries(problem,fqn2PQuery)» | ||
213 | |||
214 | ////////// | ||
215 | // 3. Unfinishedness Indexers | ||
216 | ////////// | ||
217 | // 3.1 Unfinishedness Measured by Multiplicity | ||
218 | ////////// | ||
219 | «unfinishedIndexer.generateUnfinishedMultiplicityQueries(problem,fqn2PQuery)» | ||
220 | |||
221 | ////////// | ||
222 | // 3.2 Unfinishedness Measured by WF Queries | ||
223 | ////////// | ||
224 | «unfinishedIndexer.generateUnfinishedWfQueries(problem,fqn2PQuery)» | ||
225 | |||
226 | ////////// | ||
227 | // 4. Refinement Indexers | ||
228 | ////////// | ||
229 | // 4.1 Object constructors | ||
230 | ////////// | ||
231 | «typeRefinementGenerator.generateRefineObjectQueries(problem,emptySolution,typeAnalysisResult)» | ||
232 | |||
233 | ////////// | ||
234 | // 4.2 Type refinement | ||
235 | ////////// | ||
236 | «typeRefinementGenerator.generateRefineTypeQueries(problem,emptySolution,typeAnalysisResult)» | ||
237 | |||
238 | ////////// | ||
239 | // 4.3 Relation refinement | ||
240 | ////////// | ||
241 | «relationRefinementGenerator.generateRefineReference(problem)» | ||
242 | ''' | ||
243 | } | ||
244 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend new file mode 100644 index 00000000..dac5630b --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend | |||
@@ -0,0 +1,96 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationStatistics | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysis | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult | ||
10 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeInferenceMethod | ||
11 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.util.ParseUtil | ||
12 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
13 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace | ||
14 | import java.util.Map | ||
15 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | ||
16 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification | ||
17 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | ||
18 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | ||
19 | import org.eclipse.xtend.lib.annotations.Data | ||
20 | |||
21 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
22 | |||
23 | @Data class GeneratedPatterns { | ||
24 | public Map<Relation, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> invalidWFQueries | ||
25 | public Map<Relation, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> unfinishedWFQueries | ||
26 | public Map<Relation, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> unfinishedMulticiplicityQueries | ||
27 | public Map<ObjectCreationPrecondition, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> refineObjectQueries | ||
28 | public Map<? extends Type, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> refineTypeQueries | ||
29 | public Map<Pair<RelationDeclaration, Relation>, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> refinerelationQueries | ||
30 | } | ||
31 | |||
32 | class PatternProvider { | ||
33 | val ParseUtil parseUtil = new ParseUtil | ||
34 | val TypeAnalysis typeAnalysis = new TypeAnalysis | ||
35 | |||
36 | public def generateQueries( | ||
37 | LogicProblem problem, | ||
38 | PartialInterpretation emptySolution, | ||
39 | ModelGenerationStatistics statistics, | ||
40 | Iterable<PQuery> existingQueries, | ||
41 | ReasonerWorkspace workspace, | ||
42 | TypeInferenceMethod typeInferenceMethod | ||
43 | ) { | ||
44 | val fqn2Query = existingQueries.toMap[it.fullyQualifiedName] | ||
45 | val PatternGenerator patternGenerator = new PatternGenerator(typeInferenceMethod) | ||
46 | val typeAnalysisResult = if(patternGenerator.requiresTypeAnalysis) { | ||
47 | val startTime = System.nanoTime | ||
48 | val result = typeAnalysis.performTypeAnalysis(problem,emptySolution) | ||
49 | val typeAnalysisTime = System.nanoTime - startTime | ||
50 | statistics.PreliminaryTypeAnalisisTime = typeAnalysisTime | ||
51 | result | ||
52 | } else { | ||
53 | null | ||
54 | } | ||
55 | val baseIndexerFile = patternGenerator.transformBaseProperties(problem,emptySolution,fqn2Query,typeAnalysisResult) | ||
56 | writeQueries(baseIndexerFile,"GeneratedQueries",workspace) | ||
57 | val generatedQueries = parseUtil.parse(baseIndexerFile) | ||
58 | val runtimeQueries = calclulateRuntimeQueries(patternGenerator,problem,emptySolution,typeAnalysisResult,generatedQueries); | ||
59 | return runtimeQueries | ||
60 | } | ||
61 | |||
62 | private def writeQueries(CharSequence content, String name,ReasonerWorkspace workspace) { | ||
63 | if(workspace!=null) { | ||
64 | workspace.writeText('''«name».vql_deactivated''',content) | ||
65 | } | ||
66 | } | ||
67 | |||
68 | private def GeneratedPatterns calclulateRuntimeQueries( | ||
69 | PatternGenerator patternGenerator, | ||
70 | LogicProblem problem, | ||
71 | PartialInterpretation emptySolution, | ||
72 | TypeAnalysisResult typeAnalysisResult, | ||
73 | Map<String, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> queries | ||
74 | ) { | ||
75 | val Map<Relation, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> | ||
76 | invalidWFQueries = patternGenerator.invalidIndexer.getInvalidateByWfQueryNames(problem).mapValues[it.lookup(queries)] | ||
77 | val Map<Relation, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> | ||
78 | unfinishedWFQueries = patternGenerator.unfinishedIndexer.getUnfinishedWFQueryNames(problem).mapValues[it.lookup(queries)] | ||
79 | val Map<Relation, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> | ||
80 | unfinishedMultiplicityQueries = patternGenerator.unfinishedIndexer.getUnfinishedMultiplicityQueries(problem).mapValues[it.lookup(queries)] | ||
81 | val Map<ObjectCreationPrecondition, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> | ||
82 | refineObjectsQueries = patternGenerator.typeRefinementGenerator.getRefineObjectQueryNames(problem,emptySolution,typeAnalysisResult).mapValues[it.lookup(queries)] | ||
83 | val Map<? extends Type, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> | ||
84 | refineTypeQueries = patternGenerator.typeRefinementGenerator.getRefineTypeQueryNames(problem,emptySolution,typeAnalysisResult).mapValues[it.lookup(queries)] | ||
85 | val Map<Pair<RelationDeclaration, Relation>, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> | ||
86 | refineRelationQueries = patternGenerator.relationRefinementGenerator.getRefineRelationQueries(problem).mapValues[it.lookup(queries)] | ||
87 | return new GeneratedPatterns( | ||
88 | invalidWFQueries, | ||
89 | unfinishedWFQueries, | ||
90 | unfinishedMultiplicityQueries, | ||
91 | refineObjectsQueries, | ||
92 | refineTypeQueries, | ||
93 | refineRelationQueries | ||
94 | ) | ||
95 | } | ||
96 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDeclarationIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDeclarationIndexer.xtend new file mode 100644 index 00000000..e6d92cc6 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDeclarationIndexer.xtend | |||
@@ -0,0 +1,154 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.UpperMultiplicityAssertion | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeReference | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
10 | import java.util.HashMap | ||
11 | import java.util.List | ||
12 | import java.util.Map | ||
13 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | ||
14 | |||
15 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
16 | |||
17 | class RelationDeclarationIndexer { | ||
18 | val PatternGenerator base; | ||
19 | |||
20 | new(PatternGenerator base) { | ||
21 | this.base = base | ||
22 | } | ||
23 | |||
24 | public def generateRelationIndexers(LogicProblem problem, Iterable<RelationDeclaration> relations, Map<String,PQuery> fqn2PQuery) { | ||
25 | val upperMultiplicities = new HashMap | ||
26 | problem.annotations.filter(UpperMultiplicityAssertion).forEach[ | ||
27 | upperMultiplicities.put(it.relation,it.upper) | ||
28 | ] | ||
29 | |||
30 | return ''' | ||
31 | «FOR relation : relations» | ||
32 | «IF base.isDerived(relation)» | ||
33 | «generateDerivedMustRelation(problem,relation,base.getDerivedDefinition(relation).patternFullyQualifiedName.lookup(fqn2PQuery))» | ||
34 | «generateDerivedMayRelation(problem,relation,base.getDerivedDefinition(relation).patternFullyQualifiedName.lookup(fqn2PQuery))» | ||
35 | «ELSE» | ||
36 | «generateMustRelation(problem,relation)» | ||
37 | «generateMayRelation(problem,relation,upperMultiplicities,base.getContainments(problem),base.getInverseRelations(problem),fqn2PQuery)» | ||
38 | «ENDIF» | ||
39 | «ENDFOR» | ||
40 | ''' | ||
41 | } | ||
42 | |||
43 | def private patternName(RelationDeclaration r, Modality modality) { | ||
44 | '''«modality.name.toLowerCase»InRelation«base.canonizeName(r.name)»''' | ||
45 | } | ||
46 | |||
47 | public def referRelation( | ||
48 | RelationDeclaration referred, | ||
49 | String sourceVariable, | ||
50 | String targetVariable, | ||
51 | Modality modality) | ||
52 | '''find «referred.patternName(modality)»(problem,interpretation,«sourceVariable»,«targetVariable»);''' | ||
53 | |||
54 | def generateMustRelation(LogicProblem problem, RelationDeclaration relation) ''' | ||
55 | /** | ||
56 | * Matcher for detecting tuples t where []«relation.name»(source,target) | ||
57 | */ | ||
58 | private pattern «relation.patternName(Modality.MUST)»( | ||
59 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
60 | source: DefinedElement, target:DefinedElement) | ||
61 | { | ||
62 | find interpretation(problem,interpretation); | ||
63 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
64 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"«relation.name»"); | ||
65 | PartialRelationInterpretation.relationlinks(relationIterpretation,link); | ||
66 | BinaryElementRelationLink.param1(link,source); | ||
67 | BinaryElementRelationLink.param2(link,target); | ||
68 | } | ||
69 | ''' | ||
70 | def generateMayRelation(LogicProblem problem, RelationDeclaration relation, | ||
71 | Map<Relation, Integer> upperMultiplicities, | ||
72 | List<Relation> containments, | ||
73 | HashMap<Relation, Relation> inverseRelations, | ||
74 | Map<String,PQuery> fqn2PQuery) | ||
75 | { | ||
76 | return ''' | ||
77 | /** | ||
78 | * Matcher for detecting tuples t where <>«relation.name»(source,target) | ||
79 | */ | ||
80 | private pattern «relation.patternName(Modality.MAY)»( | ||
81 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
82 | source: DefinedElement, target:DefinedElement) | ||
83 | { | ||
84 | find interpretation(problem,interpretation); | ||
85 | // The two endpoint of the link have to exist | ||
86 | find mayExist(problem, interpretation, source); | ||
87 | find mayExist(problem, interpretation, target); | ||
88 | // Type consistency | ||
89 | «transformTypeConsistency(relation.parameters.get(0),"source")» | ||
90 | «transformTypeConsistency(relation.parameters.get(1),"target")» | ||
91 | «IF upperMultiplicities.containsKey(relation)» | ||
92 | // There are "numberOfExistingReferences" currently existing instances of the reference from the source, | ||
93 | // the upper bound of the multiplicity should be considered. | ||
94 | numberOfExistingReferences == count «referRelation(relation,"source","_",Modality.MUST)» | ||
95 | check(numberOfExistingReferences < «upperMultiplicities.get(relation)»); | ||
96 | «ENDIF» | ||
97 | «IF inverseRelations.containsKey(relation) && upperMultiplicities.containsKey(inverseRelations.get(relation))» | ||
98 | // There are "numberOfExistingReferences" currently existing instances of the reference to the target, | ||
99 | // the upper bound of the opposite reference multiplicity should be considered. | ||
100 | numberOfExistingOppositeReferences == count «base.referRelation(inverseRelations.get(relation),"target","_",Modality.MUST,fqn2PQuery)» | ||
101 | check(numberOfExistingOppositeReferences < «upperMultiplicities.get(inverseRelations.get(relation))»); | ||
102 | «ENDIF» | ||
103 | «IF containments.contains(relation)» | ||
104 | // The reference is containment, then a new reference cannot be create if: | ||
105 | // 1. Multiple parents | ||
106 | neg «base.containmentIndexer.referMustContaint("_","target")» | ||
107 | // 2. Circle in the containment hierarchy | ||
108 | neg «base.containmentIndexer.referTransitiveMustContains("target","source")» | ||
109 | «ENDIF» | ||
110 | «IF inverseRelations.containsKey(relation) && containments.contains(inverseRelations.get(relation))» | ||
111 | // The eOpposite of the reference is containment, then a referene cannot be created if | ||
112 | // 1. Multiple parents | ||
113 | neg «base.containmentIndexer.referMustContaint("source","_")» | ||
114 | // 2. Circle in the containment hierarchy | ||
115 | neg «base.containmentIndexer.referTransitiveMustContains("source","target")» | ||
116 | «ENDIF» | ||
117 | } or { | ||
118 | «relation.referRelation("source","target",Modality.MUST)» | ||
119 | } | ||
120 | ''' | ||
121 | } | ||
122 | |||
123 | def generateDerivedMustRelation(LogicProblem problem, RelationDeclaration relation, PQuery definition) ''' | ||
124 | /** | ||
125 | * Matcher for detecting tuples t where []«relation.name»(source,target) | ||
126 | */ | ||
127 | private pattern «relation.patternName(Modality.MUST)»( | ||
128 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
129 | source: DefinedElement, target:DefinedElement) | ||
130 | { | ||
131 | «base.relationDefinitionIndexer.referPattern(definition,#["source","target"],Modality::MUST,true,false)» | ||
132 | } | ||
133 | ''' | ||
134 | def generateDerivedMayRelation(LogicProblem problem, RelationDeclaration relation, PQuery definition) ''' | ||
135 | /** | ||
136 | * Matcher for detecting tuples t where []«relation.name»(source,target) | ||
137 | */ | ||
138 | private pattern «relation.patternName(Modality.MAY)»( | ||
139 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
140 | source: DefinedElement, target:DefinedElement) | ||
141 | { | ||
142 | «base.relationDefinitionIndexer.referPattern(definition,#["source","target"],Modality::MAY,true,false)» | ||
143 | } | ||
144 | ''' | ||
145 | |||
146 | protected def CharSequence transformTypeConsistency(TypeReference reference, String name) { | ||
147 | if(reference instanceof ComplexTypeReference) { | ||
148 | this.base.typeIndexer.referInstanceOf(reference.referred,Modality.MAY,name) | ||
149 | } else { | ||
150 | return '''// Primitive type of «name» is already enforced''' | ||
151 | } | ||
152 | |||
153 | } | ||
154 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend new file mode 100644 index 00000000..7792eccb --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend | |||
@@ -0,0 +1,185 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
5 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery | ||
6 | import java.util.Map | ||
7 | import org.eclipse.emf.ecore.EAttribute | ||
8 | import org.eclipse.emf.ecore.EReference | ||
9 | import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey | ||
10 | import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey | ||
11 | import org.eclipse.viatra.query.runtime.matchers.psystem.PConstraint | ||
12 | import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable | ||
13 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality | ||
14 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter | ||
15 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality | ||
16 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall | ||
17 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.BinaryTransitiveClosure | ||
18 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue | ||
19 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall | ||
20 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint | ||
21 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | ||
22 | |||
23 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
24 | import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey | ||
25 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
26 | |||
27 | class RelationDefinitionIndexer { | ||
28 | val PatternGenerator base; | ||
29 | |||
30 | new(PatternGenerator base) { | ||
31 | this.base = base | ||
32 | } | ||
33 | |||
34 | public def generateRelationDefinitions( | ||
35 | LogicProblem problem, | ||
36 | Iterable<RelationDefinition> relations, | ||
37 | Map<String,PQuery> fqn2PQuery) { | ||
38 | val relation2PQuery = relations.toInvertedMap[ | ||
39 | annotations.filter(TransfomedViatraQuery).head.patternFullyQualifiedName.lookup(fqn2PQuery) | ||
40 | ] | ||
41 | |||
42 | return ''' | ||
43 | «FOR relation : relations» | ||
44 | // Must, May and Current queries for «relation.name» | ||
45 | «relation.transformPattern(relation.lookup(relation2PQuery), Modality.MUST)» | ||
46 | «relation.transformPattern(relation.lookup(relation2PQuery), Modality.MAY)» | ||
47 | «relation.transformPattern(relation.lookup(relation2PQuery), Modality.CURRENT)» | ||
48 | «ENDFOR» | ||
49 | ''' | ||
50 | } | ||
51 | |||
52 | private def relationDefinitionName(RelationDefinition relation, Modality modality) | ||
53 | '''«modality.name.toLowerCase»InRelation_«base.canonizeName(relation.name)»''' | ||
54 | |||
55 | private def canonizeName(PVariable v) { | ||
56 | return '''«IF v.referringConstraints.size == 1»_«ENDIF»var_«v.name.replaceAll("\\W","")»''' | ||
57 | } | ||
58 | |||
59 | private def transformPattern(RelationDefinition relation, PQuery p, Modality modality) { | ||
60 | try { | ||
61 | return ''' | ||
62 | private pattern «relationDefinitionName(relation,modality)»( | ||
63 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
64 | «FOR param : p.parameters SEPARATOR ', '»var_«param.name»«ENDFOR») | ||
65 | «FOR body : p.disjunctBodies.bodies SEPARATOR "or"»{ | ||
66 | find interpretation(problem,interpretation); | ||
67 | «FOR constraint : body.constraints» | ||
68 | «constraint.transformConstraint(modality)» | ||
69 | «ENDFOR» | ||
70 | }«ENDFOR» | ||
71 | ''' | ||
72 | } catch(UnsupportedOperationException e) { | ||
73 | throw new UnsupportedOperationException('''Can not transform pattern "«p.fullyQualifiedName»"!''',e) | ||
74 | } | ||
75 | } | ||
76 | |||
77 | private def toMustMay(Modality modality) { | ||
78 | if(modality == Modality::MAY) return Modality::MAY | ||
79 | else return Modality::MUST | ||
80 | } | ||
81 | |||
82 | def public referPattern(PQuery p, String[] variables, Modality modality, boolean positive, boolean transitive) ''' | ||
83 | «IF !positive»neg «ENDIF»find «modality.name.toLowerCase»InRelation_pattern_«p.fullyQualifiedName.replace('.','_')»«IF transitive»+«ENDIF»(problem,interpretation,«variables.join(',')»); | ||
84 | ''' | ||
85 | |||
86 | private dispatch def transformConstraint(TypeConstraint constraint, Modality modality) { | ||
87 | val touple = constraint.variablesTuple | ||
88 | if(touple.size == 1) { | ||
89 | val inputKey = constraint.equivalentJudgement.inputKey | ||
90 | if(inputKey instanceof EClassTransitiveInstancesKey) { | ||
91 | return base.typeIndexer.referInstanceOf(inputKey.emfKey,modality.toMustMay, | ||
92 | constraint.getVariableInTuple(0).canonizeName) | ||
93 | } else if(inputKey instanceof EDataTypeInSlotsKey){ | ||
94 | return '''// type constraint is enforced by construction''' | ||
95 | } | ||
96 | |||
97 | } else if(touple.size == 2){ | ||
98 | val key = (constraint.equivalentJudgement.inputKey as EStructuralFeatureInstancesKey).emfKey | ||
99 | if(key instanceof EReference) { | ||
100 | return base.referRelationByName( | ||
101 | key, | ||
102 | constraint.getVariableInTuple(0).canonizeName, | ||
103 | constraint.getVariableInTuple(1).canonizeName, | ||
104 | modality.toMustMay) | ||
105 | } else if (key instanceof EAttribute) { | ||
106 | return '''// attribute reference omitted'''//base.referRelationByName() | ||
107 | } else throw new UnsupportedOperationException('''unknown key: «key.class»''') | ||
108 | } else { | ||
109 | throw new UnsupportedOperationException() | ||
110 | } | ||
111 | } | ||
112 | |||
113 | private dispatch def transformConstraint(Equality equality, Modality modality) { | ||
114 | val a = equality.who | ||
115 | val b = equality.withWhom | ||
116 | transformEquality(modality.toMustMay, a, b) | ||
117 | } | ||
118 | |||
119 | private def CharSequence transformEquality(Modality modality, PVariable a, PVariable b) { | ||
120 | if(modality.isMustOrCurrent) '''«a.canonizeName» == «b.canonizeName»;''' | ||
121 | else '''find mayEquivalent(problem, interpretation, «a.canonizeName», «b.canonizeName»);''' | ||
122 | } | ||
123 | |||
124 | private dispatch def transformConstraint(Inequality inequality, Modality modality) { | ||
125 | val a = inequality.who | ||
126 | val b = inequality.withWhom | ||
127 | if(modality.isCurrent) { | ||
128 | return '''«a.canonizeName» != «b.canonizeName»;''' | ||
129 | } else if(modality.isMust) { | ||
130 | return '''neg find mayEquivalent(problem, interpretation, «a.canonizeName», «b.canonizeName»);''' | ||
131 | } else { | ||
132 | return '''«a.canonizeName» != «b.canonizeName»;''' | ||
133 | } | ||
134 | } | ||
135 | |||
136 | private dispatch def transformConstraint(NegativePatternCall pcall, Modality modality) { | ||
137 | val params = (0..<pcall.actualParametersTuple.size).map[index | | ||
138 | val variable = pcall.actualParametersTuple.get(index) as PVariable | ||
139 | return variable.canonizeName | ||
140 | ] | ||
141 | return referPattern(pcall.referredQuery,params,modality.dual,false,false) | ||
142 | } | ||
143 | |||
144 | private dispatch def transformConstraint(PositivePatternCall pcall, Modality modality) { | ||
145 | val params = (0..<pcall.variablesTuple.size).map[index | | ||
146 | val variable = pcall.variablesTuple.get(index) as PVariable | ||
147 | return variable.canonizeName | ||
148 | ] | ||
149 | return referPattern(pcall.referredQuery,params,modality,true,false) | ||
150 | } | ||
151 | private dispatch def transformConstraint(BinaryTransitiveClosure pcall, Modality modality) { | ||
152 | val params = (0..1).map[index | | ||
153 | val variable = pcall.getVariableInTuple(index) as PVariable | ||
154 | return variable.canonizeName | ||
155 | ] | ||
156 | return referPattern(pcall.referredQuery,params,modality,true,true) | ||
157 | } | ||
158 | private dispatch def transformConstraint(ExportedParameter e, Modality modality) { | ||
159 | return '''// «e.parameterName» is exported''' | ||
160 | } | ||
161 | private dispatch def transformConstraint(ConstantValue c, Modality modality) { | ||
162 | val target = c.supplierKey | ||
163 | |||
164 | var String targetString; | ||
165 | var String additionalDefinition; | ||
166 | if(target instanceof Enum<?>) { | ||
167 | targetString = '''const_«target.name»_«target.declaringClass.simpleName»''' | ||
168 | additionalDefinition = '''DefinedElement.name(«targetString»,"«target.name» «target.declaringClass.simpleName»"); LogicProblem.elements(problem,«targetString»);''' | ||
169 | } else if(target instanceof Integer) { | ||
170 | targetString = target.toString | ||
171 | additionalDefinition = '''''' | ||
172 | } else throw new UnsupportedOperationException('''Unknown constant type: «target.class»''') | ||
173 | |||
174 | val source = c.variablesTuple | ||
175 | var String sourceName | ||
176 | if(source.size == 1) | ||
177 | sourceName = (source.get(0) as PVariable).canonizeName | ||
178 | else throw new UnsupportedOperationException("unknown source") | ||
179 | return '''«sourceName» == «targetString»;«additionalDefinition»'''; | ||
180 | } | ||
181 | |||
182 | private dispatch def transformConstraint(PConstraint c, Modality modality) { | ||
183 | throw new UnsupportedOperationException('''Unknown constraint type: "«c.class.name»"!''') | ||
184 | } | ||
185 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend new file mode 100644 index 00000000..7b175227 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend | |||
@@ -0,0 +1,93 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
7 | import java.util.LinkedList | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference | ||
9 | |||
10 | class RelationRefinementGenerator { | ||
11 | PatternGenerator base; | ||
12 | public new(PatternGenerator base) { | ||
13 | this.base = base | ||
14 | } | ||
15 | |||
16 | def CharSequence generateRefineReference(LogicProblem p) { | ||
17 | return ''' | ||
18 | «FOR relationRefinement: this.getRelationRefinements(p)» | ||
19 | pattern «relationRefinementQueryName(relationRefinement.key,relationRefinement.value)»( | ||
20 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
21 | relationIterpretation:PartialRelationInterpretation«IF relationRefinement.value != null», oppositeInterpretation:PartialRelationInterpretation«ENDIF», | ||
22 | from: DefinedElement, to: DefinedElement) | ||
23 | { | ||
24 | find interpretation(problem,interpretation); | ||
25 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
26 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"«relationRefinement.key.name»"); | ||
27 | «IF relationRefinement.value != null» | ||
28 | PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); | ||
29 | PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"«relationRefinement.value.name»"); | ||
30 | «ENDIF» | ||
31 | find mustExist(problem, interpretation, from); | ||
32 | find mustExist(problem, interpretation, to); | ||
33 | «base.typeIndexer.referInstanceOf((relationRefinement.key.parameters.get(0) as ComplexTypeReference).referred, Modality::MUST,"from")» | ||
34 | «base.typeIndexer.referInstanceOf((relationRefinement.key.parameters.get(1) as ComplexTypeReference).referred, Modality::MUST,"to")» | ||
35 | «base.relationDeclarationIndexer.referRelation(relationRefinement.key,"from","to",Modality.MAY)» | ||
36 | neg «base.relationDeclarationIndexer.referRelation(relationRefinement.key,"from","to",Modality.MUST)» | ||
37 | } | ||
38 | «ENDFOR» | ||
39 | ''' | ||
40 | } | ||
41 | |||
42 | def String relationRefinementQueryName(RelationDeclaration relation, Relation inverseRelation) { | ||
43 | '''«IF inverseRelation != null | ||
44 | »refineRelation_«base.canonizeName(relation.name)»_and_«base.canonizeName(inverseRelation.name)»« | ||
45 | ELSE | ||
46 | »refineRelation_«base.canonizeName(relation.name)»«ENDIF»''' | ||
47 | } | ||
48 | |||
49 | def referRefinementQuery(RelationDeclaration relation, Relation inverseRelation, String relInterpretationName, | ||
50 | String inverseInterpretationName, String sourceName, String targetName) | ||
51 | '''find «this.relationRefinementQueryName(relation,inverseRelation)»(problem, interpretation, «relInterpretationName», «IF inverseRelation != null»inverseInterpretationName, «ENDIF»«sourceName», «targetName»);''' | ||
52 | |||
53 | def getRefineRelationQueries(LogicProblem p) { | ||
54 | // val containmentRelations = p.containmentHierarchies.map[containmentRelations].flatten.toSet | ||
55 | // p.relations.filter(RelationDeclaration).filter[!containmentRelations.contains(it)].toInvertedMap['''refineRelation_«base.canonizeName(it.name)»'''] | ||
56 | /* | ||
57 | val res = new LinkedHashMap | ||
58 | for(relation: getRelationRefinements(p)) { | ||
59 | if(inverseRelations.containsKey(relation)) { | ||
60 | val name = '''refineRelation_«base.canonizeName(relation.name)»_and_«base.canonizeName(inverseRelations.get(relation).name)»''' | ||
61 | res.put(relation -> inverseRelations.get(relation),name) | ||
62 | } else { | ||
63 | val name = '''refineRelation_«base.canonizeName(relation.name)»''' | ||
64 | res.put(relation -> null,name) | ||
65 | } | ||
66 | } | ||
67 | return res*/ | ||
68 | |||
69 | getRelationRefinements(p).toInvertedMap[relationRefinementQueryName(it.key,it.value)] | ||
70 | } | ||
71 | |||
72 | |||
73 | def getRelationRefinements(LogicProblem p) { | ||
74 | val inverses = base.getInverseRelations(p) | ||
75 | val containments = base.getContainments(p) | ||
76 | val list = new LinkedList | ||
77 | for(relation : p.relations.filter(RelationDeclaration)) { | ||
78 | if(!containments.contains(relation)) { | ||
79 | if(inverses.containsKey(relation)) { | ||
80 | val inverse = inverses.get(relation) | ||
81 | if(!containments.contains(inverse)) { | ||
82 | if(base.isRepresentative(relation,inverse)) { | ||
83 | list += (relation -> inverse) | ||
84 | } | ||
85 | } | ||
86 | } else { | ||
87 | list += (relation -> null) | ||
88 | } | ||
89 | } | ||
90 | } | ||
91 | return list | ||
92 | } | ||
93 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RepairGenerator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RepairGenerator.xtend new file mode 100644 index 00000000..30fe5878 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RepairGenerator.xtend | |||
@@ -0,0 +1,18 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
4 | |||
5 | class RepairGenerator { | ||
6 | val PatternGenerator base; | ||
7 | new(PatternGenerator base) { | ||
8 | this.base = base | ||
9 | } | ||
10 | |||
11 | def generateRepairUnfinishedMultiplicityPatterns(LogicProblem problem) { | ||
12 | //val refinements = base.relationRefinementGenerator.getRelationRefinements(problem) | ||
13 | //val unfinisedLowerMultiplicities = base.get | ||
14 | } | ||
15 | def getRepairUnfinishedMultiplicityPatterns() { | ||
16 | |||
17 | } | ||
18 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexer.xtend new file mode 100644 index 00000000..6c450664 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexer.xtend | |||
@@ -0,0 +1,16 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
5 | import org.eclipse.emf.ecore.EClass | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult | ||
9 | |||
10 | interface TypeIndexer { | ||
11 | public def CharSequence getRequiredQueries() | ||
12 | public def boolean requiresTypeAnalysis() | ||
13 | public def CharSequence generateInstanceOfQueries(LogicProblem problem,PartialInterpretation emptySolution,TypeAnalysisResult typeAnalysisResult) | ||
14 | public def CharSequence referInstanceOf(Type type, Modality modality, String variableName) | ||
15 | public def CharSequence referInstanceOf(EClass type, Modality modality, String variableName) | ||
16 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexerWithPreliminaryTypeAnalysis.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexerWithPreliminaryTypeAnalysis.xtend new file mode 100644 index 00000000..3c49c323 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexerWithPreliminaryTypeAnalysis.xtend | |||
@@ -0,0 +1,97 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
8 | import org.eclipse.emf.ecore.EClass | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeRefinementPrecondition | ||
10 | import java.util.Collections | ||
11 | |||
12 | class TypeIndexerWithPreliminaryTypeAnalysis implements TypeIndexer{ | ||
13 | val PatternGenerator base; | ||
14 | |||
15 | new(PatternGenerator base) { | ||
16 | this.base = base | ||
17 | } | ||
18 | override requiresTypeAnalysis() { true } | ||
19 | |||
20 | override getRequiredQueries() ''' | ||
21 | private pattern typeInterpretation(problem:LogicProblem, interpetation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialTypeInterpratation) { | ||
22 | find interpretation(problem,interpetation); | ||
23 | LogicProblem.types(problem,type); | ||
24 | PartialInterpretation.partialtypeinterpratation(interpetation,typeInterpretation); | ||
25 | PartialTypeInterpratation.interpretationOf(typeInterpretation,type); | ||
26 | } | ||
27 | |||
28 | private pattern directInstanceOf(problem:LogicProblem, interpetation:PartialInterpretation, element:DefinedElement, type:Type) { | ||
29 | find interpretation(problem,interpetation); | ||
30 | LogicProblem.types(problem,type); | ||
31 | TypeDefinition.elements(type,element); | ||
32 | } or { | ||
33 | find interpretation(problem,interpetation); | ||
34 | find typeInterpretation(problem,interpetation,type,typeInterpretation); | ||
35 | PartialTypeInterpratation.elements(typeInterpretation,element); | ||
36 | } | ||
37 | ''' | ||
38 | |||
39 | override generateInstanceOfQueries(LogicProblem problem, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) { | ||
40 | val mayNewTypePreconditions = typeAnalysisResult.mayNewTypePreconditions | ||
41 | |||
42 | return ''' | ||
43 | «FOR type:problem.types» | ||
44 | «problem.generateMustInstenceOf(type)» | ||
45 | «problem.generateMayInstanceOf(type,mayNewTypePreconditions.get(type))» | ||
46 | «ENDFOR» | ||
47 | ''' | ||
48 | } | ||
49 | |||
50 | private def patternName(Type type, Modality modality) | ||
51 | '''«modality.toString.toLowerCase»InstanceOf«base.canonizeName(type.name)»''' | ||
52 | |||
53 | private def generateMustInstenceOf(LogicProblem problem, Type type) { | ||
54 | ''' | ||
55 | /** | ||
56 | * An element must be an instance of type "«type.name»". | ||
57 | */ | ||
58 | private pattern «patternName(type,Modality.MUST)»(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { | ||
59 | Type.name(type,"«type.name»"); | ||
60 | find directInstanceOf(problem,interpretation,element,type); | ||
61 | } | ||
62 | ''' | ||
63 | } | ||
64 | |||
65 | private def generateMayInstanceOf(LogicProblem problem, Type type, TypeRefinementPrecondition precondition) { | ||
66 | val inhibitorTypes = if(precondition!=null) { | ||
67 | precondition.inhibitorTypes | ||
68 | } else { | ||
69 | null | ||
70 | } | ||
71 | ''' | ||
72 | /** | ||
73 | * An element may be an instance of type "«type.name»". | ||
74 | */ | ||
75 | private pattern «patternName(type,Modality.MAY)»(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | ||
76 | «IF inhibitorTypes != null»{ | ||
77 | find interpretation(problem,interpretation); | ||
78 | PartialInterpretation.newElements(interpretation,element); | ||
79 | «FOR inhibitorType : inhibitorTypes» | ||
80 | neg «referInstanceOf(inhibitorType,Modality.MUST,"element")» | ||
81 | «ENDFOR» | ||
82 | } or { | ||
83 | find interpretation(problem,interpretation); | ||
84 | PartialInterpretation.openWorldElementPrototype(interpetation,element); | ||
85 | } or | ||
86 | «ENDIF» | ||
87 | { «referInstanceOf(type,Modality.MUST,"element")» } | ||
88 | ''' | ||
89 | } | ||
90 | |||
91 | public override referInstanceOf(Type type, Modality modality, String variableName) { | ||
92 | '''find «patternName(type,modality)»(problem,interpretation,«variableName»);''' | ||
93 | } | ||
94 | public override referInstanceOf(EClass type, Modality modality, String variableName) { | ||
95 | '''find «modality.toString.toLowerCase»InstanceOf«base.canonizeName('''class «type.name»''')»(problem,interpretation,«variableName»);''' | ||
96 | } | ||
97 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeRefinementGenerator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeRefinementGenerator.xtend new file mode 100644 index 00000000..a9ce9d73 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeRefinementGenerator.xtend | |||
@@ -0,0 +1,95 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
8 | import java.util.Map | ||
9 | import org.eclipse.xtend.lib.annotations.Data | ||
10 | import java.util.HashMap | ||
11 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.InverseRelationAssertion | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference | ||
14 | import java.util.LinkedHashMap | ||
15 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
16 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.ContainmentHierarchy | ||
17 | |||
18 | @Data | ||
19 | class ObjectCreationPrecondition { | ||
20 | Relation containmentRelation | ||
21 | Relation inverseContainment | ||
22 | Type newType | ||
23 | } | ||
24 | |||
25 | abstract class TypeRefinementGenerator { | ||
26 | val protected PatternGenerator base; | ||
27 | public new(PatternGenerator base) { | ||
28 | this.base = base | ||
29 | } | ||
30 | |||
31 | public def boolean requiresTypeAnalysis() | ||
32 | public def CharSequence generateRefineObjectQueries(LogicProblem p, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) | ||
33 | public def CharSequence generateRefineTypeQueries(LogicProblem p, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) | ||
34 | public def Map<? extends Type, String> getRefineTypeQueryNames(LogicProblem p, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) | ||
35 | |||
36 | public def getRefineObjectQueryNames(LogicProblem p, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) { | ||
37 | val Map<ObjectCreationPrecondition,String> objectCreationQueries = new LinkedHashMap | ||
38 | val containment = p.containmentHierarchies.head | ||
39 | val inverseRelations = new HashMap | ||
40 | p.annotations.filter(InverseRelationAssertion).forEach[ | ||
41 | inverseRelations.put(it.inverseA,it.inverseB) | ||
42 | inverseRelations.put(it.inverseB,it.inverseA) | ||
43 | ] | ||
44 | for(type: p.types.filter(TypeDeclaration).filter[!it.isAbstract]) { | ||
45 | if(containment.typeInContainment(type)) { | ||
46 | for(containmentRelation : containment.containmentRelations.filter[canBeContainedByRelation(it,type)]) { | ||
47 | if(inverseRelations.containsKey(containmentRelation)) { | ||
48 | objectCreationQueries.put( | ||
49 | new ObjectCreationPrecondition(containmentRelation,inverseRelations.get(containmentRelation),type), | ||
50 | this.patternName(containmentRelation,inverseRelations.get(containmentRelation),type)) | ||
51 | } else { | ||
52 | objectCreationQueries.put( | ||
53 | new ObjectCreationPrecondition(containmentRelation,null,type), | ||
54 | patternName(containmentRelation,null,type)) | ||
55 | } | ||
56 | } | ||
57 | } else { | ||
58 | objectCreationQueries.put( | ||
59 | new ObjectCreationPrecondition(null,null,type), | ||
60 | this.patternName(null,null,type)) | ||
61 | } | ||
62 | } | ||
63 | return objectCreationQueries | ||
64 | } | ||
65 | |||
66 | protected def canBeContainedByRelation(Relation r, Type t) { | ||
67 | if(r.parameters.size==2) { | ||
68 | val param = r.parameters.get(1) | ||
69 | if(param instanceof ComplexTypeReference) { | ||
70 | val allSuperTypes = t.transitiveClosureStar[it.supertypes] | ||
71 | for(superType : allSuperTypes) { | ||
72 | if(param.referred == superType) return true | ||
73 | } | ||
74 | } | ||
75 | } | ||
76 | return false | ||
77 | } | ||
78 | |||
79 | private def typeInContainment(ContainmentHierarchy hierarchy, Type type) { | ||
80 | val allSuperTypes = type.transitiveClosureStar[it.supertypes] | ||
81 | return allSuperTypes.exists[hierarchy.typesOrderedInHierarchy.contains(it)] | ||
82 | } | ||
83 | |||
84 | protected def String patternName(Relation containmentRelation, Relation inverseContainment, Type newType) { | ||
85 | if(containmentRelation != null) { | ||
86 | if(inverseContainment != null) { | ||
87 | '''createObject_«base.canonizeName(newType.name)»_by_«base.canonizeName(containmentRelation.name)»_with_«base.canonizeName(inverseContainment.name)»''' | ||
88 | } else { | ||
89 | '''createObject_«base.canonizeName(newType.name)»_by_«base.canonizeName(containmentRelation.name)»''' | ||
90 | } | ||
91 | } else { | ||
92 | '''createObject_«base.canonizeName(newType.name)»''' | ||
93 | } | ||
94 | } | ||
95 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeRefinementWithPreliminaryTypeAnalysis.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeRefinementWithPreliminaryTypeAnalysis.xtend new file mode 100644 index 00000000..be54d63c --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeRefinementWithPreliminaryTypeAnalysis.xtend | |||
@@ -0,0 +1,105 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.InverseRelationAssertion | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
10 | import java.util.HashMap | ||
11 | |||
12 | class TypeRefinementWithPreliminaryTypeAnalysis extends TypeRefinementGenerator{ | ||
13 | public new(PatternGenerator base) { | ||
14 | super(base) | ||
15 | } | ||
16 | override requiresTypeAnalysis() { true } | ||
17 | |||
18 | |||
19 | override generateRefineObjectQueries(LogicProblem p, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) { | ||
20 | val possibleNewDynamicType = typeAnalysisResult.possibleNewDynamicTypes | ||
21 | val containment = p.containmentHierarchies.head | ||
22 | val inverseRelations = new HashMap | ||
23 | p.annotations.filter(InverseRelationAssertion).forEach[ | ||
24 | inverseRelations.put(it.inverseA,it.inverseB) | ||
25 | inverseRelations.put(it.inverseB,it.inverseA) | ||
26 | ] | ||
27 | return ''' | ||
28 | «FOR type:possibleNewDynamicType» | ||
29 | «IF(containment.typesOrderedInHierarchy.contains(type))» | ||
30 | «FOR containmentRelation : containment.containmentRelations.filter[canBeContainedByRelation(it,type)]» | ||
31 | «IF inverseRelations.containsKey(containmentRelation)» | ||
32 | pattern «this.patternName(containmentRelation,inverseRelations.get(containmentRelation),type)»( | ||
33 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
34 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialTypeInterpratation, | ||
35 | container:DefinedElement) | ||
36 | { | ||
37 | find interpretation(problem,interpretation); | ||
38 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
39 | PartialTypeInterpratation.interpretationOf.name(typeInterpretation,"«type.name»"); | ||
40 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
41 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"«containmentRelation.name»"); | ||
42 | PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); | ||
43 | PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"«inverseRelations.get(containmentRelation).name»"); | ||
44 | «base.typeIndexer.referInstanceOf((containmentRelation.parameters.get(0) as ComplexTypeReference).referred,Modality.MUST,"container")» | ||
45 | «base.typeIndexer.referInstanceOf(type,Modality.MAY,"newObject")» | ||
46 | «base.relationDeclarationIndexer.referRelation(containmentRelation as RelationDeclaration,"container","newObject",Modality.MAY)» | ||
47 | find mustExist(problem, interpretation, container); | ||
48 | neg find mustExist(problem, interpretation, newObject); | ||
49 | } | ||
50 | «ELSE» | ||
51 | pattern «this.patternName(containmentRelation,null,type)»( | ||
52 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
53 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialTypeInterpratation, | ||
54 | container:DefinedElement) | ||
55 | { | ||
56 | find interpretation(problem,interpretation); | ||
57 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
58 | PartialTypeInterpratation.interpretationOf.name(typeInterpretation,"«type.name»"); | ||
59 | PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); | ||
60 | PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"«containmentRelation.name»"); | ||
61 | «base.typeIndexer.referInstanceOf((containmentRelation.parameters.get(0) as ComplexTypeReference).referred,Modality.MUST,"container")» | ||
62 | «base.typeIndexer.referInstanceOf(type,Modality.MAY,"newObject")» | ||
63 | «base.relationDeclarationIndexer.referRelation(containmentRelation as RelationDeclaration,"container","newObject",Modality.MAY)» | ||
64 | find mustExist(problem, interpretation, container); | ||
65 | neg find mustExist(problem, interpretation, newObject); | ||
66 | } | ||
67 | «ENDIF» | ||
68 | «ENDFOR» | ||
69 | «ELSE» | ||
70 | pattern createObject_«base.canonizeName(type.name)»( | ||
71 | problem:LogicProblem, interpretation:PartialInterpretation, | ||
72 | typeInterpretation:PartialTypeInterpratation) | ||
73 | { | ||
74 | find interpretation(problem,interpretation); | ||
75 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | ||
76 | PartialTypeInterpratation.interpretationOf.name(type,"«type.name»"); | ||
77 | «base.typeIndexer.referInstanceOf(type,Modality.MAY,"newObject")» | ||
78 | find mayExist(problem, interpretation, newObject); | ||
79 | neg find mustExist(problem, interpretation, newObject); | ||
80 | } | ||
81 | «ENDIF» | ||
82 | «ENDFOR» | ||
83 | ''' | ||
84 | } | ||
85 | |||
86 | override generateRefineTypeQueries(LogicProblem p, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) { | ||
87 | val newTypeRefinements = typeAnalysisResult.possibleNewTypeRefinements | ||
88 | return ''' | ||
89 | «FOR newTypeRefinement : newTypeRefinements» | ||
90 | pattern refineTypeTo_«base.canonizeName(newTypeRefinement.targetType.name)»(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | ||
91 | find interpretation(problem,interpretation); | ||
92 | PartialInterpretation.newElements(interpretation,element); | ||
93 | «FOR inhibitorType : newTypeRefinement.inhibitorTypes» | ||
94 | neg «base.typeIndexer.referInstanceOf(inhibitorType,Modality.MUST,"element")» | ||
95 | «ENDFOR» | ||
96 | } | ||
97 | «ENDFOR» | ||
98 | ''' | ||
99 | } | ||
100 | |||
101 | override getRefineTypeQueryNames(LogicProblem p, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) { | ||
102 | val newTypeRefinements = typeAnalysisResult.possibleNewTypeRefinements | ||
103 | newTypeRefinements.map[targetType].toInvertedMap['''refineTypeTo_«base.canonizeName(it.name)»'''] | ||
104 | } | ||
105 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnfinishedIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnfinishedIndexer.xtend new file mode 100644 index 00000000..ad1c9033 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnfinishedIndexer.xtend | |||
@@ -0,0 +1,85 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.LowerMultiplicityAssertion | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
5 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransformedViatraWellformednessConstraint | ||
6 | import java.util.Map | ||
7 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | ||
8 | |||
9 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
10 | import java.util.LinkedHashMap | ||
11 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference | ||
13 | |||
14 | class UnfinishedIndexer { | ||
15 | val PatternGenerator base | ||
16 | |||
17 | new(PatternGenerator patternGenerator) { | ||
18 | this.base = patternGenerator | ||
19 | } | ||
20 | |||
21 | def generateUnfinishedWfQueries(LogicProblem problem, Map<String,PQuery> fqn2PQuery) { | ||
22 | val wfQueries = base.wfQueries(problem) | ||
23 | ''' | ||
24 | «FOR wfQuery: wfQueries» | ||
25 | pattern unfinishedBy_«base.canonizeName(wfQuery.target.name)»(problem:LogicProblem, interpretation:PartialInterpretation, | ||
26 | «FOR param : wfQuery.patternFullyQualifiedName.lookup(fqn2PQuery).parameters SEPARATOR ', '»var_«param.name»«ENDFOR») | ||
27 | { | ||
28 | «base.relationDefinitionIndexer.referPattern( | ||
29 | wfQuery.patternFullyQualifiedName.lookup(fqn2PQuery), | ||
30 | wfQuery.patternFullyQualifiedName.lookup(fqn2PQuery).parameters.map['''var_«it.name»'''], | ||
31 | Modality.CURRENT, | ||
32 | true,false)» | ||
33 | } | ||
34 | «ENDFOR» | ||
35 | ''' | ||
36 | } | ||
37 | def getUnfinishedWFQueryNames(LogicProblem problem) { | ||
38 | val wfQueries = base.wfQueries(problem) | ||
39 | val map = new LinkedHashMap | ||
40 | for(wfQuery : wfQueries) { | ||
41 | map.put(wfQuery.target,'''unfinishedBy_«base.canonizeName(wfQuery.target.name)»''') | ||
42 | } | ||
43 | return map | ||
44 | } | ||
45 | def generateUnfinishedMultiplicityQueries(LogicProblem problem, Map<String,PQuery> fqn2PQuery) { | ||
46 | val lowerMultiplicities = base.lowerMultiplicities(problem) | ||
47 | return ''' | ||
48 | «FOR lowerMultiplicity : lowerMultiplicities» | ||
49 | pattern «unfinishedMultiplicityName(lowerMultiplicity)»(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { | ||
50 | find interpretation(problem,interpretation); | ||
51 | PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); | ||
52 | PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"«lowerMultiplicity.relation.name»"); | ||
53 | «base.typeIndexer.referInstanceOf(lowerMultiplicity.firstParamTypeOfRelation,Modality::MUST,"object")» | ||
54 | numberOfExistingReferences == count «base.referRelation(lowerMultiplicity.relation,"object","_",Modality.MUST,fqn2PQuery)» | ||
55 | check(numberOfExistingReferences < «lowerMultiplicity.lower»); | ||
56 | missingMultiplicity == eval(«lowerMultiplicity.lower»-numberOfExistingReferences); | ||
57 | } | ||
58 | «ENDFOR» | ||
59 | ''' | ||
60 | } | ||
61 | def String unfinishedMultiplicityName(LowerMultiplicityAssertion lowerMultiplicityAssertion) | ||
62 | '''unfinishedLowerMultiplicity_«base.canonizeName(lowerMultiplicityAssertion.relation.name)»''' | ||
63 | |||
64 | def public referUnfinishedMultiplicityQuery(LowerMultiplicityAssertion lowerMultiplicityAssertion) | ||
65 | '''find «unfinishedMultiplicityName(lowerMultiplicityAssertion)»(problem, interpretation ,object, missingMultiplicity);''' | ||
66 | |||
67 | def getFirstParamTypeOfRelation(LowerMultiplicityAssertion lowerMultiplicityAssertion) { | ||
68 | val parameters = lowerMultiplicityAssertion.relation.parameters | ||
69 | if(parameters.size == 2) { | ||
70 | val firstParam = parameters.get(0) | ||
71 | if(firstParam instanceof ComplexTypeReference) { | ||
72 | return firstParam.referred | ||
73 | } | ||
74 | } | ||
75 | } | ||
76 | |||
77 | def getUnfinishedMultiplicityQueries(LogicProblem problem) { | ||
78 | val lowerMultiplicities = base.lowerMultiplicities(problem) | ||
79 | val map = new LinkedHashMap | ||
80 | for(lowerMultiplicity : lowerMultiplicities) { | ||
81 | map.put(lowerMultiplicity.relation,unfinishedMultiplicityName(lowerMultiplicity)) | ||
82 | } | ||
83 | return map | ||
84 | } | ||
85 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/GoalConstraintProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/GoalConstraintProvider.xtend new file mode 100644 index 00000000..e1be2742 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/GoalConstraintProvider.xtend | |||
@@ -0,0 +1,18 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.rules | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.MultiplicityGoalConstraintCalculator | ||
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.GeneratedPatterns | ||
5 | import java.util.ArrayList | ||
6 | |||
7 | class GoalConstraintProvider { | ||
8 | def public getUnfinishedMultiplicityQueries(GeneratedPatterns patterns) { | ||
9 | val multiplicityQueries = patterns.unfinishedMulticiplicityQueries | ||
10 | val res = new ArrayList(multiplicityQueries.size) | ||
11 | for(multiplicityQuery : multiplicityQueries.entrySet) { | ||
12 | val targetRelationName = multiplicityQuery.key.name | ||
13 | val query = multiplicityQuery.value | ||
14 | res += new MultiplicityGoalConstraintCalculator(targetRelationName,query); | ||
15 | } | ||
16 | return res | ||
17 | } | ||
18 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend new file mode 100644 index 00000000..8b0f8f85 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend | |||
@@ -0,0 +1,209 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.rules | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationStatistics | ||
10 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.GeneratedPatterns | ||
11 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.ObjectCreationPrecondition | ||
12 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
13 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation | ||
14 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation | ||
15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationFactory | ||
16 | import java.util.LinkedHashMap | ||
17 | import org.eclipse.viatra.query.runtime.api.GenericPatternMatch | ||
18 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification | ||
19 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | ||
20 | import org.eclipse.viatra.transformation.runtime.emf.rules.batch.BatchTransformationRule | ||
21 | import org.eclipse.viatra.transformation.runtime.emf.rules.batch.BatchTransformationRuleFactory | ||
22 | |||
23 | class RefinementRuleProvider { | ||
24 | private extension BatchTransformationRuleFactory factory = new BatchTransformationRuleFactory | ||
25 | private extension PartialinterpretationFactory factory2 = PartialinterpretationFactory.eINSTANCE | ||
26 | private extension LogiclanguageFactory factory3 = LogiclanguageFactory.eINSTANCE | ||
27 | |||
28 | def canonizeName(String name) { | ||
29 | return name.replace(' ','_') | ||
30 | } | ||
31 | |||
32 | def LinkedHashMap<ObjectCreationPrecondition, BatchTransformationRule<GenericPatternMatch, ViatraQueryMatcher<GenericPatternMatch>>> | ||
33 | createObjectRefinementRules( | ||
34 | GeneratedPatterns patterns, | ||
35 | boolean nameNewElement, | ||
36 | ModelGenerationStatistics statistics | ||
37 | ) | ||
38 | { | ||
39 | val res = new LinkedHashMap | ||
40 | for(LHSEntry: patterns.refineObjectQueries.entrySet) { | ||
41 | val containmentRelation = LHSEntry.key.containmentRelation | ||
42 | val inverseRelation = LHSEntry.key.inverseContainment | ||
43 | val type = LHSEntry.key.newType | ||
44 | val lhs = LHSEntry.value as IQuerySpecification<ViatraQueryMatcher<GenericPatternMatch>> | ||
45 | val rule = createObjectCreationRule(containmentRelation,inverseRelation,type,lhs,nameNewElement,statistics) | ||
46 | res.put(LHSEntry.key,rule) | ||
47 | } | ||
48 | return res | ||
49 | } | ||
50 | |||
51 | def private createObjectCreationRule( | ||
52 | Relation containmentRelation, | ||
53 | Relation inverseRelation, | ||
54 | Type type, | ||
55 | IQuerySpecification<ViatraQueryMatcher<GenericPatternMatch>> lhs, | ||
56 | boolean nameNewElement, | ||
57 | ModelGenerationStatistics statistics) | ||
58 | { | ||
59 | val name = '''addObject_«type.name.canonizeName»« | ||
60 | IF containmentRelation!=null»_by_«containmentRelation.name.canonizeName»«ENDIF»''' | ||
61 | val ruleBuilder = factory.createRule | ||
62 | .name(name) | ||
63 | .precondition(lhs) | ||
64 | if(containmentRelation != null) { | ||
65 | if(inverseRelation!= null) { | ||
66 | ruleBuilder.action[match | | ||
67 | //println(name) | ||
68 | val startTime = System.nanoTime | ||
69 | //val problem = match.get(0) as LogicProblem | ||
70 | val interpretation = match.get(1) as PartialInterpretation | ||
71 | val relationInterpretation = match.get(2) as PartialRelationInterpretation | ||
72 | val inverseRelationInterpretation = match.get(3) as PartialRelationInterpretation | ||
73 | val typeInterpretation = match.get(4) as PartialTypeInterpratation | ||
74 | val container = match.get(5) as DefinedElement | ||
75 | |||
76 | val newElement = createDefinedElement | ||
77 | if(nameNewElement) { | ||
78 | newElement.name = '''new «interpretation.newElements.size»''' | ||
79 | } | ||
80 | |||
81 | // Existence | ||
82 | interpretation.newElements+=newElement | ||
83 | interpretation.maxNewElements=interpretation.maxNewElements-1 | ||
84 | if(interpretation.minNewElements > 0) { | ||
85 | interpretation.minNewElements=interpretation.minNewElements-1 | ||
86 | } | ||
87 | |||
88 | // Types | ||
89 | typeInterpretation.elements += newElement | ||
90 | typeInterpretation.supertypeInterpretation.forEach[it.elements += newElement] | ||
91 | // ContainmentRelation | ||
92 | val newLink1 = factory2.createBinaryElementRelationLink => [it.param1 = container it.param2 = newElement] | ||
93 | relationInterpretation.relationlinks+=newLink1 | ||
94 | // Inverse Containment | ||
95 | val newLink2 = factory2.createBinaryElementRelationLink => [it.param1 = newElement it.param2 = container] | ||
96 | inverseRelationInterpretation.relationlinks+=newLink2 | ||
97 | statistics.addExecutionTime(System.nanoTime-startTime) | ||
98 | ] | ||
99 | } else { | ||
100 | ruleBuilder.action[match | | ||
101 | //println(name) | ||
102 | val startTime = System.nanoTime | ||
103 | //val problem = match.get(0) as LogicProblem | ||
104 | val interpretation = match.get(1) as PartialInterpretation | ||
105 | val relationInterpretation = match.get(2) as PartialRelationInterpretation | ||
106 | val typeInterpretation = match.get(3) as PartialTypeInterpratation | ||
107 | val container = match.get(4) as DefinedElement | ||
108 | |||
109 | val newElement = createDefinedElement | ||
110 | if(nameNewElement) { | ||
111 | newElement.name = '''new «interpretation.newElements.size»''' | ||
112 | } | ||
113 | |||
114 | // Existence | ||
115 | interpretation.newElements+=newElement | ||
116 | interpretation.maxNewElements=interpretation.maxNewElements-1 | ||
117 | if(interpretation.minNewElements > 0) { | ||
118 | interpretation.minNewElements=interpretation.minNewElements-1 | ||
119 | } | ||
120 | |||
121 | // Types | ||
122 | typeInterpretation.elements += newElement | ||
123 | typeInterpretation.supertypeInterpretation.forEach[it.elements += newElement] | ||
124 | // ContainmentRelation | ||
125 | val newLink = factory2.createBinaryElementRelationLink => [it.param1 = container it.param2 = newElement] | ||
126 | relationInterpretation.relationlinks+=newLink | ||
127 | statistics.addExecutionTime(System.nanoTime-startTime) | ||
128 | ] | ||
129 | } | ||
130 | } else { | ||
131 | ruleBuilder.action[match | | ||
132 | //println(name) | ||
133 | val startTime = System.nanoTime | ||
134 | //val problem = match.get(0) as LogicProblem | ||
135 | val interpretation = match.get(1) as PartialInterpretation | ||
136 | val typeInterpretation = match.get(2) as PartialTypeInterpratation | ||
137 | |||
138 | val newElement = createDefinedElement //=> [it.name = null] | ||
139 | if(nameNewElement) { | ||
140 | newElement.name = '''new «interpretation.newElements.size»''' | ||
141 | } | ||
142 | // Existence | ||
143 | interpretation.newElements+=newElement | ||
144 | interpretation.maxNewElements=interpretation.maxNewElements-1 | ||
145 | if(interpretation.minNewElements > 0) { | ||
146 | interpretation.minNewElements=interpretation.minNewElements-1 | ||
147 | } | ||
148 | // Types | ||
149 | typeInterpretation.elements += newElement | ||
150 | typeInterpretation.supertypeInterpretation.forEach[it.elements += newElement] | ||
151 | statistics.addExecutionTime(System.nanoTime-startTime) | ||
152 | ] | ||
153 | } | ||
154 | return ruleBuilder.build | ||
155 | } | ||
156 | |||
157 | def createRelationRefinementRules(GeneratedPatterns patterns, ModelGenerationStatistics statistics) { | ||
158 | val res = new LinkedHashMap | ||
159 | for(LHSEntry: patterns.refinerelationQueries.entrySet) { | ||
160 | val declaration = LHSEntry.key.key | ||
161 | val inverseReference = LHSEntry.key.value | ||
162 | val lhs = LHSEntry.value as IQuerySpecification<ViatraQueryMatcher<GenericPatternMatch>> | ||
163 | val rule = createRelationRefinementRule(declaration,inverseReference,lhs,statistics) | ||
164 | res.put(LHSEntry.key,rule) | ||
165 | } | ||
166 | return res | ||
167 | } | ||
168 | |||
169 | def private BatchTransformationRule<GenericPatternMatch, ViatraQueryMatcher<GenericPatternMatch>> | ||
170 | createRelationRefinementRule(RelationDeclaration declaration, Relation inverseRelation, IQuerySpecification<ViatraQueryMatcher<GenericPatternMatch>> lhs, ModelGenerationStatistics statistics) | ||
171 | { | ||
172 | val name = '''addRelation_«declaration.name.canonizeName»«IF inverseRelation != null»_and_«inverseRelation.name.canonizeName»«ENDIF»''' | ||
173 | val ruleBuilder = factory.createRule | ||
174 | .name(name) | ||
175 | .precondition(lhs) | ||
176 | if (inverseRelation == null) { | ||
177 | ruleBuilder.action [ match | | ||
178 | val startTime = System.nanoTime | ||
179 | //println(name) | ||
180 | // val problem = match.get(0) as LogicProblem | ||
181 | // val interpretation = match.get(1) as PartialInterpretation | ||
182 | val relationInterpretation = match.get(2) as PartialRelationInterpretation | ||
183 | val src = match.get(3) as DefinedElement | ||
184 | val trg = match.get(4) as DefinedElement | ||
185 | val link = createBinaryElementRelationLink => [it.param1 = src it.param2 = trg] | ||
186 | relationInterpretation.relationlinks += link | ||
187 | statistics.addExecutionTime(System.nanoTime-startTime) | ||
188 | ] | ||
189 | } else { | ||
190 | ruleBuilder.action [ match | | ||
191 | val startTime = System.nanoTime | ||
192 | //println(name) | ||
193 | // val problem = match.get(0) as LogicProblem | ||
194 | // val interpretation = match.get(1) as PartialInterpretation | ||
195 | val relationInterpretation = match.get(2) as PartialRelationInterpretation | ||
196 | val inverseInterpretation = match.get(3) as PartialRelationInterpretation | ||
197 | val src = match.get(4) as DefinedElement | ||
198 | val trg = match.get(5) as DefinedElement | ||
199 | val link = createBinaryElementRelationLink => [it.param1 = src it.param2 = trg] | ||
200 | relationInterpretation.relationlinks += link | ||
201 | val inverseLink = createBinaryElementRelationLink => [it.param1 = trg it.param2 = src] | ||
202 | inverseInterpretation.relationlinks += inverseLink | ||
203 | statistics.addExecutionTime(System.nanoTime-startTime) | ||
204 | ] | ||
205 | } | ||
206 | |||
207 | return ruleBuilder.build | ||
208 | } | ||
209 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/util/ParseUtil.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/util/ParseUtil.xtend new file mode 100644 index 00000000..005304ea --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/util/ParseUtil.xtend | |||
@@ -0,0 +1,89 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.util | ||
2 | |||
3 | import com.google.inject.Guice | ||
4 | import com.google.inject.Injector | ||
5 | import com.google.inject.Module | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage | ||
9 | import java.io.ByteArrayInputStream | ||
10 | import java.io.InputStream | ||
11 | import java.util.LinkedHashMap | ||
12 | import org.eclipse.emf.common.util.URI | ||
13 | import org.eclipse.emf.ecore.resource.Resource | ||
14 | import org.eclipse.emf.ecore.util.EcoreUtil | ||
15 | import org.eclipse.viatra.query.patternlanguage.PatternLanguageStandaloneSetup | ||
16 | import org.eclipse.viatra.query.patternlanguage.annotations.ExtensionBasedAnnotationValidatorLoader | ||
17 | import org.eclipse.viatra.query.patternlanguage.annotations.IAnnotationValidatorLoader | ||
18 | import org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguageRuntimeModule | ||
19 | import org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguageStandaloneSetup | ||
20 | import org.eclipse.viatra.query.patternlanguage.emf.GenmodelExtensionLoader | ||
21 | import org.eclipse.viatra.query.patternlanguage.emf.IGenmodelMappingLoader | ||
22 | import org.eclipse.viatra.query.patternlanguage.emf.eMFPatternLanguage.PatternModel | ||
23 | import org.eclipse.viatra.query.patternlanguage.emf.specification.SpecificationBuilder | ||
24 | import org.eclipse.xtext.resource.XtextResourceSet | ||
25 | |||
26 | class MyModule extends EMFPatternLanguageRuntimeModule implements Module{ | ||
27 | def public Class<? extends IAnnotationValidatorLoader> bindAnnotationValidatorLoader() { | ||
28 | return typeof(ExtensionBasedAnnotationValidatorLoader); | ||
29 | } | ||
30 | def public Class<? extends IGenmodelMappingLoader> bindGenmodelMappingLoader() { | ||
31 | return typeof(GenmodelExtensionLoader); | ||
32 | } | ||
33 | } | ||
34 | |||
35 | class ParseUtil { | ||
36 | val Injector injector; | ||
37 | new() { | ||
38 | PatternLanguageStandaloneSetup.doSetup | ||
39 | EMFPatternLanguageStandaloneSetup.doSetup; | ||
40 | PartialinterpretationPackage.eINSTANCE.class; | ||
41 | LogicproblemPackage.eINSTANCE.class; | ||
42 | LogiclanguagePackage.eINSTANCE.class; | ||
43 | |||
44 | injector = internalCreateInjector//(new EMFPatternLanguageStandaloneSetup()).createInjectorAndDoEMFRegistration(); | ||
45 | } | ||
46 | |||
47 | def protected Injector internalCreateInjector() { | ||
48 | var newInjector = new EMFPatternLanguageStandaloneSetup().createInjectorAndDoEMFRegistration(); | ||
49 | //XXX the following line enforce the tests to be run in an Eclipse environment | ||
50 | val Module module = new MyModule | ||
51 | newInjector = Guice.createInjector(module) | ||
52 | //ViatraQueryLoggingUtil.setExternalLogger(newInjector.getInstance(Logger.class)); | ||
53 | //EMFPatternLanguagePlugin.getInstance().addCompoundInjector(newInjector,EMFPatternLanguagePlugin.TEST_INJECTOR_PRIORITY); | ||
54 | return newInjector; | ||
55 | } | ||
56 | |||
57 | // @Inject | ||
58 | // var ParseHelper<PatternModel> parseHelper; | ||
59 | val builder = new SpecificationBuilder | ||
60 | |||
61 | public def parse(CharSequence vqlFileContent) { | ||
62 | //val patternModel = this.parseHelper.parse(vqlFileContent) | ||
63 | val XtextResourceSet resourceSet = injector.getInstance(XtextResourceSet); | ||
64 | val Resource resource = resourceSet.createResource(URI.createURI("dummy:/example.vql")); | ||
65 | val InputStream in = new ByteArrayInputStream(vqlFileContent.toString.getBytes()); | ||
66 | resource.load(in, resourceSet.getLoadOptions()); | ||
67 | val patternModel = resource.getContents().get(0) as PatternModel; | ||
68 | |||
69 | EcoreUtil.resolveAll(resource) | ||
70 | resource.validate | ||
71 | val res = new LinkedHashMap | ||
72 | for(pattern : patternModel.patterns) { | ||
73 | val querySpecification = builder.getOrCreateSpecification(pattern) | ||
74 | res.put(querySpecification.fullyQualifiedName,querySpecification) | ||
75 | //println('''«querySpecification.fullyQualifiedName» -> «querySpecification»''') | ||
76 | } | ||
77 | resource.validate | ||
78 | return res | ||
79 | } | ||
80 | |||
81 | def private validate(Resource resource) { | ||
82 | val errors = resource.errors | ||
83 | if(!errors.isEmpty) { | ||
84 | println('''-- Errors --''') | ||
85 | errors.forEach[println('''> «it»''')] | ||
86 | println('''------------''') | ||
87 | } | ||
88 | } | ||
89 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/.classpath b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/.classpath new file mode 100644 index 00000000..1c96fe2f --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/.classpath | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <classpath> | ||
3 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | ||
4 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
5 | <classpathentry kind="src" path="src"/> | ||
6 | <classpathentry kind="src" path="xtend-gen"/> | ||
7 | <classpathentry kind="output" path="bin"/> | ||
8 | </classpath> | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/.gitignore b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/.gitignore new file mode 100644 index 00000000..8ae4e44d --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/.gitignore | |||
@@ -0,0 +1,4 @@ | |||
1 | /bin/ | ||
2 | /src-gen/ | ||
3 | /vql-gen/ | ||
4 | /xtend-gen/ | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/.project b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/.project new file mode 100644 index 00000000..153ec5ab --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/.project | |||
@@ -0,0 +1,34 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <projectDescription> | ||
3 | <name>hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic</name> | ||
4 | <comment></comment> | ||
5 | <projects> | ||
6 | </projects> | ||
7 | <buildSpec> | ||
8 | <buildCommand> | ||
9 | <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
10 | <arguments> | ||
11 | </arguments> | ||
12 | </buildCommand> | ||
13 | <buildCommand> | ||
14 | <name>org.eclipse.jdt.core.javabuilder</name> | ||
15 | <arguments> | ||
16 | </arguments> | ||
17 | </buildCommand> | ||
18 | <buildCommand> | ||
19 | <name>org.eclipse.pde.ManifestBuilder</name> | ||
20 | <arguments> | ||
21 | </arguments> | ||
22 | </buildCommand> | ||
23 | <buildCommand> | ||
24 | <name>org.eclipse.pde.SchemaBuilder</name> | ||
25 | <arguments> | ||
26 | </arguments> | ||
27 | </buildCommand> | ||
28 | </buildSpec> | ||
29 | <natures> | ||
30 | <nature>org.eclipse.pde.PluginNature</nature> | ||
31 | <nature>org.eclipse.jdt.core.javanature</nature> | ||
32 | <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
33 | </natures> | ||
34 | </projectDescription> | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/.settings/org.eclipse.jdt.core.prefs b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..295926d9 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/.settings/org.eclipse.jdt.core.prefs | |||
@@ -0,0 +1,7 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
4 | org.eclipse.jdt.core.compiler.compliance=1.8 | ||
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
7 | org.eclipse.jdt.core.compiler.source=1.8 | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/META-INF/MANIFEST.MF b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/META-INF/MANIFEST.MF new file mode 100644 index 00000000..24dbd918 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/META-INF/MANIFEST.MF | |||
@@ -0,0 +1,15 @@ | |||
1 | Manifest-Version: 1.0 | ||
2 | Bundle-ManifestVersion: 2 | ||
3 | Bundle-Name: Partialinterpretation2logic | ||
4 | Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic | ||
5 | Bundle-Version: 1.0.0.qualifier | ||
6 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
7 | Require-Bundle: com.google.guava, | ||
8 | org.eclipse.xtext.xbase.lib, | ||
9 | org.eclipse.xtend.lib, | ||
10 | org.eclipse.xtend.lib.macro, | ||
11 | hu.bme.mit.inf.dslreasoner.logic.model;bundle-version="1.0.0", | ||
12 | hu.bme.mit.inf.dslreasoner.ecore2logic;bundle-version="1.0.0", | ||
13 | hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage;bundle-version="1.0.0" | ||
14 | Export-Package: hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic | ||
15 | |||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/build.properties b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/build.properties new file mode 100644 index 00000000..41eb6ade --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/build.properties | |||
@@ -0,0 +1,4 @@ | |||
1 | source.. = src/ | ||
2 | output.. = bin/ | ||
3 | bin.includes = META-INF/,\ | ||
4 | . | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2Logic.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2Logic.xtend new file mode 100644 index 00000000..2910a702 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2Logic.xtend | |||
@@ -0,0 +1,21 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
6 | import java.util.List | ||
7 | import org.eclipse.emf.ecore.EObject | ||
8 | |||
9 | class InstanceModel2Logic { | ||
10 | val InstanceModel2PartialInterpretation instanceModel2PartialInterpretation = new InstanceModel2PartialInterpretation | ||
11 | val PartialInterpretation2Logic partialInterpretation2Logic = new PartialInterpretation2Logic | ||
12 | |||
13 | public def transform( | ||
14 | TracedOutput<LogicProblem, Ecore2Logic_Trace> metamodelTranslationResult, | ||
15 | List<EObject> objects) | ||
16 | { | ||
17 | val res1 = this.instanceModel2PartialInterpretation.transform(metamodelTranslationResult,objects,true) | ||
18 | this.partialInterpretation2Logic.transformPartialIntepretation2Logic(metamodelTranslationResult.output,res1) | ||
19 | return metamodelTranslationResult//.output | ||
20 | } | ||
21 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend new file mode 100644 index 00000000..58c41a49 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend | |||
@@ -0,0 +1,130 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic | ||
4 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.PartialInterpretationInitialiser | ||
10 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.Problem2PartialInterpretationTrace | ||
11 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation | ||
12 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationFactory | ||
13 | import java.util.HashMap | ||
14 | import java.util.List | ||
15 | import java.util.Map | ||
16 | import org.eclipse.emf.common.util.Enumerator | ||
17 | import org.eclipse.emf.ecore.EObject | ||
18 | |||
19 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
20 | import org.eclipse.emf.ecore.resource.Resource | ||
21 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput | ||
22 | |||
23 | class InstanceModel2PartialInterpretation { | ||
24 | val extension LogiclanguageFactory factory = LogiclanguageFactory.eINSTANCE | ||
25 | val extension PartialinterpretationFactory factory2 = PartialinterpretationFactory.eINSTANCE | ||
26 | val Ecore2Logic ecore2Logic = new Ecore2Logic | ||
27 | val partialInterpretationInitialiser = new PartialInterpretationInitialiser | ||
28 | |||
29 | public def transform( | ||
30 | TracedOutput<LogicProblem, Ecore2Logic_Trace> metamodelTranslationResult, | ||
31 | Resource resource, | ||
32 | boolean withID) | ||
33 | { | ||
34 | val objects = resource.allContents.toList | ||
35 | return transform(metamodelTranslationResult,objects,withID) | ||
36 | } | ||
37 | |||
38 | public def transform( | ||
39 | TracedOutput<LogicProblem, Ecore2Logic_Trace> metamodelTranslationResult, | ||
40 | List<EObject> objects, | ||
41 | boolean withID) | ||
42 | { | ||
43 | val problem = metamodelTranslationResult.output | ||
44 | val ecore2LogicTrace = metamodelTranslationResult.trace | ||
45 | val tracedOutput = partialInterpretationInitialiser.initialisePartialInterpretation(problem, -1, -1) | ||
46 | val partialInterpretation = tracedOutput.output | ||
47 | val partialInterpretationTrace = tracedOutput.trace | ||
48 | |||
49 | val Map<EObject,DefinedElement> object2DefinedElement = new HashMap | ||
50 | |||
51 | // EObject -> DefinedElement | ||
52 | for(objectIndex : 0..<objects.size) { | ||
53 | val object = objects.get(objectIndex) | ||
54 | val element = createDefinedElement => [ | ||
55 | it.name = if(withID) | ||
56 | { '''PartialObject«objectIndex»''' } else | ||
57 | { null } | ||
58 | ] | ||
59 | |||
60 | // Add element to interpretation | ||
61 | partialInterpretation.newElements += element | ||
62 | |||
63 | // Define the types | ||
64 | val type = ecore2Logic.TypeofEClass(ecore2LogicTrace,object.eClass) as TypeDeclaration | ||
65 | val interpretation = type.lookup(partialInterpretationTrace.type2Interpretation) | ||
66 | interpretation.elements += element | ||
67 | interpretation.supertypeInterpretation.forEach[elements += element] | ||
68 | |||
69 | // Trace handling | ||
70 | object2DefinedElement.put(object, element) | ||
71 | } | ||
72 | |||
73 | for(source : objects) { | ||
74 | // Translating the references | ||
75 | for(reference : source.eClass.EAllReferences) { | ||
76 | val type = ecore2Logic.relationOfReference(ecore2LogicTrace,reference) | ||
77 | val interpretation = type.lookup(partialInterpretationTrace.relation2Interpretation) | ||
78 | val sourceElement = source.lookup(object2DefinedElement) | ||
79 | if(reference.isMany) { | ||
80 | val listOfTargets = source.eGet(reference) as List<? extends EObject> | ||
81 | for(target : listOfTargets) { | ||
82 | val targetElement = target.lookup(object2DefinedElement) | ||
83 | translateLink(interpretation,sourceElement,targetElement) | ||
84 | } | ||
85 | } else { | ||
86 | val target = source.eGet(reference) as EObject | ||
87 | val targetElement = target.lookup(object2DefinedElement) | ||
88 | if(target !== null) { | ||
89 | translateLink(interpretation,sourceElement,targetElement) | ||
90 | } | ||
91 | } | ||
92 | } | ||
93 | // Transforming the relations | ||
94 | for(attribute : source.eClass.EAllAttributes) { | ||
95 | val type = ecore2Logic.relationOfAttribute(ecore2LogicTrace,attribute) | ||
96 | val interpretation = type.lookup(partialInterpretationTrace.relation2Interpretation) | ||
97 | val sourceElement = source.lookup(object2DefinedElement) | ||
98 | if(attribute.isMany) { | ||
99 | val listOfTargets = source.eGet(attribute) as List<? extends EObject> | ||
100 | for(target : listOfTargets) { | ||
101 | translateLink(interpretation,sourceElement,translateValue(target,ecore2LogicTrace,partialInterpretationTrace)) | ||
102 | } | ||
103 | } else { | ||
104 | val target = source.eGet(attribute) | ||
105 | if(target !== null) { | ||
106 | translateLink(interpretation,sourceElement,translateValue(target,ecore2LogicTrace,partialInterpretationTrace)) | ||
107 | } | ||
108 | } | ||
109 | } | ||
110 | } | ||
111 | |||
112 | return partialInterpretation | ||
113 | } | ||
114 | |||
115 | protected def translateLink(PartialRelationInterpretation interpretation, DefinedElement source, DefinedElement target) { | ||
116 | interpretation.relationlinks += createBinaryElementRelationLink => [it.param1 = source it.param2 = target] | ||
117 | } | ||
118 | |||
119 | dispatch protected def translateValue(Enumerator value, Ecore2Logic_Trace ecore2LogicTrace, Problem2PartialInterpretationTrace partialInterpretationTrace) { | ||
120 | val term = this.ecore2Logic.Literal(ecore2LogicTrace,value) | ||
121 | if(term instanceof DefinedElement) { | ||
122 | return term | ||
123 | } | ||
124 | else throw new AssertionError('''term should be a defined element?''') | ||
125 | } | ||
126 | |||
127 | dispatch protected def translateValue(Object value, Ecore2Logic_Trace ecore2LogicTrace, Problem2PartialInterpretationTrace partialInterpretationTrace) { | ||
128 | throw new UnsupportedOperationException('''Mapping of «value.class.simpleName» in partial models is currently not supported!''') | ||
129 | } | ||
130 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/PartialInterpretation2Logic.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/PartialInterpretation2Logic.xtend new file mode 100644 index 00000000..39d8a365 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/PartialInterpretation2Logic.xtend | |||
@@ -0,0 +1,146 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicProblemBuilder | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.SymbolicDeclaration | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
10 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink | ||
11 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
12 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation | ||
13 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation | ||
14 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink | ||
15 | import java.util.ArrayList | ||
16 | import java.util.HashMap | ||
17 | import java.util.HashSet | ||
18 | import java.util.Map | ||
19 | import java.util.Set | ||
20 | import org.eclipse.xtend.lib.annotations.Data | ||
21 | |||
22 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
23 | |||
24 | @Data class PartialInterpretation2Logic_Trace { | ||
25 | Map<TypeDeclaration, TypeDefinition> definedPart = new HashMap | ||
26 | Map<TypeDeclaration, TypeDeclaration> undefinedPart = new HashMap | ||
27 | Set<Type> originalTypes = new HashSet | ||
28 | Set<TypeDeclaration> splittedTypes = new HashSet | ||
29 | } | ||
30 | |||
31 | class PartialInterpretation2Logic { | ||
32 | val extension LogiclanguageFactory factory = LogiclanguageFactory.eINSTANCE | ||
33 | val extension LogicProblemBuilder builder = new LogicProblemBuilder | ||
34 | |||
35 | def transformPartialIntepretation2Logic(LogicProblem p, PartialInterpretation i) { | ||
36 | val trace = new PartialInterpretation2Logic_Trace() | ||
37 | trace.originalTypes.addAll(p.types) | ||
38 | if(! i.newElements.empty) { | ||
39 | |||
40 | // Elements adding | ||
41 | addExistingElementToProblem(p,i) | ||
42 | |||
43 | // Types | ||
44 | for(partialTypeDeclaration : i.partialtypeinterpratation) { | ||
45 | splitTypeIntoTwo(p,partialTypeDeclaration,trace) | ||
46 | } | ||
47 | connectSplittings(p,trace) | ||
48 | |||
49 | // Relations | ||
50 | for(partialRelationInterpretation : i.partialrelationinterpretation) { | ||
51 | relationLinksToAssertion(p,partialRelationInterpretation,trace) | ||
52 | } | ||
53 | } | ||
54 | } | ||
55 | |||
56 | private def addExistingElementToProblem(LogicProblem p, PartialInterpretation i) { | ||
57 | val newElements = new ArrayList(i.newElements) | ||
58 | var newElementIndex = 1 | ||
59 | for(newElement : newElements) { | ||
60 | newElement.name = '''DefinedElement «newElementIndex++»''' | ||
61 | p.elements += newElement | ||
62 | } | ||
63 | } | ||
64 | |||
65 | private def splitTypeIntoTwo(LogicProblem p, PartialTypeInterpratation partialTypeDeclaration,PartialInterpretation2Logic_Trace trace) { | ||
66 | if(!partialTypeDeclaration.elements.empty) { | ||
67 | val declaration = partialTypeDeclaration.interpretationOf | ||
68 | |||
69 | val definedPart = createTypeDefinition => [ | ||
70 | it.name = '''DefinedPartOf «declaration.name»''' | ||
71 | it.elements += partialTypeDeclaration.elements | ||
72 | it.isAbstract = declaration.isIsAbstract | ||
73 | ] | ||
74 | val undefinedPart = createTypeDeclaration => [ | ||
75 | it.name = '''UndefinedPartOf «declaration.name»''' | ||
76 | it.isAbstract = declaration.isIsAbstract | ||
77 | ] | ||
78 | declaration.isAbstract = true | ||
79 | |||
80 | trace.definedPart.put(declaration,definedPart) | ||
81 | trace.undefinedPart.put(declaration,undefinedPart) | ||
82 | trace.splittedTypes.add(declaration) | ||
83 | p.add(definedPart) | ||
84 | p.add(undefinedPart) | ||
85 | Supertype(definedPart,declaration) | ||
86 | Supertype(undefinedPart,declaration) | ||
87 | } | ||
88 | } | ||
89 | |||
90 | private def connectSplittings(LogicProblem p,PartialInterpretation2Logic_Trace trace) { | ||
91 | val originalTypes = p.types.filter[originalType(trace)].toList | ||
92 | for(type : originalTypes) { | ||
93 | val superTypes = new ArrayList(type.supertypes.filter[originalType(trace)].toList) | ||
94 | for(supertype : superTypes) { | ||
95 | if(type.isSplitted(trace)) { | ||
96 | if(supertype.isSplitted(trace)) { | ||
97 | Supertype((type as TypeDeclaration).lookup(trace.definedPart), (supertype as TypeDeclaration).lookup(trace.definedPart)) | ||
98 | Supertype((type as TypeDeclaration).lookup(trace.undefinedPart), (supertype as TypeDeclaration).lookup(trace.undefinedPart)) | ||
99 | } else { | ||
100 | // Do nothing | ||
101 | } | ||
102 | } else { | ||
103 | if(supertype.isSplitted(trace)) { | ||
104 | Supertype(type, (supertype as TypeDeclaration).lookup(trace.undefinedPart)) | ||
105 | } else if(supertype instanceof TypeDefinition) { | ||
106 | // Do nothing | ||
107 | } | ||
108 | } | ||
109 | } | ||
110 | } | ||
111 | } | ||
112 | |||
113 | private def originalType(Type type,PartialInterpretation2Logic_Trace trace) { | ||
114 | return trace.originalTypes.contains(type) | ||
115 | } | ||
116 | private def isSplitted(Type t, PartialInterpretation2Logic_Trace trace) { | ||
117 | trace.splittedTypes.contains(t) | ||
118 | } | ||
119 | |||
120 | private def relationLinksToAssertion(LogicProblem p, PartialRelationInterpretation r,PartialInterpretation2Logic_Trace trace) { | ||
121 | val relation = r.interpretationOf | ||
122 | val links = r.relationlinks | ||
123 | if(links.size == 0) { | ||
124 | return | ||
125 | } else { | ||
126 | val term = if(links.size == 1) { | ||
127 | createLink(links.head,relation) | ||
128 | } else { | ||
129 | links.map[link|createLink(link,relation)].And | ||
130 | } | ||
131 | val assertion = Assertion('''PartialInterpretation «r.interpretationOf.name»''',term) | ||
132 | p.add(assertion) | ||
133 | } | ||
134 | |||
135 | } | ||
136 | |||
137 | def private createLink(RelationLink link, SymbolicDeclaration relationDeclaration) { | ||
138 | if(link instanceof BinaryElementRelationLink) { | ||
139 | return createSymbolicValue=>[ | ||
140 | it.symbolicReference=relationDeclaration | ||
141 | it.parameterSubstitutions += createSymbolicValue => [link.param1] | ||
142 | it.parameterSubstitutions += createSymbolicValue => [link.param2] | ||
143 | ] | ||
144 | } else throw new UnsupportedOperationException | ||
145 | } | ||
146 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/.classpath b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/.classpath new file mode 100644 index 00000000..75ccaa90 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/.classpath | |||
@@ -0,0 +1,9 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <classpath> | ||
3 | <classpathentry kind="src" path="ecore-gen"/> | ||
4 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | ||
5 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
6 | <classpathentry kind="src" path="src"/> | ||
7 | <classpathentry kind="src" path="xtend-gen"/> | ||
8 | <classpathentry kind="output" path="bin"/> | ||
9 | </classpath> | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/.gitignore b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/.gitignore new file mode 100644 index 00000000..b33f6aff --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | /bin/ | ||
2 | /xtend-gen/ | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/.project b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/.project new file mode 100644 index 00000000..b8b85892 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/.project | |||
@@ -0,0 +1,34 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <projectDescription> | ||
3 | <name>hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage</name> | ||
4 | <comment></comment> | ||
5 | <projects> | ||
6 | </projects> | ||
7 | <buildSpec> | ||
8 | <buildCommand> | ||
9 | <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
10 | <arguments> | ||
11 | </arguments> | ||
12 | </buildCommand> | ||
13 | <buildCommand> | ||
14 | <name>org.eclipse.jdt.core.javabuilder</name> | ||
15 | <arguments> | ||
16 | </arguments> | ||
17 | </buildCommand> | ||
18 | <buildCommand> | ||
19 | <name>org.eclipse.pde.ManifestBuilder</name> | ||
20 | <arguments> | ||
21 | </arguments> | ||
22 | </buildCommand> | ||
23 | <buildCommand> | ||
24 | <name>org.eclipse.pde.SchemaBuilder</name> | ||
25 | <arguments> | ||
26 | </arguments> | ||
27 | </buildCommand> | ||
28 | </buildSpec> | ||
29 | <natures> | ||
30 | <nature>org.eclipse.pde.PluginNature</nature> | ||
31 | <nature>org.eclipse.jdt.core.javanature</nature> | ||
32 | <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
33 | </natures> | ||
34 | </projectDescription> | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/.settings/org.eclipse.jdt.core.prefs b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..295926d9 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/.settings/org.eclipse.jdt.core.prefs | |||
@@ -0,0 +1,7 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
4 | org.eclipse.jdt.core.compiler.compliance=1.8 | ||
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
7 | org.eclipse.jdt.core.compiler.source=1.8 | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/META-INF/MANIFEST.MF b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/META-INF/MANIFEST.MF new file mode 100644 index 00000000..ea971e17 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/META-INF/MANIFEST.MF | |||
@@ -0,0 +1,27 @@ | |||
1 | Manifest-Version: 1.0 | ||
2 | Bundle-ManifestVersion: 2 | ||
3 | Bundle-Name: %pluginName | ||
4 | Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage;singleton:=true | ||
5 | Bundle-Version: 1.0.0.qualifier | ||
6 | Bundle-ClassPath: . | ||
7 | Bundle-Vendor: %providerName | ||
8 | Bundle-Localization: plugin | ||
9 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
10 | Export-Package: hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage, | ||
11 | hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood, | ||
12 | hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation, | ||
13 | hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl, | ||
14 | hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.util, | ||
15 | hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder, | ||
16 | hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation | ||
17 | Require-Bundle: org.eclipse.core.runtime, | ||
18 | org.eclipse.emf.ecore;visibility:=reexport, | ||
19 | hu.bme.mit.inf.dslreasoner.logic.model;bundle-version="1.0.0";visibility:=reexport, | ||
20 | com.google.guava, | ||
21 | org.eclipse.xtext.xbase.lib, | ||
22 | org.eclipse.xtend.lib, | ||
23 | org.eclipse.xtend.lib.macro, | ||
24 | org.eclipse.viatra.query.runtime;bundle-version="1.5.0", | ||
25 | org.eclipse.viatra.dse;bundle-version="0.15.0" | ||
26 | Bundle-ActivationPolicy: lazy | ||
27 | |||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/build.properties b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/build.properties new file mode 100644 index 00000000..72399047 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/build.properties | |||
@@ -0,0 +1,10 @@ | |||
1 | # | ||
2 | |||
3 | bin.includes = .,\ | ||
4 | model/,\ | ||
5 | META-INF/,\ | ||
6 | plugin.xml,\ | ||
7 | plugin.properties | ||
8 | jars.compile.order = . | ||
9 | source.. = ecore-gen/ | ||
10 | output.. = bin/ | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/BinaryElementRelationLink.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/BinaryElementRelationLink.java new file mode 100644 index 00000000..bd88f469 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/BinaryElementRelationLink.java | |||
@@ -0,0 +1,77 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; | ||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * A representation of the model object '<em><b>Binary Element Relation Link</b></em>'. | ||
10 | * <!-- end-user-doc --> | ||
11 | * | ||
12 | * <p> | ||
13 | * The following features are supported: | ||
14 | * </p> | ||
15 | * <ul> | ||
16 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink#getParam1 <em>Param1</em>}</li> | ||
17 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink#getParam2 <em>Param2</em>}</li> | ||
18 | * </ul> | ||
19 | * | ||
20 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getBinaryElementRelationLink() | ||
21 | * @model | ||
22 | * @generated | ||
23 | */ | ||
24 | public interface BinaryElementRelationLink extends RelationLink { | ||
25 | /** | ||
26 | * Returns the value of the '<em><b>Param1</b></em>' reference. | ||
27 | * <!-- begin-user-doc --> | ||
28 | * <p> | ||
29 | * If the meaning of the '<em>Param1</em>' reference isn't clear, | ||
30 | * there really should be more of a description here... | ||
31 | * </p> | ||
32 | * <!-- end-user-doc --> | ||
33 | * @return the value of the '<em>Param1</em>' reference. | ||
34 | * @see #setParam1(DefinedElement) | ||
35 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getBinaryElementRelationLink_Param1() | ||
36 | * @model required="true" | ||
37 | * @generated | ||
38 | */ | ||
39 | DefinedElement getParam1(); | ||
40 | |||
41 | /** | ||
42 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink#getParam1 <em>Param1</em>}' reference. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @param value the new value of the '<em>Param1</em>' reference. | ||
46 | * @see #getParam1() | ||
47 | * @generated | ||
48 | */ | ||
49 | void setParam1(DefinedElement value); | ||
50 | |||
51 | /** | ||
52 | * Returns the value of the '<em><b>Param2</b></em>' reference. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <p> | ||
55 | * If the meaning of the '<em>Param2</em>' reference isn't clear, | ||
56 | * there really should be more of a description here... | ||
57 | * </p> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @return the value of the '<em>Param2</em>' reference. | ||
60 | * @see #setParam2(DefinedElement) | ||
61 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getBinaryElementRelationLink_Param2() | ||
62 | * @model required="true" | ||
63 | * @generated | ||
64 | */ | ||
65 | DefinedElement getParam2(); | ||
66 | |||
67 | /** | ||
68 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink#getParam2 <em>Param2</em>}' reference. | ||
69 | * <!-- begin-user-doc --> | ||
70 | * <!-- end-user-doc --> | ||
71 | * @param value the new value of the '<em>Param2</em>' reference. | ||
72 | * @see #getParam2() | ||
73 | * @generated | ||
74 | */ | ||
75 | void setParam2(DefinedElement value); | ||
76 | |||
77 | } // BinaryElementRelationLink | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/NaryRelationLink.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/NaryRelationLink.java new file mode 100644 index 00000000..b4981259 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/NaryRelationLink.java | |||
@@ -0,0 +1,40 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation; | ||
4 | |||
5 | import org.eclipse.emf.common.util.EList; | ||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * A representation of the model object '<em><b>Nary Relation Link</b></em>'. | ||
10 | * <!-- end-user-doc --> | ||
11 | * | ||
12 | * <p> | ||
13 | * The following features are supported: | ||
14 | * </p> | ||
15 | * <ul> | ||
16 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLink#getElements <em>Elements</em>}</li> | ||
17 | * </ul> | ||
18 | * | ||
19 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getNaryRelationLink() | ||
20 | * @model | ||
21 | * @generated | ||
22 | */ | ||
23 | public interface NaryRelationLink extends RelationLink { | ||
24 | /** | ||
25 | * Returns the value of the '<em><b>Elements</b></em>' containment reference list. | ||
26 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLinkElement}. | ||
27 | * <!-- begin-user-doc --> | ||
28 | * <p> | ||
29 | * If the meaning of the '<em>Elements</em>' containment reference list isn't clear, | ||
30 | * there really should be more of a description here... | ||
31 | * </p> | ||
32 | * <!-- end-user-doc --> | ||
33 | * @return the value of the '<em>Elements</em>' containment reference list. | ||
34 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getNaryRelationLink_Elements() | ||
35 | * @model containment="true" | ||
36 | * @generated | ||
37 | */ | ||
38 | EList<NaryRelationLinkElement> getElements(); | ||
39 | |||
40 | } // NaryRelationLink | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/NaryRelationLinkElement.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/NaryRelationLinkElement.java new file mode 100644 index 00000000..4b70390f --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/NaryRelationLinkElement.java | |||
@@ -0,0 +1,50 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EObject; | ||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * A representation of the model object '<em><b>Nary Relation Link Element</b></em>'. | ||
10 | * <!-- end-user-doc --> | ||
11 | * | ||
12 | * <p> | ||
13 | * The following features are supported: | ||
14 | * </p> | ||
15 | * <ul> | ||
16 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLinkElement#getIndex <em>Index</em>}</li> | ||
17 | * </ul> | ||
18 | * | ||
19 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getNaryRelationLinkElement() | ||
20 | * @model | ||
21 | * @generated | ||
22 | */ | ||
23 | public interface NaryRelationLinkElement extends EObject { | ||
24 | /** | ||
25 | * Returns the value of the '<em><b>Index</b></em>' attribute. | ||
26 | * <!-- begin-user-doc --> | ||
27 | * <p> | ||
28 | * If the meaning of the '<em>Index</em>' attribute isn't clear, | ||
29 | * there really should be more of a description here... | ||
30 | * </p> | ||
31 | * <!-- end-user-doc --> | ||
32 | * @return the value of the '<em>Index</em>' attribute. | ||
33 | * @see #setIndex(int) | ||
34 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getNaryRelationLinkElement_Index() | ||
35 | * @model | ||
36 | * @generated | ||
37 | */ | ||
38 | int getIndex(); | ||
39 | |||
40 | /** | ||
41 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLinkElement#getIndex <em>Index</em>}' attribute. | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @param value the new value of the '<em>Index</em>' attribute. | ||
45 | * @see #getIndex() | ||
46 | * @generated | ||
47 | */ | ||
48 | void setIndex(int value); | ||
49 | |||
50 | } // NaryRelationLinkElement | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialConstantInterpretation.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialConstantInterpretation.java new file mode 100644 index 00000000..29f2cb21 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialConstantInterpretation.java | |||
@@ -0,0 +1,52 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDeclaration; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EObject; | ||
8 | |||
9 | /** | ||
10 | * <!-- begin-user-doc --> | ||
11 | * A representation of the model object '<em><b>Partial Constant Interpretation</b></em>'. | ||
12 | * <!-- end-user-doc --> | ||
13 | * | ||
14 | * <p> | ||
15 | * The following features are supported: | ||
16 | * </p> | ||
17 | * <ul> | ||
18 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation#getInterpretationOf <em>Interpretation Of</em>}</li> | ||
19 | * </ul> | ||
20 | * | ||
21 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialConstantInterpretation() | ||
22 | * @model | ||
23 | * @generated | ||
24 | */ | ||
25 | public interface PartialConstantInterpretation extends EObject { | ||
26 | /** | ||
27 | * Returns the value of the '<em><b>Interpretation Of</b></em>' reference. | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <p> | ||
30 | * If the meaning of the '<em>Interpretation Of</em>' reference isn't clear, | ||
31 | * there really should be more of a description here... | ||
32 | * </p> | ||
33 | * <!-- end-user-doc --> | ||
34 | * @return the value of the '<em>Interpretation Of</em>' reference. | ||
35 | * @see #setInterpretationOf(ConstantDeclaration) | ||
36 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialConstantInterpretation_InterpretationOf() | ||
37 | * @model required="true" | ||
38 | * @generated | ||
39 | */ | ||
40 | ConstantDeclaration getInterpretationOf(); | ||
41 | |||
42 | /** | ||
43 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation#getInterpretationOf <em>Interpretation Of</em>}' reference. | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @param value the new value of the '<em>Interpretation Of</em>' reference. | ||
47 | * @see #getInterpretationOf() | ||
48 | * @generated | ||
49 | */ | ||
50 | void setInterpretationOf(ConstantDeclaration value); | ||
51 | |||
52 | } // PartialConstantInterpretation | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialFunctionInterpretation.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialFunctionInterpretation.java new file mode 100644 index 00000000..26ce2480 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialFunctionInterpretation.java | |||
@@ -0,0 +1,52 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDeclaration; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EObject; | ||
8 | |||
9 | /** | ||
10 | * <!-- begin-user-doc --> | ||
11 | * A representation of the model object '<em><b>Partial Function Interpretation</b></em>'. | ||
12 | * <!-- end-user-doc --> | ||
13 | * | ||
14 | * <p> | ||
15 | * The following features are supported: | ||
16 | * </p> | ||
17 | * <ul> | ||
18 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation#getInterpretationOf <em>Interpretation Of</em>}</li> | ||
19 | * </ul> | ||
20 | * | ||
21 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialFunctionInterpretation() | ||
22 | * @model | ||
23 | * @generated | ||
24 | */ | ||
25 | public interface PartialFunctionInterpretation extends EObject { | ||
26 | /** | ||
27 | * Returns the value of the '<em><b>Interpretation Of</b></em>' reference. | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <p> | ||
30 | * If the meaning of the '<em>Interpretation Of</em>' reference isn't clear, | ||
31 | * there really should be more of a description here... | ||
32 | * </p> | ||
33 | * <!-- end-user-doc --> | ||
34 | * @return the value of the '<em>Interpretation Of</em>' reference. | ||
35 | * @see #setInterpretationOf(FunctionDeclaration) | ||
36 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialFunctionInterpretation_InterpretationOf() | ||
37 | * @model required="true" | ||
38 | * @generated | ||
39 | */ | ||
40 | FunctionDeclaration getInterpretationOf(); | ||
41 | |||
42 | /** | ||
43 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation#getInterpretationOf <em>Interpretation Of</em>}' reference. | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @param value the new value of the '<em>Interpretation Of</em>' reference. | ||
47 | * @see #getInterpretationOf() | ||
48 | * @generated | ||
49 | */ | ||
50 | void setInterpretationOf(FunctionDeclaration value); | ||
51 | |||
52 | } // PartialFunctionInterpretation | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialInterpretation.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialInterpretation.java new file mode 100644 index 00000000..46c85cc8 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialInterpretation.java | |||
@@ -0,0 +1,251 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; | ||
6 | |||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem; | ||
8 | |||
9 | import org.eclipse.emf.common.util.EList; | ||
10 | |||
11 | import org.eclipse.emf.ecore.EObject; | ||
12 | |||
13 | /** | ||
14 | * <!-- begin-user-doc --> | ||
15 | * A representation of the model object '<em><b>Partial Interpretation</b></em>'. | ||
16 | * <!-- end-user-doc --> | ||
17 | * | ||
18 | * <p> | ||
19 | * The following features are supported: | ||
20 | * </p> | ||
21 | * <ul> | ||
22 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getProblem <em>Problem</em>}</li> | ||
23 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getPartialconstantinterpretation <em>Partialconstantinterpretation</em>}</li> | ||
24 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getPartialrelationinterpretation <em>Partialrelationinterpretation</em>}</li> | ||
25 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getPartialfunctioninterpretation <em>Partialfunctioninterpretation</em>}</li> | ||
26 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getNewElements <em>New Elements</em>}</li> | ||
27 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getPartialtypeinterpratation <em>Partialtypeinterpratation</em>}</li> | ||
28 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElements <em>Min New Elements</em>}</li> | ||
29 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMaxNewElements <em>Max New Elements</em>}</li> | ||
30 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getOpenWorldElementPrototype <em>Open World Element Prototype</em>}</li> | ||
31 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getProblemConainer <em>Problem Conainer</em>}</li> | ||
32 | * </ul> | ||
33 | * | ||
34 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation() | ||
35 | * @model | ||
36 | * @generated | ||
37 | */ | ||
38 | public interface PartialInterpretation extends EObject { | ||
39 | /** | ||
40 | * Returns the value of the '<em><b>Problem</b></em>' reference. | ||
41 | * <!-- begin-user-doc --> | ||
42 | * <p> | ||
43 | * If the meaning of the '<em>Problem</em>' reference isn't clear, | ||
44 | * there really should be more of a description here... | ||
45 | * </p> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @return the value of the '<em>Problem</em>' reference. | ||
48 | * @see #setProblem(LogicProblem) | ||
49 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation_Problem() | ||
50 | * @model required="true" | ||
51 | * @generated | ||
52 | */ | ||
53 | LogicProblem getProblem(); | ||
54 | |||
55 | /** | ||
56 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getProblem <em>Problem</em>}' reference. | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @param value the new value of the '<em>Problem</em>' reference. | ||
60 | * @see #getProblem() | ||
61 | * @generated | ||
62 | */ | ||
63 | void setProblem(LogicProblem value); | ||
64 | |||
65 | /** | ||
66 | * Returns the value of the '<em><b>Partialconstantinterpretation</b></em>' containment reference list. | ||
67 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation}. | ||
68 | * <!-- begin-user-doc --> | ||
69 | * <p> | ||
70 | * If the meaning of the '<em>Partialconstantinterpretation</em>' containment reference list isn't clear, | ||
71 | * there really should be more of a description here... | ||
72 | * </p> | ||
73 | * <!-- end-user-doc --> | ||
74 | * @return the value of the '<em>Partialconstantinterpretation</em>' containment reference list. | ||
75 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation_Partialconstantinterpretation() | ||
76 | * @model containment="true" | ||
77 | * @generated | ||
78 | */ | ||
79 | EList<PartialConstantInterpretation> getPartialconstantinterpretation(); | ||
80 | |||
81 | /** | ||
82 | * Returns the value of the '<em><b>Partialrelationinterpretation</b></em>' containment reference list. | ||
83 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation}. | ||
84 | * <!-- begin-user-doc --> | ||
85 | * <p> | ||
86 | * If the meaning of the '<em>Partialrelationinterpretation</em>' containment reference list isn't clear, | ||
87 | * there really should be more of a description here... | ||
88 | * </p> | ||
89 | * <!-- end-user-doc --> | ||
90 | * @return the value of the '<em>Partialrelationinterpretation</em>' containment reference list. | ||
91 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation_Partialrelationinterpretation() | ||
92 | * @model containment="true" | ||
93 | * @generated | ||
94 | */ | ||
95 | EList<PartialRelationInterpretation> getPartialrelationinterpretation(); | ||
96 | |||
97 | /** | ||
98 | * Returns the value of the '<em><b>Partialfunctioninterpretation</b></em>' containment reference list. | ||
99 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation}. | ||
100 | * <!-- begin-user-doc --> | ||
101 | * <p> | ||
102 | * If the meaning of the '<em>Partialfunctioninterpretation</em>' containment reference list isn't clear, | ||
103 | * there really should be more of a description here... | ||
104 | * </p> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @return the value of the '<em>Partialfunctioninterpretation</em>' containment reference list. | ||
107 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation_Partialfunctioninterpretation() | ||
108 | * @model containment="true" | ||
109 | * @generated | ||
110 | */ | ||
111 | EList<PartialFunctionInterpretation> getPartialfunctioninterpretation(); | ||
112 | |||
113 | /** | ||
114 | * Returns the value of the '<em><b>New Elements</b></em>' containment reference list. | ||
115 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement}. | ||
116 | * <!-- begin-user-doc --> | ||
117 | * <p> | ||
118 | * If the meaning of the '<em>New Elements</em>' containment reference list isn't clear, | ||
119 | * there really should be more of a description here... | ||
120 | * </p> | ||
121 | * <!-- end-user-doc --> | ||
122 | * @return the value of the '<em>New Elements</em>' containment reference list. | ||
123 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation_NewElements() | ||
124 | * @model containment="true" | ||
125 | * @generated | ||
126 | */ | ||
127 | EList<DefinedElement> getNewElements(); | ||
128 | |||
129 | /** | ||
130 | * Returns the value of the '<em><b>Partialtypeinterpratation</b></em>' containment reference list. | ||
131 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation}. | ||
132 | * <!-- begin-user-doc --> | ||
133 | * <p> | ||
134 | * If the meaning of the '<em>Partialtypeinterpratation</em>' containment reference list isn't clear, | ||
135 | * there really should be more of a description here... | ||
136 | * </p> | ||
137 | * <!-- end-user-doc --> | ||
138 | * @return the value of the '<em>Partialtypeinterpratation</em>' containment reference list. | ||
139 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation_Partialtypeinterpratation() | ||
140 | * @model containment="true" | ||
141 | * @generated | ||
142 | */ | ||
143 | EList<PartialTypeInterpratation> getPartialtypeinterpratation(); | ||
144 | |||
145 | /** | ||
146 | * Returns the value of the '<em><b>Min New Elements</b></em>' attribute. | ||
147 | * The default value is <code>"0"</code>. | ||
148 | * <!-- begin-user-doc --> | ||
149 | * <p> | ||
150 | * If the meaning of the '<em>Min New Elements</em>' attribute isn't clear, | ||
151 | * there really should be more of a description here... | ||
152 | * </p> | ||
153 | * <!-- end-user-doc --> | ||
154 | * @return the value of the '<em>Min New Elements</em>' attribute. | ||
155 | * @see #setMinNewElements(int) | ||
156 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation_MinNewElements() | ||
157 | * @model default="0" id="true" required="true" | ||
158 | * @generated | ||
159 | */ | ||
160 | int getMinNewElements(); | ||
161 | |||
162 | /** | ||
163 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElements <em>Min New Elements</em>}' attribute. | ||
164 | * <!-- begin-user-doc --> | ||
165 | * <!-- end-user-doc --> | ||
166 | * @param value the new value of the '<em>Min New Elements</em>' attribute. | ||
167 | * @see #getMinNewElements() | ||
168 | * @generated | ||
169 | */ | ||
170 | void setMinNewElements(int value); | ||
171 | |||
172 | /** | ||
173 | * Returns the value of the '<em><b>Max New Elements</b></em>' attribute. | ||
174 | * The default value is <code>"0"</code>. | ||
175 | * <!-- begin-user-doc --> | ||
176 | * <p> | ||
177 | * If the meaning of the '<em>Max New Elements</em>' attribute isn't clear, | ||
178 | * there really should be more of a description here... | ||
179 | * </p> | ||
180 | * <!-- end-user-doc --> | ||
181 | * @return the value of the '<em>Max New Elements</em>' attribute. | ||
182 | * @see #setMaxNewElements(int) | ||
183 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation_MaxNewElements() | ||
184 | * @model default="0" required="true" | ||
185 | * @generated | ||
186 | */ | ||
187 | int getMaxNewElements(); | ||
188 | |||
189 | /** | ||
190 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMaxNewElements <em>Max New Elements</em>}' attribute. | ||
191 | * <!-- begin-user-doc --> | ||
192 | * <!-- end-user-doc --> | ||
193 | * @param value the new value of the '<em>Max New Elements</em>' attribute. | ||
194 | * @see #getMaxNewElements() | ||
195 | * @generated | ||
196 | */ | ||
197 | void setMaxNewElements(int value); | ||
198 | |||
199 | /** | ||
200 | * Returns the value of the '<em><b>Open World Element Prototype</b></em>' containment reference. | ||
201 | * <!-- begin-user-doc --> | ||
202 | * <p> | ||
203 | * If the meaning of the '<em>Open World Element Prototype</em>' containment reference isn't clear, | ||
204 | * there really should be more of a description here... | ||
205 | * </p> | ||
206 | * <!-- end-user-doc --> | ||
207 | * @return the value of the '<em>Open World Element Prototype</em>' containment reference. | ||
208 | * @see #setOpenWorldElementPrototype(DefinedElement) | ||
209 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation_OpenWorldElementPrototype() | ||
210 | * @model containment="true" required="true" | ||
211 | * @generated | ||
212 | */ | ||
213 | DefinedElement getOpenWorldElementPrototype(); | ||
214 | |||
215 | /** | ||
216 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getOpenWorldElementPrototype <em>Open World Element Prototype</em>}' containment reference. | ||
217 | * <!-- begin-user-doc --> | ||
218 | * <!-- end-user-doc --> | ||
219 | * @param value the new value of the '<em>Open World Element Prototype</em>' containment reference. | ||
220 | * @see #getOpenWorldElementPrototype() | ||
221 | * @generated | ||
222 | */ | ||
223 | void setOpenWorldElementPrototype(DefinedElement value); | ||
224 | |||
225 | /** | ||
226 | * Returns the value of the '<em><b>Problem Conainer</b></em>' containment reference. | ||
227 | * <!-- begin-user-doc --> | ||
228 | * <p> | ||
229 | * If the meaning of the '<em>Problem Conainer</em>' containment reference isn't clear, | ||
230 | * there really should be more of a description here... | ||
231 | * </p> | ||
232 | * <!-- end-user-doc --> | ||
233 | * @return the value of the '<em>Problem Conainer</em>' containment reference. | ||
234 | * @see #setProblemConainer(LogicProblem) | ||
235 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation_ProblemConainer() | ||
236 | * @model containment="true" | ||
237 | * @generated | ||
238 | */ | ||
239 | LogicProblem getProblemConainer(); | ||
240 | |||
241 | /** | ||
242 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getProblemConainer <em>Problem Conainer</em>}' containment reference. | ||
243 | * <!-- begin-user-doc --> | ||
244 | * <!-- end-user-doc --> | ||
245 | * @param value the new value of the '<em>Problem Conainer</em>' containment reference. | ||
246 | * @see #getProblemConainer() | ||
247 | * @generated | ||
248 | */ | ||
249 | void setProblemConainer(LogicProblem value); | ||
250 | |||
251 | } // PartialInterpretation | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialRelationInterpretation.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialRelationInterpretation.java new file mode 100644 index 00000000..e1fa092f --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialRelationInterpretation.java | |||
@@ -0,0 +1,126 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration; | ||
6 | |||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeReference; | ||
8 | import org.eclipse.emf.common.util.EList; | ||
9 | |||
10 | import org.eclipse.emf.ecore.EObject; | ||
11 | |||
12 | /** | ||
13 | * <!-- begin-user-doc --> | ||
14 | * A representation of the model object '<em><b>Partial Relation Interpretation</b></em>'. | ||
15 | * <!-- end-user-doc --> | ||
16 | * | ||
17 | * <p> | ||
18 | * The following features are supported: | ||
19 | * </p> | ||
20 | * <ul> | ||
21 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getInterpretationOf <em>Interpretation Of</em>}</li> | ||
22 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getRelationlinks <em>Relationlinks</em>}</li> | ||
23 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getParam1 <em>Param1</em>}</li> | ||
24 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getParam2 <em>Param2</em>}</li> | ||
25 | * </ul> | ||
26 | * | ||
27 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialRelationInterpretation() | ||
28 | * @model | ||
29 | * @generated | ||
30 | */ | ||
31 | public interface PartialRelationInterpretation extends EObject { | ||
32 | /** | ||
33 | * Returns the value of the '<em><b>Interpretation Of</b></em>' reference. | ||
34 | * <!-- begin-user-doc --> | ||
35 | * <p> | ||
36 | * If the meaning of the '<em>Interpretation Of</em>' reference isn't clear, | ||
37 | * there really should be more of a description here... | ||
38 | * </p> | ||
39 | * <!-- end-user-doc --> | ||
40 | * @return the value of the '<em>Interpretation Of</em>' reference. | ||
41 | * @see #setInterpretationOf(RelationDeclaration) | ||
42 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialRelationInterpretation_InterpretationOf() | ||
43 | * @model required="true" | ||
44 | * @generated | ||
45 | */ | ||
46 | RelationDeclaration getInterpretationOf(); | ||
47 | |||
48 | /** | ||
49 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getInterpretationOf <em>Interpretation Of</em>}' reference. | ||
50 | * <!-- begin-user-doc --> | ||
51 | * <!-- end-user-doc --> | ||
52 | * @param value the new value of the '<em>Interpretation Of</em>' reference. | ||
53 | * @see #getInterpretationOf() | ||
54 | * @generated | ||
55 | */ | ||
56 | void setInterpretationOf(RelationDeclaration value); | ||
57 | |||
58 | /** | ||
59 | * Returns the value of the '<em><b>Relationlinks</b></em>' containment reference list. | ||
60 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink}. | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <p> | ||
63 | * If the meaning of the '<em>Relationlinks</em>' containment reference list isn't clear, | ||
64 | * there really should be more of a description here... | ||
65 | * </p> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @return the value of the '<em>Relationlinks</em>' containment reference list. | ||
68 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialRelationInterpretation_Relationlinks() | ||
69 | * @model containment="true" | ||
70 | * @generated | ||
71 | */ | ||
72 | EList<RelationLink> getRelationlinks(); | ||
73 | |||
74 | /** | ||
75 | * Returns the value of the '<em><b>Param1</b></em>' reference. | ||
76 | * <!-- begin-user-doc --> | ||
77 | * <p> | ||
78 | * If the meaning of the '<em>Param1</em>' reference isn't clear, | ||
79 | * there really should be more of a description here... | ||
80 | * </p> | ||
81 | * <!-- end-user-doc --> | ||
82 | * @return the value of the '<em>Param1</em>' reference. | ||
83 | * @see #setParam1(TypeReference) | ||
84 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialRelationInterpretation_Param1() | ||
85 | * @model | ||
86 | * @generated | ||
87 | */ | ||
88 | TypeReference getParam1(); | ||
89 | |||
90 | /** | ||
91 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getParam1 <em>Param1</em>}' reference. | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @param value the new value of the '<em>Param1</em>' reference. | ||
95 | * @see #getParam1() | ||
96 | * @generated | ||
97 | */ | ||
98 | void setParam1(TypeReference value); | ||
99 | |||
100 | /** | ||
101 | * Returns the value of the '<em><b>Param2</b></em>' reference. | ||
102 | * <!-- begin-user-doc --> | ||
103 | * <p> | ||
104 | * If the meaning of the '<em>Param2</em>' reference isn't clear, | ||
105 | * there really should be more of a description here... | ||
106 | * </p> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @return the value of the '<em>Param2</em>' reference. | ||
109 | * @see #setParam2(TypeReference) | ||
110 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialRelationInterpretation_Param2() | ||
111 | * @model | ||
112 | * @generated | ||
113 | */ | ||
114 | TypeReference getParam2(); | ||
115 | |||
116 | /** | ||
117 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getParam2 <em>Param2</em>}' reference. | ||
118 | * <!-- begin-user-doc --> | ||
119 | * <!-- end-user-doc --> | ||
120 | * @param value the new value of the '<em>Param2</em>' reference. | ||
121 | * @see #getParam2() | ||
122 | * @generated | ||
123 | */ | ||
124 | void setParam2(TypeReference value); | ||
125 | |||
126 | } // PartialRelationInterpretation | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialTypeInterpratation.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialTypeInterpratation.java new file mode 100644 index 00000000..ff313b42 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialTypeInterpratation.java | |||
@@ -0,0 +1,88 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration; | ||
7 | |||
8 | import org.eclipse.emf.common.util.EList; | ||
9 | import org.eclipse.emf.ecore.EObject; | ||
10 | |||
11 | /** | ||
12 | * <!-- begin-user-doc --> | ||
13 | * A representation of the model object '<em><b>Partial Type Interpratation</b></em>'. | ||
14 | * <!-- end-user-doc --> | ||
15 | * | ||
16 | * <p> | ||
17 | * The following features are supported: | ||
18 | * </p> | ||
19 | * <ul> | ||
20 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getInterpretationOf <em>Interpretation Of</em>}</li> | ||
21 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getElements <em>Elements</em>}</li> | ||
22 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getSupertypeInterpretation <em>Supertype Interpretation</em>}</li> | ||
23 | * </ul> | ||
24 | * | ||
25 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialTypeInterpratation() | ||
26 | * @model | ||
27 | * @generated | ||
28 | */ | ||
29 | public interface PartialTypeInterpratation extends EObject { | ||
30 | /** | ||
31 | * Returns the value of the '<em><b>Interpretation Of</b></em>' reference. | ||
32 | * <!-- begin-user-doc --> | ||
33 | * <p> | ||
34 | * If the meaning of the '<em>Interpretation Of</em>' reference isn't clear, | ||
35 | * there really should be more of a description here... | ||
36 | * </p> | ||
37 | * <!-- end-user-doc --> | ||
38 | * @return the value of the '<em>Interpretation Of</em>' reference. | ||
39 | * @see #setInterpretationOf(TypeDeclaration) | ||
40 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialTypeInterpratation_InterpretationOf() | ||
41 | * @model required="true" | ||
42 | * @generated | ||
43 | */ | ||
44 | TypeDeclaration getInterpretationOf(); | ||
45 | |||
46 | /** | ||
47 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getInterpretationOf <em>Interpretation Of</em>}' reference. | ||
48 | * <!-- begin-user-doc --> | ||
49 | * <!-- end-user-doc --> | ||
50 | * @param value the new value of the '<em>Interpretation Of</em>' reference. | ||
51 | * @see #getInterpretationOf() | ||
52 | * @generated | ||
53 | */ | ||
54 | void setInterpretationOf(TypeDeclaration value); | ||
55 | |||
56 | /** | ||
57 | * Returns the value of the '<em><b>Elements</b></em>' reference list. | ||
58 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement}. | ||
59 | * <!-- begin-user-doc --> | ||
60 | * <p> | ||
61 | * If the meaning of the '<em>Elements</em>' reference isn't clear, | ||
62 | * there really should be more of a description here... | ||
63 | * </p> | ||
64 | * <!-- end-user-doc --> | ||
65 | * @return the value of the '<em>Elements</em>' reference list. | ||
66 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialTypeInterpratation_Elements() | ||
67 | * @model | ||
68 | * @generated | ||
69 | */ | ||
70 | EList<DefinedElement> getElements(); | ||
71 | |||
72 | /** | ||
73 | * Returns the value of the '<em><b>Supertype Interpretation</b></em>' reference list. | ||
74 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation}. | ||
75 | * <!-- begin-user-doc --> | ||
76 | * <p> | ||
77 | * If the meaning of the '<em>Supertype Interpretation</em>' reference list isn't clear, | ||
78 | * there really should be more of a description here... | ||
79 | * </p> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @return the value of the '<em>Supertype Interpretation</em>' reference list. | ||
82 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialTypeInterpratation_SupertypeInterpretation() | ||
83 | * @model | ||
84 | * @generated | ||
85 | */ | ||
86 | EList<PartialTypeInterpratation> getSupertypeInterpretation(); | ||
87 | |||
88 | } // PartialTypeInterpratation | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationFactory.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationFactory.java new file mode 100644 index 00000000..406e2f02 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationFactory.java | |||
@@ -0,0 +1,114 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EFactory; | ||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * The <b>Factory</b> for the model. | ||
10 | * It provides a create method for each non-abstract class of the model. | ||
11 | * <!-- end-user-doc --> | ||
12 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage | ||
13 | * @generated | ||
14 | */ | ||
15 | public interface PartialinterpretationFactory extends EFactory { | ||
16 | /** | ||
17 | * The singleton instance of the factory. | ||
18 | * <!-- begin-user-doc --> | ||
19 | * <!-- end-user-doc --> | ||
20 | * @generated | ||
21 | */ | ||
22 | PartialinterpretationFactory eINSTANCE = hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationFactoryImpl.init(); | ||
23 | |||
24 | /** | ||
25 | * Returns a new object of class '<em>Partial Interpretation</em>'. | ||
26 | * <!-- begin-user-doc --> | ||
27 | * <!-- end-user-doc --> | ||
28 | * @return a new object of class '<em>Partial Interpretation</em>'. | ||
29 | * @generated | ||
30 | */ | ||
31 | PartialInterpretation createPartialInterpretation(); | ||
32 | |||
33 | /** | ||
34 | * Returns a new object of class '<em>Partial Constant Interpretation</em>'. | ||
35 | * <!-- begin-user-doc --> | ||
36 | * <!-- end-user-doc --> | ||
37 | * @return a new object of class '<em>Partial Constant Interpretation</em>'. | ||
38 | * @generated | ||
39 | */ | ||
40 | PartialConstantInterpretation createPartialConstantInterpretation(); | ||
41 | |||
42 | /** | ||
43 | * Returns a new object of class '<em>Partial Relation Interpretation</em>'. | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @return a new object of class '<em>Partial Relation Interpretation</em>'. | ||
47 | * @generated | ||
48 | */ | ||
49 | PartialRelationInterpretation createPartialRelationInterpretation(); | ||
50 | |||
51 | /** | ||
52 | * Returns a new object of class '<em>Partial Function Interpretation</em>'. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @return a new object of class '<em>Partial Function Interpretation</em>'. | ||
56 | * @generated | ||
57 | */ | ||
58 | PartialFunctionInterpretation createPartialFunctionInterpretation(); | ||
59 | |||
60 | /** | ||
61 | * Returns a new object of class '<em>Partial Type Interpratation</em>'. | ||
62 | * <!-- begin-user-doc --> | ||
63 | * <!-- end-user-doc --> | ||
64 | * @return a new object of class '<em>Partial Type Interpratation</em>'. | ||
65 | * @generated | ||
66 | */ | ||
67 | PartialTypeInterpratation createPartialTypeInterpratation(); | ||
68 | |||
69 | /** | ||
70 | * Returns a new object of class '<em>Unary Element Relation Link</em>'. | ||
71 | * <!-- begin-user-doc --> | ||
72 | * <!-- end-user-doc --> | ||
73 | * @return a new object of class '<em>Unary Element Relation Link</em>'. | ||
74 | * @generated | ||
75 | */ | ||
76 | UnaryElementRelationLink createUnaryElementRelationLink(); | ||
77 | |||
78 | /** | ||
79 | * Returns a new object of class '<em>Binary Element Relation Link</em>'. | ||
80 | * <!-- begin-user-doc --> | ||
81 | * <!-- end-user-doc --> | ||
82 | * @return a new object of class '<em>Binary Element Relation Link</em>'. | ||
83 | * @generated | ||
84 | */ | ||
85 | BinaryElementRelationLink createBinaryElementRelationLink(); | ||
86 | |||
87 | /** | ||
88 | * Returns a new object of class '<em>Nary Relation Link</em>'. | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @return a new object of class '<em>Nary Relation Link</em>'. | ||
92 | * @generated | ||
93 | */ | ||
94 | NaryRelationLink createNaryRelationLink(); | ||
95 | |||
96 | /** | ||
97 | * Returns a new object of class '<em>Nary Relation Link Element</em>'. | ||
98 | * <!-- begin-user-doc --> | ||
99 | * <!-- end-user-doc --> | ||
100 | * @return a new object of class '<em>Nary Relation Link Element</em>'. | ||
101 | * @generated | ||
102 | */ | ||
103 | NaryRelationLinkElement createNaryRelationLinkElement(); | ||
104 | |||
105 | /** | ||
106 | * Returns the package supported by this factory. | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @return the package supported by this factory. | ||
110 | * @generated | ||
111 | */ | ||
112 | PartialinterpretationPackage getPartialinterpretationPackage(); | ||
113 | |||
114 | } //PartialinterpretationFactory | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationPackage.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationPackage.java new file mode 100644 index 00000000..573500dd --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationPackage.java | |||
@@ -0,0 +1,1237 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EAttribute; | ||
6 | import org.eclipse.emf.ecore.EClass; | ||
7 | import org.eclipse.emf.ecore.EPackage; | ||
8 | import org.eclipse.emf.ecore.EReference; | ||
9 | |||
10 | /** | ||
11 | * <!-- begin-user-doc --> | ||
12 | * The <b>Package</b> for the model. | ||
13 | * It contains accessors for the meta objects to represent | ||
14 | * <ul> | ||
15 | * <li>each class,</li> | ||
16 | * <li>each feature of each class,</li> | ||
17 | * <li>each operation of each class,</li> | ||
18 | * <li>each enum,</li> | ||
19 | * <li>and each data type</li> | ||
20 | * </ul> | ||
21 | * <!-- end-user-doc --> | ||
22 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationFactory | ||
23 | * @model kind="package" | ||
24 | * @generated | ||
25 | */ | ||
26 | public interface PartialinterpretationPackage extends EPackage { | ||
27 | /** | ||
28 | * The package name. | ||
29 | * <!-- begin-user-doc --> | ||
30 | * <!-- end-user-doc --> | ||
31 | * @generated | ||
32 | */ | ||
33 | String eNAME = "partialinterpretation"; | ||
34 | |||
35 | /** | ||
36 | * The package namespace URI. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @generated | ||
40 | */ | ||
41 | String eNS_URI = "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"; | ||
42 | |||
43 | /** | ||
44 | * The package namespace name. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @generated | ||
48 | */ | ||
49 | String eNS_PREFIX = "partialinterpretation"; | ||
50 | |||
51 | /** | ||
52 | * The singleton instance of the package. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @generated | ||
56 | */ | ||
57 | PartialinterpretationPackage eINSTANCE = hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl.init(); | ||
58 | |||
59 | /** | ||
60 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl <em>Partial Interpretation</em>}' class. | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl | ||
64 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getPartialInterpretation() | ||
65 | * @generated | ||
66 | */ | ||
67 | int PARTIAL_INTERPRETATION = 0; | ||
68 | |||
69 | /** | ||
70 | * The feature id for the '<em><b>Problem</b></em>' reference. | ||
71 | * <!-- begin-user-doc --> | ||
72 | * <!-- end-user-doc --> | ||
73 | * @generated | ||
74 | * @ordered | ||
75 | */ | ||
76 | int PARTIAL_INTERPRETATION__PROBLEM = 0; | ||
77 | |||
78 | /** | ||
79 | * The feature id for the '<em><b>Partialconstantinterpretation</b></em>' containment reference list. | ||
80 | * <!-- begin-user-doc --> | ||
81 | * <!-- end-user-doc --> | ||
82 | * @generated | ||
83 | * @ordered | ||
84 | */ | ||
85 | int PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION = 1; | ||
86 | |||
87 | /** | ||
88 | * The feature id for the '<em><b>Partialrelationinterpretation</b></em>' containment reference list. | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @generated | ||
92 | * @ordered | ||
93 | */ | ||
94 | int PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION = 2; | ||
95 | |||
96 | /** | ||
97 | * The feature id for the '<em><b>Partialfunctioninterpretation</b></em>' containment reference list. | ||
98 | * <!-- begin-user-doc --> | ||
99 | * <!-- end-user-doc --> | ||
100 | * @generated | ||
101 | * @ordered | ||
102 | */ | ||
103 | int PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION = 3; | ||
104 | |||
105 | /** | ||
106 | * The feature id for the '<em><b>New Elements</b></em>' containment reference list. | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @generated | ||
110 | * @ordered | ||
111 | */ | ||
112 | int PARTIAL_INTERPRETATION__NEW_ELEMENTS = 4; | ||
113 | |||
114 | /** | ||
115 | * The feature id for the '<em><b>Partialtypeinterpratation</b></em>' containment reference list. | ||
116 | * <!-- begin-user-doc --> | ||
117 | * <!-- end-user-doc --> | ||
118 | * @generated | ||
119 | * @ordered | ||
120 | */ | ||
121 | int PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION = 5; | ||
122 | |||
123 | /** | ||
124 | * The feature id for the '<em><b>Min New Elements</b></em>' attribute. | ||
125 | * <!-- begin-user-doc --> | ||
126 | * <!-- end-user-doc --> | ||
127 | * @generated | ||
128 | * @ordered | ||
129 | */ | ||
130 | int PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS = 6; | ||
131 | |||
132 | /** | ||
133 | * The feature id for the '<em><b>Max New Elements</b></em>' attribute. | ||
134 | * <!-- begin-user-doc --> | ||
135 | * <!-- end-user-doc --> | ||
136 | * @generated | ||
137 | * @ordered | ||
138 | */ | ||
139 | int PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS = 7; | ||
140 | |||
141 | /** | ||
142 | * The feature id for the '<em><b>Open World Element Prototype</b></em>' containment reference. | ||
143 | * <!-- begin-user-doc --> | ||
144 | * <!-- end-user-doc --> | ||
145 | * @generated | ||
146 | * @ordered | ||
147 | */ | ||
148 | int PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE = 8; | ||
149 | |||
150 | /** | ||
151 | * The feature id for the '<em><b>Problem Conainer</b></em>' containment reference. | ||
152 | * <!-- begin-user-doc --> | ||
153 | * <!-- end-user-doc --> | ||
154 | * @generated | ||
155 | * @ordered | ||
156 | */ | ||
157 | int PARTIAL_INTERPRETATION__PROBLEM_CONAINER = 9; | ||
158 | |||
159 | /** | ||
160 | * The number of structural features of the '<em>Partial Interpretation</em>' class. | ||
161 | * <!-- begin-user-doc --> | ||
162 | * <!-- end-user-doc --> | ||
163 | * @generated | ||
164 | * @ordered | ||
165 | */ | ||
166 | int PARTIAL_INTERPRETATION_FEATURE_COUNT = 10; | ||
167 | |||
168 | /** | ||
169 | * The number of operations of the '<em>Partial Interpretation</em>' class. | ||
170 | * <!-- begin-user-doc --> | ||
171 | * <!-- end-user-doc --> | ||
172 | * @generated | ||
173 | * @ordered | ||
174 | */ | ||
175 | int PARTIAL_INTERPRETATION_OPERATION_COUNT = 0; | ||
176 | |||
177 | /** | ||
178 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialConstantInterpretationImpl <em>Partial Constant Interpretation</em>}' class. | ||
179 | * <!-- begin-user-doc --> | ||
180 | * <!-- end-user-doc --> | ||
181 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialConstantInterpretationImpl | ||
182 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getPartialConstantInterpretation() | ||
183 | * @generated | ||
184 | */ | ||
185 | int PARTIAL_CONSTANT_INTERPRETATION = 1; | ||
186 | |||
187 | /** | ||
188 | * The feature id for the '<em><b>Interpretation Of</b></em>' reference. | ||
189 | * <!-- begin-user-doc --> | ||
190 | * <!-- end-user-doc --> | ||
191 | * @generated | ||
192 | * @ordered | ||
193 | */ | ||
194 | int PARTIAL_CONSTANT_INTERPRETATION__INTERPRETATION_OF = 0; | ||
195 | |||
196 | /** | ||
197 | * The number of structural features of the '<em>Partial Constant Interpretation</em>' class. | ||
198 | * <!-- begin-user-doc --> | ||
199 | * <!-- end-user-doc --> | ||
200 | * @generated | ||
201 | * @ordered | ||
202 | */ | ||
203 | int PARTIAL_CONSTANT_INTERPRETATION_FEATURE_COUNT = 1; | ||
204 | |||
205 | /** | ||
206 | * The number of operations of the '<em>Partial Constant Interpretation</em>' class. | ||
207 | * <!-- begin-user-doc --> | ||
208 | * <!-- end-user-doc --> | ||
209 | * @generated | ||
210 | * @ordered | ||
211 | */ | ||
212 | int PARTIAL_CONSTANT_INTERPRETATION_OPERATION_COUNT = 0; | ||
213 | |||
214 | /** | ||
215 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialRelationInterpretationImpl <em>Partial Relation Interpretation</em>}' class. | ||
216 | * <!-- begin-user-doc --> | ||
217 | * <!-- end-user-doc --> | ||
218 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialRelationInterpretationImpl | ||
219 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getPartialRelationInterpretation() | ||
220 | * @generated | ||
221 | */ | ||
222 | int PARTIAL_RELATION_INTERPRETATION = 2; | ||
223 | |||
224 | /** | ||
225 | * The feature id for the '<em><b>Interpretation Of</b></em>' reference. | ||
226 | * <!-- begin-user-doc --> | ||
227 | * <!-- end-user-doc --> | ||
228 | * @generated | ||
229 | * @ordered | ||
230 | */ | ||
231 | int PARTIAL_RELATION_INTERPRETATION__INTERPRETATION_OF = 0; | ||
232 | |||
233 | /** | ||
234 | * The feature id for the '<em><b>Relationlinks</b></em>' containment reference list. | ||
235 | * <!-- begin-user-doc --> | ||
236 | * <!-- end-user-doc --> | ||
237 | * @generated | ||
238 | * @ordered | ||
239 | */ | ||
240 | int PARTIAL_RELATION_INTERPRETATION__RELATIONLINKS = 1; | ||
241 | |||
242 | /** | ||
243 | * The feature id for the '<em><b>Param1</b></em>' reference. | ||
244 | * <!-- begin-user-doc --> | ||
245 | * <!-- end-user-doc --> | ||
246 | * @generated | ||
247 | * @ordered | ||
248 | */ | ||
249 | int PARTIAL_RELATION_INTERPRETATION__PARAM1 = 2; | ||
250 | |||
251 | /** | ||
252 | * The feature id for the '<em><b>Param2</b></em>' reference. | ||
253 | * <!-- begin-user-doc --> | ||
254 | * <!-- end-user-doc --> | ||
255 | * @generated | ||
256 | * @ordered | ||
257 | */ | ||
258 | int PARTIAL_RELATION_INTERPRETATION__PARAM2 = 3; | ||
259 | |||
260 | /** | ||
261 | * The number of structural features of the '<em>Partial Relation Interpretation</em>' class. | ||
262 | * <!-- begin-user-doc --> | ||
263 | * <!-- end-user-doc --> | ||
264 | * @generated | ||
265 | * @ordered | ||
266 | */ | ||
267 | int PARTIAL_RELATION_INTERPRETATION_FEATURE_COUNT = 4; | ||
268 | |||
269 | /** | ||
270 | * The number of operations of the '<em>Partial Relation Interpretation</em>' class. | ||
271 | * <!-- begin-user-doc --> | ||
272 | * <!-- end-user-doc --> | ||
273 | * @generated | ||
274 | * @ordered | ||
275 | */ | ||
276 | int PARTIAL_RELATION_INTERPRETATION_OPERATION_COUNT = 0; | ||
277 | |||
278 | /** | ||
279 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialFunctionInterpretationImpl <em>Partial Function Interpretation</em>}' class. | ||
280 | * <!-- begin-user-doc --> | ||
281 | * <!-- end-user-doc --> | ||
282 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialFunctionInterpretationImpl | ||
283 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getPartialFunctionInterpretation() | ||
284 | * @generated | ||
285 | */ | ||
286 | int PARTIAL_FUNCTION_INTERPRETATION = 3; | ||
287 | |||
288 | /** | ||
289 | * The feature id for the '<em><b>Interpretation Of</b></em>' reference. | ||
290 | * <!-- begin-user-doc --> | ||
291 | * <!-- end-user-doc --> | ||
292 | * @generated | ||
293 | * @ordered | ||
294 | */ | ||
295 | int PARTIAL_FUNCTION_INTERPRETATION__INTERPRETATION_OF = 0; | ||
296 | |||
297 | /** | ||
298 | * The number of structural features of the '<em>Partial Function Interpretation</em>' class. | ||
299 | * <!-- begin-user-doc --> | ||
300 | * <!-- end-user-doc --> | ||
301 | * @generated | ||
302 | * @ordered | ||
303 | */ | ||
304 | int PARTIAL_FUNCTION_INTERPRETATION_FEATURE_COUNT = 1; | ||
305 | |||
306 | /** | ||
307 | * The number of operations of the '<em>Partial Function Interpretation</em>' class. | ||
308 | * <!-- begin-user-doc --> | ||
309 | * <!-- end-user-doc --> | ||
310 | * @generated | ||
311 | * @ordered | ||
312 | */ | ||
313 | int PARTIAL_FUNCTION_INTERPRETATION_OPERATION_COUNT = 0; | ||
314 | |||
315 | /** | ||
316 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialTypeInterpratationImpl <em>Partial Type Interpratation</em>}' class. | ||
317 | * <!-- begin-user-doc --> | ||
318 | * <!-- end-user-doc --> | ||
319 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialTypeInterpratationImpl | ||
320 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getPartialTypeInterpratation() | ||
321 | * @generated | ||
322 | */ | ||
323 | int PARTIAL_TYPE_INTERPRATATION = 4; | ||
324 | |||
325 | /** | ||
326 | * The feature id for the '<em><b>Interpretation Of</b></em>' reference. | ||
327 | * <!-- begin-user-doc --> | ||
328 | * <!-- end-user-doc --> | ||
329 | * @generated | ||
330 | * @ordered | ||
331 | */ | ||
332 | int PARTIAL_TYPE_INTERPRATATION__INTERPRETATION_OF = 0; | ||
333 | |||
334 | /** | ||
335 | * The feature id for the '<em><b>Elements</b></em>' reference list. | ||
336 | * <!-- begin-user-doc --> | ||
337 | * <!-- end-user-doc --> | ||
338 | * @generated | ||
339 | * @ordered | ||
340 | */ | ||
341 | int PARTIAL_TYPE_INTERPRATATION__ELEMENTS = 1; | ||
342 | |||
343 | /** | ||
344 | * The feature id for the '<em><b>Supertype Interpretation</b></em>' reference list. | ||
345 | * <!-- begin-user-doc --> | ||
346 | * <!-- end-user-doc --> | ||
347 | * @generated | ||
348 | * @ordered | ||
349 | */ | ||
350 | int PARTIAL_TYPE_INTERPRATATION__SUPERTYPE_INTERPRETATION = 2; | ||
351 | |||
352 | /** | ||
353 | * The number of structural features of the '<em>Partial Type Interpratation</em>' class. | ||
354 | * <!-- begin-user-doc --> | ||
355 | * <!-- end-user-doc --> | ||
356 | * @generated | ||
357 | * @ordered | ||
358 | */ | ||
359 | int PARTIAL_TYPE_INTERPRATATION_FEATURE_COUNT = 3; | ||
360 | |||
361 | /** | ||
362 | * The number of operations of the '<em>Partial Type Interpratation</em>' class. | ||
363 | * <!-- begin-user-doc --> | ||
364 | * <!-- end-user-doc --> | ||
365 | * @generated | ||
366 | * @ordered | ||
367 | */ | ||
368 | int PARTIAL_TYPE_INTERPRATATION_OPERATION_COUNT = 0; | ||
369 | |||
370 | /** | ||
371 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.RelationLinkImpl <em>Relation Link</em>}' class. | ||
372 | * <!-- begin-user-doc --> | ||
373 | * <!-- end-user-doc --> | ||
374 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.RelationLinkImpl | ||
375 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getRelationLink() | ||
376 | * @generated | ||
377 | */ | ||
378 | int RELATION_LINK = 5; | ||
379 | |||
380 | /** | ||
381 | * The number of structural features of the '<em>Relation Link</em>' class. | ||
382 | * <!-- begin-user-doc --> | ||
383 | * <!-- end-user-doc --> | ||
384 | * @generated | ||
385 | * @ordered | ||
386 | */ | ||
387 | int RELATION_LINK_FEATURE_COUNT = 0; | ||
388 | |||
389 | /** | ||
390 | * The number of operations of the '<em>Relation Link</em>' class. | ||
391 | * <!-- begin-user-doc --> | ||
392 | * <!-- end-user-doc --> | ||
393 | * @generated | ||
394 | * @ordered | ||
395 | */ | ||
396 | int RELATION_LINK_OPERATION_COUNT = 0; | ||
397 | |||
398 | /** | ||
399 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.UnaryElementRelationLinkImpl <em>Unary Element Relation Link</em>}' class. | ||
400 | * <!-- begin-user-doc --> | ||
401 | * <!-- end-user-doc --> | ||
402 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.UnaryElementRelationLinkImpl | ||
403 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getUnaryElementRelationLink() | ||
404 | * @generated | ||
405 | */ | ||
406 | int UNARY_ELEMENT_RELATION_LINK = 6; | ||
407 | |||
408 | /** | ||
409 | * The feature id for the '<em><b>Param1</b></em>' reference. | ||
410 | * <!-- begin-user-doc --> | ||
411 | * <!-- end-user-doc --> | ||
412 | * @generated | ||
413 | * @ordered | ||
414 | */ | ||
415 | int UNARY_ELEMENT_RELATION_LINK__PARAM1 = RELATION_LINK_FEATURE_COUNT + 0; | ||
416 | |||
417 | /** | ||
418 | * The number of structural features of the '<em>Unary Element Relation Link</em>' class. | ||
419 | * <!-- begin-user-doc --> | ||
420 | * <!-- end-user-doc --> | ||
421 | * @generated | ||
422 | * @ordered | ||
423 | */ | ||
424 | int UNARY_ELEMENT_RELATION_LINK_FEATURE_COUNT = RELATION_LINK_FEATURE_COUNT + 1; | ||
425 | |||
426 | /** | ||
427 | * The number of operations of the '<em>Unary Element Relation Link</em>' class. | ||
428 | * <!-- begin-user-doc --> | ||
429 | * <!-- end-user-doc --> | ||
430 | * @generated | ||
431 | * @ordered | ||
432 | */ | ||
433 | int UNARY_ELEMENT_RELATION_LINK_OPERATION_COUNT = RELATION_LINK_OPERATION_COUNT + 0; | ||
434 | |||
435 | /** | ||
436 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.BinaryElementRelationLinkImpl <em>Binary Element Relation Link</em>}' class. | ||
437 | * <!-- begin-user-doc --> | ||
438 | * <!-- end-user-doc --> | ||
439 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.BinaryElementRelationLinkImpl | ||
440 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getBinaryElementRelationLink() | ||
441 | * @generated | ||
442 | */ | ||
443 | int BINARY_ELEMENT_RELATION_LINK = 7; | ||
444 | |||
445 | /** | ||
446 | * The feature id for the '<em><b>Param1</b></em>' reference. | ||
447 | * <!-- begin-user-doc --> | ||
448 | * <!-- end-user-doc --> | ||
449 | * @generated | ||
450 | * @ordered | ||
451 | */ | ||
452 | int BINARY_ELEMENT_RELATION_LINK__PARAM1 = RELATION_LINK_FEATURE_COUNT + 0; | ||
453 | |||
454 | /** | ||
455 | * The feature id for the '<em><b>Param2</b></em>' reference. | ||
456 | * <!-- begin-user-doc --> | ||
457 | * <!-- end-user-doc --> | ||
458 | * @generated | ||
459 | * @ordered | ||
460 | */ | ||
461 | int BINARY_ELEMENT_RELATION_LINK__PARAM2 = RELATION_LINK_FEATURE_COUNT + 1; | ||
462 | |||
463 | /** | ||
464 | * The number of structural features of the '<em>Binary Element Relation Link</em>' class. | ||
465 | * <!-- begin-user-doc --> | ||
466 | * <!-- end-user-doc --> | ||
467 | * @generated | ||
468 | * @ordered | ||
469 | */ | ||
470 | int BINARY_ELEMENT_RELATION_LINK_FEATURE_COUNT = RELATION_LINK_FEATURE_COUNT + 2; | ||
471 | |||
472 | /** | ||
473 | * The number of operations of the '<em>Binary Element Relation Link</em>' class. | ||
474 | * <!-- begin-user-doc --> | ||
475 | * <!-- end-user-doc --> | ||
476 | * @generated | ||
477 | * @ordered | ||
478 | */ | ||
479 | int BINARY_ELEMENT_RELATION_LINK_OPERATION_COUNT = RELATION_LINK_OPERATION_COUNT + 0; | ||
480 | |||
481 | /** | ||
482 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.NaryRelationLinkImpl <em>Nary Relation Link</em>}' class. | ||
483 | * <!-- begin-user-doc --> | ||
484 | * <!-- end-user-doc --> | ||
485 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.NaryRelationLinkImpl | ||
486 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getNaryRelationLink() | ||
487 | * @generated | ||
488 | */ | ||
489 | int NARY_RELATION_LINK = 8; | ||
490 | |||
491 | /** | ||
492 | * The feature id for the '<em><b>Elements</b></em>' containment reference list. | ||
493 | * <!-- begin-user-doc --> | ||
494 | * <!-- end-user-doc --> | ||
495 | * @generated | ||
496 | * @ordered | ||
497 | */ | ||
498 | int NARY_RELATION_LINK__ELEMENTS = RELATION_LINK_FEATURE_COUNT + 0; | ||
499 | |||
500 | /** | ||
501 | * The number of structural features of the '<em>Nary Relation Link</em>' class. | ||
502 | * <!-- begin-user-doc --> | ||
503 | * <!-- end-user-doc --> | ||
504 | * @generated | ||
505 | * @ordered | ||
506 | */ | ||
507 | int NARY_RELATION_LINK_FEATURE_COUNT = RELATION_LINK_FEATURE_COUNT + 1; | ||
508 | |||
509 | /** | ||
510 | * The number of operations of the '<em>Nary Relation Link</em>' class. | ||
511 | * <!-- begin-user-doc --> | ||
512 | * <!-- end-user-doc --> | ||
513 | * @generated | ||
514 | * @ordered | ||
515 | */ | ||
516 | int NARY_RELATION_LINK_OPERATION_COUNT = RELATION_LINK_OPERATION_COUNT + 0; | ||
517 | |||
518 | /** | ||
519 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.NaryRelationLinkElementImpl <em>Nary Relation Link Element</em>}' class. | ||
520 | * <!-- begin-user-doc --> | ||
521 | * <!-- end-user-doc --> | ||
522 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.NaryRelationLinkElementImpl | ||
523 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getNaryRelationLinkElement() | ||
524 | * @generated | ||
525 | */ | ||
526 | int NARY_RELATION_LINK_ELEMENT = 9; | ||
527 | |||
528 | /** | ||
529 | * The feature id for the '<em><b>Index</b></em>' attribute. | ||
530 | * <!-- begin-user-doc --> | ||
531 | * <!-- end-user-doc --> | ||
532 | * @generated | ||
533 | * @ordered | ||
534 | */ | ||
535 | int NARY_RELATION_LINK_ELEMENT__INDEX = 0; | ||
536 | |||
537 | /** | ||
538 | * The number of structural features of the '<em>Nary Relation Link Element</em>' class. | ||
539 | * <!-- begin-user-doc --> | ||
540 | * <!-- end-user-doc --> | ||
541 | * @generated | ||
542 | * @ordered | ||
543 | */ | ||
544 | int NARY_RELATION_LINK_ELEMENT_FEATURE_COUNT = 1; | ||
545 | |||
546 | /** | ||
547 | * The number of operations of the '<em>Nary Relation Link Element</em>' class. | ||
548 | * <!-- begin-user-doc --> | ||
549 | * <!-- end-user-doc --> | ||
550 | * @generated | ||
551 | * @ordered | ||
552 | */ | ||
553 | int NARY_RELATION_LINK_ELEMENT_OPERATION_COUNT = 0; | ||
554 | |||
555 | |||
556 | /** | ||
557 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation <em>Partial Interpretation</em>}'. | ||
558 | * <!-- begin-user-doc --> | ||
559 | * <!-- end-user-doc --> | ||
560 | * @return the meta object for class '<em>Partial Interpretation</em>'. | ||
561 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
562 | * @generated | ||
563 | */ | ||
564 | EClass getPartialInterpretation(); | ||
565 | |||
566 | /** | ||
567 | * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getProblem <em>Problem</em>}'. | ||
568 | * <!-- begin-user-doc --> | ||
569 | * <!-- end-user-doc --> | ||
570 | * @return the meta object for the reference '<em>Problem</em>'. | ||
571 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getProblem() | ||
572 | * @see #getPartialInterpretation() | ||
573 | * @generated | ||
574 | */ | ||
575 | EReference getPartialInterpretation_Problem(); | ||
576 | |||
577 | /** | ||
578 | * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getPartialconstantinterpretation <em>Partialconstantinterpretation</em>}'. | ||
579 | * <!-- begin-user-doc --> | ||
580 | * <!-- end-user-doc --> | ||
581 | * @return the meta object for the containment reference list '<em>Partialconstantinterpretation</em>'. | ||
582 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getPartialconstantinterpretation() | ||
583 | * @see #getPartialInterpretation() | ||
584 | * @generated | ||
585 | */ | ||
586 | EReference getPartialInterpretation_Partialconstantinterpretation(); | ||
587 | |||
588 | /** | ||
589 | * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getPartialrelationinterpretation <em>Partialrelationinterpretation</em>}'. | ||
590 | * <!-- begin-user-doc --> | ||
591 | * <!-- end-user-doc --> | ||
592 | * @return the meta object for the containment reference list '<em>Partialrelationinterpretation</em>'. | ||
593 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getPartialrelationinterpretation() | ||
594 | * @see #getPartialInterpretation() | ||
595 | * @generated | ||
596 | */ | ||
597 | EReference getPartialInterpretation_Partialrelationinterpretation(); | ||
598 | |||
599 | /** | ||
600 | * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getPartialfunctioninterpretation <em>Partialfunctioninterpretation</em>}'. | ||
601 | * <!-- begin-user-doc --> | ||
602 | * <!-- end-user-doc --> | ||
603 | * @return the meta object for the containment reference list '<em>Partialfunctioninterpretation</em>'. | ||
604 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getPartialfunctioninterpretation() | ||
605 | * @see #getPartialInterpretation() | ||
606 | * @generated | ||
607 | */ | ||
608 | EReference getPartialInterpretation_Partialfunctioninterpretation(); | ||
609 | |||
610 | /** | ||
611 | * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getNewElements <em>New Elements</em>}'. | ||
612 | * <!-- begin-user-doc --> | ||
613 | * <!-- end-user-doc --> | ||
614 | * @return the meta object for the containment reference list '<em>New Elements</em>'. | ||
615 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getNewElements() | ||
616 | * @see #getPartialInterpretation() | ||
617 | * @generated | ||
618 | */ | ||
619 | EReference getPartialInterpretation_NewElements(); | ||
620 | |||
621 | /** | ||
622 | * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getPartialtypeinterpratation <em>Partialtypeinterpratation</em>}'. | ||
623 | * <!-- begin-user-doc --> | ||
624 | * <!-- end-user-doc --> | ||
625 | * @return the meta object for the containment reference list '<em>Partialtypeinterpratation</em>'. | ||
626 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getPartialtypeinterpratation() | ||
627 | * @see #getPartialInterpretation() | ||
628 | * @generated | ||
629 | */ | ||
630 | EReference getPartialInterpretation_Partialtypeinterpratation(); | ||
631 | |||
632 | /** | ||
633 | * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElements <em>Min New Elements</em>}'. | ||
634 | * <!-- begin-user-doc --> | ||
635 | * <!-- end-user-doc --> | ||
636 | * @return the meta object for the attribute '<em>Min New Elements</em>'. | ||
637 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElements() | ||
638 | * @see #getPartialInterpretation() | ||
639 | * @generated | ||
640 | */ | ||
641 | EAttribute getPartialInterpretation_MinNewElements(); | ||
642 | |||
643 | /** | ||
644 | * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMaxNewElements <em>Max New Elements</em>}'. | ||
645 | * <!-- begin-user-doc --> | ||
646 | * <!-- end-user-doc --> | ||
647 | * @return the meta object for the attribute '<em>Max New Elements</em>'. | ||
648 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMaxNewElements() | ||
649 | * @see #getPartialInterpretation() | ||
650 | * @generated | ||
651 | */ | ||
652 | EAttribute getPartialInterpretation_MaxNewElements(); | ||
653 | |||
654 | /** | ||
655 | * Returns the meta object for the containment reference '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getOpenWorldElementPrototype <em>Open World Element Prototype</em>}'. | ||
656 | * <!-- begin-user-doc --> | ||
657 | * <!-- end-user-doc --> | ||
658 | * @return the meta object for the containment reference '<em>Open World Element Prototype</em>'. | ||
659 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getOpenWorldElementPrototype() | ||
660 | * @see #getPartialInterpretation() | ||
661 | * @generated | ||
662 | */ | ||
663 | EReference getPartialInterpretation_OpenWorldElementPrototype(); | ||
664 | |||
665 | /** | ||
666 | * Returns the meta object for the containment reference '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getProblemConainer <em>Problem Conainer</em>}'. | ||
667 | * <!-- begin-user-doc --> | ||
668 | * <!-- end-user-doc --> | ||
669 | * @return the meta object for the containment reference '<em>Problem Conainer</em>'. | ||
670 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getProblemConainer() | ||
671 | * @see #getPartialInterpretation() | ||
672 | * @generated | ||
673 | */ | ||
674 | EReference getPartialInterpretation_ProblemConainer(); | ||
675 | |||
676 | /** | ||
677 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation <em>Partial Constant Interpretation</em>}'. | ||
678 | * <!-- begin-user-doc --> | ||
679 | * <!-- end-user-doc --> | ||
680 | * @return the meta object for class '<em>Partial Constant Interpretation</em>'. | ||
681 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation | ||
682 | * @generated | ||
683 | */ | ||
684 | EClass getPartialConstantInterpretation(); | ||
685 | |||
686 | /** | ||
687 | * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation#getInterpretationOf <em>Interpretation Of</em>}'. | ||
688 | * <!-- begin-user-doc --> | ||
689 | * <!-- end-user-doc --> | ||
690 | * @return the meta object for the reference '<em>Interpretation Of</em>'. | ||
691 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation#getInterpretationOf() | ||
692 | * @see #getPartialConstantInterpretation() | ||
693 | * @generated | ||
694 | */ | ||
695 | EReference getPartialConstantInterpretation_InterpretationOf(); | ||
696 | |||
697 | /** | ||
698 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation <em>Partial Relation Interpretation</em>}'. | ||
699 | * <!-- begin-user-doc --> | ||
700 | * <!-- end-user-doc --> | ||
701 | * @return the meta object for class '<em>Partial Relation Interpretation</em>'. | ||
702 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation | ||
703 | * @generated | ||
704 | */ | ||
705 | EClass getPartialRelationInterpretation(); | ||
706 | |||
707 | /** | ||
708 | * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getInterpretationOf <em>Interpretation Of</em>}'. | ||
709 | * <!-- begin-user-doc --> | ||
710 | * <!-- end-user-doc --> | ||
711 | * @return the meta object for the reference '<em>Interpretation Of</em>'. | ||
712 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getInterpretationOf() | ||
713 | * @see #getPartialRelationInterpretation() | ||
714 | * @generated | ||
715 | */ | ||
716 | EReference getPartialRelationInterpretation_InterpretationOf(); | ||
717 | |||
718 | /** | ||
719 | * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getRelationlinks <em>Relationlinks</em>}'. | ||
720 | * <!-- begin-user-doc --> | ||
721 | * <!-- end-user-doc --> | ||
722 | * @return the meta object for the containment reference list '<em>Relationlinks</em>'. | ||
723 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getRelationlinks() | ||
724 | * @see #getPartialRelationInterpretation() | ||
725 | * @generated | ||
726 | */ | ||
727 | EReference getPartialRelationInterpretation_Relationlinks(); | ||
728 | |||
729 | /** | ||
730 | * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getParam1 <em>Param1</em>}'. | ||
731 | * <!-- begin-user-doc --> | ||
732 | * <!-- end-user-doc --> | ||
733 | * @return the meta object for the reference '<em>Param1</em>'. | ||
734 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getParam1() | ||
735 | * @see #getPartialRelationInterpretation() | ||
736 | * @generated | ||
737 | */ | ||
738 | EReference getPartialRelationInterpretation_Param1(); | ||
739 | |||
740 | /** | ||
741 | * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getParam2 <em>Param2</em>}'. | ||
742 | * <!-- begin-user-doc --> | ||
743 | * <!-- end-user-doc --> | ||
744 | * @return the meta object for the reference '<em>Param2</em>'. | ||
745 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation#getParam2() | ||
746 | * @see #getPartialRelationInterpretation() | ||
747 | * @generated | ||
748 | */ | ||
749 | EReference getPartialRelationInterpretation_Param2(); | ||
750 | |||
751 | /** | ||
752 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation <em>Partial Function Interpretation</em>}'. | ||
753 | * <!-- begin-user-doc --> | ||
754 | * <!-- end-user-doc --> | ||
755 | * @return the meta object for class '<em>Partial Function Interpretation</em>'. | ||
756 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation | ||
757 | * @generated | ||
758 | */ | ||
759 | EClass getPartialFunctionInterpretation(); | ||
760 | |||
761 | /** | ||
762 | * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation#getInterpretationOf <em>Interpretation Of</em>}'. | ||
763 | * <!-- begin-user-doc --> | ||
764 | * <!-- end-user-doc --> | ||
765 | * @return the meta object for the reference '<em>Interpretation Of</em>'. | ||
766 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation#getInterpretationOf() | ||
767 | * @see #getPartialFunctionInterpretation() | ||
768 | * @generated | ||
769 | */ | ||
770 | EReference getPartialFunctionInterpretation_InterpretationOf(); | ||
771 | |||
772 | /** | ||
773 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation <em>Partial Type Interpratation</em>}'. | ||
774 | * <!-- begin-user-doc --> | ||
775 | * <!-- end-user-doc --> | ||
776 | * @return the meta object for class '<em>Partial Type Interpratation</em>'. | ||
777 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation | ||
778 | * @generated | ||
779 | */ | ||
780 | EClass getPartialTypeInterpratation(); | ||
781 | |||
782 | /** | ||
783 | * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getInterpretationOf <em>Interpretation Of</em>}'. | ||
784 | * <!-- begin-user-doc --> | ||
785 | * <!-- end-user-doc --> | ||
786 | * @return the meta object for the reference '<em>Interpretation Of</em>'. | ||
787 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getInterpretationOf() | ||
788 | * @see #getPartialTypeInterpratation() | ||
789 | * @generated | ||
790 | */ | ||
791 | EReference getPartialTypeInterpratation_InterpretationOf(); | ||
792 | |||
793 | /** | ||
794 | * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getElements <em>Elements</em>}'. | ||
795 | * <!-- begin-user-doc --> | ||
796 | * <!-- end-user-doc --> | ||
797 | * @return the meta object for the reference list '<em>Elements</em>'. | ||
798 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getElements() | ||
799 | * @see #getPartialTypeInterpratation() | ||
800 | * @generated | ||
801 | */ | ||
802 | EReference getPartialTypeInterpratation_Elements(); | ||
803 | |||
804 | /** | ||
805 | * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getSupertypeInterpretation <em>Supertype Interpretation</em>}'. | ||
806 | * <!-- begin-user-doc --> | ||
807 | * <!-- end-user-doc --> | ||
808 | * @return the meta object for the reference list '<em>Supertype Interpretation</em>'. | ||
809 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getSupertypeInterpretation() | ||
810 | * @see #getPartialTypeInterpratation() | ||
811 | * @generated | ||
812 | */ | ||
813 | EReference getPartialTypeInterpratation_SupertypeInterpretation(); | ||
814 | |||
815 | /** | ||
816 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink <em>Relation Link</em>}'. | ||
817 | * <!-- begin-user-doc --> | ||
818 | * <!-- end-user-doc --> | ||
819 | * @return the meta object for class '<em>Relation Link</em>'. | ||
820 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink | ||
821 | * @generated | ||
822 | */ | ||
823 | EClass getRelationLink(); | ||
824 | |||
825 | /** | ||
826 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.UnaryElementRelationLink <em>Unary Element Relation Link</em>}'. | ||
827 | * <!-- begin-user-doc --> | ||
828 | * <!-- end-user-doc --> | ||
829 | * @return the meta object for class '<em>Unary Element Relation Link</em>'. | ||
830 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.UnaryElementRelationLink | ||
831 | * @generated | ||
832 | */ | ||
833 | EClass getUnaryElementRelationLink(); | ||
834 | |||
835 | /** | ||
836 | * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.UnaryElementRelationLink#getParam1 <em>Param1</em>}'. | ||
837 | * <!-- begin-user-doc --> | ||
838 | * <!-- end-user-doc --> | ||
839 | * @return the meta object for the reference '<em>Param1</em>'. | ||
840 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.UnaryElementRelationLink#getParam1() | ||
841 | * @see #getUnaryElementRelationLink() | ||
842 | * @generated | ||
843 | */ | ||
844 | EReference getUnaryElementRelationLink_Param1(); | ||
845 | |||
846 | /** | ||
847 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink <em>Binary Element Relation Link</em>}'. | ||
848 | * <!-- begin-user-doc --> | ||
849 | * <!-- end-user-doc --> | ||
850 | * @return the meta object for class '<em>Binary Element Relation Link</em>'. | ||
851 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink | ||
852 | * @generated | ||
853 | */ | ||
854 | EClass getBinaryElementRelationLink(); | ||
855 | |||
856 | /** | ||
857 | * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink#getParam1 <em>Param1</em>}'. | ||
858 | * <!-- begin-user-doc --> | ||
859 | * <!-- end-user-doc --> | ||
860 | * @return the meta object for the reference '<em>Param1</em>'. | ||
861 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink#getParam1() | ||
862 | * @see #getBinaryElementRelationLink() | ||
863 | * @generated | ||
864 | */ | ||
865 | EReference getBinaryElementRelationLink_Param1(); | ||
866 | |||
867 | /** | ||
868 | * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink#getParam2 <em>Param2</em>}'. | ||
869 | * <!-- begin-user-doc --> | ||
870 | * <!-- end-user-doc --> | ||
871 | * @return the meta object for the reference '<em>Param2</em>'. | ||
872 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink#getParam2() | ||
873 | * @see #getBinaryElementRelationLink() | ||
874 | * @generated | ||
875 | */ | ||
876 | EReference getBinaryElementRelationLink_Param2(); | ||
877 | |||
878 | /** | ||
879 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLink <em>Nary Relation Link</em>}'. | ||
880 | * <!-- begin-user-doc --> | ||
881 | * <!-- end-user-doc --> | ||
882 | * @return the meta object for class '<em>Nary Relation Link</em>'. | ||
883 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLink | ||
884 | * @generated | ||
885 | */ | ||
886 | EClass getNaryRelationLink(); | ||
887 | |||
888 | /** | ||
889 | * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLink#getElements <em>Elements</em>}'. | ||
890 | * <!-- begin-user-doc --> | ||
891 | * <!-- end-user-doc --> | ||
892 | * @return the meta object for the containment reference list '<em>Elements</em>'. | ||
893 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLink#getElements() | ||
894 | * @see #getNaryRelationLink() | ||
895 | * @generated | ||
896 | */ | ||
897 | EReference getNaryRelationLink_Elements(); | ||
898 | |||
899 | /** | ||
900 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLinkElement <em>Nary Relation Link Element</em>}'. | ||
901 | * <!-- begin-user-doc --> | ||
902 | * <!-- end-user-doc --> | ||
903 | * @return the meta object for class '<em>Nary Relation Link Element</em>'. | ||
904 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLinkElement | ||
905 | * @generated | ||
906 | */ | ||
907 | EClass getNaryRelationLinkElement(); | ||
908 | |||
909 | /** | ||
910 | * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLinkElement#getIndex <em>Index</em>}'. | ||
911 | * <!-- begin-user-doc --> | ||
912 | * <!-- end-user-doc --> | ||
913 | * @return the meta object for the attribute '<em>Index</em>'. | ||
914 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLinkElement#getIndex() | ||
915 | * @see #getNaryRelationLinkElement() | ||
916 | * @generated | ||
917 | */ | ||
918 | EAttribute getNaryRelationLinkElement_Index(); | ||
919 | |||
920 | /** | ||
921 | * Returns the factory that creates the instances of the model. | ||
922 | * <!-- begin-user-doc --> | ||
923 | * <!-- end-user-doc --> | ||
924 | * @return the factory that creates the instances of the model. | ||
925 | * @generated | ||
926 | */ | ||
927 | PartialinterpretationFactory getPartialinterpretationFactory(); | ||
928 | |||
929 | /** | ||
930 | * <!-- begin-user-doc --> | ||
931 | * Defines literals for the meta objects that represent | ||
932 | * <ul> | ||
933 | * <li>each class,</li> | ||
934 | * <li>each feature of each class,</li> | ||
935 | * <li>each operation of each class,</li> | ||
936 | * <li>each enum,</li> | ||
937 | * <li>and each data type</li> | ||
938 | * </ul> | ||
939 | * <!-- end-user-doc --> | ||
940 | * @generated | ||
941 | */ | ||
942 | interface Literals { | ||
943 | /** | ||
944 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl <em>Partial Interpretation</em>}' class. | ||
945 | * <!-- begin-user-doc --> | ||
946 | * <!-- end-user-doc --> | ||
947 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl | ||
948 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getPartialInterpretation() | ||
949 | * @generated | ||
950 | */ | ||
951 | EClass PARTIAL_INTERPRETATION = eINSTANCE.getPartialInterpretation(); | ||
952 | |||
953 | /** | ||
954 | * The meta object literal for the '<em><b>Problem</b></em>' reference feature. | ||
955 | * <!-- begin-user-doc --> | ||
956 | * <!-- end-user-doc --> | ||
957 | * @generated | ||
958 | */ | ||
959 | EReference PARTIAL_INTERPRETATION__PROBLEM = eINSTANCE.getPartialInterpretation_Problem(); | ||
960 | |||
961 | /** | ||
962 | * The meta object literal for the '<em><b>Partialconstantinterpretation</b></em>' containment reference list feature. | ||
963 | * <!-- begin-user-doc --> | ||
964 | * <!-- end-user-doc --> | ||
965 | * @generated | ||
966 | */ | ||
967 | EReference PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION = eINSTANCE.getPartialInterpretation_Partialconstantinterpretation(); | ||
968 | |||
969 | /** | ||
970 | * The meta object literal for the '<em><b>Partialrelationinterpretation</b></em>' containment reference list feature. | ||
971 | * <!-- begin-user-doc --> | ||
972 | * <!-- end-user-doc --> | ||
973 | * @generated | ||
974 | */ | ||
975 | EReference PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION = eINSTANCE.getPartialInterpretation_Partialrelationinterpretation(); | ||
976 | |||
977 | /** | ||
978 | * The meta object literal for the '<em><b>Partialfunctioninterpretation</b></em>' containment reference list feature. | ||
979 | * <!-- begin-user-doc --> | ||
980 | * <!-- end-user-doc --> | ||
981 | * @generated | ||
982 | */ | ||
983 | EReference PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION = eINSTANCE.getPartialInterpretation_Partialfunctioninterpretation(); | ||
984 | |||
985 | /** | ||
986 | * The meta object literal for the '<em><b>New Elements</b></em>' containment reference list feature. | ||
987 | * <!-- begin-user-doc --> | ||
988 | * <!-- end-user-doc --> | ||
989 | * @generated | ||
990 | */ | ||
991 | EReference PARTIAL_INTERPRETATION__NEW_ELEMENTS = eINSTANCE.getPartialInterpretation_NewElements(); | ||
992 | |||
993 | /** | ||
994 | * The meta object literal for the '<em><b>Partialtypeinterpratation</b></em>' containment reference list feature. | ||
995 | * <!-- begin-user-doc --> | ||
996 | * <!-- end-user-doc --> | ||
997 | * @generated | ||
998 | */ | ||
999 | EReference PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION = eINSTANCE.getPartialInterpretation_Partialtypeinterpratation(); | ||
1000 | |||
1001 | /** | ||
1002 | * The meta object literal for the '<em><b>Min New Elements</b></em>' attribute feature. | ||
1003 | * <!-- begin-user-doc --> | ||
1004 | * <!-- end-user-doc --> | ||
1005 | * @generated | ||
1006 | */ | ||
1007 | EAttribute PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS = eINSTANCE.getPartialInterpretation_MinNewElements(); | ||
1008 | |||
1009 | /** | ||
1010 | * The meta object literal for the '<em><b>Max New Elements</b></em>' attribute feature. | ||
1011 | * <!-- begin-user-doc --> | ||
1012 | * <!-- end-user-doc --> | ||
1013 | * @generated | ||
1014 | */ | ||
1015 | EAttribute PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS = eINSTANCE.getPartialInterpretation_MaxNewElements(); | ||
1016 | |||
1017 | /** | ||
1018 | * The meta object literal for the '<em><b>Open World Element Prototype</b></em>' containment reference feature. | ||
1019 | * <!-- begin-user-doc --> | ||
1020 | * <!-- end-user-doc --> | ||
1021 | * @generated | ||
1022 | */ | ||
1023 | EReference PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE = eINSTANCE.getPartialInterpretation_OpenWorldElementPrototype(); | ||
1024 | |||
1025 | /** | ||
1026 | * The meta object literal for the '<em><b>Problem Conainer</b></em>' containment reference feature. | ||
1027 | * <!-- begin-user-doc --> | ||
1028 | * <!-- end-user-doc --> | ||
1029 | * @generated | ||
1030 | */ | ||
1031 | EReference PARTIAL_INTERPRETATION__PROBLEM_CONAINER = eINSTANCE.getPartialInterpretation_ProblemConainer(); | ||
1032 | |||
1033 | /** | ||
1034 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialConstantInterpretationImpl <em>Partial Constant Interpretation</em>}' class. | ||
1035 | * <!-- begin-user-doc --> | ||
1036 | * <!-- end-user-doc --> | ||
1037 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialConstantInterpretationImpl | ||
1038 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getPartialConstantInterpretation() | ||
1039 | * @generated | ||
1040 | */ | ||
1041 | EClass PARTIAL_CONSTANT_INTERPRETATION = eINSTANCE.getPartialConstantInterpretation(); | ||
1042 | |||
1043 | /** | ||
1044 | * The meta object literal for the '<em><b>Interpretation Of</b></em>' reference feature. | ||
1045 | * <!-- begin-user-doc --> | ||
1046 | * <!-- end-user-doc --> | ||
1047 | * @generated | ||
1048 | */ | ||
1049 | EReference PARTIAL_CONSTANT_INTERPRETATION__INTERPRETATION_OF = eINSTANCE.getPartialConstantInterpretation_InterpretationOf(); | ||
1050 | |||
1051 | /** | ||
1052 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialRelationInterpretationImpl <em>Partial Relation Interpretation</em>}' class. | ||
1053 | * <!-- begin-user-doc --> | ||
1054 | * <!-- end-user-doc --> | ||
1055 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialRelationInterpretationImpl | ||
1056 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getPartialRelationInterpretation() | ||
1057 | * @generated | ||
1058 | */ | ||
1059 | EClass PARTIAL_RELATION_INTERPRETATION = eINSTANCE.getPartialRelationInterpretation(); | ||
1060 | |||
1061 | /** | ||
1062 | * The meta object literal for the '<em><b>Interpretation Of</b></em>' reference feature. | ||
1063 | * <!-- begin-user-doc --> | ||
1064 | * <!-- end-user-doc --> | ||
1065 | * @generated | ||
1066 | */ | ||
1067 | EReference PARTIAL_RELATION_INTERPRETATION__INTERPRETATION_OF = eINSTANCE.getPartialRelationInterpretation_InterpretationOf(); | ||
1068 | |||
1069 | /** | ||
1070 | * The meta object literal for the '<em><b>Relationlinks</b></em>' containment reference list feature. | ||
1071 | * <!-- begin-user-doc --> | ||
1072 | * <!-- end-user-doc --> | ||
1073 | * @generated | ||
1074 | */ | ||
1075 | EReference PARTIAL_RELATION_INTERPRETATION__RELATIONLINKS = eINSTANCE.getPartialRelationInterpretation_Relationlinks(); | ||
1076 | |||
1077 | /** | ||
1078 | * The meta object literal for the '<em><b>Param1</b></em>' reference feature. | ||
1079 | * <!-- begin-user-doc --> | ||
1080 | * <!-- end-user-doc --> | ||
1081 | * @generated | ||
1082 | */ | ||
1083 | EReference PARTIAL_RELATION_INTERPRETATION__PARAM1 = eINSTANCE.getPartialRelationInterpretation_Param1(); | ||
1084 | |||
1085 | /** | ||
1086 | * The meta object literal for the '<em><b>Param2</b></em>' reference feature. | ||
1087 | * <!-- begin-user-doc --> | ||
1088 | * <!-- end-user-doc --> | ||
1089 | * @generated | ||
1090 | */ | ||
1091 | EReference PARTIAL_RELATION_INTERPRETATION__PARAM2 = eINSTANCE.getPartialRelationInterpretation_Param2(); | ||
1092 | |||
1093 | /** | ||
1094 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialFunctionInterpretationImpl <em>Partial Function Interpretation</em>}' class. | ||
1095 | * <!-- begin-user-doc --> | ||
1096 | * <!-- end-user-doc --> | ||
1097 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialFunctionInterpretationImpl | ||
1098 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getPartialFunctionInterpretation() | ||
1099 | * @generated | ||
1100 | */ | ||
1101 | EClass PARTIAL_FUNCTION_INTERPRETATION = eINSTANCE.getPartialFunctionInterpretation(); | ||
1102 | |||
1103 | /** | ||
1104 | * The meta object literal for the '<em><b>Interpretation Of</b></em>' reference feature. | ||
1105 | * <!-- begin-user-doc --> | ||
1106 | * <!-- end-user-doc --> | ||
1107 | * @generated | ||
1108 | */ | ||
1109 | EReference PARTIAL_FUNCTION_INTERPRETATION__INTERPRETATION_OF = eINSTANCE.getPartialFunctionInterpretation_InterpretationOf(); | ||
1110 | |||
1111 | /** | ||
1112 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialTypeInterpratationImpl <em>Partial Type Interpratation</em>}' class. | ||
1113 | * <!-- begin-user-doc --> | ||
1114 | * <!-- end-user-doc --> | ||
1115 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialTypeInterpratationImpl | ||
1116 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getPartialTypeInterpratation() | ||
1117 | * @generated | ||
1118 | */ | ||
1119 | EClass PARTIAL_TYPE_INTERPRATATION = eINSTANCE.getPartialTypeInterpratation(); | ||
1120 | |||
1121 | /** | ||
1122 | * The meta object literal for the '<em><b>Interpretation Of</b></em>' reference feature. | ||
1123 | * <!-- begin-user-doc --> | ||
1124 | * <!-- end-user-doc --> | ||
1125 | * @generated | ||
1126 | */ | ||
1127 | EReference PARTIAL_TYPE_INTERPRATATION__INTERPRETATION_OF = eINSTANCE.getPartialTypeInterpratation_InterpretationOf(); | ||
1128 | |||
1129 | /** | ||
1130 | * The meta object literal for the '<em><b>Elements</b></em>' reference list feature. | ||
1131 | * <!-- begin-user-doc --> | ||
1132 | * <!-- end-user-doc --> | ||
1133 | * @generated | ||
1134 | */ | ||
1135 | EReference PARTIAL_TYPE_INTERPRATATION__ELEMENTS = eINSTANCE.getPartialTypeInterpratation_Elements(); | ||
1136 | |||
1137 | /** | ||
1138 | * The meta object literal for the '<em><b>Supertype Interpretation</b></em>' reference list feature. | ||
1139 | * <!-- begin-user-doc --> | ||
1140 | * <!-- end-user-doc --> | ||
1141 | * @generated | ||
1142 | */ | ||
1143 | EReference PARTIAL_TYPE_INTERPRATATION__SUPERTYPE_INTERPRETATION = eINSTANCE.getPartialTypeInterpratation_SupertypeInterpretation(); | ||
1144 | |||
1145 | /** | ||
1146 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.RelationLinkImpl <em>Relation Link</em>}' class. | ||
1147 | * <!-- begin-user-doc --> | ||
1148 | * <!-- end-user-doc --> | ||
1149 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.RelationLinkImpl | ||
1150 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getRelationLink() | ||
1151 | * @generated | ||
1152 | */ | ||
1153 | EClass RELATION_LINK = eINSTANCE.getRelationLink(); | ||
1154 | |||
1155 | /** | ||
1156 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.UnaryElementRelationLinkImpl <em>Unary Element Relation Link</em>}' class. | ||
1157 | * <!-- begin-user-doc --> | ||
1158 | * <!-- end-user-doc --> | ||
1159 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.UnaryElementRelationLinkImpl | ||
1160 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getUnaryElementRelationLink() | ||
1161 | * @generated | ||
1162 | */ | ||
1163 | EClass UNARY_ELEMENT_RELATION_LINK = eINSTANCE.getUnaryElementRelationLink(); | ||
1164 | |||
1165 | /** | ||
1166 | * The meta object literal for the '<em><b>Param1</b></em>' reference feature. | ||
1167 | * <!-- begin-user-doc --> | ||
1168 | * <!-- end-user-doc --> | ||
1169 | * @generated | ||
1170 | */ | ||
1171 | EReference UNARY_ELEMENT_RELATION_LINK__PARAM1 = eINSTANCE.getUnaryElementRelationLink_Param1(); | ||
1172 | |||
1173 | /** | ||
1174 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.BinaryElementRelationLinkImpl <em>Binary Element Relation Link</em>}' class. | ||
1175 | * <!-- begin-user-doc --> | ||
1176 | * <!-- end-user-doc --> | ||
1177 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.BinaryElementRelationLinkImpl | ||
1178 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getBinaryElementRelationLink() | ||
1179 | * @generated | ||
1180 | */ | ||
1181 | EClass BINARY_ELEMENT_RELATION_LINK = eINSTANCE.getBinaryElementRelationLink(); | ||
1182 | |||
1183 | /** | ||
1184 | * The meta object literal for the '<em><b>Param1</b></em>' reference feature. | ||
1185 | * <!-- begin-user-doc --> | ||
1186 | * <!-- end-user-doc --> | ||
1187 | * @generated | ||
1188 | */ | ||
1189 | EReference BINARY_ELEMENT_RELATION_LINK__PARAM1 = eINSTANCE.getBinaryElementRelationLink_Param1(); | ||
1190 | |||
1191 | /** | ||
1192 | * The meta object literal for the '<em><b>Param2</b></em>' reference feature. | ||
1193 | * <!-- begin-user-doc --> | ||
1194 | * <!-- end-user-doc --> | ||
1195 | * @generated | ||
1196 | */ | ||
1197 | EReference BINARY_ELEMENT_RELATION_LINK__PARAM2 = eINSTANCE.getBinaryElementRelationLink_Param2(); | ||
1198 | |||
1199 | /** | ||
1200 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.NaryRelationLinkImpl <em>Nary Relation Link</em>}' class. | ||
1201 | * <!-- begin-user-doc --> | ||
1202 | * <!-- end-user-doc --> | ||
1203 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.NaryRelationLinkImpl | ||
1204 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getNaryRelationLink() | ||
1205 | * @generated | ||
1206 | */ | ||
1207 | EClass NARY_RELATION_LINK = eINSTANCE.getNaryRelationLink(); | ||
1208 | |||
1209 | /** | ||
1210 | * The meta object literal for the '<em><b>Elements</b></em>' containment reference list feature. | ||
1211 | * <!-- begin-user-doc --> | ||
1212 | * <!-- end-user-doc --> | ||
1213 | * @generated | ||
1214 | */ | ||
1215 | EReference NARY_RELATION_LINK__ELEMENTS = eINSTANCE.getNaryRelationLink_Elements(); | ||
1216 | |||
1217 | /** | ||
1218 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.NaryRelationLinkElementImpl <em>Nary Relation Link Element</em>}' class. | ||
1219 | * <!-- begin-user-doc --> | ||
1220 | * <!-- end-user-doc --> | ||
1221 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.NaryRelationLinkElementImpl | ||
1222 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialinterpretationPackageImpl#getNaryRelationLinkElement() | ||
1223 | * @generated | ||
1224 | */ | ||
1225 | EClass NARY_RELATION_LINK_ELEMENT = eINSTANCE.getNaryRelationLinkElement(); | ||
1226 | |||
1227 | /** | ||
1228 | * The meta object literal for the '<em><b>Index</b></em>' attribute feature. | ||
1229 | * <!-- begin-user-doc --> | ||
1230 | * <!-- end-user-doc --> | ||
1231 | * @generated | ||
1232 | */ | ||
1233 | EAttribute NARY_RELATION_LINK_ELEMENT__INDEX = eINSTANCE.getNaryRelationLinkElement_Index(); | ||
1234 | |||
1235 | } | ||
1236 | |||
1237 | } //PartialinterpretationPackage | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/RelationLink.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/RelationLink.java new file mode 100644 index 00000000..8da96792 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/RelationLink.java | |||
@@ -0,0 +1,18 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EObject; | ||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * A representation of the model object '<em><b>Relation Link</b></em>'. | ||
10 | * <!-- end-user-doc --> | ||
11 | * | ||
12 | * | ||
13 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getRelationLink() | ||
14 | * @model abstract="true" | ||
15 | * @generated | ||
16 | */ | ||
17 | public interface RelationLink extends EObject { | ||
18 | } // RelationLink | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/UnaryElementRelationLink.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/UnaryElementRelationLink.java new file mode 100644 index 00000000..f25a4e05 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/UnaryElementRelationLink.java | |||
@@ -0,0 +1,50 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; | ||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * A representation of the model object '<em><b>Unary Element Relation Link</b></em>'. | ||
10 | * <!-- end-user-doc --> | ||
11 | * | ||
12 | * <p> | ||
13 | * The following features are supported: | ||
14 | * </p> | ||
15 | * <ul> | ||
16 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.UnaryElementRelationLink#getParam1 <em>Param1</em>}</li> | ||
17 | * </ul> | ||
18 | * | ||
19 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getUnaryElementRelationLink() | ||
20 | * @model | ||
21 | * @generated | ||
22 | */ | ||
23 | public interface UnaryElementRelationLink extends RelationLink { | ||
24 | /** | ||
25 | * Returns the value of the '<em><b>Param1</b></em>' reference. | ||
26 | * <!-- begin-user-doc --> | ||
27 | * <p> | ||
28 | * If the meaning of the '<em>Param1</em>' reference isn't clear, | ||
29 | * there really should be more of a description here... | ||
30 | * </p> | ||
31 | * <!-- end-user-doc --> | ||
32 | * @return the value of the '<em>Param1</em>' reference. | ||
33 | * @see #setParam1(DefinedElement) | ||
34 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getUnaryElementRelationLink_Param1() | ||
35 | * @model required="true" | ||
36 | * @generated | ||
37 | */ | ||
38 | DefinedElement getParam1(); | ||
39 | |||
40 | /** | ||
41 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.UnaryElementRelationLink#getParam1 <em>Param1</em>}' reference. | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @param value the new value of the '<em>Param1</em>' reference. | ||
45 | * @see #getParam1() | ||
46 | * @generated | ||
47 | */ | ||
48 | void setParam1(DefinedElement value); | ||
49 | |||
50 | } // UnaryElementRelationLink | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BinaryElementRelationLinkImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BinaryElementRelationLinkImpl.java new file mode 100644 index 00000000..f5efe02a --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BinaryElementRelationLinkImpl.java | |||
@@ -0,0 +1,217 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; | ||
6 | |||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink; | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.Notification; | ||
11 | |||
12 | import org.eclipse.emf.ecore.EClass; | ||
13 | import org.eclipse.emf.ecore.InternalEObject; | ||
14 | |||
15 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
16 | |||
17 | /** | ||
18 | * <!-- begin-user-doc --> | ||
19 | * An implementation of the model object '<em><b>Binary Element Relation Link</b></em>'. | ||
20 | * <!-- end-user-doc --> | ||
21 | * <p> | ||
22 | * The following features are implemented: | ||
23 | * </p> | ||
24 | * <ul> | ||
25 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.BinaryElementRelationLinkImpl#getParam1 <em>Param1</em>}</li> | ||
26 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.BinaryElementRelationLinkImpl#getParam2 <em>Param2</em>}</li> | ||
27 | * </ul> | ||
28 | * | ||
29 | * @generated | ||
30 | */ | ||
31 | public class BinaryElementRelationLinkImpl extends RelationLinkImpl implements BinaryElementRelationLink { | ||
32 | /** | ||
33 | * The cached value of the '{@link #getParam1() <em>Param1</em>}' reference. | ||
34 | * <!-- begin-user-doc --> | ||
35 | * <!-- end-user-doc --> | ||
36 | * @see #getParam1() | ||
37 | * @generated | ||
38 | * @ordered | ||
39 | */ | ||
40 | protected DefinedElement param1; | ||
41 | |||
42 | /** | ||
43 | * The cached value of the '{@link #getParam2() <em>Param2</em>}' reference. | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @see #getParam2() | ||
47 | * @generated | ||
48 | * @ordered | ||
49 | */ | ||
50 | protected DefinedElement param2; | ||
51 | |||
52 | /** | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <!-- end-user-doc --> | ||
55 | * @generated | ||
56 | */ | ||
57 | protected BinaryElementRelationLinkImpl() { | ||
58 | super(); | ||
59 | } | ||
60 | |||
61 | /** | ||
62 | * <!-- begin-user-doc --> | ||
63 | * <!-- end-user-doc --> | ||
64 | * @generated | ||
65 | */ | ||
66 | @Override | ||
67 | protected EClass eStaticClass() { | ||
68 | return PartialinterpretationPackage.Literals.BINARY_ELEMENT_RELATION_LINK; | ||
69 | } | ||
70 | |||
71 | /** | ||
72 | * <!-- begin-user-doc --> | ||
73 | * <!-- end-user-doc --> | ||
74 | * @generated | ||
75 | */ | ||
76 | public DefinedElement getParam1() { | ||
77 | if (param1 != null && param1.eIsProxy()) { | ||
78 | InternalEObject oldParam1 = (InternalEObject)param1; | ||
79 | param1 = (DefinedElement)eResolveProxy(oldParam1); | ||
80 | if (param1 != oldParam1) { | ||
81 | if (eNotificationRequired()) | ||
82 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, PartialinterpretationPackage.BINARY_ELEMENT_RELATION_LINK__PARAM1, oldParam1, param1)); | ||
83 | } | ||
84 | } | ||
85 | return param1; | ||
86 | } | ||
87 | |||
88 | /** | ||
89 | * <!-- begin-user-doc --> | ||
90 | * <!-- end-user-doc --> | ||
91 | * @generated | ||
92 | */ | ||
93 | public DefinedElement basicGetParam1() { | ||
94 | return param1; | ||
95 | } | ||
96 | |||
97 | /** | ||
98 | * <!-- begin-user-doc --> | ||
99 | * <!-- end-user-doc --> | ||
100 | * @generated | ||
101 | */ | ||
102 | public void setParam1(DefinedElement newParam1) { | ||
103 | DefinedElement oldParam1 = param1; | ||
104 | param1 = newParam1; | ||
105 | if (eNotificationRequired()) | ||
106 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.BINARY_ELEMENT_RELATION_LINK__PARAM1, oldParam1, param1)); | ||
107 | } | ||
108 | |||
109 | /** | ||
110 | * <!-- begin-user-doc --> | ||
111 | * <!-- end-user-doc --> | ||
112 | * @generated | ||
113 | */ | ||
114 | public DefinedElement getParam2() { | ||
115 | if (param2 != null && param2.eIsProxy()) { | ||
116 | InternalEObject oldParam2 = (InternalEObject)param2; | ||
117 | param2 = (DefinedElement)eResolveProxy(oldParam2); | ||
118 | if (param2 != oldParam2) { | ||
119 | if (eNotificationRequired()) | ||
120 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, PartialinterpretationPackage.BINARY_ELEMENT_RELATION_LINK__PARAM2, oldParam2, param2)); | ||
121 | } | ||
122 | } | ||
123 | return param2; | ||
124 | } | ||
125 | |||
126 | /** | ||
127 | * <!-- begin-user-doc --> | ||
128 | * <!-- end-user-doc --> | ||
129 | * @generated | ||
130 | */ | ||
131 | public DefinedElement basicGetParam2() { | ||
132 | return param2; | ||
133 | } | ||
134 | |||
135 | /** | ||
136 | * <!-- begin-user-doc --> | ||
137 | * <!-- end-user-doc --> | ||
138 | * @generated | ||
139 | */ | ||
140 | public void setParam2(DefinedElement newParam2) { | ||
141 | DefinedElement oldParam2 = param2; | ||
142 | param2 = newParam2; | ||
143 | if (eNotificationRequired()) | ||
144 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.BINARY_ELEMENT_RELATION_LINK__PARAM2, oldParam2, param2)); | ||
145 | } | ||
146 | |||
147 | /** | ||
148 | * <!-- begin-user-doc --> | ||
149 | * <!-- end-user-doc --> | ||
150 | * @generated | ||
151 | */ | ||
152 | @Override | ||
153 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
154 | switch (featureID) { | ||
155 | case PartialinterpretationPackage.BINARY_ELEMENT_RELATION_LINK__PARAM1: | ||
156 | if (resolve) return getParam1(); | ||
157 | return basicGetParam1(); | ||
158 | case PartialinterpretationPackage.BINARY_ELEMENT_RELATION_LINK__PARAM2: | ||
159 | if (resolve) return getParam2(); | ||
160 | return basicGetParam2(); | ||
161 | } | ||
162 | return super.eGet(featureID, resolve, coreType); | ||
163 | } | ||
164 | |||
165 | /** | ||
166 | * <!-- begin-user-doc --> | ||
167 | * <!-- end-user-doc --> | ||
168 | * @generated | ||
169 | */ | ||
170 | @Override | ||
171 | public void eSet(int featureID, Object newValue) { | ||
172 | switch (featureID) { | ||
173 | case PartialinterpretationPackage.BINARY_ELEMENT_RELATION_LINK__PARAM1: | ||
174 | setParam1((DefinedElement)newValue); | ||
175 | return; | ||
176 | case PartialinterpretationPackage.BINARY_ELEMENT_RELATION_LINK__PARAM2: | ||
177 | setParam2((DefinedElement)newValue); | ||
178 | return; | ||
179 | } | ||
180 | super.eSet(featureID, newValue); | ||
181 | } | ||
182 | |||
183 | /** | ||
184 | * <!-- begin-user-doc --> | ||
185 | * <!-- end-user-doc --> | ||
186 | * @generated | ||
187 | */ | ||
188 | @Override | ||
189 | public void eUnset(int featureID) { | ||
190 | switch (featureID) { | ||
191 | case PartialinterpretationPackage.BINARY_ELEMENT_RELATION_LINK__PARAM1: | ||
192 | setParam1((DefinedElement)null); | ||
193 | return; | ||
194 | case PartialinterpretationPackage.BINARY_ELEMENT_RELATION_LINK__PARAM2: | ||
195 | setParam2((DefinedElement)null); | ||
196 | return; | ||
197 | } | ||
198 | super.eUnset(featureID); | ||
199 | } | ||
200 | |||
201 | /** | ||
202 | * <!-- begin-user-doc --> | ||
203 | * <!-- end-user-doc --> | ||
204 | * @generated | ||
205 | */ | ||
206 | @Override | ||
207 | public boolean eIsSet(int featureID) { | ||
208 | switch (featureID) { | ||
209 | case PartialinterpretationPackage.BINARY_ELEMENT_RELATION_LINK__PARAM1: | ||
210 | return param1 != null; | ||
211 | case PartialinterpretationPackage.BINARY_ELEMENT_RELATION_LINK__PARAM2: | ||
212 | return param2 != null; | ||
213 | } | ||
214 | return super.eIsSet(featureID); | ||
215 | } | ||
216 | |||
217 | } //BinaryElementRelationLinkImpl | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkElementImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkElementImpl.java new file mode 100644 index 00000000..40e6549d --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkElementImpl.java | |||
@@ -0,0 +1,163 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLinkElement; | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; | ||
7 | |||
8 | import org.eclipse.emf.common.notify.Notification; | ||
9 | |||
10 | import org.eclipse.emf.ecore.EClass; | ||
11 | |||
12 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
13 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
14 | |||
15 | /** | ||
16 | * <!-- begin-user-doc --> | ||
17 | * An implementation of the model object '<em><b>Nary Relation Link Element</b></em>'. | ||
18 | * <!-- end-user-doc --> | ||
19 | * <p> | ||
20 | * The following features are implemented: | ||
21 | * </p> | ||
22 | * <ul> | ||
23 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.NaryRelationLinkElementImpl#getIndex <em>Index</em>}</li> | ||
24 | * </ul> | ||
25 | * | ||
26 | * @generated | ||
27 | */ | ||
28 | public class NaryRelationLinkElementImpl extends MinimalEObjectImpl.Container implements NaryRelationLinkElement { | ||
29 | /** | ||
30 | * The default value of the '{@link #getIndex() <em>Index</em>}' attribute. | ||
31 | * <!-- begin-user-doc --> | ||
32 | * <!-- end-user-doc --> | ||
33 | * @see #getIndex() | ||
34 | * @generated | ||
35 | * @ordered | ||
36 | */ | ||
37 | protected static final int INDEX_EDEFAULT = 0; | ||
38 | |||
39 | /** | ||
40 | * The cached value of the '{@link #getIndex() <em>Index</em>}' attribute. | ||
41 | * <!-- begin-user-doc --> | ||
42 | * <!-- end-user-doc --> | ||
43 | * @see #getIndex() | ||
44 | * @generated | ||
45 | * @ordered | ||
46 | */ | ||
47 | protected int index = INDEX_EDEFAULT; | ||
48 | |||
49 | /** | ||
50 | * <!-- begin-user-doc --> | ||
51 | * <!-- end-user-doc --> | ||
52 | * @generated | ||
53 | */ | ||
54 | protected NaryRelationLinkElementImpl() { | ||
55 | super(); | ||
56 | } | ||
57 | |||
58 | /** | ||
59 | * <!-- begin-user-doc --> | ||
60 | * <!-- end-user-doc --> | ||
61 | * @generated | ||
62 | */ | ||
63 | @Override | ||
64 | protected EClass eStaticClass() { | ||
65 | return PartialinterpretationPackage.Literals.NARY_RELATION_LINK_ELEMENT; | ||
66 | } | ||
67 | |||
68 | /** | ||
69 | * <!-- begin-user-doc --> | ||
70 | * <!-- end-user-doc --> | ||
71 | * @generated | ||
72 | */ | ||
73 | public int getIndex() { | ||
74 | return index; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @generated | ||
81 | */ | ||
82 | public void setIndex(int newIndex) { | ||
83 | int oldIndex = index; | ||
84 | index = newIndex; | ||
85 | if (eNotificationRequired()) | ||
86 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.NARY_RELATION_LINK_ELEMENT__INDEX, oldIndex, index)); | ||
87 | } | ||
88 | |||
89 | /** | ||
90 | * <!-- begin-user-doc --> | ||
91 | * <!-- end-user-doc --> | ||
92 | * @generated | ||
93 | */ | ||
94 | @Override | ||
95 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
96 | switch (featureID) { | ||
97 | case PartialinterpretationPackage.NARY_RELATION_LINK_ELEMENT__INDEX: | ||
98 | return getIndex(); | ||
99 | } | ||
100 | return super.eGet(featureID, resolve, coreType); | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | @Override | ||
109 | public void eSet(int featureID, Object newValue) { | ||
110 | switch (featureID) { | ||
111 | case PartialinterpretationPackage.NARY_RELATION_LINK_ELEMENT__INDEX: | ||
112 | setIndex((Integer)newValue); | ||
113 | return; | ||
114 | } | ||
115 | super.eSet(featureID, newValue); | ||
116 | } | ||
117 | |||
118 | /** | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @generated | ||
122 | */ | ||
123 | @Override | ||
124 | public void eUnset(int featureID) { | ||
125 | switch (featureID) { | ||
126 | case PartialinterpretationPackage.NARY_RELATION_LINK_ELEMENT__INDEX: | ||
127 | setIndex(INDEX_EDEFAULT); | ||
128 | return; | ||
129 | } | ||
130 | super.eUnset(featureID); | ||
131 | } | ||
132 | |||
133 | /** | ||
134 | * <!-- begin-user-doc --> | ||
135 | * <!-- end-user-doc --> | ||
136 | * @generated | ||
137 | */ | ||
138 | @Override | ||
139 | public boolean eIsSet(int featureID) { | ||
140 | switch (featureID) { | ||
141 | case PartialinterpretationPackage.NARY_RELATION_LINK_ELEMENT__INDEX: | ||
142 | return index != INDEX_EDEFAULT; | ||
143 | } | ||
144 | return super.eIsSet(featureID); | ||
145 | } | ||
146 | |||
147 | /** | ||
148 | * <!-- begin-user-doc --> | ||
149 | * <!-- end-user-doc --> | ||
150 | * @generated | ||
151 | */ | ||
152 | @Override | ||
153 | public String toString() { | ||
154 | if (eIsProxy()) return super.toString(); | ||
155 | |||
156 | StringBuffer result = new StringBuffer(super.toString()); | ||
157 | result.append(" (index: "); | ||
158 | result.append(index); | ||
159 | result.append(')'); | ||
160 | return result.toString(); | ||
161 | } | ||
162 | |||
163 | } //NaryRelationLinkElementImpl | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkImpl.java new file mode 100644 index 00000000..f387ee06 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkImpl.java | |||
@@ -0,0 +1,150 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLink; | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLinkElement; | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; | ||
8 | |||
9 | import java.util.Collection; | ||
10 | |||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
12 | |||
13 | import org.eclipse.emf.common.util.EList; | ||
14 | |||
15 | import org.eclipse.emf.ecore.EClass; | ||
16 | import org.eclipse.emf.ecore.InternalEObject; | ||
17 | |||
18 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
19 | import org.eclipse.emf.ecore.util.InternalEList; | ||
20 | |||
21 | /** | ||
22 | * <!-- begin-user-doc --> | ||
23 | * An implementation of the model object '<em><b>Nary Relation Link</b></em>'. | ||
24 | * <!-- end-user-doc --> | ||
25 | * <p> | ||
26 | * The following features are implemented: | ||
27 | * </p> | ||
28 | * <ul> | ||
29 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.NaryRelationLinkImpl#getElements <em>Elements</em>}</li> | ||
30 | * </ul> | ||
31 | * | ||
32 | * @generated | ||
33 | */ | ||
34 | public class NaryRelationLinkImpl extends RelationLinkImpl implements NaryRelationLink { | ||
35 | /** | ||
36 | * The cached value of the '{@link #getElements() <em>Elements</em>}' containment reference list. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @see #getElements() | ||
40 | * @generated | ||
41 | * @ordered | ||
42 | */ | ||
43 | protected EList<NaryRelationLinkElement> elements; | ||
44 | |||
45 | /** | ||
46 | * <!-- begin-user-doc --> | ||
47 | * <!-- end-user-doc --> | ||
48 | * @generated | ||
49 | */ | ||
50 | protected NaryRelationLinkImpl() { | ||
51 | super(); | ||
52 | } | ||
53 | |||
54 | /** | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @generated | ||
58 | */ | ||
59 | @Override | ||
60 | protected EClass eStaticClass() { | ||
61 | return PartialinterpretationPackage.Literals.NARY_RELATION_LINK; | ||
62 | } | ||
63 | |||
64 | /** | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @generated | ||
68 | */ | ||
69 | public EList<NaryRelationLinkElement> getElements() { | ||
70 | if (elements == null) { | ||
71 | elements = new EObjectContainmentEList<NaryRelationLinkElement>(NaryRelationLinkElement.class, this, PartialinterpretationPackage.NARY_RELATION_LINK__ELEMENTS); | ||
72 | } | ||
73 | return elements; | ||
74 | } | ||
75 | |||
76 | /** | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @generated | ||
80 | */ | ||
81 | @Override | ||
82 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
83 | switch (featureID) { | ||
84 | case PartialinterpretationPackage.NARY_RELATION_LINK__ELEMENTS: | ||
85 | return ((InternalEList<?>)getElements()).basicRemove(otherEnd, msgs); | ||
86 | } | ||
87 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
88 | } | ||
89 | |||
90 | /** | ||
91 | * <!-- begin-user-doc --> | ||
92 | * <!-- end-user-doc --> | ||
93 | * @generated | ||
94 | */ | ||
95 | @Override | ||
96 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
97 | switch (featureID) { | ||
98 | case PartialinterpretationPackage.NARY_RELATION_LINK__ELEMENTS: | ||
99 | return getElements(); | ||
100 | } | ||
101 | return super.eGet(featureID, resolve, coreType); | ||
102 | } | ||
103 | |||
104 | /** | ||
105 | * <!-- begin-user-doc --> | ||
106 | * <!-- end-user-doc --> | ||
107 | * @generated | ||
108 | */ | ||
109 | @SuppressWarnings("unchecked") | ||
110 | @Override | ||
111 | public void eSet(int featureID, Object newValue) { | ||
112 | switch (featureID) { | ||
113 | case PartialinterpretationPackage.NARY_RELATION_LINK__ELEMENTS: | ||
114 | getElements().clear(); | ||
115 | getElements().addAll((Collection<? extends NaryRelationLinkElement>)newValue); | ||
116 | return; | ||
117 | } | ||
118 | super.eSet(featureID, newValue); | ||
119 | } | ||
120 | |||
121 | /** | ||
122 | * <!-- begin-user-doc --> | ||
123 | * <!-- end-user-doc --> | ||
124 | * @generated | ||
125 | */ | ||
126 | @Override | ||
127 | public void eUnset(int featureID) { | ||
128 | switch (featureID) { | ||
129 | case PartialinterpretationPackage.NARY_RELATION_LINK__ELEMENTS: | ||
130 | getElements().clear(); | ||
131 | return; | ||
132 | } | ||
133 | super.eUnset(featureID); | ||
134 | } | ||
135 | |||
136 | /** | ||
137 | * <!-- begin-user-doc --> | ||
138 | * <!-- end-user-doc --> | ||
139 | * @generated | ||
140 | */ | ||
141 | @Override | ||
142 | public boolean eIsSet(int featureID) { | ||
143 | switch (featureID) { | ||
144 | case PartialinterpretationPackage.NARY_RELATION_LINK__ELEMENTS: | ||
145 | return elements != null && !elements.isEmpty(); | ||
146 | } | ||
147 | return super.eIsSet(featureID); | ||
148 | } | ||
149 | |||
150 | } //NaryRelationLinkImpl | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialConstantInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialConstantInterpretationImpl.java new file mode 100644 index 00000000..81b2ce8d --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialConstantInterpretationImpl.java | |||
@@ -0,0 +1,158 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDeclaration; | ||
6 | |||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation; | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.Notification; | ||
11 | |||
12 | import org.eclipse.emf.ecore.EClass; | ||
13 | import org.eclipse.emf.ecore.InternalEObject; | ||
14 | |||
15 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
16 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
17 | |||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * An implementation of the model object '<em><b>Partial Constant Interpretation</b></em>'. | ||
21 | * <!-- end-user-doc --> | ||
22 | * <p> | ||
23 | * The following features are implemented: | ||
24 | * </p> | ||
25 | * <ul> | ||
26 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialConstantInterpretationImpl#getInterpretationOf <em>Interpretation Of</em>}</li> | ||
27 | * </ul> | ||
28 | * | ||
29 | * @generated | ||
30 | */ | ||
31 | public class PartialConstantInterpretationImpl extends MinimalEObjectImpl.Container implements PartialConstantInterpretation { | ||
32 | /** | ||
33 | * The cached value of the '{@link #getInterpretationOf() <em>Interpretation Of</em>}' reference. | ||
34 | * <!-- begin-user-doc --> | ||
35 | * <!-- end-user-doc --> | ||
36 | * @see #getInterpretationOf() | ||
37 | * @generated | ||
38 | * @ordered | ||
39 | */ | ||
40 | protected ConstantDeclaration interpretationOf; | ||
41 | |||
42 | /** | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @generated | ||
46 | */ | ||
47 | protected PartialConstantInterpretationImpl() { | ||
48 | super(); | ||
49 | } | ||
50 | |||
51 | /** | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @generated | ||
55 | */ | ||
56 | @Override | ||
57 | protected EClass eStaticClass() { | ||
58 | return PartialinterpretationPackage.Literals.PARTIAL_CONSTANT_INTERPRETATION; | ||
59 | } | ||
60 | |||
61 | /** | ||
62 | * <!-- begin-user-doc --> | ||
63 | * <!-- end-user-doc --> | ||
64 | * @generated | ||
65 | */ | ||
66 | public ConstantDeclaration getInterpretationOf() { | ||
67 | if (interpretationOf != null && interpretationOf.eIsProxy()) { | ||
68 | InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf; | ||
69 | interpretationOf = (ConstantDeclaration)eResolveProxy(oldInterpretationOf); | ||
70 | if (interpretationOf != oldInterpretationOf) { | ||
71 | if (eNotificationRequired()) | ||
72 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, PartialinterpretationPackage.PARTIAL_CONSTANT_INTERPRETATION__INTERPRETATION_OF, oldInterpretationOf, interpretationOf)); | ||
73 | } | ||
74 | } | ||
75 | return interpretationOf; | ||
76 | } | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | public ConstantDeclaration basicGetInterpretationOf() { | ||
84 | return interpretationOf; | ||
85 | } | ||
86 | |||
87 | /** | ||
88 | * <!-- begin-user-doc --> | ||
89 | * <!-- end-user-doc --> | ||
90 | * @generated | ||
91 | */ | ||
92 | public void setInterpretationOf(ConstantDeclaration newInterpretationOf) { | ||
93 | ConstantDeclaration oldInterpretationOf = interpretationOf; | ||
94 | interpretationOf = newInterpretationOf; | ||
95 | if (eNotificationRequired()) | ||
96 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_CONSTANT_INTERPRETATION__INTERPRETATION_OF, oldInterpretationOf, interpretationOf)); | ||
97 | } | ||
98 | |||
99 | /** | ||
100 | * <!-- begin-user-doc --> | ||
101 | * <!-- end-user-doc --> | ||
102 | * @generated | ||
103 | */ | ||
104 | @Override | ||
105 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
106 | switch (featureID) { | ||
107 | case PartialinterpretationPackage.PARTIAL_CONSTANT_INTERPRETATION__INTERPRETATION_OF: | ||
108 | if (resolve) return getInterpretationOf(); | ||
109 | return basicGetInterpretationOf(); | ||
110 | } | ||
111 | return super.eGet(featureID, resolve, coreType); | ||
112 | } | ||
113 | |||
114 | /** | ||
115 | * <!-- begin-user-doc --> | ||
116 | * <!-- end-user-doc --> | ||
117 | * @generated | ||
118 | */ | ||
119 | @Override | ||
120 | public void eSet(int featureID, Object newValue) { | ||
121 | switch (featureID) { | ||
122 | case PartialinterpretationPackage.PARTIAL_CONSTANT_INTERPRETATION__INTERPRETATION_OF: | ||
123 | setInterpretationOf((ConstantDeclaration)newValue); | ||
124 | return; | ||
125 | } | ||
126 | super.eSet(featureID, newValue); | ||
127 | } | ||
128 | |||
129 | /** | ||
130 | * <!-- begin-user-doc --> | ||
131 | * <!-- end-user-doc --> | ||
132 | * @generated | ||
133 | */ | ||
134 | @Override | ||
135 | public void eUnset(int featureID) { | ||
136 | switch (featureID) { | ||
137 | case PartialinterpretationPackage.PARTIAL_CONSTANT_INTERPRETATION__INTERPRETATION_OF: | ||
138 | setInterpretationOf((ConstantDeclaration)null); | ||
139 | return; | ||
140 | } | ||
141 | super.eUnset(featureID); | ||
142 | } | ||
143 | |||
144 | /** | ||
145 | * <!-- begin-user-doc --> | ||
146 | * <!-- end-user-doc --> | ||
147 | * @generated | ||
148 | */ | ||
149 | @Override | ||
150 | public boolean eIsSet(int featureID) { | ||
151 | switch (featureID) { | ||
152 | case PartialinterpretationPackage.PARTIAL_CONSTANT_INTERPRETATION__INTERPRETATION_OF: | ||
153 | return interpretationOf != null; | ||
154 | } | ||
155 | return super.eIsSet(featureID); | ||
156 | } | ||
157 | |||
158 | } //PartialConstantInterpretationImpl | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialFunctionInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialFunctionInterpretationImpl.java new file mode 100644 index 00000000..2d361e8e --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialFunctionInterpretationImpl.java | |||
@@ -0,0 +1,158 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDeclaration; | ||
6 | |||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation; | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.Notification; | ||
11 | |||
12 | import org.eclipse.emf.ecore.EClass; | ||
13 | import org.eclipse.emf.ecore.InternalEObject; | ||
14 | |||
15 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
16 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
17 | |||
18 | /** | ||
19 | * <!-- begin-user-doc --> | ||
20 | * An implementation of the model object '<em><b>Partial Function Interpretation</b></em>'. | ||
21 | * <!-- end-user-doc --> | ||
22 | * <p> | ||
23 | * The following features are implemented: | ||
24 | * </p> | ||
25 | * <ul> | ||
26 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialFunctionInterpretationImpl#getInterpretationOf <em>Interpretation Of</em>}</li> | ||
27 | * </ul> | ||
28 | * | ||
29 | * @generated | ||
30 | */ | ||
31 | public class PartialFunctionInterpretationImpl extends MinimalEObjectImpl.Container implements PartialFunctionInterpretation { | ||
32 | /** | ||
33 | * The cached value of the '{@link #getInterpretationOf() <em>Interpretation Of</em>}' reference. | ||
34 | * <!-- begin-user-doc --> | ||
35 | * <!-- end-user-doc --> | ||
36 | * @see #getInterpretationOf() | ||
37 | * @generated | ||
38 | * @ordered | ||
39 | */ | ||
40 | protected FunctionDeclaration interpretationOf; | ||
41 | |||
42 | /** | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @generated | ||
46 | */ | ||
47 | protected PartialFunctionInterpretationImpl() { | ||
48 | super(); | ||
49 | } | ||
50 | |||
51 | /** | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @generated | ||
55 | */ | ||
56 | @Override | ||
57 | protected EClass eStaticClass() { | ||
58 | return PartialinterpretationPackage.Literals.PARTIAL_FUNCTION_INTERPRETATION; | ||
59 | } | ||
60 | |||
61 | /** | ||
62 | * <!-- begin-user-doc --> | ||
63 | * <!-- end-user-doc --> | ||
64 | * @generated | ||
65 | */ | ||
66 | public FunctionDeclaration getInterpretationOf() { | ||
67 | if (interpretationOf != null && interpretationOf.eIsProxy()) { | ||
68 | InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf; | ||
69 | interpretationOf = (FunctionDeclaration)eResolveProxy(oldInterpretationOf); | ||
70 | if (interpretationOf != oldInterpretationOf) { | ||
71 | if (eNotificationRequired()) | ||
72 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, PartialinterpretationPackage.PARTIAL_FUNCTION_INTERPRETATION__INTERPRETATION_OF, oldInterpretationOf, interpretationOf)); | ||
73 | } | ||
74 | } | ||
75 | return interpretationOf; | ||
76 | } | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | public FunctionDeclaration basicGetInterpretationOf() { | ||
84 | return interpretationOf; | ||
85 | } | ||
86 | |||
87 | /** | ||
88 | * <!-- begin-user-doc --> | ||
89 | * <!-- end-user-doc --> | ||
90 | * @generated | ||
91 | */ | ||
92 | public void setInterpretationOf(FunctionDeclaration newInterpretationOf) { | ||
93 | FunctionDeclaration oldInterpretationOf = interpretationOf; | ||
94 | interpretationOf = newInterpretationOf; | ||
95 | if (eNotificationRequired()) | ||
96 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_FUNCTION_INTERPRETATION__INTERPRETATION_OF, oldInterpretationOf, interpretationOf)); | ||
97 | } | ||
98 | |||
99 | /** | ||
100 | * <!-- begin-user-doc --> | ||
101 | * <!-- end-user-doc --> | ||
102 | * @generated | ||
103 | */ | ||
104 | @Override | ||
105 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
106 | switch (featureID) { | ||
107 | case PartialinterpretationPackage.PARTIAL_FUNCTION_INTERPRETATION__INTERPRETATION_OF: | ||
108 | if (resolve) return getInterpretationOf(); | ||
109 | return basicGetInterpretationOf(); | ||
110 | } | ||
111 | return super.eGet(featureID, resolve, coreType); | ||
112 | } | ||
113 | |||
114 | /** | ||
115 | * <!-- begin-user-doc --> | ||
116 | * <!-- end-user-doc --> | ||
117 | * @generated | ||
118 | */ | ||
119 | @Override | ||
120 | public void eSet(int featureID, Object newValue) { | ||
121 | switch (featureID) { | ||
122 | case PartialinterpretationPackage.PARTIAL_FUNCTION_INTERPRETATION__INTERPRETATION_OF: | ||
123 | setInterpretationOf((FunctionDeclaration)newValue); | ||
124 | return; | ||
125 | } | ||
126 | super.eSet(featureID, newValue); | ||
127 | } | ||
128 | |||
129 | /** | ||
130 | * <!-- begin-user-doc --> | ||
131 | * <!-- end-user-doc --> | ||
132 | * @generated | ||
133 | */ | ||
134 | @Override | ||
135 | public void eUnset(int featureID) { | ||
136 | switch (featureID) { | ||
137 | case PartialinterpretationPackage.PARTIAL_FUNCTION_INTERPRETATION__INTERPRETATION_OF: | ||
138 | setInterpretationOf((FunctionDeclaration)null); | ||
139 | return; | ||
140 | } | ||
141 | super.eUnset(featureID); | ||
142 | } | ||
143 | |||
144 | /** | ||
145 | * <!-- begin-user-doc --> | ||
146 | * <!-- end-user-doc --> | ||
147 | * @generated | ||
148 | */ | ||
149 | @Override | ||
150 | public boolean eIsSet(int featureID) { | ||
151 | switch (featureID) { | ||
152 | case PartialinterpretationPackage.PARTIAL_FUNCTION_INTERPRETATION__INTERPRETATION_OF: | ||
153 | return interpretationOf != null; | ||
154 | } | ||
155 | return super.eIsSet(featureID); | ||
156 | } | ||
157 | |||
158 | } //PartialFunctionInterpretationImpl | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java new file mode 100644 index 00000000..09690c79 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java | |||
@@ -0,0 +1,619 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; | ||
6 | |||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem; | ||
8 | |||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation; | ||
10 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation; | ||
11 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation; | ||
12 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation; | ||
13 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation; | ||
14 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; | ||
15 | |||
16 | import java.util.Collection; | ||
17 | |||
18 | import org.eclipse.emf.common.notify.Notification; | ||
19 | import org.eclipse.emf.common.notify.NotificationChain; | ||
20 | |||
21 | import org.eclipse.emf.common.util.EList; | ||
22 | |||
23 | import org.eclipse.emf.ecore.EClass; | ||
24 | import org.eclipse.emf.ecore.InternalEObject; | ||
25 | |||
26 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
27 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
28 | |||
29 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
30 | import org.eclipse.emf.ecore.util.InternalEList; | ||
31 | |||
32 | /** | ||
33 | * <!-- begin-user-doc --> | ||
34 | * An implementation of the model object '<em><b>Partial Interpretation</b></em>'. | ||
35 | * <!-- end-user-doc --> | ||
36 | * <p> | ||
37 | * The following features are implemented: | ||
38 | * </p> | ||
39 | * <ul> | ||
40 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getProblem <em>Problem</em>}</li> | ||
41 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getPartialconstantinterpretation <em>Partialconstantinterpretation</em>}</li> | ||
42 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getPartialrelationinterpretation <em>Partialrelationinterpretation</em>}</li> | ||
43 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getPartialfunctioninterpretation <em>Partialfunctioninterpretation</em>}</li> | ||
44 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getNewElements <em>New Elements</em>}</li> | ||
45 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getPartialtypeinterpratation <em>Partialtypeinterpratation</em>}</li> | ||
46 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getMinNewElements <em>Min New Elements</em>}</li> | ||
47 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getMaxNewElements <em>Max New Elements</em>}</li> | ||
48 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getOpenWorldElementPrototype <em>Open World Element Prototype</em>}</li> | ||
49 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getProblemConainer <em>Problem Conainer</em>}</li> | ||
50 | * </ul> | ||
51 | * | ||
52 | * @generated | ||
53 | */ | ||
54 | public class PartialInterpretationImpl extends MinimalEObjectImpl.Container implements PartialInterpretation { | ||
55 | /** | ||
56 | * The cached value of the '{@link #getProblem() <em>Problem</em>}' reference. | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @see #getProblem() | ||
60 | * @generated | ||
61 | * @ordered | ||
62 | */ | ||
63 | protected LogicProblem problem; | ||
64 | |||
65 | /** | ||
66 | * The cached value of the '{@link #getPartialconstantinterpretation() <em>Partialconstantinterpretation</em>}' containment reference list. | ||
67 | * <!-- begin-user-doc --> | ||
68 | * <!-- end-user-doc --> | ||
69 | * @see #getPartialconstantinterpretation() | ||
70 | * @generated | ||
71 | * @ordered | ||
72 | */ | ||
73 | protected EList<PartialConstantInterpretation> partialconstantinterpretation; | ||
74 | |||
75 | /** | ||
76 | * The cached value of the '{@link #getPartialrelationinterpretation() <em>Partialrelationinterpretation</em>}' containment reference list. | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @see #getPartialrelationinterpretation() | ||
80 | * @generated | ||
81 | * @ordered | ||
82 | */ | ||
83 | protected EList<PartialRelationInterpretation> partialrelationinterpretation; | ||
84 | |||
85 | /** | ||
86 | * The cached value of the '{@link #getPartialfunctioninterpretation() <em>Partialfunctioninterpretation</em>}' containment reference list. | ||
87 | * <!-- begin-user-doc --> | ||
88 | * <!-- end-user-doc --> | ||
89 | * @see #getPartialfunctioninterpretation() | ||
90 | * @generated | ||
91 | * @ordered | ||
92 | */ | ||
93 | protected EList<PartialFunctionInterpretation> partialfunctioninterpretation; | ||
94 | |||
95 | /** | ||
96 | * The cached value of the '{@link #getNewElements() <em>New Elements</em>}' containment reference list. | ||
97 | * <!-- begin-user-doc --> | ||
98 | * <!-- end-user-doc --> | ||
99 | * @see #getNewElements() | ||
100 | * @generated | ||
101 | * @ordered | ||
102 | */ | ||
103 | protected EList<DefinedElement> newElements; | ||
104 | |||
105 | /** | ||
106 | * The cached value of the '{@link #getPartialtypeinterpratation() <em>Partialtypeinterpratation</em>}' containment reference list. | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @see #getPartialtypeinterpratation() | ||
110 | * @generated | ||
111 | * @ordered | ||
112 | */ | ||
113 | protected EList<PartialTypeInterpratation> partialtypeinterpratation; | ||
114 | |||
115 | /** | ||
116 | * The default value of the '{@link #getMinNewElements() <em>Min New Elements</em>}' attribute. | ||
117 | * <!-- begin-user-doc --> | ||
118 | * <!-- end-user-doc --> | ||
119 | * @see #getMinNewElements() | ||
120 | * @generated | ||
121 | * @ordered | ||
122 | */ | ||
123 | protected static final int MIN_NEW_ELEMENTS_EDEFAULT = 0; | ||
124 | |||
125 | /** | ||
126 | * The cached value of the '{@link #getMinNewElements() <em>Min New Elements</em>}' attribute. | ||
127 | * <!-- begin-user-doc --> | ||
128 | * <!-- end-user-doc --> | ||
129 | * @see #getMinNewElements() | ||
130 | * @generated | ||
131 | * @ordered | ||
132 | */ | ||
133 | protected int minNewElements = MIN_NEW_ELEMENTS_EDEFAULT; | ||
134 | |||
135 | /** | ||
136 | * The default value of the '{@link #getMaxNewElements() <em>Max New Elements</em>}' attribute. | ||
137 | * <!-- begin-user-doc --> | ||
138 | * <!-- end-user-doc --> | ||
139 | * @see #getMaxNewElements() | ||
140 | * @generated | ||
141 | * @ordered | ||
142 | */ | ||
143 | protected static final int MAX_NEW_ELEMENTS_EDEFAULT = 0; | ||
144 | |||
145 | /** | ||
146 | * The cached value of the '{@link #getMaxNewElements() <em>Max New Elements</em>}' attribute. | ||
147 | * <!-- begin-user-doc --> | ||
148 | * <!-- end-user-doc --> | ||
149 | * @see #getMaxNewElements() | ||
150 | * @generated | ||
151 | * @ordered | ||
152 | */ | ||
153 | protected int maxNewElements = MAX_NEW_ELEMENTS_EDEFAULT; | ||
154 | |||
155 | /** | ||
156 | * The cached value of the '{@link #getOpenWorldElementPrototype() <em>Open World Element Prototype</em>}' containment reference. | ||
157 | * <!-- begin-user-doc --> | ||
158 | * <!-- end-user-doc --> | ||
159 | * @see #getOpenWorldElementPrototype() | ||
160 | * @generated | ||
161 | * @ordered | ||
162 | */ | ||
163 | protected DefinedElement openWorldElementPrototype; | ||
164 | |||
165 | /** | ||
166 | * The cached value of the '{@link #getProblemConainer() <em>Problem Conainer</em>}' containment reference. | ||
167 | * <!-- begin-user-doc --> | ||
168 | * <!-- end-user-doc --> | ||
169 | * @see #getProblemConainer() | ||
170 | * @generated | ||
171 | * @ordered | ||
172 | */ | ||
173 | protected LogicProblem problemConainer; | ||
174 | |||
175 | /** | ||
176 | * <!-- begin-user-doc --> | ||
177 | * <!-- end-user-doc --> | ||
178 | * @generated | ||
179 | */ | ||
180 | protected PartialInterpretationImpl() { | ||
181 | super(); | ||
182 | } | ||
183 | |||
184 | /** | ||
185 | * <!-- begin-user-doc --> | ||
186 | * <!-- end-user-doc --> | ||
187 | * @generated | ||
188 | */ | ||
189 | @Override | ||
190 | protected EClass eStaticClass() { | ||
191 | return PartialinterpretationPackage.Literals.PARTIAL_INTERPRETATION; | ||
192 | } | ||
193 | |||
194 | /** | ||
195 | * <!-- begin-user-doc --> | ||
196 | * <!-- end-user-doc --> | ||
197 | * @generated | ||
198 | */ | ||
199 | public LogicProblem getProblem() { | ||
200 | if (problem != null && problem.eIsProxy()) { | ||
201 | InternalEObject oldProblem = (InternalEObject)problem; | ||
202 | problem = (LogicProblem)eResolveProxy(oldProblem); | ||
203 | if (problem != oldProblem) { | ||
204 | if (eNotificationRequired()) | ||
205 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM, oldProblem, problem)); | ||
206 | } | ||
207 | } | ||
208 | return problem; | ||
209 | } | ||
210 | |||
211 | /** | ||
212 | * <!-- begin-user-doc --> | ||
213 | * <!-- end-user-doc --> | ||
214 | * @generated | ||
215 | */ | ||
216 | public LogicProblem basicGetProblem() { | ||
217 | return problem; | ||
218 | } | ||
219 | |||
220 | /** | ||
221 | * <!-- begin-user-doc --> | ||
222 | * <!-- end-user-doc --> | ||
223 | * @generated | ||
224 | */ | ||
225 | public void setProblem(LogicProblem newProblem) { | ||
226 | LogicProblem oldProblem = problem; | ||
227 | problem = newProblem; | ||
228 | if (eNotificationRequired()) | ||
229 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM, oldProblem, problem)); | ||
230 | } | ||
231 | |||
232 | /** | ||
233 | * <!-- begin-user-doc --> | ||
234 | * <!-- end-user-doc --> | ||
235 | * @generated | ||
236 | */ | ||
237 | public EList<PartialConstantInterpretation> getPartialconstantinterpretation() { | ||
238 | if (partialconstantinterpretation == null) { | ||
239 | partialconstantinterpretation = new EObjectContainmentEList<PartialConstantInterpretation>(PartialConstantInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION); | ||
240 | } | ||
241 | return partialconstantinterpretation; | ||
242 | } | ||
243 | |||
244 | /** | ||
245 | * <!-- begin-user-doc --> | ||
246 | * <!-- end-user-doc --> | ||
247 | * @generated | ||
248 | */ | ||
249 | public EList<PartialRelationInterpretation> getPartialrelationinterpretation() { | ||
250 | if (partialrelationinterpretation == null) { | ||
251 | partialrelationinterpretation = new EObjectContainmentEList<PartialRelationInterpretation>(PartialRelationInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION); | ||
252 | } | ||
253 | return partialrelationinterpretation; | ||
254 | } | ||
255 | |||
256 | /** | ||
257 | * <!-- begin-user-doc --> | ||
258 | * <!-- end-user-doc --> | ||
259 | * @generated | ||
260 | */ | ||
261 | public EList<PartialFunctionInterpretation> getPartialfunctioninterpretation() { | ||
262 | if (partialfunctioninterpretation == null) { | ||
263 | partialfunctioninterpretation = new EObjectContainmentEList<PartialFunctionInterpretation>(PartialFunctionInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION); | ||
264 | } | ||
265 | return partialfunctioninterpretation; | ||
266 | } | ||
267 | |||
268 | /** | ||
269 | * <!-- begin-user-doc --> | ||
270 | * <!-- end-user-doc --> | ||
271 | * @generated | ||
272 | */ | ||
273 | public EList<DefinedElement> getNewElements() { | ||
274 | if (newElements == null) { | ||
275 | newElements = new EObjectContainmentEList<DefinedElement>(DefinedElement.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS); | ||
276 | } | ||
277 | return newElements; | ||
278 | } | ||
279 | |||
280 | /** | ||
281 | * <!-- begin-user-doc --> | ||
282 | * <!-- end-user-doc --> | ||
283 | * @generated | ||
284 | */ | ||
285 | public EList<PartialTypeInterpratation> getPartialtypeinterpratation() { | ||
286 | if (partialtypeinterpratation == null) { | ||
287 | partialtypeinterpratation = new EObjectContainmentEList<PartialTypeInterpratation>(PartialTypeInterpratation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION); | ||
288 | } | ||
289 | return partialtypeinterpratation; | ||
290 | } | ||
291 | |||
292 | /** | ||
293 | * <!-- begin-user-doc --> | ||
294 | * <!-- end-user-doc --> | ||
295 | * @generated | ||
296 | */ | ||
297 | public int getMinNewElements() { | ||
298 | return minNewElements; | ||
299 | } | ||
300 | |||
301 | /** | ||
302 | * <!-- begin-user-doc --> | ||
303 | * <!-- end-user-doc --> | ||
304 | * @generated | ||
305 | */ | ||
306 | public void setMinNewElements(int newMinNewElements) { | ||
307 | int oldMinNewElements = minNewElements; | ||
308 | minNewElements = newMinNewElements; | ||
309 | if (eNotificationRequired()) | ||
310 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS, oldMinNewElements, minNewElements)); | ||
311 | } | ||
312 | |||
313 | /** | ||
314 | * <!-- begin-user-doc --> | ||
315 | * <!-- end-user-doc --> | ||
316 | * @generated | ||
317 | */ | ||
318 | public int getMaxNewElements() { | ||
319 | return maxNewElements; | ||
320 | } | ||
321 | |||
322 | /** | ||
323 | * <!-- begin-user-doc --> | ||
324 | * <!-- end-user-doc --> | ||
325 | * @generated | ||
326 | */ | ||
327 | public void setMaxNewElements(int newMaxNewElements) { | ||
328 | int oldMaxNewElements = maxNewElements; | ||
329 | maxNewElements = newMaxNewElements; | ||
330 | if (eNotificationRequired()) | ||
331 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS, oldMaxNewElements, maxNewElements)); | ||
332 | } | ||
333 | |||
334 | /** | ||
335 | * <!-- begin-user-doc --> | ||
336 | * <!-- end-user-doc --> | ||
337 | * @generated | ||
338 | */ | ||
339 | public DefinedElement getOpenWorldElementPrototype() { | ||
340 | return openWorldElementPrototype; | ||
341 | } | ||
342 | |||
343 | /** | ||
344 | * <!-- begin-user-doc --> | ||
345 | * <!-- end-user-doc --> | ||
346 | * @generated | ||
347 | */ | ||
348 | public NotificationChain basicSetOpenWorldElementPrototype(DefinedElement newOpenWorldElementPrototype, NotificationChain msgs) { | ||
349 | DefinedElement oldOpenWorldElementPrototype = openWorldElementPrototype; | ||
350 | openWorldElementPrototype = newOpenWorldElementPrototype; | ||
351 | if (eNotificationRequired()) { | ||
352 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE, oldOpenWorldElementPrototype, newOpenWorldElementPrototype); | ||
353 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
354 | } | ||
355 | return msgs; | ||
356 | } | ||
357 | |||
358 | /** | ||
359 | * <!-- begin-user-doc --> | ||
360 | * <!-- end-user-doc --> | ||
361 | * @generated | ||
362 | */ | ||
363 | public void setOpenWorldElementPrototype(DefinedElement newOpenWorldElementPrototype) { | ||
364 | if (newOpenWorldElementPrototype != openWorldElementPrototype) { | ||
365 | NotificationChain msgs = null; | ||
366 | if (openWorldElementPrototype != null) | ||
367 | msgs = ((InternalEObject)openWorldElementPrototype).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE, null, msgs); | ||
368 | if (newOpenWorldElementPrototype != null) | ||
369 | msgs = ((InternalEObject)newOpenWorldElementPrototype).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE, null, msgs); | ||
370 | msgs = basicSetOpenWorldElementPrototype(newOpenWorldElementPrototype, msgs); | ||
371 | if (msgs != null) msgs.dispatch(); | ||
372 | } | ||
373 | else if (eNotificationRequired()) | ||
374 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE, newOpenWorldElementPrototype, newOpenWorldElementPrototype)); | ||
375 | } | ||
376 | |||
377 | /** | ||
378 | * <!-- begin-user-doc --> | ||
379 | * <!-- end-user-doc --> | ||
380 | * @generated | ||
381 | */ | ||
382 | public LogicProblem getProblemConainer() { | ||
383 | return problemConainer; | ||
384 | } | ||
385 | |||
386 | /** | ||
387 | * <!-- begin-user-doc --> | ||
388 | * <!-- end-user-doc --> | ||
389 | * @generated | ||
390 | */ | ||
391 | public NotificationChain basicSetProblemConainer(LogicProblem newProblemConainer, NotificationChain msgs) { | ||
392 | LogicProblem oldProblemConainer = problemConainer; | ||
393 | problemConainer = newProblemConainer; | ||
394 | if (eNotificationRequired()) { | ||
395 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER, oldProblemConainer, newProblemConainer); | ||
396 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
397 | } | ||
398 | return msgs; | ||
399 | } | ||
400 | |||
401 | /** | ||
402 | * <!-- begin-user-doc --> | ||
403 | * <!-- end-user-doc --> | ||
404 | * @generated | ||
405 | */ | ||
406 | public void setProblemConainer(LogicProblem newProblemConainer) { | ||
407 | if (newProblemConainer != problemConainer) { | ||
408 | NotificationChain msgs = null; | ||
409 | if (problemConainer != null) | ||
410 | msgs = ((InternalEObject)problemConainer).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER, null, msgs); | ||
411 | if (newProblemConainer != null) | ||
412 | msgs = ((InternalEObject)newProblemConainer).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER, null, msgs); | ||
413 | msgs = basicSetProblemConainer(newProblemConainer, msgs); | ||
414 | if (msgs != null) msgs.dispatch(); | ||
415 | } | ||
416 | else if (eNotificationRequired()) | ||
417 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER, newProblemConainer, newProblemConainer)); | ||
418 | } | ||
419 | |||
420 | /** | ||
421 | * <!-- begin-user-doc --> | ||
422 | * <!-- end-user-doc --> | ||
423 | * @generated | ||
424 | */ | ||
425 | @Override | ||
426 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
427 | switch (featureID) { | ||
428 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION: | ||
429 | return ((InternalEList<?>)getPartialconstantinterpretation()).basicRemove(otherEnd, msgs); | ||
430 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION: | ||
431 | return ((InternalEList<?>)getPartialrelationinterpretation()).basicRemove(otherEnd, msgs); | ||
432 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION: | ||
433 | return ((InternalEList<?>)getPartialfunctioninterpretation()).basicRemove(otherEnd, msgs); | ||
434 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS: | ||
435 | return ((InternalEList<?>)getNewElements()).basicRemove(otherEnd, msgs); | ||
436 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION: | ||
437 | return ((InternalEList<?>)getPartialtypeinterpratation()).basicRemove(otherEnd, msgs); | ||
438 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE: | ||
439 | return basicSetOpenWorldElementPrototype(null, msgs); | ||
440 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER: | ||
441 | return basicSetProblemConainer(null, msgs); | ||
442 | } | ||
443 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
444 | } | ||
445 | |||
446 | /** | ||
447 | * <!-- begin-user-doc --> | ||
448 | * <!-- end-user-doc --> | ||
449 | * @generated | ||
450 | */ | ||
451 | @Override | ||
452 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
453 | switch (featureID) { | ||
454 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM: | ||
455 | if (resolve) return getProblem(); | ||
456 | return basicGetProblem(); | ||
457 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION: | ||
458 | return getPartialconstantinterpretation(); | ||
459 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION: | ||
460 | return getPartialrelationinterpretation(); | ||
461 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION: | ||
462 | return getPartialfunctioninterpretation(); | ||
463 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS: | ||
464 | return getNewElements(); | ||
465 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION: | ||
466 | return getPartialtypeinterpratation(); | ||
467 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS: | ||
468 | return getMinNewElements(); | ||
469 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: | ||
470 | return getMaxNewElements(); | ||
471 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE: | ||
472 | return getOpenWorldElementPrototype(); | ||
473 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER: | ||
474 | return getProblemConainer(); | ||
475 | } | ||
476 | return super.eGet(featureID, resolve, coreType); | ||
477 | } | ||
478 | |||
479 | /** | ||
480 | * <!-- begin-user-doc --> | ||
481 | * <!-- end-user-doc --> | ||
482 | * @generated | ||
483 | */ | ||
484 | @SuppressWarnings("unchecked") | ||
485 | @Override | ||
486 | public void eSet(int featureID, Object newValue) { | ||
487 | switch (featureID) { | ||
488 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM: | ||
489 | setProblem((LogicProblem)newValue); | ||
490 | return; | ||
491 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION: | ||
492 | getPartialconstantinterpretation().clear(); | ||
493 | getPartialconstantinterpretation().addAll((Collection<? extends PartialConstantInterpretation>)newValue); | ||
494 | return; | ||
495 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION: | ||
496 | getPartialrelationinterpretation().clear(); | ||
497 | getPartialrelationinterpretation().addAll((Collection<? extends PartialRelationInterpretation>)newValue); | ||
498 | return; | ||
499 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION: | ||
500 | getPartialfunctioninterpretation().clear(); | ||
501 | getPartialfunctioninterpretation().addAll((Collection<? extends PartialFunctionInterpretation>)newValue); | ||
502 | return; | ||
503 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS: | ||
504 | getNewElements().clear(); | ||
505 | getNewElements().addAll((Collection<? extends DefinedElement>)newValue); | ||
506 | return; | ||
507 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION: | ||
508 | getPartialtypeinterpratation().clear(); | ||
509 | getPartialtypeinterpratation().addAll((Collection<? extends PartialTypeInterpratation>)newValue); | ||
510 | return; | ||
511 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS: | ||
512 | setMinNewElements((Integer)newValue); | ||
513 | return; | ||
514 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: | ||
515 | setMaxNewElements((Integer)newValue); | ||
516 | return; | ||
517 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE: | ||
518 | setOpenWorldElementPrototype((DefinedElement)newValue); | ||
519 | return; | ||
520 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER: | ||
521 | setProblemConainer((LogicProblem)newValue); | ||
522 | return; | ||
523 | } | ||
524 | super.eSet(featureID, newValue); | ||
525 | } | ||
526 | |||
527 | /** | ||
528 | * <!-- begin-user-doc --> | ||
529 | * <!-- end-user-doc --> | ||
530 | * @generated | ||
531 | */ | ||
532 | @Override | ||
533 | public void eUnset(int featureID) { | ||
534 | switch (featureID) { | ||
535 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM: | ||
536 | setProblem((LogicProblem)null); | ||
537 | return; | ||
538 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION: | ||
539 | getPartialconstantinterpretation().clear(); | ||
540 | return; | ||
541 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION: | ||
542 | getPartialrelationinterpretation().clear(); | ||
543 | return; | ||
544 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION: | ||
545 | getPartialfunctioninterpretation().clear(); | ||
546 | return; | ||
547 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS: | ||
548 | getNewElements().clear(); | ||
549 | return; | ||
550 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION: | ||
551 | getPartialtypeinterpratation().clear(); | ||
552 | return; | ||
553 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS: | ||
554 | setMinNewElements(MIN_NEW_ELEMENTS_EDEFAULT); | ||
555 | return; | ||
556 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: | ||
557 | setMaxNewElements(MAX_NEW_ELEMENTS_EDEFAULT); | ||
558 | return; | ||
559 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE: | ||
560 | setOpenWorldElementPrototype((DefinedElement)null); | ||
561 | return; | ||
562 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER: | ||
563 | setProblemConainer((LogicProblem)null); | ||
564 | return; | ||
565 | } | ||
566 | super.eUnset(featureID); | ||
567 | } | ||
568 | |||
569 | /** | ||
570 | * <!-- begin-user-doc --> | ||
571 | * <!-- end-user-doc --> | ||
572 | * @generated | ||
573 | */ | ||
574 | @Override | ||
575 | public boolean eIsSet(int featureID) { | ||
576 | switch (featureID) { | ||
577 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM: | ||
578 | return problem != null; | ||
579 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION: | ||
580 | return partialconstantinterpretation != null && !partialconstantinterpretation.isEmpty(); | ||
581 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION: | ||
582 | return partialrelationinterpretation != null && !partialrelationinterpretation.isEmpty(); | ||
583 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION: | ||
584 | return partialfunctioninterpretation != null && !partialfunctioninterpretation.isEmpty(); | ||
585 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS: | ||
586 | return newElements != null && !newElements.isEmpty(); | ||
587 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION: | ||
588 | return partialtypeinterpratation != null && !partialtypeinterpratation.isEmpty(); | ||
589 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS: | ||
590 | return minNewElements != MIN_NEW_ELEMENTS_EDEFAULT; | ||
591 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: | ||
592 | return maxNewElements != MAX_NEW_ELEMENTS_EDEFAULT; | ||
593 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE: | ||
594 | return openWorldElementPrototype != null; | ||
595 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PROBLEM_CONAINER: | ||
596 | return problemConainer != null; | ||
597 | } | ||
598 | return super.eIsSet(featureID); | ||
599 | } | ||
600 | |||
601 | /** | ||
602 | * <!-- begin-user-doc --> | ||
603 | * <!-- end-user-doc --> | ||
604 | * @generated | ||
605 | */ | ||
606 | @Override | ||
607 | public String toString() { | ||
608 | if (eIsProxy()) return super.toString(); | ||
609 | |||
610 | StringBuffer result = new StringBuffer(super.toString()); | ||
611 | result.append(" (minNewElements: "); | ||
612 | result.append(minNewElements); | ||
613 | result.append(", maxNewElements: "); | ||
614 | result.append(maxNewElements); | ||
615 | result.append(')'); | ||
616 | return result.toString(); | ||
617 | } | ||
618 | |||
619 | } //PartialInterpretationImpl | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialRelationInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialRelationInterpretationImpl.java new file mode 100644 index 00000000..71aef9af --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialRelationInterpretationImpl.java | |||
@@ -0,0 +1,337 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration; | ||
6 | |||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeReference; | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation; | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; | ||
10 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink; | ||
11 | |||
12 | import java.util.Collection; | ||
13 | |||
14 | import org.eclipse.emf.common.notify.Notification; | ||
15 | import org.eclipse.emf.common.notify.NotificationChain; | ||
16 | |||
17 | import org.eclipse.emf.common.util.EList; | ||
18 | |||
19 | import org.eclipse.emf.ecore.EClass; | ||
20 | import org.eclipse.emf.ecore.InternalEObject; | ||
21 | |||
22 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
23 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
24 | |||
25 | import org.eclipse.emf.ecore.util.EObjectContainmentEList; | ||
26 | import org.eclipse.emf.ecore.util.InternalEList; | ||
27 | |||
28 | /** | ||
29 | * <!-- begin-user-doc --> | ||
30 | * An implementation of the model object '<em><b>Partial Relation Interpretation</b></em>'. | ||
31 | * <!-- end-user-doc --> | ||
32 | * <p> | ||
33 | * The following features are implemented: | ||
34 | * </p> | ||
35 | * <ul> | ||
36 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialRelationInterpretationImpl#getInterpretationOf <em>Interpretation Of</em>}</li> | ||
37 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialRelationInterpretationImpl#getRelationlinks <em>Relationlinks</em>}</li> | ||
38 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialRelationInterpretationImpl#getParam1 <em>Param1</em>}</li> | ||
39 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialRelationInterpretationImpl#getParam2 <em>Param2</em>}</li> | ||
40 | * </ul> | ||
41 | * | ||
42 | * @generated | ||
43 | */ | ||
44 | public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Container implements PartialRelationInterpretation { | ||
45 | /** | ||
46 | * The cached value of the '{@link #getInterpretationOf() <em>Interpretation Of</em>}' reference. | ||
47 | * <!-- begin-user-doc --> | ||
48 | * <!-- end-user-doc --> | ||
49 | * @see #getInterpretationOf() | ||
50 | * @generated | ||
51 | * @ordered | ||
52 | */ | ||
53 | protected RelationDeclaration interpretationOf; | ||
54 | |||
55 | /** | ||
56 | * The cached value of the '{@link #getRelationlinks() <em>Relationlinks</em>}' containment reference list. | ||
57 | * <!-- begin-user-doc --> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @see #getRelationlinks() | ||
60 | * @generated | ||
61 | * @ordered | ||
62 | */ | ||
63 | protected EList<RelationLink> relationlinks; | ||
64 | |||
65 | /** | ||
66 | * The cached value of the '{@link #getParam1() <em>Param1</em>}' reference. | ||
67 | * <!-- begin-user-doc --> | ||
68 | * <!-- end-user-doc --> | ||
69 | * @see #getParam1() | ||
70 | * @generated | ||
71 | * @ordered | ||
72 | */ | ||
73 | protected TypeReference param1; | ||
74 | |||
75 | /** | ||
76 | * The cached value of the '{@link #getParam2() <em>Param2</em>}' reference. | ||
77 | * <!-- begin-user-doc --> | ||
78 | * <!-- end-user-doc --> | ||
79 | * @see #getParam2() | ||
80 | * @generated | ||
81 | * @ordered | ||
82 | */ | ||
83 | protected TypeReference param2; | ||
84 | |||
85 | /** | ||
86 | * <!-- begin-user-doc --> | ||
87 | * <!-- end-user-doc --> | ||
88 | * @generated | ||
89 | */ | ||
90 | protected PartialRelationInterpretationImpl() { | ||
91 | super(); | ||
92 | } | ||
93 | |||
94 | /** | ||
95 | * <!-- begin-user-doc --> | ||
96 | * <!-- end-user-doc --> | ||
97 | * @generated | ||
98 | */ | ||
99 | @Override | ||
100 | protected EClass eStaticClass() { | ||
101 | return PartialinterpretationPackage.Literals.PARTIAL_RELATION_INTERPRETATION; | ||
102 | } | ||
103 | |||
104 | /** | ||
105 | * <!-- begin-user-doc --> | ||
106 | * <!-- end-user-doc --> | ||
107 | * @generated | ||
108 | */ | ||
109 | public RelationDeclaration getInterpretationOf() { | ||
110 | if (interpretationOf != null && interpretationOf.eIsProxy()) { | ||
111 | InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf; | ||
112 | interpretationOf = (RelationDeclaration)eResolveProxy(oldInterpretationOf); | ||
113 | if (interpretationOf != oldInterpretationOf) { | ||
114 | if (eNotificationRequired()) | ||
115 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__INTERPRETATION_OF, oldInterpretationOf, interpretationOf)); | ||
116 | } | ||
117 | } | ||
118 | return interpretationOf; | ||
119 | } | ||
120 | |||
121 | /** | ||
122 | * <!-- begin-user-doc --> | ||
123 | * <!-- end-user-doc --> | ||
124 | * @generated | ||
125 | */ | ||
126 | public RelationDeclaration basicGetInterpretationOf() { | ||
127 | return interpretationOf; | ||
128 | } | ||
129 | |||
130 | /** | ||
131 | * <!-- begin-user-doc --> | ||
132 | * <!-- end-user-doc --> | ||
133 | * @generated | ||
134 | */ | ||
135 | public void setInterpretationOf(RelationDeclaration newInterpretationOf) { | ||
136 | RelationDeclaration oldInterpretationOf = interpretationOf; | ||
137 | interpretationOf = newInterpretationOf; | ||
138 | if (eNotificationRequired()) | ||
139 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__INTERPRETATION_OF, oldInterpretationOf, interpretationOf)); | ||
140 | } | ||
141 | |||
142 | /** | ||
143 | * <!-- begin-user-doc --> | ||
144 | * <!-- end-user-doc --> | ||
145 | * @generated | ||
146 | */ | ||
147 | public EList<RelationLink> getRelationlinks() { | ||
148 | if (relationlinks == null) { | ||
149 | relationlinks = new EObjectContainmentEList<RelationLink>(RelationLink.class, this, PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__RELATIONLINKS); | ||
150 | } | ||
151 | return relationlinks; | ||
152 | } | ||
153 | |||
154 | /** | ||
155 | * <!-- begin-user-doc --> | ||
156 | * <!-- end-user-doc --> | ||
157 | * @generated | ||
158 | */ | ||
159 | public TypeReference getParam1() { | ||
160 | if (param1 != null && param1.eIsProxy()) { | ||
161 | InternalEObject oldParam1 = (InternalEObject)param1; | ||
162 | param1 = (TypeReference)eResolveProxy(oldParam1); | ||
163 | if (param1 != oldParam1) { | ||
164 | if (eNotificationRequired()) | ||
165 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__PARAM1, oldParam1, param1)); | ||
166 | } | ||
167 | } | ||
168 | return param1; | ||
169 | } | ||
170 | |||
171 | /** | ||
172 | * <!-- begin-user-doc --> | ||
173 | * <!-- end-user-doc --> | ||
174 | * @generated | ||
175 | */ | ||
176 | public TypeReference basicGetParam1() { | ||
177 | return param1; | ||
178 | } | ||
179 | |||
180 | /** | ||
181 | * <!-- begin-user-doc --> | ||
182 | * <!-- end-user-doc --> | ||
183 | * @generated | ||
184 | */ | ||
185 | public void setParam1(TypeReference newParam1) { | ||
186 | TypeReference oldParam1 = param1; | ||
187 | param1 = newParam1; | ||
188 | if (eNotificationRequired()) | ||
189 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__PARAM1, oldParam1, param1)); | ||
190 | } | ||
191 | |||
192 | /** | ||
193 | * <!-- begin-user-doc --> | ||
194 | * <!-- end-user-doc --> | ||
195 | * @generated | ||
196 | */ | ||
197 | public TypeReference getParam2() { | ||
198 | if (param2 != null && param2.eIsProxy()) { | ||
199 | InternalEObject oldParam2 = (InternalEObject)param2; | ||
200 | param2 = (TypeReference)eResolveProxy(oldParam2); | ||
201 | if (param2 != oldParam2) { | ||
202 | if (eNotificationRequired()) | ||
203 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__PARAM2, oldParam2, param2)); | ||
204 | } | ||
205 | } | ||
206 | return param2; | ||
207 | } | ||
208 | |||
209 | /** | ||
210 | * <!-- begin-user-doc --> | ||
211 | * <!-- end-user-doc --> | ||
212 | * @generated | ||
213 | */ | ||
214 | public TypeReference basicGetParam2() { | ||
215 | return param2; | ||
216 | } | ||
217 | |||
218 | /** | ||
219 | * <!-- begin-user-doc --> | ||
220 | * <!-- end-user-doc --> | ||
221 | * @generated | ||
222 | */ | ||
223 | public void setParam2(TypeReference newParam2) { | ||
224 | TypeReference oldParam2 = param2; | ||
225 | param2 = newParam2; | ||
226 | if (eNotificationRequired()) | ||
227 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__PARAM2, oldParam2, param2)); | ||
228 | } | ||
229 | |||
230 | /** | ||
231 | * <!-- begin-user-doc --> | ||
232 | * <!-- end-user-doc --> | ||
233 | * @generated | ||
234 | */ | ||
235 | @Override | ||
236 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
237 | switch (featureID) { | ||
238 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__RELATIONLINKS: | ||
239 | return ((InternalEList<?>)getRelationlinks()).basicRemove(otherEnd, msgs); | ||
240 | } | ||
241 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
242 | } | ||
243 | |||
244 | /** | ||
245 | * <!-- begin-user-doc --> | ||
246 | * <!-- end-user-doc --> | ||
247 | * @generated | ||
248 | */ | ||
249 | @Override | ||
250 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
251 | switch (featureID) { | ||
252 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__INTERPRETATION_OF: | ||
253 | if (resolve) return getInterpretationOf(); | ||
254 | return basicGetInterpretationOf(); | ||
255 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__RELATIONLINKS: | ||
256 | return getRelationlinks(); | ||
257 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__PARAM1: | ||
258 | if (resolve) return getParam1(); | ||
259 | return basicGetParam1(); | ||
260 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__PARAM2: | ||
261 | if (resolve) return getParam2(); | ||
262 | return basicGetParam2(); | ||
263 | } | ||
264 | return super.eGet(featureID, resolve, coreType); | ||
265 | } | ||
266 | |||
267 | /** | ||
268 | * <!-- begin-user-doc --> | ||
269 | * <!-- end-user-doc --> | ||
270 | * @generated | ||
271 | */ | ||
272 | @SuppressWarnings("unchecked") | ||
273 | @Override | ||
274 | public void eSet(int featureID, Object newValue) { | ||
275 | switch (featureID) { | ||
276 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__INTERPRETATION_OF: | ||
277 | setInterpretationOf((RelationDeclaration)newValue); | ||
278 | return; | ||
279 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__RELATIONLINKS: | ||
280 | getRelationlinks().clear(); | ||
281 | getRelationlinks().addAll((Collection<? extends RelationLink>)newValue); | ||
282 | return; | ||
283 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__PARAM1: | ||
284 | setParam1((TypeReference)newValue); | ||
285 | return; | ||
286 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__PARAM2: | ||
287 | setParam2((TypeReference)newValue); | ||
288 | return; | ||
289 | } | ||
290 | super.eSet(featureID, newValue); | ||
291 | } | ||
292 | |||
293 | /** | ||
294 | * <!-- begin-user-doc --> | ||
295 | * <!-- end-user-doc --> | ||
296 | * @generated | ||
297 | */ | ||
298 | @Override | ||
299 | public void eUnset(int featureID) { | ||
300 | switch (featureID) { | ||
301 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__INTERPRETATION_OF: | ||
302 | setInterpretationOf((RelationDeclaration)null); | ||
303 | return; | ||
304 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__RELATIONLINKS: | ||
305 | getRelationlinks().clear(); | ||
306 | return; | ||
307 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__PARAM1: | ||
308 | setParam1((TypeReference)null); | ||
309 | return; | ||
310 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__PARAM2: | ||
311 | setParam2((TypeReference)null); | ||
312 | return; | ||
313 | } | ||
314 | super.eUnset(featureID); | ||
315 | } | ||
316 | |||
317 | /** | ||
318 | * <!-- begin-user-doc --> | ||
319 | * <!-- end-user-doc --> | ||
320 | * @generated | ||
321 | */ | ||
322 | @Override | ||
323 | public boolean eIsSet(int featureID) { | ||
324 | switch (featureID) { | ||
325 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__INTERPRETATION_OF: | ||
326 | return interpretationOf != null; | ||
327 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__RELATIONLINKS: | ||
328 | return relationlinks != null && !relationlinks.isEmpty(); | ||
329 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__PARAM1: | ||
330 | return param1 != null; | ||
331 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__PARAM2: | ||
332 | return param2 != null; | ||
333 | } | ||
334 | return super.eIsSet(featureID); | ||
335 | } | ||
336 | |||
337 | } //PartialRelationInterpretationImpl | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java new file mode 100644 index 00000000..1090aaf7 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java | |||
@@ -0,0 +1,231 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration; | ||
7 | |||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation; | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; | ||
10 | |||
11 | import java.util.Collection; | ||
12 | import org.eclipse.emf.common.notify.Notification; | ||
13 | |||
14 | import org.eclipse.emf.common.util.EList; | ||
15 | import org.eclipse.emf.ecore.EClass; | ||
16 | import org.eclipse.emf.ecore.InternalEObject; | ||
17 | |||
18 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
19 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
20 | import org.eclipse.emf.ecore.util.EObjectResolvingEList; | ||
21 | |||
22 | /** | ||
23 | * <!-- begin-user-doc --> | ||
24 | * An implementation of the model object '<em><b>Partial Type Interpratation</b></em>'. | ||
25 | * <!-- end-user-doc --> | ||
26 | * <p> | ||
27 | * The following features are implemented: | ||
28 | * </p> | ||
29 | * <ul> | ||
30 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialTypeInterpratationImpl#getInterpretationOf <em>Interpretation Of</em>}</li> | ||
31 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialTypeInterpratationImpl#getElements <em>Elements</em>}</li> | ||
32 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialTypeInterpratationImpl#getSupertypeInterpretation <em>Supertype Interpretation</em>}</li> | ||
33 | * </ul> | ||
34 | * | ||
35 | * @generated | ||
36 | */ | ||
37 | public class PartialTypeInterpratationImpl extends MinimalEObjectImpl.Container implements PartialTypeInterpratation { | ||
38 | /** | ||
39 | * The cached value of the '{@link #getInterpretationOf() <em>Interpretation Of</em>}' reference. | ||
40 | * <!-- begin-user-doc --> | ||
41 | * <!-- end-user-doc --> | ||
42 | * @see #getInterpretationOf() | ||
43 | * @generated | ||
44 | * @ordered | ||
45 | */ | ||
46 | protected TypeDeclaration interpretationOf; | ||
47 | |||
48 | /** | ||
49 | * The cached value of the '{@link #getElements() <em>Elements</em>}' reference list. | ||
50 | * <!-- begin-user-doc --> | ||
51 | * <!-- end-user-doc --> | ||
52 | * @see #getElements() | ||
53 | * @generated | ||
54 | * @ordered | ||
55 | */ | ||
56 | protected EList<DefinedElement> elements; | ||
57 | |||
58 | /** | ||
59 | * The cached value of the '{@link #getSupertypeInterpretation() <em>Supertype Interpretation</em>}' reference list. | ||
60 | * <!-- begin-user-doc --> | ||
61 | * <!-- end-user-doc --> | ||
62 | * @see #getSupertypeInterpretation() | ||
63 | * @generated | ||
64 | * @ordered | ||
65 | */ | ||
66 | protected EList<PartialTypeInterpratation> supertypeInterpretation; | ||
67 | |||
68 | /** | ||
69 | * <!-- begin-user-doc --> | ||
70 | * <!-- end-user-doc --> | ||
71 | * @generated | ||
72 | */ | ||
73 | protected PartialTypeInterpratationImpl() { | ||
74 | super(); | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @generated | ||
81 | */ | ||
82 | @Override | ||
83 | protected EClass eStaticClass() { | ||
84 | return PartialinterpretationPackage.Literals.PARTIAL_TYPE_INTERPRATATION; | ||
85 | } | ||
86 | |||
87 | /** | ||
88 | * <!-- begin-user-doc --> | ||
89 | * <!-- end-user-doc --> | ||
90 | * @generated | ||
91 | */ | ||
92 | public TypeDeclaration getInterpretationOf() { | ||
93 | if (interpretationOf != null && interpretationOf.eIsProxy()) { | ||
94 | InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf; | ||
95 | interpretationOf = (TypeDeclaration)eResolveProxy(oldInterpretationOf); | ||
96 | if (interpretationOf != oldInterpretationOf) { | ||
97 | if (eNotificationRequired()) | ||
98 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__INTERPRETATION_OF, oldInterpretationOf, interpretationOf)); | ||
99 | } | ||
100 | } | ||
101 | return interpretationOf; | ||
102 | } | ||
103 | |||
104 | /** | ||
105 | * <!-- begin-user-doc --> | ||
106 | * <!-- end-user-doc --> | ||
107 | * @generated | ||
108 | */ | ||
109 | public TypeDeclaration basicGetInterpretationOf() { | ||
110 | return interpretationOf; | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * <!-- begin-user-doc --> | ||
115 | * <!-- end-user-doc --> | ||
116 | * @generated | ||
117 | */ | ||
118 | public void setInterpretationOf(TypeDeclaration newInterpretationOf) { | ||
119 | TypeDeclaration oldInterpretationOf = interpretationOf; | ||
120 | interpretationOf = newInterpretationOf; | ||
121 | if (eNotificationRequired()) | ||
122 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__INTERPRETATION_OF, oldInterpretationOf, interpretationOf)); | ||
123 | } | ||
124 | |||
125 | /** | ||
126 | * <!-- begin-user-doc --> | ||
127 | * <!-- end-user-doc --> | ||
128 | * @generated | ||
129 | */ | ||
130 | public EList<DefinedElement> getElements() { | ||
131 | if (elements == null) { | ||
132 | elements = new EObjectResolvingEList<DefinedElement>(DefinedElement.class, this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS); | ||
133 | } | ||
134 | return elements; | ||
135 | } | ||
136 | |||
137 | /** | ||
138 | * <!-- begin-user-doc --> | ||
139 | * <!-- end-user-doc --> | ||
140 | * @generated | ||
141 | */ | ||
142 | public EList<PartialTypeInterpratation> getSupertypeInterpretation() { | ||
143 | if (supertypeInterpretation == null) { | ||
144 | supertypeInterpretation = new EObjectResolvingEList<PartialTypeInterpratation>(PartialTypeInterpratation.class, this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SUPERTYPE_INTERPRETATION); | ||
145 | } | ||
146 | return supertypeInterpretation; | ||
147 | } | ||
148 | |||
149 | /** | ||
150 | * <!-- begin-user-doc --> | ||
151 | * <!-- end-user-doc --> | ||
152 | * @generated | ||
153 | */ | ||
154 | @Override | ||
155 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
156 | switch (featureID) { | ||
157 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__INTERPRETATION_OF: | ||
158 | if (resolve) return getInterpretationOf(); | ||
159 | return basicGetInterpretationOf(); | ||
160 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS: | ||
161 | return getElements(); | ||
162 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SUPERTYPE_INTERPRETATION: | ||
163 | return getSupertypeInterpretation(); | ||
164 | } | ||
165 | return super.eGet(featureID, resolve, coreType); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * <!-- begin-user-doc --> | ||
170 | * <!-- end-user-doc --> | ||
171 | * @generated | ||
172 | */ | ||
173 | @SuppressWarnings("unchecked") | ||
174 | @Override | ||
175 | public void eSet(int featureID, Object newValue) { | ||
176 | switch (featureID) { | ||
177 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__INTERPRETATION_OF: | ||
178 | setInterpretationOf((TypeDeclaration)newValue); | ||
179 | return; | ||
180 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS: | ||
181 | getElements().clear(); | ||
182 | getElements().addAll((Collection<? extends DefinedElement>)newValue); | ||
183 | return; | ||
184 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SUPERTYPE_INTERPRETATION: | ||
185 | getSupertypeInterpretation().clear(); | ||
186 | getSupertypeInterpretation().addAll((Collection<? extends PartialTypeInterpratation>)newValue); | ||
187 | return; | ||
188 | } | ||
189 | super.eSet(featureID, newValue); | ||
190 | } | ||
191 | |||
192 | /** | ||
193 | * <!-- begin-user-doc --> | ||
194 | * <!-- end-user-doc --> | ||
195 | * @generated | ||
196 | */ | ||
197 | @Override | ||
198 | public void eUnset(int featureID) { | ||
199 | switch (featureID) { | ||
200 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__INTERPRETATION_OF: | ||
201 | setInterpretationOf((TypeDeclaration)null); | ||
202 | return; | ||
203 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS: | ||
204 | getElements().clear(); | ||
205 | return; | ||
206 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SUPERTYPE_INTERPRETATION: | ||
207 | getSupertypeInterpretation().clear(); | ||
208 | return; | ||
209 | } | ||
210 | super.eUnset(featureID); | ||
211 | } | ||
212 | |||
213 | /** | ||
214 | * <!-- begin-user-doc --> | ||
215 | * <!-- end-user-doc --> | ||
216 | * @generated | ||
217 | */ | ||
218 | @Override | ||
219 | public boolean eIsSet(int featureID) { | ||
220 | switch (featureID) { | ||
221 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__INTERPRETATION_OF: | ||
222 | return interpretationOf != null; | ||
223 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS: | ||
224 | return elements != null && !elements.isEmpty(); | ||
225 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SUPERTYPE_INTERPRETATION: | ||
226 | return supertypeInterpretation != null && !supertypeInterpretation.isEmpty(); | ||
227 | } | ||
228 | return super.eIsSet(featureID); | ||
229 | } | ||
230 | |||
231 | } //PartialTypeInterpratationImpl | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationFactoryImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationFactoryImpl.java new file mode 100644 index 00000000..99ab7830 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationFactoryImpl.java | |||
@@ -0,0 +1,183 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.*; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | ||
8 | import org.eclipse.emf.ecore.EObject; | ||
9 | import org.eclipse.emf.ecore.EPackage; | ||
10 | |||
11 | import org.eclipse.emf.ecore.impl.EFactoryImpl; | ||
12 | |||
13 | import org.eclipse.emf.ecore.plugin.EcorePlugin; | ||
14 | |||
15 | /** | ||
16 | * <!-- begin-user-doc --> | ||
17 | * An implementation of the model <b>Factory</b>. | ||
18 | * <!-- end-user-doc --> | ||
19 | * @generated | ||
20 | */ | ||
21 | public class PartialinterpretationFactoryImpl extends EFactoryImpl implements PartialinterpretationFactory { | ||
22 | /** | ||
23 | * Creates the default factory implementation. | ||
24 | * <!-- begin-user-doc --> | ||
25 | * <!-- end-user-doc --> | ||
26 | * @generated | ||
27 | */ | ||
28 | public static PartialinterpretationFactory init() { | ||
29 | try { | ||
30 | PartialinterpretationFactory thePartialinterpretationFactory = (PartialinterpretationFactory)EPackage.Registry.INSTANCE.getEFactory(PartialinterpretationPackage.eNS_URI); | ||
31 | if (thePartialinterpretationFactory != null) { | ||
32 | return thePartialinterpretationFactory; | ||
33 | } | ||
34 | } | ||
35 | catch (Exception exception) { | ||
36 | EcorePlugin.INSTANCE.log(exception); | ||
37 | } | ||
38 | return new PartialinterpretationFactoryImpl(); | ||
39 | } | ||
40 | |||
41 | /** | ||
42 | * Creates an instance of the factory. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @generated | ||
46 | */ | ||
47 | public PartialinterpretationFactoryImpl() { | ||
48 | super(); | ||
49 | } | ||
50 | |||
51 | /** | ||
52 | * <!-- begin-user-doc --> | ||
53 | * <!-- end-user-doc --> | ||
54 | * @generated | ||
55 | */ | ||
56 | @Override | ||
57 | public EObject create(EClass eClass) { | ||
58 | switch (eClass.getClassifierID()) { | ||
59 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION: return createPartialInterpretation(); | ||
60 | case PartialinterpretationPackage.PARTIAL_CONSTANT_INTERPRETATION: return createPartialConstantInterpretation(); | ||
61 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION: return createPartialRelationInterpretation(); | ||
62 | case PartialinterpretationPackage.PARTIAL_FUNCTION_INTERPRETATION: return createPartialFunctionInterpretation(); | ||
63 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION: return createPartialTypeInterpratation(); | ||
64 | case PartialinterpretationPackage.UNARY_ELEMENT_RELATION_LINK: return createUnaryElementRelationLink(); | ||
65 | case PartialinterpretationPackage.BINARY_ELEMENT_RELATION_LINK: return createBinaryElementRelationLink(); | ||
66 | case PartialinterpretationPackage.NARY_RELATION_LINK: return createNaryRelationLink(); | ||
67 | case PartialinterpretationPackage.NARY_RELATION_LINK_ELEMENT: return createNaryRelationLinkElement(); | ||
68 | default: | ||
69 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); | ||
70 | } | ||
71 | } | ||
72 | |||
73 | /** | ||
74 | * <!-- begin-user-doc --> | ||
75 | * <!-- end-user-doc --> | ||
76 | * @generated | ||
77 | */ | ||
78 | public PartialInterpretation createPartialInterpretation() { | ||
79 | PartialInterpretationImpl partialInterpretation = new PartialInterpretationImpl(); | ||
80 | return partialInterpretation; | ||
81 | } | ||
82 | |||
83 | /** | ||
84 | * <!-- begin-user-doc --> | ||
85 | * <!-- end-user-doc --> | ||
86 | * @generated | ||
87 | */ | ||
88 | public PartialConstantInterpretation createPartialConstantInterpretation() { | ||
89 | PartialConstantInterpretationImpl partialConstantInterpretation = new PartialConstantInterpretationImpl(); | ||
90 | return partialConstantInterpretation; | ||
91 | } | ||
92 | |||
93 | /** | ||
94 | * <!-- begin-user-doc --> | ||
95 | * <!-- end-user-doc --> | ||
96 | * @generated | ||
97 | */ | ||
98 | public PartialRelationInterpretation createPartialRelationInterpretation() { | ||
99 | PartialRelationInterpretationImpl partialRelationInterpretation = new PartialRelationInterpretationImpl(); | ||
100 | return partialRelationInterpretation; | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * <!-- begin-user-doc --> | ||
105 | * <!-- end-user-doc --> | ||
106 | * @generated | ||
107 | */ | ||
108 | public PartialFunctionInterpretation createPartialFunctionInterpretation() { | ||
109 | PartialFunctionInterpretationImpl partialFunctionInterpretation = new PartialFunctionInterpretationImpl(); | ||
110 | return partialFunctionInterpretation; | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * <!-- begin-user-doc --> | ||
115 | * <!-- end-user-doc --> | ||
116 | * @generated | ||
117 | */ | ||
118 | public PartialTypeInterpratation createPartialTypeInterpratation() { | ||
119 | PartialTypeInterpratationImpl partialTypeInterpratation = new PartialTypeInterpratationImpl(); | ||
120 | return partialTypeInterpratation; | ||
121 | } | ||
122 | |||
123 | /** | ||
124 | * <!-- begin-user-doc --> | ||
125 | * <!-- end-user-doc --> | ||
126 | * @generated | ||
127 | */ | ||
128 | public UnaryElementRelationLink createUnaryElementRelationLink() { | ||
129 | UnaryElementRelationLinkImpl unaryElementRelationLink = new UnaryElementRelationLinkImpl(); | ||
130 | return unaryElementRelationLink; | ||
131 | } | ||
132 | |||
133 | /** | ||
134 | * <!-- begin-user-doc --> | ||
135 | * <!-- end-user-doc --> | ||
136 | * @generated | ||
137 | */ | ||
138 | public BinaryElementRelationLink createBinaryElementRelationLink() { | ||
139 | BinaryElementRelationLinkImpl binaryElementRelationLink = new BinaryElementRelationLinkImpl(); | ||
140 | return binaryElementRelationLink; | ||
141 | } | ||
142 | |||
143 | /** | ||
144 | * <!-- begin-user-doc --> | ||
145 | * <!-- end-user-doc --> | ||
146 | * @generated | ||
147 | */ | ||
148 | public NaryRelationLink createNaryRelationLink() { | ||
149 | NaryRelationLinkImpl naryRelationLink = new NaryRelationLinkImpl(); | ||
150 | return naryRelationLink; | ||
151 | } | ||
152 | |||
153 | /** | ||
154 | * <!-- begin-user-doc --> | ||
155 | * <!-- end-user-doc --> | ||
156 | * @generated | ||
157 | */ | ||
158 | public NaryRelationLinkElement createNaryRelationLinkElement() { | ||
159 | NaryRelationLinkElementImpl naryRelationLinkElement = new NaryRelationLinkElementImpl(); | ||
160 | return naryRelationLinkElement; | ||
161 | } | ||
162 | |||
163 | /** | ||
164 | * <!-- begin-user-doc --> | ||
165 | * <!-- end-user-doc --> | ||
166 | * @generated | ||
167 | */ | ||
168 | public PartialinterpretationPackage getPartialinterpretationPackage() { | ||
169 | return (PartialinterpretationPackage)getEPackage(); | ||
170 | } | ||
171 | |||
172 | /** | ||
173 | * <!-- begin-user-doc --> | ||
174 | * <!-- end-user-doc --> | ||
175 | * @deprecated | ||
176 | * @generated | ||
177 | */ | ||
178 | @Deprecated | ||
179 | public static PartialinterpretationPackage getPackage() { | ||
180 | return PartialinterpretationPackage.eINSTANCE; | ||
181 | } | ||
182 | |||
183 | } //PartialinterpretationFactoryImpl | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java new file mode 100644 index 00000000..65d73721 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java | |||
@@ -0,0 +1,635 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage; | ||
6 | |||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage; | ||
8 | |||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink; | ||
10 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLink; | ||
11 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLinkElement; | ||
12 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation; | ||
13 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation; | ||
14 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation; | ||
15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation; | ||
16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation; | ||
17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationFactory; | ||
18 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; | ||
19 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink; | ||
20 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.UnaryElementRelationLink; | ||
21 | |||
22 | import org.eclipse.emf.ecore.EAttribute; | ||
23 | import org.eclipse.emf.ecore.EClass; | ||
24 | import org.eclipse.emf.ecore.EPackage; | ||
25 | import org.eclipse.emf.ecore.EReference; | ||
26 | |||
27 | import org.eclipse.emf.ecore.impl.EPackageImpl; | ||
28 | |||
29 | /** | ||
30 | * <!-- begin-user-doc --> | ||
31 | * An implementation of the model <b>Package</b>. | ||
32 | * <!-- end-user-doc --> | ||
33 | * @generated | ||
34 | */ | ||
35 | public class PartialinterpretationPackageImpl extends EPackageImpl implements PartialinterpretationPackage { | ||
36 | /** | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @generated | ||
40 | */ | ||
41 | private EClass partialInterpretationEClass = null; | ||
42 | |||
43 | /** | ||
44 | * <!-- begin-user-doc --> | ||
45 | * <!-- end-user-doc --> | ||
46 | * @generated | ||
47 | */ | ||
48 | private EClass partialConstantInterpretationEClass = null; | ||
49 | |||
50 | /** | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @generated | ||
54 | */ | ||
55 | private EClass partialRelationInterpretationEClass = null; | ||
56 | |||
57 | /** | ||
58 | * <!-- begin-user-doc --> | ||
59 | * <!-- end-user-doc --> | ||
60 | * @generated | ||
61 | */ | ||
62 | private EClass partialFunctionInterpretationEClass = null; | ||
63 | |||
64 | /** | ||
65 | * <!-- begin-user-doc --> | ||
66 | * <!-- end-user-doc --> | ||
67 | * @generated | ||
68 | */ | ||
69 | private EClass partialTypeInterpratationEClass = null; | ||
70 | |||
71 | /** | ||
72 | * <!-- begin-user-doc --> | ||
73 | * <!-- end-user-doc --> | ||
74 | * @generated | ||
75 | */ | ||
76 | private EClass relationLinkEClass = null; | ||
77 | |||
78 | /** | ||
79 | * <!-- begin-user-doc --> | ||
80 | * <!-- end-user-doc --> | ||
81 | * @generated | ||
82 | */ | ||
83 | private EClass unaryElementRelationLinkEClass = null; | ||
84 | |||
85 | /** | ||
86 | * <!-- begin-user-doc --> | ||
87 | * <!-- end-user-doc --> | ||
88 | * @generated | ||
89 | */ | ||
90 | private EClass binaryElementRelationLinkEClass = null; | ||
91 | |||
92 | /** | ||
93 | * <!-- begin-user-doc --> | ||
94 | * <!-- end-user-doc --> | ||
95 | * @generated | ||
96 | */ | ||
97 | private EClass naryRelationLinkEClass = null; | ||
98 | |||
99 | /** | ||
100 | * <!-- begin-user-doc --> | ||
101 | * <!-- end-user-doc --> | ||
102 | * @generated | ||
103 | */ | ||
104 | private EClass naryRelationLinkElementEClass = null; | ||
105 | |||
106 | /** | ||
107 | * Creates an instance of the model <b>Package</b>, registered with | ||
108 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package | ||
109 | * package URI value. | ||
110 | * <p>Note: the correct way to create the package is via the static | ||
111 | * factory method {@link #init init()}, which also performs | ||
112 | * initialization of the package, or returns the registered package, | ||
113 | * if one already exists. | ||
114 | * <!-- begin-user-doc --> | ||
115 | * <!-- end-user-doc --> | ||
116 | * @see org.eclipse.emf.ecore.EPackage.Registry | ||
117 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#eNS_URI | ||
118 | * @see #init() | ||
119 | * @generated | ||
120 | */ | ||
121 | private PartialinterpretationPackageImpl() { | ||
122 | super(eNS_URI, PartialinterpretationFactory.eINSTANCE); | ||
123 | } | ||
124 | |||
125 | /** | ||
126 | * <!-- begin-user-doc --> | ||
127 | * <!-- end-user-doc --> | ||
128 | * @generated | ||
129 | */ | ||
130 | private static boolean isInited = false; | ||
131 | |||
132 | /** | ||
133 | * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. | ||
134 | * | ||
135 | * <p>This method is used to initialize {@link PartialinterpretationPackage#eINSTANCE} when that field is accessed. | ||
136 | * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. | ||
137 | * <!-- begin-user-doc --> | ||
138 | * <!-- end-user-doc --> | ||
139 | * @see #eNS_URI | ||
140 | * @see #createPackageContents() | ||
141 | * @see #initializePackageContents() | ||
142 | * @generated | ||
143 | */ | ||
144 | public static PartialinterpretationPackage init() { | ||
145 | if (isInited) return (PartialinterpretationPackage)EPackage.Registry.INSTANCE.getEPackage(PartialinterpretationPackage.eNS_URI); | ||
146 | |||
147 | // Obtain or create and register package | ||
148 | PartialinterpretationPackageImpl thePartialinterpretationPackage = (PartialinterpretationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PartialinterpretationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PartialinterpretationPackageImpl()); | ||
149 | |||
150 | isInited = true; | ||
151 | |||
152 | // Initialize simple dependencies | ||
153 | LogiclanguagePackage.eINSTANCE.eClass(); | ||
154 | LogicproblemPackage.eINSTANCE.eClass(); | ||
155 | |||
156 | // Create package meta-data objects | ||
157 | thePartialinterpretationPackage.createPackageContents(); | ||
158 | |||
159 | // Initialize created meta-data | ||
160 | thePartialinterpretationPackage.initializePackageContents(); | ||
161 | |||
162 | // Mark meta-data to indicate it can't be changed | ||
163 | thePartialinterpretationPackage.freeze(); | ||
164 | |||
165 | |||
166 | // Update the registry and return the package | ||
167 | EPackage.Registry.INSTANCE.put(PartialinterpretationPackage.eNS_URI, thePartialinterpretationPackage); | ||
168 | return thePartialinterpretationPackage; | ||
169 | } | ||
170 | |||
171 | /** | ||
172 | * <!-- begin-user-doc --> | ||
173 | * <!-- end-user-doc --> | ||
174 | * @generated | ||
175 | */ | ||
176 | public EClass getPartialInterpretation() { | ||
177 | return partialInterpretationEClass; | ||
178 | } | ||
179 | |||
180 | /** | ||
181 | * <!-- begin-user-doc --> | ||
182 | * <!-- end-user-doc --> | ||
183 | * @generated | ||
184 | */ | ||
185 | public EReference getPartialInterpretation_Problem() { | ||
186 | return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(0); | ||
187 | } | ||
188 | |||
189 | /** | ||
190 | * <!-- begin-user-doc --> | ||
191 | * <!-- end-user-doc --> | ||
192 | * @generated | ||
193 | */ | ||
194 | public EReference getPartialInterpretation_Partialconstantinterpretation() { | ||
195 | return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(1); | ||
196 | } | ||
197 | |||
198 | /** | ||
199 | * <!-- begin-user-doc --> | ||
200 | * <!-- end-user-doc --> | ||
201 | * @generated | ||
202 | */ | ||
203 | public EReference getPartialInterpretation_Partialrelationinterpretation() { | ||
204 | return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(2); | ||
205 | } | ||
206 | |||
207 | /** | ||
208 | * <!-- begin-user-doc --> | ||
209 | * <!-- end-user-doc --> | ||
210 | * @generated | ||
211 | */ | ||
212 | public EReference getPartialInterpretation_Partialfunctioninterpretation() { | ||
213 | return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(3); | ||
214 | } | ||
215 | |||
216 | /** | ||
217 | * <!-- begin-user-doc --> | ||
218 | * <!-- end-user-doc --> | ||
219 | * @generated | ||
220 | */ | ||
221 | public EReference getPartialInterpretation_NewElements() { | ||
222 | return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(4); | ||
223 | } | ||
224 | |||
225 | /** | ||
226 | * <!-- begin-user-doc --> | ||
227 | * <!-- end-user-doc --> | ||
228 | * @generated | ||
229 | */ | ||
230 | public EReference getPartialInterpretation_Partialtypeinterpratation() { | ||
231 | return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(5); | ||
232 | } | ||
233 | |||
234 | /** | ||
235 | * <!-- begin-user-doc --> | ||
236 | * <!-- end-user-doc --> | ||
237 | * @generated | ||
238 | */ | ||
239 | public EAttribute getPartialInterpretation_MinNewElements() { | ||
240 | return (EAttribute)partialInterpretationEClass.getEStructuralFeatures().get(6); | ||
241 | } | ||
242 | |||
243 | /** | ||
244 | * <!-- begin-user-doc --> | ||
245 | * <!-- end-user-doc --> | ||
246 | * @generated | ||
247 | */ | ||
248 | public EAttribute getPartialInterpretation_MaxNewElements() { | ||
249 | return (EAttribute)partialInterpretationEClass.getEStructuralFeatures().get(7); | ||
250 | } | ||
251 | |||
252 | /** | ||
253 | * <!-- begin-user-doc --> | ||
254 | * <!-- end-user-doc --> | ||
255 | * @generated | ||
256 | */ | ||
257 | public EReference getPartialInterpretation_OpenWorldElementPrototype() { | ||
258 | return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(8); | ||
259 | } | ||
260 | |||
261 | /** | ||
262 | * <!-- begin-user-doc --> | ||
263 | * <!-- end-user-doc --> | ||
264 | * @generated | ||
265 | */ | ||
266 | public EReference getPartialInterpretation_ProblemConainer() { | ||
267 | return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(9); | ||
268 | } | ||
269 | |||
270 | /** | ||
271 | * <!-- begin-user-doc --> | ||
272 | * <!-- end-user-doc --> | ||
273 | * @generated | ||
274 | */ | ||
275 | public EClass getPartialConstantInterpretation() { | ||
276 | return partialConstantInterpretationEClass; | ||
277 | } | ||
278 | |||
279 | /** | ||
280 | * <!-- begin-user-doc --> | ||
281 | * <!-- end-user-doc --> | ||
282 | * @generated | ||
283 | */ | ||
284 | public EReference getPartialConstantInterpretation_InterpretationOf() { | ||
285 | return (EReference)partialConstantInterpretationEClass.getEStructuralFeatures().get(0); | ||
286 | } | ||
287 | |||
288 | /** | ||
289 | * <!-- begin-user-doc --> | ||
290 | * <!-- end-user-doc --> | ||
291 | * @generated | ||
292 | */ | ||
293 | public EClass getPartialRelationInterpretation() { | ||
294 | return partialRelationInterpretationEClass; | ||
295 | } | ||
296 | |||
297 | /** | ||
298 | * <!-- begin-user-doc --> | ||
299 | * <!-- end-user-doc --> | ||
300 | * @generated | ||
301 | */ | ||
302 | public EReference getPartialRelationInterpretation_InterpretationOf() { | ||
303 | return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(0); | ||
304 | } | ||
305 | |||
306 | /** | ||
307 | * <!-- begin-user-doc --> | ||
308 | * <!-- end-user-doc --> | ||
309 | * @generated | ||
310 | */ | ||
311 | public EReference getPartialRelationInterpretation_Relationlinks() { | ||
312 | return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(1); | ||
313 | } | ||
314 | |||
315 | /** | ||
316 | * <!-- begin-user-doc --> | ||
317 | * <!-- end-user-doc --> | ||
318 | * @generated | ||
319 | */ | ||
320 | public EReference getPartialRelationInterpretation_Param1() { | ||
321 | return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(2); | ||
322 | } | ||
323 | |||
324 | /** | ||
325 | * <!-- begin-user-doc --> | ||
326 | * <!-- end-user-doc --> | ||
327 | * @generated | ||
328 | */ | ||
329 | public EReference getPartialRelationInterpretation_Param2() { | ||
330 | return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(3); | ||
331 | } | ||
332 | |||
333 | /** | ||
334 | * <!-- begin-user-doc --> | ||
335 | * <!-- end-user-doc --> | ||
336 | * @generated | ||
337 | */ | ||
338 | public EClass getPartialFunctionInterpretation() { | ||
339 | return partialFunctionInterpretationEClass; | ||
340 | } | ||
341 | |||
342 | /** | ||
343 | * <!-- begin-user-doc --> | ||
344 | * <!-- end-user-doc --> | ||
345 | * @generated | ||
346 | */ | ||
347 | public EReference getPartialFunctionInterpretation_InterpretationOf() { | ||
348 | return (EReference)partialFunctionInterpretationEClass.getEStructuralFeatures().get(0); | ||
349 | } | ||
350 | |||
351 | /** | ||
352 | * <!-- begin-user-doc --> | ||
353 | * <!-- end-user-doc --> | ||
354 | * @generated | ||
355 | */ | ||
356 | public EClass getPartialTypeInterpratation() { | ||
357 | return partialTypeInterpratationEClass; | ||
358 | } | ||
359 | |||
360 | /** | ||
361 | * <!-- begin-user-doc --> | ||
362 | * <!-- end-user-doc --> | ||
363 | * @generated | ||
364 | */ | ||
365 | public EReference getPartialTypeInterpratation_InterpretationOf() { | ||
366 | return (EReference)partialTypeInterpratationEClass.getEStructuralFeatures().get(0); | ||
367 | } | ||
368 | |||
369 | /** | ||
370 | * <!-- begin-user-doc --> | ||
371 | * <!-- end-user-doc --> | ||
372 | * @generated | ||
373 | */ | ||
374 | public EReference getPartialTypeInterpratation_Elements() { | ||
375 | return (EReference)partialTypeInterpratationEClass.getEStructuralFeatures().get(1); | ||
376 | } | ||
377 | |||
378 | /** | ||
379 | * <!-- begin-user-doc --> | ||
380 | * <!-- end-user-doc --> | ||
381 | * @generated | ||
382 | */ | ||
383 | public EReference getPartialTypeInterpratation_SupertypeInterpretation() { | ||
384 | return (EReference)partialTypeInterpratationEClass.getEStructuralFeatures().get(2); | ||
385 | } | ||
386 | |||
387 | /** | ||
388 | * <!-- begin-user-doc --> | ||
389 | * <!-- end-user-doc --> | ||
390 | * @generated | ||
391 | */ | ||
392 | public EClass getRelationLink() { | ||
393 | return relationLinkEClass; | ||
394 | } | ||
395 | |||
396 | /** | ||
397 | * <!-- begin-user-doc --> | ||
398 | * <!-- end-user-doc --> | ||
399 | * @generated | ||
400 | */ | ||
401 | public EClass getUnaryElementRelationLink() { | ||
402 | return unaryElementRelationLinkEClass; | ||
403 | } | ||
404 | |||
405 | /** | ||
406 | * <!-- begin-user-doc --> | ||
407 | * <!-- end-user-doc --> | ||
408 | * @generated | ||
409 | */ | ||
410 | public EReference getUnaryElementRelationLink_Param1() { | ||
411 | return (EReference)unaryElementRelationLinkEClass.getEStructuralFeatures().get(0); | ||
412 | } | ||
413 | |||
414 | /** | ||
415 | * <!-- begin-user-doc --> | ||
416 | * <!-- end-user-doc --> | ||
417 | * @generated | ||
418 | */ | ||
419 | public EClass getBinaryElementRelationLink() { | ||
420 | return binaryElementRelationLinkEClass; | ||
421 | } | ||
422 | |||
423 | /** | ||
424 | * <!-- begin-user-doc --> | ||
425 | * <!-- end-user-doc --> | ||
426 | * @generated | ||
427 | */ | ||
428 | public EReference getBinaryElementRelationLink_Param1() { | ||
429 | return (EReference)binaryElementRelationLinkEClass.getEStructuralFeatures().get(0); | ||
430 | } | ||
431 | |||
432 | /** | ||
433 | * <!-- begin-user-doc --> | ||
434 | * <!-- end-user-doc --> | ||
435 | * @generated | ||
436 | */ | ||
437 | public EReference getBinaryElementRelationLink_Param2() { | ||
438 | return (EReference)binaryElementRelationLinkEClass.getEStructuralFeatures().get(1); | ||
439 | } | ||
440 | |||
441 | /** | ||
442 | * <!-- begin-user-doc --> | ||
443 | * <!-- end-user-doc --> | ||
444 | * @generated | ||
445 | */ | ||
446 | public EClass getNaryRelationLink() { | ||
447 | return naryRelationLinkEClass; | ||
448 | } | ||
449 | |||
450 | /** | ||
451 | * <!-- begin-user-doc --> | ||
452 | * <!-- end-user-doc --> | ||
453 | * @generated | ||
454 | */ | ||
455 | public EReference getNaryRelationLink_Elements() { | ||
456 | return (EReference)naryRelationLinkEClass.getEStructuralFeatures().get(0); | ||
457 | } | ||
458 | |||
459 | /** | ||
460 | * <!-- begin-user-doc --> | ||
461 | * <!-- end-user-doc --> | ||
462 | * @generated | ||
463 | */ | ||
464 | public EClass getNaryRelationLinkElement() { | ||
465 | return naryRelationLinkElementEClass; | ||
466 | } | ||
467 | |||
468 | /** | ||
469 | * <!-- begin-user-doc --> | ||
470 | * <!-- end-user-doc --> | ||
471 | * @generated | ||
472 | */ | ||
473 | public EAttribute getNaryRelationLinkElement_Index() { | ||
474 | return (EAttribute)naryRelationLinkElementEClass.getEStructuralFeatures().get(0); | ||
475 | } | ||
476 | |||
477 | /** | ||
478 | * <!-- begin-user-doc --> | ||
479 | * <!-- end-user-doc --> | ||
480 | * @generated | ||
481 | */ | ||
482 | public PartialinterpretationFactory getPartialinterpretationFactory() { | ||
483 | return (PartialinterpretationFactory)getEFactoryInstance(); | ||
484 | } | ||
485 | |||
486 | /** | ||
487 | * <!-- begin-user-doc --> | ||
488 | * <!-- end-user-doc --> | ||
489 | * @generated | ||
490 | */ | ||
491 | private boolean isCreated = false; | ||
492 | |||
493 | /** | ||
494 | * Creates the meta-model objects for the package. This method is | ||
495 | * guarded to have no affect on any invocation but its first. | ||
496 | * <!-- begin-user-doc --> | ||
497 | * <!-- end-user-doc --> | ||
498 | * @generated | ||
499 | */ | ||
500 | public void createPackageContents() { | ||
501 | if (isCreated) return; | ||
502 | isCreated = true; | ||
503 | |||
504 | // Create classes and their features | ||
505 | partialInterpretationEClass = createEClass(PARTIAL_INTERPRETATION); | ||
506 | createEReference(partialInterpretationEClass, PARTIAL_INTERPRETATION__PROBLEM); | ||
507 | createEReference(partialInterpretationEClass, PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION); | ||
508 | createEReference(partialInterpretationEClass, PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION); | ||
509 | createEReference(partialInterpretationEClass, PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION); | ||
510 | createEReference(partialInterpretationEClass, PARTIAL_INTERPRETATION__NEW_ELEMENTS); | ||
511 | createEReference(partialInterpretationEClass, PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION); | ||
512 | createEAttribute(partialInterpretationEClass, PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS); | ||
513 | createEAttribute(partialInterpretationEClass, PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS); | ||
514 | createEReference(partialInterpretationEClass, PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENT_PROTOTYPE); | ||
515 | createEReference(partialInterpretationEClass, PARTIAL_INTERPRETATION__PROBLEM_CONAINER); | ||
516 | |||
517 | partialConstantInterpretationEClass = createEClass(PARTIAL_CONSTANT_INTERPRETATION); | ||
518 | createEReference(partialConstantInterpretationEClass, PARTIAL_CONSTANT_INTERPRETATION__INTERPRETATION_OF); | ||
519 | |||
520 | partialRelationInterpretationEClass = createEClass(PARTIAL_RELATION_INTERPRETATION); | ||
521 | createEReference(partialRelationInterpretationEClass, PARTIAL_RELATION_INTERPRETATION__INTERPRETATION_OF); | ||
522 | createEReference(partialRelationInterpretationEClass, PARTIAL_RELATION_INTERPRETATION__RELATIONLINKS); | ||
523 | createEReference(partialRelationInterpretationEClass, PARTIAL_RELATION_INTERPRETATION__PARAM1); | ||
524 | createEReference(partialRelationInterpretationEClass, PARTIAL_RELATION_INTERPRETATION__PARAM2); | ||
525 | |||
526 | partialFunctionInterpretationEClass = createEClass(PARTIAL_FUNCTION_INTERPRETATION); | ||
527 | createEReference(partialFunctionInterpretationEClass, PARTIAL_FUNCTION_INTERPRETATION__INTERPRETATION_OF); | ||
528 | |||
529 | partialTypeInterpratationEClass = createEClass(PARTIAL_TYPE_INTERPRATATION); | ||
530 | createEReference(partialTypeInterpratationEClass, PARTIAL_TYPE_INTERPRATATION__INTERPRETATION_OF); | ||
531 | createEReference(partialTypeInterpratationEClass, PARTIAL_TYPE_INTERPRATATION__ELEMENTS); | ||
532 | createEReference(partialTypeInterpratationEClass, PARTIAL_TYPE_INTERPRATATION__SUPERTYPE_INTERPRETATION); | ||
533 | |||
534 | relationLinkEClass = createEClass(RELATION_LINK); | ||
535 | |||
536 | unaryElementRelationLinkEClass = createEClass(UNARY_ELEMENT_RELATION_LINK); | ||
537 | createEReference(unaryElementRelationLinkEClass, UNARY_ELEMENT_RELATION_LINK__PARAM1); | ||
538 | |||
539 | binaryElementRelationLinkEClass = createEClass(BINARY_ELEMENT_RELATION_LINK); | ||
540 | createEReference(binaryElementRelationLinkEClass, BINARY_ELEMENT_RELATION_LINK__PARAM1); | ||
541 | createEReference(binaryElementRelationLinkEClass, BINARY_ELEMENT_RELATION_LINK__PARAM2); | ||
542 | |||
543 | naryRelationLinkEClass = createEClass(NARY_RELATION_LINK); | ||
544 | createEReference(naryRelationLinkEClass, NARY_RELATION_LINK__ELEMENTS); | ||
545 | |||
546 | naryRelationLinkElementEClass = createEClass(NARY_RELATION_LINK_ELEMENT); | ||
547 | createEAttribute(naryRelationLinkElementEClass, NARY_RELATION_LINK_ELEMENT__INDEX); | ||
548 | } | ||
549 | |||
550 | /** | ||
551 | * <!-- begin-user-doc --> | ||
552 | * <!-- end-user-doc --> | ||
553 | * @generated | ||
554 | */ | ||
555 | private boolean isInitialized = false; | ||
556 | |||
557 | /** | ||
558 | * Complete the initialization of the package and its meta-model. This | ||
559 | * method is guarded to have no affect on any invocation but its first. | ||
560 | * <!-- begin-user-doc --> | ||
561 | * <!-- end-user-doc --> | ||
562 | * @generated | ||
563 | */ | ||
564 | public void initializePackageContents() { | ||
565 | if (isInitialized) return; | ||
566 | isInitialized = true; | ||
567 | |||
568 | // Initialize package | ||
569 | setName(eNAME); | ||
570 | setNsPrefix(eNS_PREFIX); | ||
571 | setNsURI(eNS_URI); | ||
572 | |||
573 | // Obtain other dependent packages | ||
574 | LogicproblemPackage theLogicproblemPackage = (LogicproblemPackage)EPackage.Registry.INSTANCE.getEPackage(LogicproblemPackage.eNS_URI); | ||
575 | LogiclanguagePackage theLogiclanguagePackage = (LogiclanguagePackage)EPackage.Registry.INSTANCE.getEPackage(LogiclanguagePackage.eNS_URI); | ||
576 | |||
577 | // Create type parameters | ||
578 | |||
579 | // Set bounds for type parameters | ||
580 | |||
581 | // Add supertypes to classes | ||
582 | unaryElementRelationLinkEClass.getESuperTypes().add(this.getRelationLink()); | ||
583 | binaryElementRelationLinkEClass.getESuperTypes().add(this.getRelationLink()); | ||
584 | naryRelationLinkEClass.getESuperTypes().add(this.getRelationLink()); | ||
585 | |||
586 | // Initialize classes, features, and operations; add parameters | ||
587 | initEClass(partialInterpretationEClass, PartialInterpretation.class, "PartialInterpretation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
588 | initEReference(getPartialInterpretation_Problem(), theLogicproblemPackage.getLogicProblem(), null, "problem", null, 1, 1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
589 | initEReference(getPartialInterpretation_Partialconstantinterpretation(), this.getPartialConstantInterpretation(), null, "partialconstantinterpretation", null, 0, -1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
590 | initEReference(getPartialInterpretation_Partialrelationinterpretation(), this.getPartialRelationInterpretation(), null, "partialrelationinterpretation", null, 0, -1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
591 | initEReference(getPartialInterpretation_Partialfunctioninterpretation(), this.getPartialFunctionInterpretation(), null, "partialfunctioninterpretation", null, 0, -1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
592 | initEReference(getPartialInterpretation_NewElements(), theLogiclanguagePackage.getDefinedElement(), null, "newElements", null, 0, -1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
593 | initEReference(getPartialInterpretation_Partialtypeinterpratation(), this.getPartialTypeInterpratation(), null, "partialtypeinterpratation", null, 0, -1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
594 | initEAttribute(getPartialInterpretation_MinNewElements(), ecorePackage.getEInt(), "minNewElements", "0", 1, 1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
595 | initEAttribute(getPartialInterpretation_MaxNewElements(), ecorePackage.getEInt(), "maxNewElements", "0", 1, 1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
596 | initEReference(getPartialInterpretation_OpenWorldElementPrototype(), theLogiclanguagePackage.getDefinedElement(), null, "openWorldElementPrototype", null, 1, 1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
597 | initEReference(getPartialInterpretation_ProblemConainer(), theLogicproblemPackage.getLogicProblem(), null, "problemConainer", null, 0, 1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
598 | |||
599 | initEClass(partialConstantInterpretationEClass, PartialConstantInterpretation.class, "PartialConstantInterpretation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
600 | initEReference(getPartialConstantInterpretation_InterpretationOf(), theLogiclanguagePackage.getConstantDeclaration(), null, "interpretationOf", null, 1, 1, PartialConstantInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
601 | |||
602 | initEClass(partialRelationInterpretationEClass, PartialRelationInterpretation.class, "PartialRelationInterpretation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
603 | initEReference(getPartialRelationInterpretation_InterpretationOf(), theLogiclanguagePackage.getRelationDeclaration(), null, "interpretationOf", null, 1, 1, PartialRelationInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
604 | initEReference(getPartialRelationInterpretation_Relationlinks(), this.getRelationLink(), null, "relationlinks", null, 0, -1, PartialRelationInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
605 | initEReference(getPartialRelationInterpretation_Param1(), theLogiclanguagePackage.getTypeReference(), null, "param1", null, 0, 1, PartialRelationInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
606 | initEReference(getPartialRelationInterpretation_Param2(), theLogiclanguagePackage.getTypeReference(), null, "param2", null, 0, 1, PartialRelationInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
607 | |||
608 | initEClass(partialFunctionInterpretationEClass, PartialFunctionInterpretation.class, "PartialFunctionInterpretation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
609 | initEReference(getPartialFunctionInterpretation_InterpretationOf(), theLogiclanguagePackage.getFunctionDeclaration(), null, "interpretationOf", null, 1, 1, PartialFunctionInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
610 | |||
611 | initEClass(partialTypeInterpratationEClass, PartialTypeInterpratation.class, "PartialTypeInterpratation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
612 | initEReference(getPartialTypeInterpratation_InterpretationOf(), theLogiclanguagePackage.getTypeDeclaration(), null, "interpretationOf", null, 1, 1, PartialTypeInterpratation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
613 | initEReference(getPartialTypeInterpratation_Elements(), theLogiclanguagePackage.getDefinedElement(), null, "elements", null, 0, -1, PartialTypeInterpratation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
614 | initEReference(getPartialTypeInterpratation_SupertypeInterpretation(), this.getPartialTypeInterpratation(), null, "supertypeInterpretation", null, 0, -1, PartialTypeInterpratation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
615 | |||
616 | initEClass(relationLinkEClass, RelationLink.class, "RelationLink", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
617 | |||
618 | initEClass(unaryElementRelationLinkEClass, UnaryElementRelationLink.class, "UnaryElementRelationLink", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
619 | initEReference(getUnaryElementRelationLink_Param1(), theLogiclanguagePackage.getDefinedElement(), null, "param1", null, 1, 1, UnaryElementRelationLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
620 | |||
621 | initEClass(binaryElementRelationLinkEClass, BinaryElementRelationLink.class, "BinaryElementRelationLink", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
622 | initEReference(getBinaryElementRelationLink_Param1(), theLogiclanguagePackage.getDefinedElement(), null, "param1", null, 1, 1, BinaryElementRelationLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
623 | initEReference(getBinaryElementRelationLink_Param2(), theLogiclanguagePackage.getDefinedElement(), null, "param2", null, 1, 1, BinaryElementRelationLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
624 | |||
625 | initEClass(naryRelationLinkEClass, NaryRelationLink.class, "NaryRelationLink", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
626 | initEReference(getNaryRelationLink_Elements(), this.getNaryRelationLinkElement(), null, "elements", null, 0, -1, NaryRelationLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
627 | |||
628 | initEClass(naryRelationLinkElementEClass, NaryRelationLinkElement.class, "NaryRelationLinkElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
629 | initEAttribute(getNaryRelationLinkElement_Index(), ecorePackage.getEInt(), "index", null, 0, 1, NaryRelationLinkElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
630 | |||
631 | // Create resource | ||
632 | createResource(eNS_URI); | ||
633 | } | ||
634 | |||
635 | } //PartialinterpretationPackageImpl | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/RelationLinkImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/RelationLinkImpl.java new file mode 100644 index 00000000..5eda35c7 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/RelationLinkImpl.java | |||
@@ -0,0 +1,39 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink; | ||
7 | |||
8 | import org.eclipse.emf.ecore.EClass; | ||
9 | |||
10 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | ||
11 | |||
12 | /** | ||
13 | * <!-- begin-user-doc --> | ||
14 | * An implementation of the model object '<em><b>Relation Link</b></em>'. | ||
15 | * <!-- end-user-doc --> | ||
16 | * | ||
17 | * @generated | ||
18 | */ | ||
19 | public abstract class RelationLinkImpl extends MinimalEObjectImpl.Container implements RelationLink { | ||
20 | /** | ||
21 | * <!-- begin-user-doc --> | ||
22 | * <!-- end-user-doc --> | ||
23 | * @generated | ||
24 | */ | ||
25 | protected RelationLinkImpl() { | ||
26 | super(); | ||
27 | } | ||
28 | |||
29 | /** | ||
30 | * <!-- begin-user-doc --> | ||
31 | * <!-- end-user-doc --> | ||
32 | * @generated | ||
33 | */ | ||
34 | @Override | ||
35 | protected EClass eStaticClass() { | ||
36 | return PartialinterpretationPackage.Literals.RELATION_LINK; | ||
37 | } | ||
38 | |||
39 | } //RelationLinkImpl | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/UnaryElementRelationLinkImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/UnaryElementRelationLinkImpl.java new file mode 100644 index 00000000..2cb56323 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/UnaryElementRelationLinkImpl.java | |||
@@ -0,0 +1,157 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; | ||
6 | |||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.UnaryElementRelationLink; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.Notification; | ||
11 | |||
12 | import org.eclipse.emf.ecore.EClass; | ||
13 | import org.eclipse.emf.ecore.InternalEObject; | ||
14 | |||
15 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
16 | |||
17 | /** | ||
18 | * <!-- begin-user-doc --> | ||
19 | * An implementation of the model object '<em><b>Unary Element Relation Link</b></em>'. | ||
20 | * <!-- end-user-doc --> | ||
21 | * <p> | ||
22 | * The following features are implemented: | ||
23 | * </p> | ||
24 | * <ul> | ||
25 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.UnaryElementRelationLinkImpl#getParam1 <em>Param1</em>}</li> | ||
26 | * </ul> | ||
27 | * | ||
28 | * @generated | ||
29 | */ | ||
30 | public class UnaryElementRelationLinkImpl extends RelationLinkImpl implements UnaryElementRelationLink { | ||
31 | /** | ||
32 | * The cached value of the '{@link #getParam1() <em>Param1</em>}' reference. | ||
33 | * <!-- begin-user-doc --> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @see #getParam1() | ||
36 | * @generated | ||
37 | * @ordered | ||
38 | */ | ||
39 | protected DefinedElement param1; | ||
40 | |||
41 | /** | ||
42 | * <!-- begin-user-doc --> | ||
43 | * <!-- end-user-doc --> | ||
44 | * @generated | ||
45 | */ | ||
46 | protected UnaryElementRelationLinkImpl() { | ||
47 | super(); | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * <!-- begin-user-doc --> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @generated | ||
54 | */ | ||
55 | @Override | ||
56 | protected EClass eStaticClass() { | ||
57 | return PartialinterpretationPackage.Literals.UNARY_ELEMENT_RELATION_LINK; | ||
58 | } | ||
59 | |||
60 | /** | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @generated | ||
64 | */ | ||
65 | public DefinedElement getParam1() { | ||
66 | if (param1 != null && param1.eIsProxy()) { | ||
67 | InternalEObject oldParam1 = (InternalEObject)param1; | ||
68 | param1 = (DefinedElement)eResolveProxy(oldParam1); | ||
69 | if (param1 != oldParam1) { | ||
70 | if (eNotificationRequired()) | ||
71 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, PartialinterpretationPackage.UNARY_ELEMENT_RELATION_LINK__PARAM1, oldParam1, param1)); | ||
72 | } | ||
73 | } | ||
74 | return param1; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @generated | ||
81 | */ | ||
82 | public DefinedElement basicGetParam1() { | ||
83 | return param1; | ||
84 | } | ||
85 | |||
86 | /** | ||
87 | * <!-- begin-user-doc --> | ||
88 | * <!-- end-user-doc --> | ||
89 | * @generated | ||
90 | */ | ||
91 | public void setParam1(DefinedElement newParam1) { | ||
92 | DefinedElement oldParam1 = param1; | ||
93 | param1 = newParam1; | ||
94 | if (eNotificationRequired()) | ||
95 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.UNARY_ELEMENT_RELATION_LINK__PARAM1, oldParam1, param1)); | ||
96 | } | ||
97 | |||
98 | /** | ||
99 | * <!-- begin-user-doc --> | ||
100 | * <!-- end-user-doc --> | ||
101 | * @generated | ||
102 | */ | ||
103 | @Override | ||
104 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
105 | switch (featureID) { | ||
106 | case PartialinterpretationPackage.UNARY_ELEMENT_RELATION_LINK__PARAM1: | ||
107 | if (resolve) return getParam1(); | ||
108 | return basicGetParam1(); | ||
109 | } | ||
110 | return super.eGet(featureID, resolve, coreType); | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * <!-- begin-user-doc --> | ||
115 | * <!-- end-user-doc --> | ||
116 | * @generated | ||
117 | */ | ||
118 | @Override | ||
119 | public void eSet(int featureID, Object newValue) { | ||
120 | switch (featureID) { | ||
121 | case PartialinterpretationPackage.UNARY_ELEMENT_RELATION_LINK__PARAM1: | ||
122 | setParam1((DefinedElement)newValue); | ||
123 | return; | ||
124 | } | ||
125 | super.eSet(featureID, newValue); | ||
126 | } | ||
127 | |||
128 | /** | ||
129 | * <!-- begin-user-doc --> | ||
130 | * <!-- end-user-doc --> | ||
131 | * @generated | ||
132 | */ | ||
133 | @Override | ||
134 | public void eUnset(int featureID) { | ||
135 | switch (featureID) { | ||
136 | case PartialinterpretationPackage.UNARY_ELEMENT_RELATION_LINK__PARAM1: | ||
137 | setParam1((DefinedElement)null); | ||
138 | return; | ||
139 | } | ||
140 | super.eUnset(featureID); | ||
141 | } | ||
142 | |||
143 | /** | ||
144 | * <!-- begin-user-doc --> | ||
145 | * <!-- end-user-doc --> | ||
146 | * @generated | ||
147 | */ | ||
148 | @Override | ||
149 | public boolean eIsSet(int featureID) { | ||
150 | switch (featureID) { | ||
151 | case PartialinterpretationPackage.UNARY_ELEMENT_RELATION_LINK__PARAM1: | ||
152 | return param1 != null; | ||
153 | } | ||
154 | return super.eIsSet(featureID); | ||
155 | } | ||
156 | |||
157 | } //UnaryElementRelationLinkImpl | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/util/PartialinterpretationAdapterFactory.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/util/PartialinterpretationAdapterFactory.java new file mode 100644 index 00000000..628d56eb --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/util/PartialinterpretationAdapterFactory.java | |||
@@ -0,0 +1,282 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.util; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.*; | ||
6 | |||
7 | import org.eclipse.emf.common.notify.Adapter; | ||
8 | import org.eclipse.emf.common.notify.Notifier; | ||
9 | |||
10 | import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; | ||
11 | |||
12 | import org.eclipse.emf.ecore.EObject; | ||
13 | |||
14 | /** | ||
15 | * <!-- begin-user-doc --> | ||
16 | * The <b>Adapter Factory</b> for the model. | ||
17 | * It provides an adapter <code>createXXX</code> method for each class of the model. | ||
18 | * <!-- end-user-doc --> | ||
19 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage | ||
20 | * @generated | ||
21 | */ | ||
22 | public class PartialinterpretationAdapterFactory extends AdapterFactoryImpl { | ||
23 | /** | ||
24 | * The cached model package. | ||
25 | * <!-- begin-user-doc --> | ||
26 | * <!-- end-user-doc --> | ||
27 | * @generated | ||
28 | */ | ||
29 | protected static PartialinterpretationPackage modelPackage; | ||
30 | |||
31 | /** | ||
32 | * Creates an instance of the adapter factory. | ||
33 | * <!-- begin-user-doc --> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @generated | ||
36 | */ | ||
37 | public PartialinterpretationAdapterFactory() { | ||
38 | if (modelPackage == null) { | ||
39 | modelPackage = PartialinterpretationPackage.eINSTANCE; | ||
40 | } | ||
41 | } | ||
42 | |||
43 | /** | ||
44 | * Returns whether this factory is applicable for the type of the object. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model. | ||
47 | * <!-- end-user-doc --> | ||
48 | * @return whether this factory is applicable for the type of the object. | ||
49 | * @generated | ||
50 | */ | ||
51 | @Override | ||
52 | public boolean isFactoryForType(Object object) { | ||
53 | if (object == modelPackage) { | ||
54 | return true; | ||
55 | } | ||
56 | if (object instanceof EObject) { | ||
57 | return ((EObject)object).eClass().getEPackage() == modelPackage; | ||
58 | } | ||
59 | return false; | ||
60 | } | ||
61 | |||
62 | /** | ||
63 | * The switch that delegates to the <code>createXXX</code> methods. | ||
64 | * <!-- begin-user-doc --> | ||
65 | * <!-- end-user-doc --> | ||
66 | * @generated | ||
67 | */ | ||
68 | protected PartialinterpretationSwitch<Adapter> modelSwitch = | ||
69 | new PartialinterpretationSwitch<Adapter>() { | ||
70 | @Override | ||
71 | public Adapter casePartialInterpretation(PartialInterpretation object) { | ||
72 | return createPartialInterpretationAdapter(); | ||
73 | } | ||
74 | @Override | ||
75 | public Adapter casePartialConstantInterpretation(PartialConstantInterpretation object) { | ||
76 | return createPartialConstantInterpretationAdapter(); | ||
77 | } | ||
78 | @Override | ||
79 | public Adapter casePartialRelationInterpretation(PartialRelationInterpretation object) { | ||
80 | return createPartialRelationInterpretationAdapter(); | ||
81 | } | ||
82 | @Override | ||
83 | public Adapter casePartialFunctionInterpretation(PartialFunctionInterpretation object) { | ||
84 | return createPartialFunctionInterpretationAdapter(); | ||
85 | } | ||
86 | @Override | ||
87 | public Adapter casePartialTypeInterpratation(PartialTypeInterpratation object) { | ||
88 | return createPartialTypeInterpratationAdapter(); | ||
89 | } | ||
90 | @Override | ||
91 | public Adapter caseRelationLink(RelationLink object) { | ||
92 | return createRelationLinkAdapter(); | ||
93 | } | ||
94 | @Override | ||
95 | public Adapter caseUnaryElementRelationLink(UnaryElementRelationLink object) { | ||
96 | return createUnaryElementRelationLinkAdapter(); | ||
97 | } | ||
98 | @Override | ||
99 | public Adapter caseBinaryElementRelationLink(BinaryElementRelationLink object) { | ||
100 | return createBinaryElementRelationLinkAdapter(); | ||
101 | } | ||
102 | @Override | ||
103 | public Adapter caseNaryRelationLink(NaryRelationLink object) { | ||
104 | return createNaryRelationLinkAdapter(); | ||
105 | } | ||
106 | @Override | ||
107 | public Adapter caseNaryRelationLinkElement(NaryRelationLinkElement object) { | ||
108 | return createNaryRelationLinkElementAdapter(); | ||
109 | } | ||
110 | @Override | ||
111 | public Adapter defaultCase(EObject object) { | ||
112 | return createEObjectAdapter(); | ||
113 | } | ||
114 | }; | ||
115 | |||
116 | /** | ||
117 | * Creates an adapter for the <code>target</code>. | ||
118 | * <!-- begin-user-doc --> | ||
119 | * <!-- end-user-doc --> | ||
120 | * @param target the object to adapt. | ||
121 | * @return the adapter for the <code>target</code>. | ||
122 | * @generated | ||
123 | */ | ||
124 | @Override | ||
125 | public Adapter createAdapter(Notifier target) { | ||
126 | return modelSwitch.doSwitch((EObject)target); | ||
127 | } | ||
128 | |||
129 | |||
130 | /** | ||
131 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation <em>Partial Interpretation</em>}'. | ||
132 | * <!-- begin-user-doc --> | ||
133 | * This default implementation returns null so that we can easily ignore cases; | ||
134 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
135 | * <!-- end-user-doc --> | ||
136 | * @return the new adapter. | ||
137 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
138 | * @generated | ||
139 | */ | ||
140 | public Adapter createPartialInterpretationAdapter() { | ||
141 | return null; | ||
142 | } | ||
143 | |||
144 | /** | ||
145 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation <em>Partial Constant Interpretation</em>}'. | ||
146 | * <!-- begin-user-doc --> | ||
147 | * This default implementation returns null so that we can easily ignore cases; | ||
148 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
149 | * <!-- end-user-doc --> | ||
150 | * @return the new adapter. | ||
151 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation | ||
152 | * @generated | ||
153 | */ | ||
154 | public Adapter createPartialConstantInterpretationAdapter() { | ||
155 | return null; | ||
156 | } | ||
157 | |||
158 | /** | ||
159 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation <em>Partial Relation Interpretation</em>}'. | ||
160 | * <!-- begin-user-doc --> | ||
161 | * This default implementation returns null so that we can easily ignore cases; | ||
162 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
163 | * <!-- end-user-doc --> | ||
164 | * @return the new adapter. | ||
165 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation | ||
166 | * @generated | ||
167 | */ | ||
168 | public Adapter createPartialRelationInterpretationAdapter() { | ||
169 | return null; | ||
170 | } | ||
171 | |||
172 | /** | ||
173 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation <em>Partial Function Interpretation</em>}'. | ||
174 | * <!-- begin-user-doc --> | ||
175 | * This default implementation returns null so that we can easily ignore cases; | ||
176 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
177 | * <!-- end-user-doc --> | ||
178 | * @return the new adapter. | ||
179 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation | ||
180 | * @generated | ||
181 | */ | ||
182 | public Adapter createPartialFunctionInterpretationAdapter() { | ||
183 | return null; | ||
184 | } | ||
185 | |||
186 | /** | ||
187 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation <em>Partial Type Interpratation</em>}'. | ||
188 | * <!-- begin-user-doc --> | ||
189 | * This default implementation returns null so that we can easily ignore cases; | ||
190 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
191 | * <!-- end-user-doc --> | ||
192 | * @return the new adapter. | ||
193 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation | ||
194 | * @generated | ||
195 | */ | ||
196 | public Adapter createPartialTypeInterpratationAdapter() { | ||
197 | return null; | ||
198 | } | ||
199 | |||
200 | /** | ||
201 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink <em>Relation Link</em>}'. | ||
202 | * <!-- begin-user-doc --> | ||
203 | * This default implementation returns null so that we can easily ignore cases; | ||
204 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
205 | * <!-- end-user-doc --> | ||
206 | * @return the new adapter. | ||
207 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink | ||
208 | * @generated | ||
209 | */ | ||
210 | public Adapter createRelationLinkAdapter() { | ||
211 | return null; | ||
212 | } | ||
213 | |||
214 | /** | ||
215 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.UnaryElementRelationLink <em>Unary Element Relation Link</em>}'. | ||
216 | * <!-- begin-user-doc --> | ||
217 | * This default implementation returns null so that we can easily ignore cases; | ||
218 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
219 | * <!-- end-user-doc --> | ||
220 | * @return the new adapter. | ||
221 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.UnaryElementRelationLink | ||
222 | * @generated | ||
223 | */ | ||
224 | public Adapter createUnaryElementRelationLinkAdapter() { | ||
225 | return null; | ||
226 | } | ||
227 | |||
228 | /** | ||
229 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink <em>Binary Element Relation Link</em>}'. | ||
230 | * <!-- begin-user-doc --> | ||
231 | * This default implementation returns null so that we can easily ignore cases; | ||
232 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
233 | * <!-- end-user-doc --> | ||
234 | * @return the new adapter. | ||
235 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink | ||
236 | * @generated | ||
237 | */ | ||
238 | public Adapter createBinaryElementRelationLinkAdapter() { | ||
239 | return null; | ||
240 | } | ||
241 | |||
242 | /** | ||
243 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLink <em>Nary Relation Link</em>}'. | ||
244 | * <!-- begin-user-doc --> | ||
245 | * This default implementation returns null so that we can easily ignore cases; | ||
246 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
247 | * <!-- end-user-doc --> | ||
248 | * @return the new adapter. | ||
249 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLink | ||
250 | * @generated | ||
251 | */ | ||
252 | public Adapter createNaryRelationLinkAdapter() { | ||
253 | return null; | ||
254 | } | ||
255 | |||
256 | /** | ||
257 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLinkElement <em>Nary Relation Link Element</em>}'. | ||
258 | * <!-- begin-user-doc --> | ||
259 | * This default implementation returns null so that we can easily ignore cases; | ||
260 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
261 | * <!-- end-user-doc --> | ||
262 | * @return the new adapter. | ||
263 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLinkElement | ||
264 | * @generated | ||
265 | */ | ||
266 | public Adapter createNaryRelationLinkElementAdapter() { | ||
267 | return null; | ||
268 | } | ||
269 | |||
270 | /** | ||
271 | * Creates a new adapter for the default case. | ||
272 | * <!-- begin-user-doc --> | ||
273 | * This default implementation returns null. | ||
274 | * <!-- end-user-doc --> | ||
275 | * @return the new adapter. | ||
276 | * @generated | ||
277 | */ | ||
278 | public Adapter createEObjectAdapter() { | ||
279 | return null; | ||
280 | } | ||
281 | |||
282 | } //PartialinterpretationAdapterFactory | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/util/PartialinterpretationSwitch.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/util/PartialinterpretationSwitch.java new file mode 100644 index 00000000..f99b2d76 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/util/PartialinterpretationSwitch.java | |||
@@ -0,0 +1,302 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.util; | ||
4 | |||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.*; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EObject; | ||
8 | import org.eclipse.emf.ecore.EPackage; | ||
9 | |||
10 | import org.eclipse.emf.ecore.util.Switch; | ||
11 | |||
12 | /** | ||
13 | * <!-- begin-user-doc --> | ||
14 | * The <b>Switch</b> for the model's inheritance hierarchy. | ||
15 | * It supports the call {@link #doSwitch(EObject) doSwitch(object)} | ||
16 | * to invoke the <code>caseXXX</code> method for each class of the model, | ||
17 | * starting with the actual class of the object | ||
18 | * and proceeding up the inheritance hierarchy | ||
19 | * until a non-null result is returned, | ||
20 | * which is the result of the switch. | ||
21 | * <!-- end-user-doc --> | ||
22 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage | ||
23 | * @generated | ||
24 | */ | ||
25 | public class PartialinterpretationSwitch<T> extends Switch<T> { | ||
26 | /** | ||
27 | * The cached model package | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <!-- end-user-doc --> | ||
30 | * @generated | ||
31 | */ | ||
32 | protected static PartialinterpretationPackage modelPackage; | ||
33 | |||
34 | /** | ||
35 | * Creates an instance of the switch. | ||
36 | * <!-- begin-user-doc --> | ||
37 | * <!-- end-user-doc --> | ||
38 | * @generated | ||
39 | */ | ||
40 | public PartialinterpretationSwitch() { | ||
41 | if (modelPackage == null) { | ||
42 | modelPackage = PartialinterpretationPackage.eINSTANCE; | ||
43 | } | ||
44 | } | ||
45 | |||
46 | /** | ||
47 | * Checks whether this is a switch for the given package. | ||
48 | * <!-- begin-user-doc --> | ||
49 | * <!-- end-user-doc --> | ||
50 | * @param ePackage the package in question. | ||
51 | * @return whether this is a switch for the given package. | ||
52 | * @generated | ||
53 | */ | ||
54 | @Override | ||
55 | protected boolean isSwitchFor(EPackage ePackage) { | ||
56 | return ePackage == modelPackage; | ||
57 | } | ||
58 | |||
59 | /** | ||
60 | * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. | ||
61 | * <!-- begin-user-doc --> | ||
62 | * <!-- end-user-doc --> | ||
63 | * @return the first non-null result returned by a <code>caseXXX</code> call. | ||
64 | * @generated | ||
65 | */ | ||
66 | @Override | ||
67 | protected T doSwitch(int classifierID, EObject theEObject) { | ||
68 | switch (classifierID) { | ||
69 | case PartialinterpretationPackage.PARTIAL_INTERPRETATION: { | ||
70 | PartialInterpretation partialInterpretation = (PartialInterpretation)theEObject; | ||
71 | T result = casePartialInterpretation(partialInterpretation); | ||
72 | if (result == null) result = defaultCase(theEObject); | ||
73 | return result; | ||
74 | } | ||
75 | case PartialinterpretationPackage.PARTIAL_CONSTANT_INTERPRETATION: { | ||
76 | PartialConstantInterpretation partialConstantInterpretation = (PartialConstantInterpretation)theEObject; | ||
77 | T result = casePartialConstantInterpretation(partialConstantInterpretation); | ||
78 | if (result == null) result = defaultCase(theEObject); | ||
79 | return result; | ||
80 | } | ||
81 | case PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION: { | ||
82 | PartialRelationInterpretation partialRelationInterpretation = (PartialRelationInterpretation)theEObject; | ||
83 | T result = casePartialRelationInterpretation(partialRelationInterpretation); | ||
84 | if (result == null) result = defaultCase(theEObject); | ||
85 | return result; | ||
86 | } | ||
87 | case PartialinterpretationPackage.PARTIAL_FUNCTION_INTERPRETATION: { | ||
88 | PartialFunctionInterpretation partialFunctionInterpretation = (PartialFunctionInterpretation)theEObject; | ||
89 | T result = casePartialFunctionInterpretation(partialFunctionInterpretation); | ||
90 | if (result == null) result = defaultCase(theEObject); | ||
91 | return result; | ||
92 | } | ||
93 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION: { | ||
94 | PartialTypeInterpratation partialTypeInterpratation = (PartialTypeInterpratation)theEObject; | ||
95 | T result = casePartialTypeInterpratation(partialTypeInterpratation); | ||
96 | if (result == null) result = defaultCase(theEObject); | ||
97 | return result; | ||
98 | } | ||
99 | case PartialinterpretationPackage.RELATION_LINK: { | ||
100 | RelationLink relationLink = (RelationLink)theEObject; | ||
101 | T result = caseRelationLink(relationLink); | ||
102 | if (result == null) result = defaultCase(theEObject); | ||
103 | return result; | ||
104 | } | ||
105 | case PartialinterpretationPackage.UNARY_ELEMENT_RELATION_LINK: { | ||
106 | UnaryElementRelationLink unaryElementRelationLink = (UnaryElementRelationLink)theEObject; | ||
107 | T result = caseUnaryElementRelationLink(unaryElementRelationLink); | ||
108 | if (result == null) result = caseRelationLink(unaryElementRelationLink); | ||
109 | if (result == null) result = defaultCase(theEObject); | ||
110 | return result; | ||
111 | } | ||
112 | case PartialinterpretationPackage.BINARY_ELEMENT_RELATION_LINK: { | ||
113 | BinaryElementRelationLink binaryElementRelationLink = (BinaryElementRelationLink)theEObject; | ||
114 | T result = caseBinaryElementRelationLink(binaryElementRelationLink); | ||
115 | if (result == null) result = caseRelationLink(binaryElementRelationLink); | ||
116 | if (result == null) result = defaultCase(theEObject); | ||
117 | return result; | ||
118 | } | ||
119 | case PartialinterpretationPackage.NARY_RELATION_LINK: { | ||
120 | NaryRelationLink naryRelationLink = (NaryRelationLink)theEObject; | ||
121 | T result = caseNaryRelationLink(naryRelationLink); | ||
122 | if (result == null) result = caseRelationLink(naryRelationLink); | ||
123 | if (result == null) result = defaultCase(theEObject); | ||
124 | return result; | ||
125 | } | ||
126 | case PartialinterpretationPackage.NARY_RELATION_LINK_ELEMENT: { | ||
127 | NaryRelationLinkElement naryRelationLinkElement = (NaryRelationLinkElement)theEObject; | ||
128 | T result = caseNaryRelationLinkElement(naryRelationLinkElement); | ||
129 | if (result == null) result = defaultCase(theEObject); | ||
130 | return result; | ||
131 | } | ||
132 | default: return defaultCase(theEObject); | ||
133 | } | ||
134 | } | ||
135 | |||
136 | /** | ||
137 | * Returns the result of interpreting the object as an instance of '<em>Partial Interpretation</em>'. | ||
138 | * <!-- begin-user-doc --> | ||
139 | * This implementation returns null; | ||
140 | * returning a non-null result will terminate the switch. | ||
141 | * <!-- end-user-doc --> | ||
142 | * @param object the target of the switch. | ||
143 | * @return the result of interpreting the object as an instance of '<em>Partial Interpretation</em>'. | ||
144 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
145 | * @generated | ||
146 | */ | ||
147 | public T casePartialInterpretation(PartialInterpretation object) { | ||
148 | return null; | ||
149 | } | ||
150 | |||
151 | /** | ||
152 | * Returns the result of interpreting the object as an instance of '<em>Partial Constant Interpretation</em>'. | ||
153 | * <!-- begin-user-doc --> | ||
154 | * This implementation returns null; | ||
155 | * returning a non-null result will terminate the switch. | ||
156 | * <!-- end-user-doc --> | ||
157 | * @param object the target of the switch. | ||
158 | * @return the result of interpreting the object as an instance of '<em>Partial Constant Interpretation</em>'. | ||
159 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
160 | * @generated | ||
161 | */ | ||
162 | public T casePartialConstantInterpretation(PartialConstantInterpretation object) { | ||
163 | return null; | ||
164 | } | ||
165 | |||
166 | /** | ||
167 | * Returns the result of interpreting the object as an instance of '<em>Partial Relation Interpretation</em>'. | ||
168 | * <!-- begin-user-doc --> | ||
169 | * This implementation returns null; | ||
170 | * returning a non-null result will terminate the switch. | ||
171 | * <!-- end-user-doc --> | ||
172 | * @param object the target of the switch. | ||
173 | * @return the result of interpreting the object as an instance of '<em>Partial Relation Interpretation</em>'. | ||
174 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
175 | * @generated | ||
176 | */ | ||
177 | public T casePartialRelationInterpretation(PartialRelationInterpretation object) { | ||
178 | return null; | ||
179 | } | ||
180 | |||
181 | /** | ||
182 | * Returns the result of interpreting the object as an instance of '<em>Partial Function Interpretation</em>'. | ||
183 | * <!-- begin-user-doc --> | ||
184 | * This implementation returns null; | ||
185 | * returning a non-null result will terminate the switch. | ||
186 | * <!-- end-user-doc --> | ||
187 | * @param object the target of the switch. | ||
188 | * @return the result of interpreting the object as an instance of '<em>Partial Function Interpretation</em>'. | ||
189 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
190 | * @generated | ||
191 | */ | ||
192 | public T casePartialFunctionInterpretation(PartialFunctionInterpretation object) { | ||
193 | return null; | ||
194 | } | ||
195 | |||
196 | /** | ||
197 | * Returns the result of interpreting the object as an instance of '<em>Partial Type Interpratation</em>'. | ||
198 | * <!-- begin-user-doc --> | ||
199 | * This implementation returns null; | ||
200 | * returning a non-null result will terminate the switch. | ||
201 | * <!-- end-user-doc --> | ||
202 | * @param object the target of the switch. | ||
203 | * @return the result of interpreting the object as an instance of '<em>Partial Type Interpratation</em>'. | ||
204 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
205 | * @generated | ||
206 | */ | ||
207 | public T casePartialTypeInterpratation(PartialTypeInterpratation object) { | ||
208 | return null; | ||
209 | } | ||
210 | |||
211 | /** | ||
212 | * Returns the result of interpreting the object as an instance of '<em>Relation Link</em>'. | ||
213 | * <!-- begin-user-doc --> | ||
214 | * This implementation returns null; | ||
215 | * returning a non-null result will terminate the switch. | ||
216 | * <!-- end-user-doc --> | ||
217 | * @param object the target of the switch. | ||
218 | * @return the result of interpreting the object as an instance of '<em>Relation Link</em>'. | ||
219 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
220 | * @generated | ||
221 | */ | ||
222 | public T caseRelationLink(RelationLink object) { | ||
223 | return null; | ||
224 | } | ||
225 | |||
226 | /** | ||
227 | * Returns the result of interpreting the object as an instance of '<em>Unary Element Relation Link</em>'. | ||
228 | * <!-- begin-user-doc --> | ||
229 | * This implementation returns null; | ||
230 | * returning a non-null result will terminate the switch. | ||
231 | * <!-- end-user-doc --> | ||
232 | * @param object the target of the switch. | ||
233 | * @return the result of interpreting the object as an instance of '<em>Unary Element Relation Link</em>'. | ||
234 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
235 | * @generated | ||
236 | */ | ||
237 | public T caseUnaryElementRelationLink(UnaryElementRelationLink object) { | ||
238 | return null; | ||
239 | } | ||
240 | |||
241 | /** | ||
242 | * Returns the result of interpreting the object as an instance of '<em>Binary Element Relation Link</em>'. | ||
243 | * <!-- begin-user-doc --> | ||
244 | * This implementation returns null; | ||
245 | * returning a non-null result will terminate the switch. | ||
246 | * <!-- end-user-doc --> | ||
247 | * @param object the target of the switch. | ||
248 | * @return the result of interpreting the object as an instance of '<em>Binary Element Relation Link</em>'. | ||
249 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
250 | * @generated | ||
251 | */ | ||
252 | public T caseBinaryElementRelationLink(BinaryElementRelationLink object) { | ||
253 | return null; | ||
254 | } | ||
255 | |||
256 | /** | ||
257 | * Returns the result of interpreting the object as an instance of '<em>Nary Relation Link</em>'. | ||
258 | * <!-- begin-user-doc --> | ||
259 | * This implementation returns null; | ||
260 | * returning a non-null result will terminate the switch. | ||
261 | * <!-- end-user-doc --> | ||
262 | * @param object the target of the switch. | ||
263 | * @return the result of interpreting the object as an instance of '<em>Nary Relation Link</em>'. | ||
264 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
265 | * @generated | ||
266 | */ | ||
267 | public T caseNaryRelationLink(NaryRelationLink object) { | ||
268 | return null; | ||
269 | } | ||
270 | |||
271 | /** | ||
272 | * Returns the result of interpreting the object as an instance of '<em>Nary Relation Link Element</em>'. | ||
273 | * <!-- begin-user-doc --> | ||
274 | * This implementation returns null; | ||
275 | * returning a non-null result will terminate the switch. | ||
276 | * <!-- end-user-doc --> | ||
277 | * @param object the target of the switch. | ||
278 | * @return the result of interpreting the object as an instance of '<em>Nary Relation Link Element</em>'. | ||
279 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
280 | * @generated | ||
281 | */ | ||
282 | public T caseNaryRelationLinkElement(NaryRelationLinkElement object) { | ||
283 | return null; | ||
284 | } | ||
285 | |||
286 | /** | ||
287 | * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. | ||
288 | * <!-- begin-user-doc --> | ||
289 | * This implementation returns null; | ||
290 | * returning a non-null result will terminate the switch, but this is the last case anyway. | ||
291 | * <!-- end-user-doc --> | ||
292 | * @param object the target of the switch. | ||
293 | * @return the result of interpreting the object as an instance of '<em>EObject</em>'. | ||
294 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) | ||
295 | * @generated | ||
296 | */ | ||
297 | @Override | ||
298 | public T defaultCase(EObject object) { | ||
299 | return null; | ||
300 | } | ||
301 | |||
302 | } //PartialinterpretationSwitch | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.aird b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.aird new file mode 100644 index 00000000..319af04b --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.aird | |||
@@ -0,0 +1,2710 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <viewpoint:DAnalysis xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style" xmi:id="_LPTx0LW_EeamG-Ij7YnW7w" selectedViews="_LRSu0LW_EeamG-Ij7YnW7w _LRdt8LW_EeamG-Ij7YnW7w _LRimcLW_EeamG-Ij7YnW7w _LRrwYLW_EeamG-Ij7YnW7w" version="10.1.0.201509162000"> | ||
3 | <semanticResources>PartialInterpretation.ecore</semanticResources> | ||
4 | <semanticResources>platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore</semanticResources> | ||
5 | <semanticResources>platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore</semanticResources> | ||
6 | <semanticResources>http://www.eclipse.org/emf/2002/Ecore</semanticResources> | ||
7 | <ownedViews xmi:type="viewpoint:DRepresentationContainer" xmi:id="_LRSu0LW_EeamG-Ij7YnW7w"> | ||
8 | <ownedRepresentations xmi:type="diagram:DSemanticDiagram" xmi:id="_MAfXILW_EeamG-Ij7YnW7w" name="partialinterpretation class diagram"> | ||
9 | <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_MAfXIbW_EeamG-Ij7YnW7w" source="DANNOTATION_CUSTOMIZATION_KEY"> | ||
10 | <data xmi:type="diagram:ComputedStyleDescriptionRegistry" xmi:id="_MAfXIrW_EeamG-Ij7YnW7w"> | ||
11 | <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_v4J-ALW_EeamG-Ij7YnW7w" routingStyle="manhattan"> | ||
12 | <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
13 | <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_v4J-AbW_EeamG-Ij7YnW7w" showIcon="false" labelExpression="service:render"> | ||
14 | <labelFormat>bold</labelFormat> | ||
15 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
16 | </centerLabelStyleDescription> | ||
17 | <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_v4J-ArW_EeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel"> | ||
18 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/> | ||
19 | </endLabelStyleDescription> | ||
20 | </computedStyleDescriptions> | ||
21 | <computedStyleDescriptions xmi:type="style:BundledImageDescription" xmi:id="_5K2RYLW_EeamG-Ij7YnW7w" labelExpression="service:render" labelAlignment="LEFT" tooltipExpression="service:renderTooltip" sizeComputationExpression="1"> | ||
22 | <borderColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
23 | <labelFormat>bold</labelFormat> | ||
24 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
25 | <color xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
26 | </computedStyleDescriptions> | ||
27 | <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_5K7J4LW_EeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan"> | ||
28 | <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
29 | <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_5K7J4bW_EeamG-Ij7YnW7w" showIcon="false" labelExpression="service:render"> | ||
30 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
31 | </centerLabelStyleDescription> | ||
32 | <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_5K7J4rW_EeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel"> | ||
33 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/> | ||
34 | </endLabelStyleDescription> | ||
35 | </computedStyleDescriptions> | ||
36 | <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_UkL5ML5UEea19paI6HZj1w" sourceArrow="FillDiamond" routingStyle="manhattan"> | ||
37 | <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
38 | <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_UkL5Mb5UEea19paI6HZj1w" showIcon="false" labelExpression="service:render"> | ||
39 | <labelFormat>bold</labelFormat> | ||
40 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
41 | </centerLabelStyleDescription> | ||
42 | <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_UkL5Mr5UEea19paI6HZj1w" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel"> | ||
43 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/> | ||
44 | </endLabelStyleDescription> | ||
45 | </computedStyleDescriptions> | ||
46 | </data> | ||
47 | </ownedAnnotationEntries> | ||
48 | <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_MA7cALW_EeamG-Ij7YnW7w" source="GMF_DIAGRAMS"> | ||
49 | <data xmi:type="notation:Diagram" xmi:id="_MA7cAbW_EeamG-Ij7YnW7w" type="Sirius" element="_MAfXILW_EeamG-Ij7YnW7w" measurementUnit="Pixel"> | ||
50 | <children xmi:type="notation:Node" xmi:id="_ggJ5QLW_EeamG-Ij7YnW7w" type="2003" element="_gf_hMLW_EeamG-Ij7YnW7w"> | ||
51 | <children xmi:type="notation:Node" xmi:id="_ggLucLW_EeamG-Ij7YnW7w" type="5007"/> | ||
52 | <children xmi:type="notation:Node" xmi:id="_ggM8kLW_EeamG-Ij7YnW7w" type="7004"> | ||
53 | <children xmi:type="notation:Node" xmi:id="_-4VQwL5TEea19paI6HZj1w" type="3010" element="_-3bR0L5TEea19paI6HZj1w"> | ||
54 | <styles xmi:type="notation:FontStyle" xmi:id="_-4VQwb5TEea19paI6HZj1w" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/> | ||
55 | <layoutConstraint xmi:type="notation:Location" xmi:id="_-4VQwr5TEea19paI6HZj1w"/> | ||
56 | </children> | ||
57 | <children xmi:type="notation:Node" xmi:id="_BBy3oL5UEea19paI6HZj1w" type="3010" element="_BBOP4L5UEea19paI6HZj1w"> | ||
58 | <styles xmi:type="notation:FontStyle" xmi:id="_BBy3ob5UEea19paI6HZj1w" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/> | ||
59 | <layoutConstraint xmi:type="notation:Location" xmi:id="_BBy3or5UEea19paI6HZj1w"/> | ||
60 | </children> | ||
61 | <styles xmi:type="notation:SortingStyle" xmi:id="_ggM8kbW_EeamG-Ij7YnW7w"/> | ||
62 | <styles xmi:type="notation:FilteringStyle" xmi:id="_ggM8krW_EeamG-Ij7YnW7w"/> | ||
63 | </children> | ||
64 | <styles xmi:type="notation:ShapeStyle" xmi:id="_ggJ5QbW_EeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
65 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ggJ5QrW_EeamG-Ij7YnW7w" x="387" y="490" width="183" height="68"/> | ||
66 | </children> | ||
67 | <children xmi:type="notation:Node" xmi:id="_v4LzMLW_EeamG-Ij7YnW7w" type="2003" element="_v4CCMLW_EeamG-Ij7YnW7w"> | ||
68 | <children xmi:type="notation:Node" xmi:id="_v4MaQLW_EeamG-Ij7YnW7w" type="5007"/> | ||
69 | <children xmi:type="notation:Node" xmi:id="_v4MaQbW_EeamG-Ij7YnW7w" type="7004"> | ||
70 | <styles xmi:type="notation:SortingStyle" xmi:id="_v4MaQrW_EeamG-Ij7YnW7w"/> | ||
71 | <styles xmi:type="notation:FilteringStyle" xmi:id="_v4MaQ7W_EeamG-Ij7YnW7w"/> | ||
72 | </children> | ||
73 | <styles xmi:type="notation:ShapeStyle" xmi:id="_v4LzMbW_EeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" fillColor="8047085"/> | ||
74 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_v4LzMrW_EeamG-Ij7YnW7w" x="567" y="15"/> | ||
75 | </children> | ||
76 | <children xmi:type="notation:Node" xmi:id="_5LFh8LW_EeamG-Ij7YnW7w" type="2003" element="_5KlLoLW_EeamG-Ij7YnW7w"> | ||
77 | <children xmi:type="notation:Node" xmi:id="_5LFh87W_EeamG-Ij7YnW7w" type="5007"/> | ||
78 | <children xmi:type="notation:Node" xmi:id="_5LGJALW_EeamG-Ij7YnW7w" type="7004"> | ||
79 | <styles xmi:type="notation:SortingStyle" xmi:id="_5LGJAbW_EeamG-Ij7YnW7w"/> | ||
80 | <styles xmi:type="notation:FilteringStyle" xmi:id="_5LGJArW_EeamG-Ij7YnW7w"/> | ||
81 | </children> | ||
82 | <styles xmi:type="notation:ShapeStyle" xmi:id="_5LFh8bW_EeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" italic="true" fillColor="8047085"/> | ||
83 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LFh8rW_EeamG-Ij7YnW7w" x="689" y="165" height="18"/> | ||
84 | </children> | ||
85 | <children xmi:type="notation:Node" xmi:id="_5LGwELW_EeamG-Ij7YnW7w" type="2003" element="_5KnA0LW_EeamG-Ij7YnW7w"> | ||
86 | <children xmi:type="notation:Node" xmi:id="_5LHXILW_EeamG-Ij7YnW7w" type="5007"/> | ||
87 | <children xmi:type="notation:Node" xmi:id="_5LHXIbW_EeamG-Ij7YnW7w" type="7004"> | ||
88 | <styles xmi:type="notation:SortingStyle" xmi:id="_5LHXIrW_EeamG-Ij7YnW7w"/> | ||
89 | <styles xmi:type="notation:FilteringStyle" xmi:id="_5LHXI7W_EeamG-Ij7YnW7w"/> | ||
90 | </children> | ||
91 | <styles xmi:type="notation:ShapeStyle" xmi:id="_5LGwEbW_EeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" fillColor="8047085"/> | ||
92 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LGwErW_EeamG-Ij7YnW7w" x="247" y="165" height="41"/> | ||
93 | </children> | ||
94 | <children xmi:type="notation:Node" xmi:id="_5LH-MLW_EeamG-Ij7YnW7w" type="2003" element="_5KoO8LW_EeamG-Ij7YnW7w"> | ||
95 | <children xmi:type="notation:Node" xmi:id="_5LIlQLW_EeamG-Ij7YnW7w" type="5007"/> | ||
96 | <children xmi:type="notation:Node" xmi:id="_5LIlQbW_EeamG-Ij7YnW7w" type="7004"> | ||
97 | <styles xmi:type="notation:SortingStyle" xmi:id="_5LIlQrW_EeamG-Ij7YnW7w"/> | ||
98 | <styles xmi:type="notation:FilteringStyle" xmi:id="_5LIlQ7W_EeamG-Ij7YnW7w"/> | ||
99 | </children> | ||
100 | <styles xmi:type="notation:ShapeStyle" xmi:id="_5LH-MbW_EeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" italic="true" fillColor="8047085"/> | ||
101 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LH-MrW_EeamG-Ij7YnW7w" x="1069" y="165" height="8"/> | ||
102 | </children> | ||
103 | <children xmi:type="notation:Node" xmi:id="_5LIlRLW_EeamG-Ij7YnW7w" type="2003" element="_5KqEILW_EeamG-Ij7YnW7w"> | ||
104 | <children xmi:type="notation:Node" xmi:id="_5LJMULW_EeamG-Ij7YnW7w" type="5007"/> | ||
105 | <children xmi:type="notation:Node" xmi:id="_5LJMUbW_EeamG-Ij7YnW7w" type="7004"> | ||
106 | <styles xmi:type="notation:SortingStyle" xmi:id="_5LJMUrW_EeamG-Ij7YnW7w"/> | ||
107 | <styles xmi:type="notation:FilteringStyle" xmi:id="_5LJMU7W_EeamG-Ij7YnW7w"/> | ||
108 | </children> | ||
109 | <styles xmi:type="notation:ShapeStyle" xmi:id="_5LIlRbW_EeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" italic="true" fillColor="8047085"/> | ||
110 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LIlRrW_EeamG-Ij7YnW7w" x="870" y="165" height="33"/> | ||
111 | </children> | ||
112 | <children xmi:type="notation:Node" xmi:id="_5LJzYLW_EeamG-Ij7YnW7w" type="2003" element="_5Kr5ULW_EeamG-Ij7YnW7w"> | ||
113 | <children xmi:type="notation:Node" xmi:id="_5LJzY7W_EeamG-Ij7YnW7w" type="5007"/> | ||
114 | <children xmi:type="notation:Node" xmi:id="_5LKacLW_EeamG-Ij7YnW7w" type="7004"> | ||
115 | <children xmi:type="notation:Node" xmi:id="_5LLokLW_EeamG-Ij7YnW7w" visible="false" type="3010" element="_5K1qULW_EeamG-Ij7YnW7w"> | ||
116 | <styles xmi:type="notation:FontStyle" xmi:id="_5LLokbW_EeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" bold="true"/> | ||
117 | <layoutConstraint xmi:type="notation:Location" xmi:id="_5LLokrW_EeamG-Ij7YnW7w"/> | ||
118 | </children> | ||
119 | <children xmi:type="notation:Node" xmi:id="_5LMPoLW_EeamG-Ij7YnW7w" visible="false" type="3010" element="_5K3fgLW_EeamG-Ij7YnW7w"> | ||
120 | <styles xmi:type="notation:FontStyle" xmi:id="_5LMPobW_EeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" bold="true"/> | ||
121 | <layoutConstraint xmi:type="notation:Location" xmi:id="_5LMPorW_EeamG-Ij7YnW7w"/> | ||
122 | </children> | ||
123 | <styles xmi:type="notation:SortingStyle" xmi:id="_5LKacbW_EeamG-Ij7YnW7w"/> | ||
124 | <styles xmi:type="notation:FilteringStyle" xmi:id="_5LKacrW_EeamG-Ij7YnW7w"/> | ||
125 | </children> | ||
126 | <styles xmi:type="notation:ShapeStyle" xmi:id="_5LJzYbW_EeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" italic="true" fillColor="8047085"/> | ||
127 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LJzYrW_EeamG-Ij7YnW7w" x="387" y="165" height="38"/> | ||
128 | </children> | ||
129 | <children xmi:type="notation:Node" xmi:id="_OeTn8LXAEeamG-Ij7YnW7w" type="2003" element="_OeBUELXAEeamG-Ij7YnW7w"> | ||
130 | <children xmi:type="notation:Node" xmi:id="_OeUPALXAEeamG-Ij7YnW7w" type="5007"/> | ||
131 | <children xmi:type="notation:Node" xmi:id="_OeUPAbXAEeamG-Ij7YnW7w" type="7004"> | ||
132 | <styles xmi:type="notation:SortingStyle" xmi:id="_OeUPArXAEeamG-Ij7YnW7w"/> | ||
133 | <styles xmi:type="notation:FilteringStyle" xmi:id="_OeUPA7XAEeamG-Ij7YnW7w"/> | ||
134 | </children> | ||
135 | <styles xmi:type="notation:ShapeStyle" xmi:id="_OeTn8bXAEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" fillColor="8047085"/> | ||
136 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OeTn8rXAEeamG-Ij7YnW7w" x="684" y="224" height="8"/> | ||
137 | </children> | ||
138 | <children xmi:type="notation:Node" xmi:id="_P3ExsLXAEeamG-Ij7YnW7w" type="2003" element="_P22IMLXAEeamG-Ij7YnW7w"> | ||
139 | <children xmi:type="notation:Node" xmi:id="_P3Exs7XAEeamG-Ij7YnW7w" type="5007"/> | ||
140 | <children xmi:type="notation:Node" xmi:id="_P3ExtLXAEeamG-Ij7YnW7w" type="7004"> | ||
141 | <styles xmi:type="notation:SortingStyle" xmi:id="_P3ExtbXAEeamG-Ij7YnW7w"/> | ||
142 | <styles xmi:type="notation:FilteringStyle" xmi:id="_P3ExtrXAEeamG-Ij7YnW7w"/> | ||
143 | </children> | ||
144 | <styles xmi:type="notation:ShapeStyle" xmi:id="_P3ExsbXAEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" fillColor="8047085"/> | ||
145 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_P3ExsrXAEeamG-Ij7YnW7w" x="867" y="224" height="14"/> | ||
146 | </children> | ||
147 | <children xmi:type="notation:Node" xmi:id="_RpdVULXAEeamG-Ij7YnW7w" type="2003" element="_RpETwLXAEeamG-Ij7YnW7w"> | ||
148 | <children xmi:type="notation:Node" xmi:id="_RpdVU7XAEeamG-Ij7YnW7w" type="5007"/> | ||
149 | <children xmi:type="notation:Node" xmi:id="_Rpd8YLXAEeamG-Ij7YnW7w" type="7004"> | ||
150 | <styles xmi:type="notation:SortingStyle" xmi:id="_Rpd8YbXAEeamG-Ij7YnW7w"/> | ||
151 | <styles xmi:type="notation:FilteringStyle" xmi:id="_Rpd8YrXAEeamG-Ij7YnW7w"/> | ||
152 | </children> | ||
153 | <styles xmi:type="notation:ShapeStyle" xmi:id="_RpdVUbXAEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" fillColor="8047085"/> | ||
154 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RpdVUrXAEeamG-Ij7YnW7w" x="1065" y="224" height="8"/> | ||
155 | </children> | ||
156 | <children xmi:type="notation:Node" xmi:id="_WfHcsLXAEeamG-Ij7YnW7w" type="2003" element="_WexecLXAEeamG-Ij7YnW7w"> | ||
157 | <children xmi:type="notation:Node" xmi:id="_WfIDwLXAEeamG-Ij7YnW7w" type="5007"/> | ||
158 | <children xmi:type="notation:Node" xmi:id="_WfIDwbXAEeamG-Ij7YnW7w" type="7004"> | ||
159 | <styles xmi:type="notation:SortingStyle" xmi:id="_WfIDwrXAEeamG-Ij7YnW7w"/> | ||
160 | <styles xmi:type="notation:FilteringStyle" xmi:id="_WfIDw7XAEeamG-Ij7YnW7w"/> | ||
161 | </children> | ||
162 | <styles xmi:type="notation:ShapeStyle" xmi:id="_WfHcsbXAEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" fillColor="8047085"/> | ||
163 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WfHcsrXAEeamG-Ij7YnW7w" x="387" y="222" height="43"/> | ||
164 | </children> | ||
165 | <children xmi:type="notation:Node" xmi:id="_KQMMQLXBEeamG-Ij7YnW7w" type="2003" element="_KP9iwLXBEeamG-Ij7YnW7w"> | ||
166 | <children xmi:type="notation:Node" xmi:id="_KQMzULXBEeamG-Ij7YnW7w" type="5007"/> | ||
167 | <children xmi:type="notation:Node" xmi:id="_KQMzUbXBEeamG-Ij7YnW7w" type="7004"> | ||
168 | <styles xmi:type="notation:SortingStyle" xmi:id="_KQMzUrXBEeamG-Ij7YnW7w"/> | ||
169 | <styles xmi:type="notation:FilteringStyle" xmi:id="_KQMzU7XBEeamG-Ij7YnW7w"/> | ||
170 | </children> | ||
171 | <styles xmi:type="notation:ShapeStyle" xmi:id="_KQMMQbXBEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
172 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KQMMQrXBEeamG-Ij7YnW7w" x="647" y="355" width="186" height="63"/> | ||
173 | </children> | ||
174 | <children xmi:type="notation:Node" xmi:id="_WUEN0LXBEeamG-Ij7YnW7w" type="2003" element="_WTu2oLXBEeamG-Ij7YnW7w"> | ||
175 | <children xmi:type="notation:Node" xmi:id="_WUEN07XBEeamG-Ij7YnW7w" type="5007"/> | ||
176 | <children xmi:type="notation:Node" xmi:id="_WUEN1LXBEeamG-Ij7YnW7w" type="7004"> | ||
177 | <styles xmi:type="notation:SortingStyle" xmi:id="_WUEN1bXBEeamG-Ij7YnW7w"/> | ||
178 | <styles xmi:type="notation:FilteringStyle" xmi:id="_WUEN1rXBEeamG-Ij7YnW7w"/> | ||
179 | </children> | ||
180 | <styles xmi:type="notation:ShapeStyle" xmi:id="_WUEN0bXBEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
181 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WUEN0rXBEeamG-Ij7YnW7w" x="847" y="355" width="178" height="63"/> | ||
182 | </children> | ||
183 | <children xmi:type="notation:Node" xmi:id="_cCnFALXBEeamG-Ij7YnW7w" type="2003" element="_cCYbgLXBEeamG-Ij7YnW7w"> | ||
184 | <children xmi:type="notation:Node" xmi:id="_cCnFA7XBEeamG-Ij7YnW7w" type="5007"/> | ||
185 | <children xmi:type="notation:Node" xmi:id="_cCnFBLXBEeamG-Ij7YnW7w" type="7004"> | ||
186 | <styles xmi:type="notation:SortingStyle" xmi:id="_cCnFBbXBEeamG-Ij7YnW7w"/> | ||
187 | <styles xmi:type="notation:FilteringStyle" xmi:id="_cCnFBrXBEeamG-Ij7YnW7w"/> | ||
188 | </children> | ||
189 | <styles xmi:type="notation:ShapeStyle" xmi:id="_cCnFAbXBEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
190 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_cCnFArXBEeamG-Ij7YnW7w" x="1037" y="355" width="183" height="63"/> | ||
191 | </children> | ||
192 | <children xmi:type="notation:Node" xmi:id="_Tg2p4LXCEeamG-Ij7YnW7w" type="2003" element="_TgoAYLXCEeamG-Ij7YnW7w"> | ||
193 | <children xmi:type="notation:Node" xmi:id="_Tg3Q8LXCEeamG-Ij7YnW7w" type="5007"/> | ||
194 | <children xmi:type="notation:Node" xmi:id="_Tg3Q8bXCEeamG-Ij7YnW7w" type="7004"> | ||
195 | <styles xmi:type="notation:SortingStyle" xmi:id="_Tg3Q8rXCEeamG-Ij7YnW7w"/> | ||
196 | <styles xmi:type="notation:FilteringStyle" xmi:id="_Tg3Q87XCEeamG-Ij7YnW7w"/> | ||
197 | </children> | ||
198 | <styles xmi:type="notation:ShapeStyle" xmi:id="_Tg2p4bXCEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
199 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Tg2p4rXCEeamG-Ij7YnW7w" x="325" y="355" width="168" height="63"/> | ||
200 | </children> | ||
201 | <styles xmi:type="notation:DiagramStyle" xmi:id="_MA7cArW_EeamG-Ij7YnW7w"/> | ||
202 | <edges xmi:type="notation:Edge" xmi:id="_v4QEoLW_EeamG-Ij7YnW7w" type="4001" element="_v4JW8LW_EeamG-Ij7YnW7w" source="_ggJ5QLW_EeamG-Ij7YnW7w" target="_v4LzMLW_EeamG-Ij7YnW7w"> | ||
203 | <children xmi:type="notation:Node" xmi:id="_v4R50LW_EeamG-Ij7YnW7w" type="6001"> | ||
204 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_v4R50bW_EeamG-Ij7YnW7w" x="-13"/> | ||
205 | </children> | ||
206 | <children xmi:type="notation:Node" xmi:id="_v4Sg4LW_EeamG-Ij7YnW7w" type="6002"> | ||
207 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_v4Sg4bW_EeamG-Ij7YnW7w" x="111"/> | ||
208 | </children> | ||
209 | <children xmi:type="notation:Node" xmi:id="_v4UWELW_EeamG-Ij7YnW7w" type="6003"> | ||
210 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_v4UWEbW_EeamG-Ij7YnW7w" x="-54"/> | ||
211 | </children> | ||
212 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_v4QEobW_EeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
213 | <styles xmi:type="notation:FontStyle" xmi:id="_v4QEorW_EeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
214 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_v4QEo7W_EeamG-Ij7YnW7w" points="[76, -39, -70, 436]$[130, -39, -16, 436]$[130, -426, -16, 49]"/> | ||
215 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_v4YngLW_EeamG-Ij7YnW7w" id="(0.5138482649044885,0.7424242424242424)"/> | ||
216 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_v4YngbW_EeamG-Ij7YnW7w" id="(0.5,0.5)"/> | ||
217 | </edges> | ||
218 | <edges xmi:type="notation:Edge" xmi:id="_5LM2sLW_EeamG-Ij7YnW7w" type="4001" element="_5K6i0LW_EeamG-Ij7YnW7w" source="_v4LzMLW_EeamG-Ij7YnW7w" target="_5LJzYLW_EeamG-Ij7YnW7w"> | ||
219 | <children xmi:type="notation:Node" xmi:id="_5LM2tLW_EeamG-Ij7YnW7w" type="6001"> | ||
220 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LM2tbW_EeamG-Ij7YnW7w" x="6" y="-11"/> | ||
221 | </children> | ||
222 | <children xmi:type="notation:Node" xmi:id="_5LM2trW_EeamG-Ij7YnW7w" type="6002"> | ||
223 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LM2t7W_EeamG-Ij7YnW7w" x="10" y="-10"/> | ||
224 | </children> | ||
225 | <children xmi:type="notation:Node" xmi:id="_5LNdwLW_EeamG-Ij7YnW7w" type="6003"> | ||
226 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LNdwbW_EeamG-Ij7YnW7w" x="-16" y="9"/> | ||
227 | </children> | ||
228 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_5LM2sbW_EeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
229 | <styles xmi:type="notation:FontStyle" xmi:id="_5LM2srW_EeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
230 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_5LM2s7W_EeamG-Ij7YnW7w" points="[-59, 89, 121, -167]$[-166, 89, 14, -167]$[-166, 150, 14, -106]"/> | ||
231 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5LPS8LW_EeamG-Ij7YnW7w" id="(0.5,0.0)"/> | ||
232 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5LPS8bW_EeamG-Ij7YnW7w" id="(0.5,2.7222222222222223)"/> | ||
233 | </edges> | ||
234 | <edges xmi:type="notation:Edge" xmi:id="_5LPS8rW_EeamG-Ij7YnW7w" type="4001" element="_5K7w8LW_EeamG-Ij7YnW7w" source="_v4LzMLW_EeamG-Ij7YnW7w" target="_5LH-MLW_EeamG-Ij7YnW7w"> | ||
235 | <children xmi:type="notation:Node" xmi:id="_5LP6A7W_EeamG-Ij7YnW7w" type="6001"> | ||
236 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LP6BLW_EeamG-Ij7YnW7w" x="128" y="79"/> | ||
237 | </children> | ||
238 | <children xmi:type="notation:Node" xmi:id="_5LP6BbW_EeamG-Ij7YnW7w" type="6002"> | ||
239 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LP6BrW_EeamG-Ij7YnW7w" x="-77" y="-10"/> | ||
240 | </children> | ||
241 | <children xmi:type="notation:Node" xmi:id="_5LP6B7W_EeamG-Ij7YnW7w" type="6003"> | ||
242 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LP6CLW_EeamG-Ij7YnW7w" x="278" y="24"/> | ||
243 | </children> | ||
244 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_5LP6ALW_EeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
245 | <styles xmi:type="notation:FontStyle" xmi:id="_5LP6AbW_EeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
246 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_5LP6ArW_EeamG-Ij7YnW7w" points="[59, 65, -443, -1359]$[501, 65, -1, -1359]$[501, 150, -1, -1274]"/> | ||
247 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5LQhELW_EeamG-Ij7YnW7w" id="(0.5,0.0)"/> | ||
248 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5LQhEbW_EeamG-Ij7YnW7w" id="(0.5,32.666666666666664)"/> | ||
249 | </edges> | ||
250 | <edges xmi:type="notation:Edge" xmi:id="_5LQhErW_EeamG-Ij7YnW7w" type="4001" element="_5K9mI7W_EeamG-Ij7YnW7w" source="_v4LzMLW_EeamG-Ij7YnW7w" target="_5LIlRLW_EeamG-Ij7YnW7w"> | ||
251 | <children xmi:type="notation:Node" xmi:id="_5LRIILW_EeamG-Ij7YnW7w" type="6001"> | ||
252 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LRIIbW_EeamG-Ij7YnW7w" x="34" y="78"/> | ||
253 | </children> | ||
254 | <children xmi:type="notation:Node" xmi:id="_5LRIIrW_EeamG-Ij7YnW7w" type="6002"> | ||
255 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LRII7W_EeamG-Ij7YnW7w" x="-30" y="10"/> | ||
256 | </children> | ||
257 | <children xmi:type="notation:Node" xmi:id="_5LRIJLW_EeamG-Ij7YnW7w" type="6003"> | ||
258 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LRIJbW_EeamG-Ij7YnW7w" x="-37" y="118"/> | ||
259 | </children> | ||
260 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_5LQhE7W_EeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
261 | <styles xmi:type="notation:FontStyle" xmi:id="_5LQhFLW_EeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
262 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_5LQhFbW_EeamG-Ij7YnW7w" points="[59, 65, -244, -208]$[302, 65, -1, -208]$[302, 150, -1, -123]"/> | ||
263 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5LRIJrW_EeamG-Ij7YnW7w" id="(0.5,0.0)"/> | ||
264 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5LRIJ7W_EeamG-Ij7YnW7w" id="(0.5,3.161290322580645)"/> | ||
265 | </edges> | ||
266 | <edges xmi:type="notation:Edge" xmi:id="_5LRvMLW_EeamG-Ij7YnW7w" type="4001" element="_5K_bULW_EeamG-Ij7YnW7w" source="_v4LzMLW_EeamG-Ij7YnW7w" target="_5LFh8LW_EeamG-Ij7YnW7w"> | ||
267 | <children xmi:type="notation:Node" xmi:id="_5LRvNLW_EeamG-Ij7YnW7w" type="6001"> | ||
268 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LRvNbW_EeamG-Ij7YnW7w" x="69" y="47"/> | ||
269 | </children> | ||
270 | <children xmi:type="notation:Node" xmi:id="_5LRvNrW_EeamG-Ij7YnW7w" type="6002"> | ||
271 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LRvN7W_EeamG-Ij7YnW7w" x="-7" y="10"/> | ||
272 | </children> | ||
273 | <children xmi:type="notation:Node" xmi:id="_5LRvOLW_EeamG-Ij7YnW7w" type="6003"> | ||
274 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LRvObW_EeamG-Ij7YnW7w" x="18"/> | ||
275 | </children> | ||
276 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_5LRvMbW_EeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
277 | <styles xmi:type="notation:FontStyle" xmi:id="_5LRvMrW_EeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
278 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_5LRvM7W_EeamG-Ij7YnW7w" points="[59, 65, -63, -323]$[138, 65, 16, -323]$[138, 150, 16, -238]"/> | ||
279 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5LSWQLW_EeamG-Ij7YnW7w" id="(0.5,0.0)"/> | ||
280 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5LSWQbW_EeamG-Ij7YnW7w" id="(0.5,6.125)"/> | ||
281 | </edges> | ||
282 | <edges xmi:type="notation:Edge" xmi:id="_5LSWQrW_EeamG-Ij7YnW7w" type="4001" element="_5LApcLW_EeamG-Ij7YnW7w" source="_v4LzMLW_EeamG-Ij7YnW7w" target="_5LGwELW_EeamG-Ij7YnW7w"> | ||
283 | <children xmi:type="notation:Node" xmi:id="_5LS9ULW_EeamG-Ij7YnW7w" type="6001"> | ||
284 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LS9UbW_EeamG-Ij7YnW7w" x="-2" y="10"/> | ||
285 | </children> | ||
286 | <children xmi:type="notation:Node" xmi:id="_5LS9UrW_EeamG-Ij7YnW7w" type="6002"> | ||
287 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LS9U7W_EeamG-Ij7YnW7w" x="105" y="-10"/> | ||
288 | </children> | ||
289 | <children xmi:type="notation:Node" xmi:id="_5LS9VLW_EeamG-Ij7YnW7w" type="6003"> | ||
290 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LS9VbW_EeamG-Ij7YnW7w" x="-15" y="-218"/> | ||
291 | </children> | ||
292 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_5LSWQ7W_EeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
293 | <styles xmi:type="notation:FontStyle" xmi:id="_5LSWRLW_EeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
294 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_5LSWRbW_EeamG-Ij7YnW7w" points="[-59, 70, 261, -178]$[-344, 70, -24, -178]$[-344, 150, -24, -98]"/> | ||
295 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5LS9VrW_EeamG-Ij7YnW7w" id="(0.5,0.0)"/> | ||
296 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5LS9V7W_EeamG-Ij7YnW7w" id="(0.5,2.5128205128205128)"/> | ||
297 | </edges> | ||
298 | <edges xmi:type="notation:Edge" xmi:id="_5LTkYLW_EeamG-Ij7YnW7w" visible="false" type="4001" element="_5LB3kLW_EeamG-Ij7YnW7w" source="_5LJzYLW_EeamG-Ij7YnW7w" target="_5LJzYLW_EeamG-Ij7YnW7w"> | ||
299 | <children xmi:type="notation:Node" xmi:id="_5LTkZLW_EeamG-Ij7YnW7w" type="6001"> | ||
300 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LTkZbW_EeamG-Ij7YnW7w" y="-10"/> | ||
301 | </children> | ||
302 | <children xmi:type="notation:Node" xmi:id="_5LTkZrW_EeamG-Ij7YnW7w" type="6002"> | ||
303 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LTkZ7W_EeamG-Ij7YnW7w" y="10"/> | ||
304 | </children> | ||
305 | <children xmi:type="notation:Node" xmi:id="_5LTkaLW_EeamG-Ij7YnW7w" type="6003"> | ||
306 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5LTkabW_EeamG-Ij7YnW7w" y="10"/> | ||
307 | </children> | ||
308 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_5LTkYbW_EeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
309 | <styles xmi:type="notation:FontStyle" xmi:id="_5LTkYrW_EeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
310 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_5LTkY7W_EeamG-Ij7YnW7w" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> | ||
311 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5LULcLW_EeamG-Ij7YnW7w" id="(0.5,1.3611111111111112)"/> | ||
312 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5LULcbW_EeamG-Ij7YnW7w" id="(0.5,1.3611111111111112)"/> | ||
313 | </edges> | ||
314 | <edges xmi:type="notation:Edge" xmi:id="_OeU2ELXAEeamG-Ij7YnW7w" type="4001" element="_OePWgLXAEeamG-Ij7YnW7w" source="_OeTn8LXAEeamG-Ij7YnW7w" target="_5LFh8LW_EeamG-Ij7YnW7w"> | ||
315 | <children xmi:type="notation:Node" xmi:id="_OeVdILXAEeamG-Ij7YnW7w" type="6001"> | ||
316 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OeVdIbXAEeamG-Ij7YnW7w" x="6" y="-10"/> | ||
317 | </children> | ||
318 | <children xmi:type="notation:Node" xmi:id="_OeVdIrXAEeamG-Ij7YnW7w" type="6002"> | ||
319 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OeVdI7XAEeamG-Ij7YnW7w" x="2" y="10"/> | ||
320 | </children> | ||
321 | <children xmi:type="notation:Node" xmi:id="_OeVdJLXAEeamG-Ij7YnW7w" type="6003"> | ||
322 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OeVdJbXAEeamG-Ij7YnW7w" x="-3" y="10"/> | ||
323 | </children> | ||
324 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_OeU2EbXAEeamG-Ij7YnW7w" routing="Tree"/> | ||
325 | <styles xmi:type="notation:FontStyle" xmi:id="_OeU2ErXAEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
326 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_OeU2E7XAEeamG-Ij7YnW7w" points="[0, -49, 4, 86]$[0, -74, 4, 61]$[0, -74, 4, 61]$[0, -86, 4, 49]"/> | ||
327 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OeVdJrXAEeamG-Ij7YnW7w" id="(0.5,16.333333333333332)"/> | ||
328 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OeVdJ7XAEeamG-Ij7YnW7w" id="(0.5,3.0625)"/> | ||
329 | </edges> | ||
330 | <edges xmi:type="notation:Edge" xmi:id="_P3FYwLXAEeamG-Ij7YnW7w" type="4001" element="_P3BuYLXAEeamG-Ij7YnW7w" source="_P3ExsLXAEeamG-Ij7YnW7w" target="_5LIlRLW_EeamG-Ij7YnW7w"> | ||
331 | <children xmi:type="notation:Node" xmi:id="_P3F_0LXAEeamG-Ij7YnW7w" type="6001"> | ||
332 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_P3F_0bXAEeamG-Ij7YnW7w" x="-54"/> | ||
333 | </children> | ||
334 | <children xmi:type="notation:Node" xmi:id="_P3F_0rXAEeamG-Ij7YnW7w" type="6002"> | ||
335 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_P3F_07XAEeamG-Ij7YnW7w" x="11" y="-2"/> | ||
336 | </children> | ||
337 | <children xmi:type="notation:Node" xmi:id="_P3F_1LXAEeamG-Ij7YnW7w" type="6003"> | ||
338 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_P3F_1bXAEeamG-Ij7YnW7w" x="-29" y="25"/> | ||
339 | </children> | ||
340 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_P3FYwbXAEeamG-Ij7YnW7w" routing="Tree"/> | ||
341 | <styles xmi:type="notation:FontStyle" xmi:id="_P3FYwrXAEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
342 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_P3FYw7XAEeamG-Ij7YnW7w" points="[0, -159, -1, -2]$[0, -163, -1, -6]$[-3, -163, -4, -6]$[-3, -179, -4, -22]"/> | ||
343 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_P3Gm4LXAEeamG-Ij7YnW7w" id="(0.5,4.083333333333333)"/> | ||
344 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_P3Gm4bXAEeamG-Ij7YnW7w" id="(0.5,1.5806451612903225)"/> | ||
345 | </edges> | ||
346 | <edges xmi:type="notation:Edge" xmi:id="_RpejcLXAEeamG-Ij7YnW7w" type="4001" element="_RpYc0LXAEeamG-Ij7YnW7w" source="_RpdVULXAEeamG-Ij7YnW7w" target="_5LH-MLW_EeamG-Ij7YnW7w"> | ||
347 | <children xmi:type="notation:Node" xmi:id="_RpfKgLXAEeamG-Ij7YnW7w" type="6001"> | ||
348 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RpfKgbXAEeamG-Ij7YnW7w" x="10"/> | ||
349 | </children> | ||
350 | <children xmi:type="notation:Node" xmi:id="_RpfKgrXAEeamG-Ij7YnW7w" type="6002"> | ||
351 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RpfKg7XAEeamG-Ij7YnW7w" x="12" y="10"/> | ||
352 | </children> | ||
353 | <children xmi:type="notation:Node" xmi:id="_RpfKhLXAEeamG-Ij7YnW7w" type="6003"> | ||
354 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RpfKhbXAEeamG-Ij7YnW7w" x="-10"/> | ||
355 | </children> | ||
356 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_RpejcbXAEeamG-Ij7YnW7w" routing="Tree"/> | ||
357 | <styles xmi:type="notation:FontStyle" xmi:id="_RpejcrXAEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
358 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Rpejc7XAEeamG-Ij7YnW7w" points="[0, -637, 0, -578]$[0, -637, 0, -578]$[-1, -637, -1, -578]$[-1, -657, -1, -598]"/> | ||
359 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_RpfxkLXAEeamG-Ij7YnW7w" id="(0.5,16.333333333333332)"/> | ||
360 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_RpfxkbXAEeamG-Ij7YnW7w" id="(0.5,16.333333333333332)"/> | ||
361 | </edges> | ||
362 | <edges xmi:type="notation:Edge" xmi:id="_WfJR4LXAEeamG-Ij7YnW7w" type="4001" element="_WfDLQLXAEeamG-Ij7YnW7w" source="_WfHcsLXAEeamG-Ij7YnW7w" target="_5LJzYLW_EeamG-Ij7YnW7w"> | ||
363 | <children xmi:type="notation:Node" xmi:id="_WfJ48LXAEeamG-Ij7YnW7w" type="6001"> | ||
364 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WfJ48bXAEeamG-Ij7YnW7w" x="3" y="-1"/> | ||
365 | </children> | ||
366 | <children xmi:type="notation:Node" xmi:id="_WfKgALXAEeamG-Ij7YnW7w" type="6002"> | ||
367 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WfKgAbXAEeamG-Ij7YnW7w"/> | ||
368 | </children> | ||
369 | <children xmi:type="notation:Node" xmi:id="_WfLHELXAEeamG-Ij7YnW7w" type="6003"> | ||
370 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WfLHEbXAEeamG-Ij7YnW7w" x="-13" y="9"/> | ||
371 | </children> | ||
372 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_WfJR4bXAEeamG-Ij7YnW7w" routing="Tree"/> | ||
373 | <styles xmi:type="notation:FontStyle" xmi:id="_WfJR4rXAEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
374 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_WfJR47XAEeamG-Ij7YnW7w" points="[0, -49, 0, 4]$[0, -61, 0, -8]$[-1, -61, -1, -8]$[-1, -67, -1, -14]"/> | ||
375 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WfLHErXAEeamG-Ij7YnW7w" id="(0.5,1.1951219512195121)"/> | ||
376 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_WfLHE7XAEeamG-Ij7YnW7w" id="(0.5,1.3611111111111112)"/> | ||
377 | </edges> | ||
378 | <edges xmi:type="notation:Edge" xmi:id="_jxh4gLXBEeamG-Ij7YnW7w" type="4001" element="_jxT2ELXBEeamG-Ij7YnW7w" source="_KQMMQLXBEeamG-Ij7YnW7w" target="_OeTn8LXAEeamG-Ij7YnW7w"> | ||
379 | <children xmi:type="notation:Node" xmi:id="_jxh4hLXBEeamG-Ij7YnW7w" type="6001"> | ||
380 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jxh4hbXBEeamG-Ij7YnW7w" x="-2" y="-62"/> | ||
381 | </children> | ||
382 | <children xmi:type="notation:Node" xmi:id="_jxh4hrXBEeamG-Ij7YnW7w" type="6002"> | ||
383 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jxh4h7XBEeamG-Ij7YnW7w" y="10"/> | ||
384 | </children> | ||
385 | <children xmi:type="notation:Node" xmi:id="_jxh4iLXBEeamG-Ij7YnW7w" type="6003"> | ||
386 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jxh4ibXBEeamG-Ij7YnW7w" y="10"/> | ||
387 | </children> | ||
388 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_jxh4gbXBEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
389 | <styles xmi:type="notation:FontStyle" xmi:id="_jxh4grXBEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
390 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_jxh4g7XBEeamG-Ij7YnW7w" points="[0, 0, 0, 92]$[0, -92, 0, 0]"/> | ||
391 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_jxifkLXBEeamG-Ij7YnW7w" id="(0.7228260869565217,0.0)"/> | ||
392 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_jxifkbXBEeamG-Ij7YnW7w" id="(0.7559055118110236,1.0)"/> | ||
393 | </edges> | ||
394 | <edges xmi:type="notation:Edge" xmi:id="_owtIQLXBEeamG-Ij7YnW7w" type="4001" element="_owbbcLXBEeamG-Ij7YnW7w" source="_WUEN0LXBEeamG-Ij7YnW7w" target="_P3ExsLXAEeamG-Ij7YnW7w"> | ||
395 | <children xmi:type="notation:Node" xmi:id="_owtvULXBEeamG-Ij7YnW7w" type="6001"> | ||
396 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_owtvUbXBEeamG-Ij7YnW7w" x="-7" y="-67"/> | ||
397 | </children> | ||
398 | <children xmi:type="notation:Node" xmi:id="_owtvUrXBEeamG-Ij7YnW7w" type="6002"> | ||
399 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_owtvU7XBEeamG-Ij7YnW7w" x="1" y="10"/> | ||
400 | </children> | ||
401 | <children xmi:type="notation:Node" xmi:id="_owtvVLXBEeamG-Ij7YnW7w" type="6003"> | ||
402 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_owtvVbXBEeamG-Ij7YnW7w" x="-1" y="10"/> | ||
403 | </children> | ||
404 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_owtIQbXBEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
405 | <styles xmi:type="notation:FontStyle" xmi:id="_owtIQrXBEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
406 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_owtIQ7XBEeamG-Ij7YnW7w" points="[38, 0, 0, 92]$[38, -92, 0, 0]"/> | ||
407 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_owtvVrXBEeamG-Ij7YnW7w" id="(0.3125,0.0)"/> | ||
408 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_owtvV7XBEeamG-Ij7YnW7w" id="(0.5934959349593496,1.0)"/> | ||
409 | </edges> | ||
410 | <edges xmi:type="notation:Edge" xmi:id="_qsii0LXBEeamG-Ij7YnW7w" type="4001" element="_qsPn4LXBEeamG-Ij7YnW7w" source="_cCnFALXBEeamG-Ij7YnW7w" target="_RpdVULXAEeamG-Ij7YnW7w"> | ||
411 | <children xmi:type="notation:Node" xmi:id="_qsjJ4LXBEeamG-Ij7YnW7w" type="6001"> | ||
412 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qsjJ4bXBEeamG-Ij7YnW7w" x="3" y="-59"/> | ||
413 | </children> | ||
414 | <children xmi:type="notation:Node" xmi:id="_qsjJ4rXBEeamG-Ij7YnW7w" type="6002"> | ||
415 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qsjJ47XBEeamG-Ij7YnW7w" x="11" y="10"/> | ||
416 | </children> | ||
417 | <children xmi:type="notation:Node" xmi:id="_qsjJ5LXBEeamG-Ij7YnW7w" type="6003"> | ||
418 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qsjJ5bXBEeamG-Ij7YnW7w" x="-11" y="10"/> | ||
419 | </children> | ||
420 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_qsii0bXBEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
421 | <styles xmi:type="notation:FontStyle" xmi:id="_qsii0rXBEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
422 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_qsii07XBEeamG-Ij7YnW7w" points="[-1, 0, -33, 92]$[-1, -92, -33, 0]"/> | ||
423 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qsjJ5rXBEeamG-Ij7YnW7w" id="(0.5027624309392266,0.0)"/> | ||
424 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qsjJ57XBEeamG-Ij7YnW7w" id="(0.753968253968254,1.0)"/> | ||
425 | </edges> | ||
426 | <edges xmi:type="notation:Edge" xmi:id="_2G-l0LXBEeamG-Ij7YnW7w" type="4001" element="_2Grq4LXBEeamG-Ij7YnW7w" source="_ggJ5QLW_EeamG-Ij7YnW7w" target="_KQMMQLXBEeamG-Ij7YnW7w"> | ||
427 | <children xmi:type="notation:Node" xmi:id="_2G-l1LXBEeamG-Ij7YnW7w" type="6001"> | ||
428 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2G-l1bXBEeamG-Ij7YnW7w" x="-58" y="-12"/> | ||
429 | </children> | ||
430 | <children xmi:type="notation:Node" xmi:id="_2G_M4LXBEeamG-Ij7YnW7w" type="6002"> | ||
431 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2G_M4bXBEeamG-Ij7YnW7w" x="29" y="10"/> | ||
432 | </children> | ||
433 | <children xmi:type="notation:Node" xmi:id="_2G_M4rXBEeamG-Ij7YnW7w" type="6003"> | ||
434 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2G_M47XBEeamG-Ij7YnW7w" x="-85" y="-14"/> | ||
435 | </children> | ||
436 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_2G-l0bXBEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
437 | <styles xmi:type="notation:FontStyle" xmi:id="_2G-l0rXBEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
438 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_2G-l07XBEeamG-Ij7YnW7w" points="[0, -27, -91, 143]$[191, -27, 100, 143]$[191, -149, 100, 21]"/> | ||
439 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_2G_M5LXBEeamG-Ij7YnW7w" id="(0.9337016574585635,1.1363636363636365)"/> | ||
440 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_2G_M5bXBEeamG-Ij7YnW7w" id="(0.0,0.6557377049180327)"/> | ||
441 | </edges> | ||
442 | <edges xmi:type="notation:Edge" xmi:id="_2333QLXBEeamG-Ij7YnW7w" type="4001" element="_23ljYLXBEeamG-Ij7YnW7w" source="_ggJ5QLW_EeamG-Ij7YnW7w" target="_WUEN0LXBEeamG-Ij7YnW7w"> | ||
443 | <children xmi:type="notation:Node" xmi:id="_234eULXBEeamG-Ij7YnW7w" type="6001"> | ||
444 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_234eUbXBEeamG-Ij7YnW7w" x="44" y="-12"/> | ||
445 | </children> | ||
446 | <children xmi:type="notation:Node" xmi:id="_235FYLXBEeamG-Ij7YnW7w" type="6002"> | ||
447 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_235FYbXBEeamG-Ij7YnW7w" x="31" y="10"/> | ||
448 | </children> | ||
449 | <children xmi:type="notation:Node" xmi:id="_235scLXBEeamG-Ij7YnW7w" type="6003"> | ||
450 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_235scbXBEeamG-Ij7YnW7w" x="-55" y="-141"/> | ||
451 | </children> | ||
452 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_2333QbXBEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
453 | <styles xmi:type="notation:FontStyle" xmi:id="_2333QrXBEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
454 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_2333Q7XBEeamG-Ij7YnW7w" points="[0, -37, -291, 148]$[391, -37, 100, 148]$[391, -159, 100, 26]"/> | ||
455 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_236TgLXBEeamG-Ij7YnW7w" id="(0.9337016574585635,1.2878787878787878)"/> | ||
456 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_236TgbXBEeamG-Ij7YnW7w" id="(0.0,0.5737704918032787)"/> | ||
457 | </edges> | ||
458 | <edges xmi:type="notation:Edge" xmi:id="_3UZbMLXBEeamG-Ij7YnW7w" type="4001" element="_3UBAsLXBEeamG-Ij7YnW7w" source="_ggJ5QLW_EeamG-Ij7YnW7w" target="_cCnFALXBEeamG-Ij7YnW7w"> | ||
459 | <children xmi:type="notation:Node" xmi:id="_3UaCQLXBEeamG-Ij7YnW7w" type="6001"> | ||
460 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3UaCQbXBEeamG-Ij7YnW7w" x="134" y="-12"/> | ||
461 | </children> | ||
462 | <children xmi:type="notation:Node" xmi:id="_3UaCQrXBEeamG-Ij7YnW7w" type="6002"> | ||
463 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3UaCQ7XBEeamG-Ij7YnW7w" x="29" y="10"/> | ||
464 | </children> | ||
465 | <children xmi:type="notation:Node" xmi:id="_3UaCRLXBEeamG-Ij7YnW7w" type="6003"> | ||
466 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3UaCRbXBEeamG-Ij7YnW7w" x="-26" y="-173"/> | ||
467 | </children> | ||
468 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_3UZbMbXBEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
469 | <styles xmi:type="notation:FontStyle" xmi:id="_3UZbMrXBEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
470 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3UZbM7XBEeamG-Ij7YnW7w" points="[0, -32, -481, 143]$[586, -32, 105, 143]$[586, -154, 105, 21]"/> | ||
471 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_3UapULXBEeamG-Ij7YnW7w" id="(0.9337016574585635,1.2121212121212122)"/> | ||
472 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_3UapUbXBEeamG-Ij7YnW7w" id="(0.0,0.6557377049180327)"/> | ||
473 | </edges> | ||
474 | <edges xmi:type="notation:Edge" xmi:id="_H4oCgLXCEeamG-Ij7YnW7w" type="4001" element="_H4YK4LXCEeamG-Ij7YnW7w" source="_ggJ5QLW_EeamG-Ij7YnW7w" target="_5LGwELW_EeamG-Ij7YnW7w"> | ||
475 | <children xmi:type="notation:Node" xmi:id="_H4oChLXCEeamG-Ij7YnW7w" type="6001"> | ||
476 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_H4oChbXCEeamG-Ij7YnW7w" x="-20" y="35"/> | ||
477 | </children> | ||
478 | <children xmi:type="notation:Node" xmi:id="_H4oChrXCEeamG-Ij7YnW7w" type="6002"> | ||
479 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_H4oCh7XCEeamG-Ij7YnW7w" x="32" y="223"/> | ||
480 | </children> | ||
481 | <children xmi:type="notation:Node" xmi:id="_H4opkLXCEeamG-Ij7YnW7w" type="6003"> | ||
482 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_H4opkbXCEeamG-Ij7YnW7w" x="23" y="10"/> | ||
483 | </children> | ||
484 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_H4oCgbXCEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
485 | <styles xmi:type="notation:FontStyle" xmi:id="_H4oCgrXCEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
486 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_H4oCg7XCEeamG-Ij7YnW7w" points="[-57, 75, 113, 361]$[-170, 75, 0, 361]$[-170, -286, 0, 0]"/> | ||
487 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_H4opkrXCEeamG-Ij7YnW7w" id="(0.4143646408839779,0.0)"/> | ||
488 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_H4opk7XCEeamG-Ij7YnW7w" id="(0.3813559322033898,1.0)"/> | ||
489 | </edges> | ||
490 | <edges xmi:type="notation:Edge" xmi:id="_zI5OoLXCEeamG-Ij7YnW7w" type="4001" element="_zIoI4LXCEeamG-Ij7YnW7w" source="_Tg2p4LXCEeamG-Ij7YnW7w" target="_WfHcsLXAEeamG-Ij7YnW7w"> | ||
491 | <children xmi:type="notation:Node" xmi:id="_zI5OpLXCEeamG-Ij7YnW7w" type="6001"> | ||
492 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zI5OpbXCEeamG-Ij7YnW7w" x="8" y="66"/> | ||
493 | </children> | ||
494 | <children xmi:type="notation:Node" xmi:id="_zI5OprXCEeamG-Ij7YnW7w" type="6002"> | ||
495 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zI5Op7XCEeamG-Ij7YnW7w" x="20" y="6"/> | ||
496 | </children> | ||
497 | <children xmi:type="notation:Node" xmi:id="_zI51sLXCEeamG-Ij7YnW7w" type="6003"> | ||
498 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_zI51sbXCEeamG-Ij7YnW7w" x="-32" y="2"/> | ||
499 | </children> | ||
500 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_zI5OobXCEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
501 | <styles xmi:type="notation:FontStyle" xmi:id="_zI5OorXCEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
502 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_zI5Oo7XCEeamG-Ij7YnW7w" points="[30, 0, 0, 92]$[30, -92, 0, 0]"/> | ||
503 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_zI51srXCEeamG-Ij7YnW7w" id="(0.6325301204819277,0.0)"/> | ||
504 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_zI51s7XCEeamG-Ij7YnW7w" id="(0.6186440677966102,1.0)"/> | ||
505 | </edges> | ||
506 | <edges xmi:type="notation:Edge" xmi:id="_2TIWALXCEeamG-Ij7YnW7w" type="4001" element="_2Sy-0LXCEeamG-Ij7YnW7w" source="_ggJ5QLW_EeamG-Ij7YnW7w" target="_Tg2p4LXCEeamG-Ij7YnW7w"> | ||
507 | <children xmi:type="notation:Node" xmi:id="_2TI9ELXCEeamG-Ij7YnW7w" type="6001"> | ||
508 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2TI9EbXCEeamG-Ij7YnW7w" x="7" y="86"/> | ||
509 | </children> | ||
510 | <children xmi:type="notation:Node" xmi:id="_2TI9ErXCEeamG-Ij7YnW7w" type="6002"> | ||
511 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2TI9E7XCEeamG-Ij7YnW7w" x="-13" y="-11"/> | ||
512 | </children> | ||
513 | <children xmi:type="notation:Node" xmi:id="_2TI9FLXCEeamG-Ij7YnW7w" type="6003"> | ||
514 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2TI9FbXCEeamG-Ij7YnW7w" x="-64" y="34"/> | ||
515 | </children> | ||
516 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_2TIWAbXCEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
517 | <styles xmi:type="notation:FontStyle" xmi:id="_2TIWArXCEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
518 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_2TIWA7XCEeamG-Ij7YnW7w" points="[0, -45, -86, 119]$[-41, -45, -127, 119]$[-41, -134, -127, 30]"/> | ||
519 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_2TI9FrXCEeamG-Ij7YnW7w" id="(0.09944751381215469,0.9090909090909091)"/> | ||
520 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_2TI9F7XCEeamG-Ij7YnW7w" id="(1.0,0.5081967213114754)"/> | ||
521 | </edges> | ||
522 | <edges xmi:type="notation:Edge" xmi:id="_kldk8LXDEeamG-Ij7YnW7w" type="4001" element="_klNtULXDEeamG-Ij7YnW7w" source="_Tg2p4LXCEeamG-Ij7YnW7w" target="_5LGwELW_EeamG-Ij7YnW7w"> | ||
523 | <children xmi:type="notation:Node" xmi:id="_kleMALXDEeamG-Ij7YnW7w" type="6001"> | ||
524 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kleMAbXDEeamG-Ij7YnW7w" y="-10"/> | ||
525 | </children> | ||
526 | <children xmi:type="notation:Node" xmi:id="_kleMArXDEeamG-Ij7YnW7w" type="6002"> | ||
527 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kleMA7XDEeamG-Ij7YnW7w" y="10"/> | ||
528 | </children> | ||
529 | <children xmi:type="notation:Node" xmi:id="_kleMBLXDEeamG-Ij7YnW7w" type="6003"> | ||
530 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kleMBbXDEeamG-Ij7YnW7w" y="10"/> | ||
531 | </children> | ||
532 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_kldk8bXDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
533 | <styles xmi:type="notation:FontStyle" xmi:id="_kldk8rXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
534 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_kldk87XDEeamG-Ij7YnW7w" points="[325, 355, 325, 355]$[247, 165, 247, 165]"/> | ||
535 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_kleMBrXDEeamG-Ij7YnW7w" id="(0.5,0.49206349206349204)"/> | ||
536 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_kleMB7XDEeamG-Ij7YnW7w" id="(0.5,0.4878048780487805)"/> | ||
537 | </edges> | ||
538 | <edges xmi:type="notation:Edge" xmi:id="_Qrl3AL5UEea19paI6HZj1w" type="4001" element="_QrIkAL5UEea19paI6HZj1w" source="_ggJ5QLW_EeamG-Ij7YnW7w" target="_5LGwELW_EeamG-Ij7YnW7w"> | ||
539 | <children xmi:type="notation:Node" xmi:id="_QrphYL5UEea19paI6HZj1w" type="6001"> | ||
540 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QrphYb5UEea19paI6HZj1w" x="-101" y="85"/> | ||
541 | </children> | ||
542 | <children xmi:type="notation:Node" xmi:id="_QrqvgL5UEea19paI6HZj1w" type="6002"> | ||
543 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Qrqvgb5UEea19paI6HZj1w" x="-65" y="18"/> | ||
544 | </children> | ||
545 | <children xmi:type="notation:Node" xmi:id="_Qrr9oL5UEea19paI6HZj1w" type="6003"> | ||
546 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Qrr9ob5UEea19paI6HZj1w" x="20" y="10"/> | ||
547 | </children> | ||
548 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_Qrl3Ab5UEea19paI6HZj1w" routing="Rectilinear"/> | ||
549 | <styles xmi:type="notation:FontStyle" xmi:id="_Qrl3Ar5UEea19paI6HZj1w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
550 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Qrl3A75UEea19paI6HZj1w" points="[0, 66, 170, 352]$[0, 100, 170, 386]$[-170, 100, 0, 386]$[-170, -286, 0, 0]"/> | ||
551 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_QrtLwL5UEea19paI6HZj1w" id="(0.23756906077348067,0.0)"/> | ||
552 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_QrtLwb5UEea19paI6HZj1w" id="(0.11016949152542373,1.0)"/> | ||
553 | </edges> | ||
554 | </data> | ||
555 | </ownedAnnotationEntries> | ||
556 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_gf_hMLW_EeamG-Ij7YnW7w" name="PartialInterpretation" tooltipText="" outgoingEdges="_v4JW8LW_EeamG-Ij7YnW7w _2Grq4LXBEeamG-Ij7YnW7w _23ljYLXBEeamG-Ij7YnW7w _3UBAsLXBEeamG-Ij7YnW7w _H4YK4LXCEeamG-Ij7YnW7w _2Sy-0LXCEeamG-Ij7YnW7w _QrIkAL5UEea19paI6HZj1w" width="12" height="10"> | ||
557 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialInterpretation"/> | ||
558 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialInterpretation"/> | ||
559 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
560 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
561 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
562 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_HsFlYL5UEea19paI6HZj1w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
563 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
564 | </ownedStyle> | ||
565 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
566 | <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_-3bR0L5TEea19paI6HZj1w" name="minNewElements : EInt = 0" tooltipText=""> | ||
567 | <target xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//PartialInterpretation/minNewElements"/> | ||
568 | <semanticElements xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//PartialInterpretation/minNewElements"/> | ||
569 | <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_Fh17YL5UEea19paI6HZj1w" labelAlignment="LEFT" description="_5K2RYLW_EeamG-Ij7YnW7w"> | ||
570 | <labelFormat>bold</labelFormat> | ||
571 | </ownedStyle> | ||
572 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
573 | </ownedElements> | ||
574 | <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_BBOP4L5UEea19paI6HZj1w" name="maxNewElements : EInt = 0" tooltipText=""> | ||
575 | <target xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//PartialInterpretation/maxNewElements"/> | ||
576 | <semanticElements xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//PartialInterpretation/maxNewElements"/> | ||
577 | <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_HsLE8L5UEea19paI6HZj1w" labelAlignment="LEFT" description="_5K2RYLW_EeamG-Ij7YnW7w"> | ||
578 | <labelFormat>bold</labelFormat> | ||
579 | </ownedStyle> | ||
580 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
581 | </ownedElements> | ||
582 | </ownedDiagramElements> | ||
583 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_v4CCMLW_EeamG-Ij7YnW7w" name="LogicProblem" tooltipText="" outgoingEdges="_5K6i0LW_EeamG-Ij7YnW7w _5K7w8LW_EeamG-Ij7YnW7w _5K9mI7W_EeamG-Ij7YnW7w _5K_bULW_EeamG-Ij7YnW7w _5LApcLW_EeamG-Ij7YnW7w" incomingEdges="_v4JW8LW_EeamG-Ij7YnW7w" width="12" height="10"> | ||
584 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem"/> | ||
585 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem"/> | ||
586 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_v4II0LW_EeamG-Ij7YnW7w"> | ||
587 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
588 | </decorations> | ||
589 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
590 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
591 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
592 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_v4DQULW_EeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
593 | <customFeatures>backgroundColor</customFeatures> | ||
594 | <customFeatures>foregroundColor</customFeatures> | ||
595 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
596 | </ownedStyle> | ||
597 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
598 | </ownedDiagramElements> | ||
599 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_v4JW8LW_EeamG-Ij7YnW7w" name="[1..1] problem" sourceNode="_gf_hMLW_EeamG-Ij7YnW7w" targetNode="_v4CCMLW_EeamG-Ij7YnW7w"> | ||
600 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/problem"/> | ||
601 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/problem"/> | ||
602 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_v4KlELW_EeamG-Ij7YnW7w" description="_v4J-ALW_EeamG-Ij7YnW7w" routingStyle="manhattan" strokeColor="0,0,0"> | ||
603 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_v4KlEbW_EeamG-Ij7YnW7w" showIcon="false"> | ||
604 | <customFeatures>labelSize</customFeatures> | ||
605 | <labelFormat>bold</labelFormat> | ||
606 | </centerLabelStyle> | ||
607 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_v4KlErW_EeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
608 | <customFeatures>labelSize</customFeatures> | ||
609 | </endLabelStyle> | ||
610 | </ownedStyle> | ||
611 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
612 | </ownedDiagramElements> | ||
613 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_5KlLoLW_EeamG-Ij7YnW7w" name="Constant" tooltipText="" incomingEdges="_5K_bULW_EeamG-Ij7YnW7w _OePWgLXAEeamG-Ij7YnW7w" width="12" height="10"> | ||
614 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Constant"/> | ||
615 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Constant"/> | ||
616 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_5K4toLW_EeamG-Ij7YnW7w"> | ||
617 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
618 | </decorations> | ||
619 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
620 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
621 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
622 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_5KlysLW_EeamG-Ij7YnW7w" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
623 | <customFeatures>backgroundColor</customFeatures> | ||
624 | <customFeatures>foregroundColor</customFeatures> | ||
625 | <labelFormat>italic</labelFormat> | ||
626 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/> | ||
627 | </ownedStyle> | ||
628 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
629 | </ownedDiagramElements> | ||
630 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_5KnA0LW_EeamG-Ij7YnW7w" name="DefinedElement" tooltipText="" incomingEdges="_5LApcLW_EeamG-Ij7YnW7w _H4YK4LXCEeamG-Ij7YnW7w _klNtULXDEeamG-Ij7YnW7w _QrIkAL5UEea19paI6HZj1w" width="12" height="10"> | ||
631 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/> | ||
632 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/> | ||
633 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_5K4tobW_EeamG-Ij7YnW7w"> | ||
634 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
635 | </decorations> | ||
636 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
637 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
638 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
639 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_5KnA0bW_EeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
640 | <customFeatures>backgroundColor</customFeatures> | ||
641 | <customFeatures>foregroundColor</customFeatures> | ||
642 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
643 | </ownedStyle> | ||
644 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
645 | </ownedDiagramElements> | ||
646 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_5KoO8LW_EeamG-Ij7YnW7w" name="Function" tooltipText="" incomingEdges="_5K7w8LW_EeamG-Ij7YnW7w _RpYc0LXAEeamG-Ij7YnW7w" width="12" height="10"> | ||
647 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Function"/> | ||
648 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Function"/> | ||
649 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_5K4torW_EeamG-Ij7YnW7w"> | ||
650 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
651 | </decorations> | ||
652 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
653 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
654 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
655 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_5Ko2ALW_EeamG-Ij7YnW7w" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
656 | <customFeatures>backgroundColor</customFeatures> | ||
657 | <customFeatures>foregroundColor</customFeatures> | ||
658 | <labelFormat>italic</labelFormat> | ||
659 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/> | ||
660 | </ownedStyle> | ||
661 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
662 | </ownedDiagramElements> | ||
663 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_5KqEILW_EeamG-Ij7YnW7w" name="Relation" tooltipText="" incomingEdges="_5K9mI7W_EeamG-Ij7YnW7w _P3BuYLXAEeamG-Ij7YnW7w" width="12" height="10"> | ||
664 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Relation"/> | ||
665 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Relation"/> | ||
666 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_5K4to7W_EeamG-Ij7YnW7w"> | ||
667 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
668 | </decorations> | ||
669 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
670 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
671 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
672 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_5KqrMLW_EeamG-Ij7YnW7w" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
673 | <customFeatures>backgroundColor</customFeatures> | ||
674 | <customFeatures>foregroundColor</customFeatures> | ||
675 | <labelFormat>italic</labelFormat> | ||
676 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/> | ||
677 | </ownedStyle> | ||
678 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
679 | </ownedDiagramElements> | ||
680 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_5Kr5ULW_EeamG-Ij7YnW7w" name="Type" tooltipText="" outgoingEdges="_5LB3kLW_EeamG-Ij7YnW7w" incomingEdges="_5K6i0LW_EeamG-Ij7YnW7w _5LB3kLW_EeamG-Ij7YnW7w _WfDLQLXAEeamG-Ij7YnW7w" width="12" height="10"> | ||
681 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type"/> | ||
682 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type"/> | ||
683 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_5K4tpLW_EeamG-Ij7YnW7w"> | ||
684 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
685 | </decorations> | ||
686 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
687 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
688 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
689 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_5KtHcLW_EeamG-Ij7YnW7w" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
690 | <customFeatures>backgroundColor</customFeatures> | ||
691 | <customFeatures>foregroundColor</customFeatures> | ||
692 | <labelFormat>italic</labelFormat> | ||
693 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/> | ||
694 | </ownedStyle> | ||
695 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
696 | <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_5K1qULW_EeamG-Ij7YnW7w" name="name : EString" visible="false" tooltipText=""> | ||
697 | <target xmi:type="ecore:EAttribute" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type/name"/> | ||
698 | <semanticElements xmi:type="ecore:EAttribute" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type/name"/> | ||
699 | <graphicalFilters xmi:type="diagram:HideFilter" xmi:id="_VCbcQLXAEeamG-Ij7YnW7w"/> | ||
700 | <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_5K24cLW_EeamG-Ij7YnW7w" labelAlignment="LEFT" description="_5K2RYLW_EeamG-Ij7YnW7w"> | ||
701 | <labelFormat>bold</labelFormat> | ||
702 | </ownedStyle> | ||
703 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
704 | </ownedElements> | ||
705 | <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_5K3fgLW_EeamG-Ij7YnW7w" name="isAbstract : EBoolean = false" visible="false" tooltipText=""> | ||
706 | <target xmi:type="ecore:EAttribute" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type/isAbstract"/> | ||
707 | <semanticElements xmi:type="ecore:EAttribute" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type/isAbstract"/> | ||
708 | <graphicalFilters xmi:type="diagram:HideFilter" xmi:id="_VCbcQbXAEeamG-Ij7YnW7w"/> | ||
709 | <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_5K4GkLW_EeamG-Ij7YnW7w" labelAlignment="LEFT" description="_5K2RYLW_EeamG-Ij7YnW7w"> | ||
710 | <labelFormat>bold</labelFormat> | ||
711 | </ownedStyle> | ||
712 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
713 | </ownedElements> | ||
714 | </ownedDiagramElements> | ||
715 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_5K6i0LW_EeamG-Ij7YnW7w" name="[0..*] types" sourceNode="_v4CCMLW_EeamG-Ij7YnW7w" targetNode="_5Kr5ULW_EeamG-Ij7YnW7w"> | ||
716 | <target xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/types"/> | ||
717 | <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/types"/> | ||
718 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_5K7J47W_EeamG-Ij7YnW7w" description="_5K7J4LW_EeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
719 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_5K7J5LW_EeamG-Ij7YnW7w" showIcon="false"> | ||
720 | <customFeatures>labelSize</customFeatures> | ||
721 | </centerLabelStyle> | ||
722 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_5K7J5bW_EeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
723 | <customFeatures>labelSize</customFeatures> | ||
724 | </endLabelStyle> | ||
725 | </ownedStyle> | ||
726 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
727 | </ownedDiagramElements> | ||
728 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_5K7w8LW_EeamG-Ij7YnW7w" name="[0..*] functions" sourceNode="_v4CCMLW_EeamG-Ij7YnW7w" targetNode="_5KoO8LW_EeamG-Ij7YnW7w"> | ||
729 | <target xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/functions"/> | ||
730 | <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/functions"/> | ||
731 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_5K9mILW_EeamG-Ij7YnW7w" description="_5K7J4LW_EeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
732 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_5K9mIbW_EeamG-Ij7YnW7w" showIcon="false"> | ||
733 | <customFeatures>labelSize</customFeatures> | ||
734 | </centerLabelStyle> | ||
735 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_5K9mIrW_EeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
736 | <customFeatures>labelSize</customFeatures> | ||
737 | </endLabelStyle> | ||
738 | </ownedStyle> | ||
739 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
740 | </ownedDiagramElements> | ||
741 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_5K9mI7W_EeamG-Ij7YnW7w" name="[0..*] relations" sourceNode="_v4CCMLW_EeamG-Ij7YnW7w" targetNode="_5KqEILW_EeamG-Ij7YnW7w"> | ||
742 | <target xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/relations"/> | ||
743 | <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/relations"/> | ||
744 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_5K-0QLW_EeamG-Ij7YnW7w" description="_5K7J4LW_EeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
745 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_5K-0QbW_EeamG-Ij7YnW7w" showIcon="false"> | ||
746 | <customFeatures>labelSize</customFeatures> | ||
747 | </centerLabelStyle> | ||
748 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_5K-0QrW_EeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
749 | <customFeatures>labelSize</customFeatures> | ||
750 | </endLabelStyle> | ||
751 | </ownedStyle> | ||
752 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
753 | </ownedDiagramElements> | ||
754 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_5K_bULW_EeamG-Ij7YnW7w" name="[0..*] constants" sourceNode="_v4CCMLW_EeamG-Ij7YnW7w" targetNode="_5KlLoLW_EeamG-Ij7YnW7w"> | ||
755 | <target xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/constants"/> | ||
756 | <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/constants"/> | ||
757 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_5LACYLW_EeamG-Ij7YnW7w" description="_5K7J4LW_EeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
758 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_5LACYbW_EeamG-Ij7YnW7w" showIcon="false"> | ||
759 | <customFeatures>labelSize</customFeatures> | ||
760 | </centerLabelStyle> | ||
761 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_5LACYrW_EeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
762 | <customFeatures>labelSize</customFeatures> | ||
763 | </endLabelStyle> | ||
764 | </ownedStyle> | ||
765 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
766 | </ownedDiagramElements> | ||
767 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_5LApcLW_EeamG-Ij7YnW7w" name="[0..*] elements" sourceNode="_v4CCMLW_EeamG-Ij7YnW7w" targetNode="_5KnA0LW_EeamG-Ij7YnW7w"> | ||
768 | <target xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/elements"/> | ||
769 | <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/elements"/> | ||
770 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_5LBQgLW_EeamG-Ij7YnW7w" description="_5K7J4LW_EeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
771 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_5LBQgbW_EeamG-Ij7YnW7w" showIcon="false"> | ||
772 | <customFeatures>labelSize</customFeatures> | ||
773 | </centerLabelStyle> | ||
774 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_5LBQgrW_EeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
775 | <customFeatures>labelSize</customFeatures> | ||
776 | </endLabelStyle> | ||
777 | </ownedStyle> | ||
778 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
779 | </ownedDiagramElements> | ||
780 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_5LB3kLW_EeamG-Ij7YnW7w" visible="false" sourceNode="_5Kr5ULW_EeamG-Ij7YnW7w" targetNode="_5Kr5ULW_EeamG-Ij7YnW7w" beginLabel="[0..*] supertypes" endLabel="[0..*] subtypes"> | ||
781 | <target xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type/subtypes"/> | ||
782 | <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type/subtypes"/> | ||
783 | <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type/supertypes"/> | ||
784 | <graphicalFilters xmi:type="diagram:HideFilter" xmi:id="__p-4ALW_EeamG-Ij7YnW7w"/> | ||
785 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_5LCeoLW_EeamG-Ij7YnW7w" sourceArrow="InputArrow" routingStyle="manhattan" strokeColor="0,0,0"> | ||
786 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='Bi-directional%20EC_EReference%20']/@style"/> | ||
787 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_5LCeobW_EeamG-Ij7YnW7w" showIcon="false"/> | ||
788 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_5LCeorW_EeamG-Ij7YnW7w" showIcon="false"/> | ||
789 | </ownedStyle> | ||
790 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='Bi-directional%20EC_EReference%20']"/> | ||
791 | </ownedDiagramElements> | ||
792 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_OeBUELXAEeamG-Ij7YnW7w" name="ConstantDeclaration" tooltipText="" outgoingEdges="_OePWgLXAEeamG-Ij7YnW7w" incomingEdges="_jxT2ELXBEeamG-Ij7YnW7w" width="12" height="10"> | ||
793 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//ConstantDeclaration"/> | ||
794 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//ConstantDeclaration"/> | ||
795 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_OeKeALXAEeamG-Ij7YnW7w"> | ||
796 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
797 | </decorations> | ||
798 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
799 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
800 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
801 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_OeB7ILXAEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
802 | <customFeatures>backgroundColor</customFeatures> | ||
803 | <customFeatures>foregroundColor</customFeatures> | ||
804 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
805 | </ownedStyle> | ||
806 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
807 | </ownedDiagramElements> | ||
808 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_OePWgLXAEeamG-Ij7YnW7w" sourceNode="_OeBUELXAEeamG-Ij7YnW7w" targetNode="_5KlLoLW_EeamG-Ij7YnW7w"> | ||
809 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//ConstantDeclaration"/> | ||
810 | <semanticElements xmi:type="ecore:EGenericType" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//ConstantDeclaration/@eGenericSuperTypes.0"/> | ||
811 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_jxRZ0LXBEeamG-Ij7YnW7w"> | ||
812 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
813 | </decorations> | ||
814 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_OeP9kLXAEeamG-Ij7YnW7w" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
815 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
816 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_OeP9kbXAEeamG-Ij7YnW7w" showIcon="false"> | ||
817 | <labelFormat>italic</labelFormat> | ||
818 | </beginLabelStyle> | ||
819 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_OeP9krXAEeamG-Ij7YnW7w" showIcon="false"/> | ||
820 | </ownedStyle> | ||
821 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
822 | </ownedDiagramElements> | ||
823 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_P22IMLXAEeamG-Ij7YnW7w" name="RelationDeclaration" tooltipText="" outgoingEdges="_P3BuYLXAEeamG-Ij7YnW7w" incomingEdges="_owbbcLXBEeamG-Ij7YnW7w" width="12" height="10"> | ||
824 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//RelationDeclaration"/> | ||
825 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//RelationDeclaration"/> | ||
826 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_P29c8LXAEeamG-Ij7YnW7w"> | ||
827 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
828 | </decorations> | ||
829 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
830 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
831 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
832 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_P22vQLXAEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
833 | <customFeatures>backgroundColor</customFeatures> | ||
834 | <customFeatures>foregroundColor</customFeatures> | ||
835 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
836 | </ownedStyle> | ||
837 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
838 | </ownedDiagramElements> | ||
839 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_P3BuYLXAEeamG-Ij7YnW7w" sourceNode="_P22IMLXAEeamG-Ij7YnW7w" targetNode="_5KqEILW_EeamG-Ij7YnW7w"> | ||
840 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//RelationDeclaration"/> | ||
841 | <semanticElements xmi:type="ecore:EGenericType" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//RelationDeclaration/@eGenericSuperTypes.0"/> | ||
842 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_jxRZ0bXBEeamG-Ij7YnW7w"> | ||
843 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
844 | </decorations> | ||
845 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_P3CVcLXAEeamG-Ij7YnW7w" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
846 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
847 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_P3CVcbXAEeamG-Ij7YnW7w" showIcon="false"> | ||
848 | <labelFormat>italic</labelFormat> | ||
849 | </beginLabelStyle> | ||
850 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_P3CVcrXAEeamG-Ij7YnW7w" showIcon="false"/> | ||
851 | </ownedStyle> | ||
852 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
853 | </ownedDiagramElements> | ||
854 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_RpETwLXAEeamG-Ij7YnW7w" name="FunctionDeclaration" tooltipText="" outgoingEdges="_RpYc0LXAEeamG-Ij7YnW7w" incomingEdges="_qsPn4LXBEeamG-Ij7YnW7w" width="12" height="10"> | ||
855 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//FunctionDeclaration"/> | ||
856 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//FunctionDeclaration"/> | ||
857 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_RpS9QLXAEeamG-Ij7YnW7w"> | ||
858 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
859 | </decorations> | ||
860 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
861 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
862 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
863 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_ezOjwLXHEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
864 | <customFeatures>backgroundColor</customFeatures> | ||
865 | <customFeatures>foregroundColor</customFeatures> | ||
866 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
867 | </ownedStyle> | ||
868 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
869 | </ownedDiagramElements> | ||
870 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_RpYc0LXAEeamG-Ij7YnW7w" sourceNode="_RpETwLXAEeamG-Ij7YnW7w" targetNode="_5KoO8LW_EeamG-Ij7YnW7w"> | ||
871 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//FunctionDeclaration"/> | ||
872 | <semanticElements xmi:type="ecore:EGenericType" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//FunctionDeclaration/@eGenericSuperTypes.0"/> | ||
873 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_jxRZ0rXBEeamG-Ij7YnW7w"> | ||
874 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
875 | </decorations> | ||
876 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_RpZD4LXAEeamG-Ij7YnW7w" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
877 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
878 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_RpZD4bXAEeamG-Ij7YnW7w" showIcon="false"> | ||
879 | <labelFormat>italic</labelFormat> | ||
880 | </beginLabelStyle> | ||
881 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_RpZD4rXAEeamG-Ij7YnW7w" showIcon="false"/> | ||
882 | </ownedStyle> | ||
883 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
884 | </ownedDiagramElements> | ||
885 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_WexecLXAEeamG-Ij7YnW7w" name="TypeDeclaration" tooltipText="" outgoingEdges="_WfDLQLXAEeamG-Ij7YnW7w" incomingEdges="_zIoI4LXCEeamG-Ij7YnW7w" width="12" height="10"> | ||
886 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//TypeDeclaration"/> | ||
887 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//TypeDeclaration"/> | ||
888 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_We8dkLXAEeamG-Ij7YnW7w"> | ||
889 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
890 | </decorations> | ||
891 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
892 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
893 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
894 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_WeyFgLXAEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
895 | <customFeatures>backgroundColor</customFeatures> | ||
896 | <customFeatures>foregroundColor</customFeatures> | ||
897 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
898 | </ownedStyle> | ||
899 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
900 | </ownedDiagramElements> | ||
901 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_WfDLQLXAEeamG-Ij7YnW7w" sourceNode="_WexecLXAEeamG-Ij7YnW7w" targetNode="_5Kr5ULW_EeamG-Ij7YnW7w"> | ||
902 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//TypeDeclaration"/> | ||
903 | <semanticElements xmi:type="ecore:EGenericType" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//TypeDeclaration/@eGenericSuperTypes.0"/> | ||
904 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_jxRZ07XBEeamG-Ij7YnW7w"> | ||
905 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
906 | </decorations> | ||
907 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_WfDLQbXAEeamG-Ij7YnW7w" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
908 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
909 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_WfDLQrXAEeamG-Ij7YnW7w" showIcon="false"> | ||
910 | <labelFormat>italic</labelFormat> | ||
911 | </beginLabelStyle> | ||
912 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_WfDLQ7XAEeamG-Ij7YnW7w" showIcon="false"/> | ||
913 | </ownedStyle> | ||
914 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
915 | </ownedDiagramElements> | ||
916 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_KP9iwLXBEeamG-Ij7YnW7w" name="PartialConstantInterpretation" tooltipText="" outgoingEdges="_jxT2ELXBEeamG-Ij7YnW7w" incomingEdges="_2Grq4LXBEeamG-Ij7YnW7w" width="12" height="10"> | ||
917 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialConstantInterpretation"/> | ||
918 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialConstantInterpretation"/> | ||
919 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
920 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
921 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
922 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_KP-J0LXBEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
923 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
924 | </ownedStyle> | ||
925 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
926 | </ownedDiagramElements> | ||
927 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_WTu2oLXBEeamG-Ij7YnW7w" name="PartialRelationInterpretation" tooltipText="" outgoingEdges="_owbbcLXBEeamG-Ij7YnW7w" incomingEdges="_23ljYLXBEeamG-Ij7YnW7w" width="12" height="10"> | ||
928 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialRelationInterpretation"/> | ||
929 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialRelationInterpretation"/> | ||
930 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
931 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
932 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
933 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_WTvdsLXBEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
934 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
935 | </ownedStyle> | ||
936 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
937 | </ownedDiagramElements> | ||
938 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_cCYbgLXBEeamG-Ij7YnW7w" name="PartialFunctionInterpretation" tooltipText="" outgoingEdges="_qsPn4LXBEeamG-Ij7YnW7w" incomingEdges="_3UBAsLXBEeamG-Ij7YnW7w" width="12" height="10"> | ||
939 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialFunctionInterpretation"/> | ||
940 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialFunctionInterpretation"/> | ||
941 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
942 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
943 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
944 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_cCZCkLXBEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
945 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
946 | </ownedStyle> | ||
947 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
948 | </ownedDiagramElements> | ||
949 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_jxT2ELXBEeamG-Ij7YnW7w" name="[1..1] interpretationOf" sourceNode="_KP9iwLXBEeamG-Ij7YnW7w" targetNode="_OeBUELXAEeamG-Ij7YnW7w"> | ||
950 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialConstantInterpretation/interpretationOf"/> | ||
951 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialConstantInterpretation/interpretationOf"/> | ||
952 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_nsVhMLXBEeamG-Ij7YnW7w" description="_v4J-ALW_EeamG-Ij7YnW7w" routingStyle="manhattan" strokeColor="0,0,0"> | ||
953 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_nsVhMbXBEeamG-Ij7YnW7w" showIcon="false"> | ||
954 | <labelFormat>bold</labelFormat> | ||
955 | </centerLabelStyle> | ||
956 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_nsVhMrXBEeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
957 | </ownedStyle> | ||
958 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
959 | </ownedDiagramElements> | ||
960 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_owbbcLXBEeamG-Ij7YnW7w" name="[1..1] interpretationOf" sourceNode="_WTu2oLXBEeamG-Ij7YnW7w" targetNode="_P22IMLXAEeamG-Ij7YnW7w"> | ||
961 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialRelationInterpretation/interpretationOf"/> | ||
962 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialRelationInterpretation/interpretationOf"/> | ||
963 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_p9nnULXBEeamG-Ij7YnW7w" description="_v4J-ALW_EeamG-Ij7YnW7w" routingStyle="manhattan" strokeColor="0,0,0"> | ||
964 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_p9nnUbXBEeamG-Ij7YnW7w" showIcon="false"> | ||
965 | <labelFormat>bold</labelFormat> | ||
966 | </centerLabelStyle> | ||
967 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_p9nnUrXBEeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
968 | </ownedStyle> | ||
969 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
970 | </ownedDiagramElements> | ||
971 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_qsPn4LXBEeamG-Ij7YnW7w" name="[1..1] interpretationOf" sourceNode="_cCYbgLXBEeamG-Ij7YnW7w" targetNode="_RpETwLXAEeamG-Ij7YnW7w"> | ||
972 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialFunctionInterpretation/interpretationOf"/> | ||
973 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialFunctionInterpretation/interpretationOf"/> | ||
974 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_r0Gn0LXBEeamG-Ij7YnW7w" description="_v4J-ALW_EeamG-Ij7YnW7w" routingStyle="manhattan" strokeColor="0,0,0"> | ||
975 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_r0Gn0bXBEeamG-Ij7YnW7w" showIcon="false"> | ||
976 | <labelFormat>bold</labelFormat> | ||
977 | </centerLabelStyle> | ||
978 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_r0Gn0rXBEeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
979 | </ownedStyle> | ||
980 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
981 | </ownedDiagramElements> | ||
982 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_2Grq4LXBEeamG-Ij7YnW7w" name="[0..*] partialconstantinterpretation" sourceNode="_gf_hMLW_EeamG-Ij7YnW7w" targetNode="_KP9iwLXBEeamG-Ij7YnW7w"> | ||
983 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/partialconstantinterpretation"/> | ||
984 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/partialconstantinterpretation"/> | ||
985 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_2GsR8LXBEeamG-Ij7YnW7w" description="_5K7J4LW_EeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
986 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_2GsR8bXBEeamG-Ij7YnW7w" showIcon="false"> | ||
987 | <customFeatures>labelSize</customFeatures> | ||
988 | </centerLabelStyle> | ||
989 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_2GsR8rXBEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
990 | <customFeatures>labelSize</customFeatures> | ||
991 | </endLabelStyle> | ||
992 | </ownedStyle> | ||
993 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
994 | </ownedDiagramElements> | ||
995 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_23ljYLXBEeamG-Ij7YnW7w" name="[0..*] partialrelationinterpretation" sourceNode="_gf_hMLW_EeamG-Ij7YnW7w" targetNode="_WTu2oLXBEeamG-Ij7YnW7w"> | ||
996 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/partialrelationinterpretation"/> | ||
997 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/partialrelationinterpretation"/> | ||
998 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_23mKcLXBEeamG-Ij7YnW7w" description="_5K7J4LW_EeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
999 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_23mKcbXBEeamG-Ij7YnW7w" showIcon="false"> | ||
1000 | <customFeatures>labelSize</customFeatures> | ||
1001 | </centerLabelStyle> | ||
1002 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_23mKcrXBEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
1003 | <customFeatures>labelSize</customFeatures> | ||
1004 | </endLabelStyle> | ||
1005 | </ownedStyle> | ||
1006 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1007 | </ownedDiagramElements> | ||
1008 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_3UBAsLXBEeamG-Ij7YnW7w" name="[0..*] partialfunctioninterpretation" sourceNode="_gf_hMLW_EeamG-Ij7YnW7w" targetNode="_cCYbgLXBEeamG-Ij7YnW7w"> | ||
1009 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/partialfunctioninterpretation"/> | ||
1010 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/partialfunctioninterpretation"/> | ||
1011 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_3UBnwLXBEeamG-Ij7YnW7w" description="_5K7J4LW_EeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1012 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_3UBnwbXBEeamG-Ij7YnW7w" showIcon="false"> | ||
1013 | <customFeatures>labelSize</customFeatures> | ||
1014 | </centerLabelStyle> | ||
1015 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_3UBnwrXBEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
1016 | <customFeatures>labelSize</customFeatures> | ||
1017 | </endLabelStyle> | ||
1018 | </ownedStyle> | ||
1019 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1020 | </ownedDiagramElements> | ||
1021 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_H4YK4LXCEeamG-Ij7YnW7w" name="[0..*] newElements" sourceNode="_gf_hMLW_EeamG-Ij7YnW7w" targetNode="_5KnA0LW_EeamG-Ij7YnW7w"> | ||
1022 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/newElements"/> | ||
1023 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/newElements"/> | ||
1024 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_H4Yx8LXCEeamG-Ij7YnW7w" description="_5K7J4LW_EeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1025 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_H4Yx8bXCEeamG-Ij7YnW7w" showIcon="false"> | ||
1026 | <customFeatures>labelSize</customFeatures> | ||
1027 | </centerLabelStyle> | ||
1028 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_H4Yx8rXCEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
1029 | <customFeatures>labelSize</customFeatures> | ||
1030 | </endLabelStyle> | ||
1031 | </ownedStyle> | ||
1032 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1033 | </ownedDiagramElements> | ||
1034 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_TgoAYLXCEeamG-Ij7YnW7w" name="PartialTypeInterpratation" tooltipText="" outgoingEdges="_zIoI4LXCEeamG-Ij7YnW7w _klNtULXDEeamG-Ij7YnW7w" incomingEdges="_2Sy-0LXCEeamG-Ij7YnW7w" width="12" height="10"> | ||
1035 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialTypeInterpratation"/> | ||
1036 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialTypeInterpratation"/> | ||
1037 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
1038 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
1039 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
1040 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_TgoncLXCEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
1041 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
1042 | </ownedStyle> | ||
1043 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
1044 | </ownedDiagramElements> | ||
1045 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_zIoI4LXCEeamG-Ij7YnW7w" name="[1..1] interpretationOf" sourceNode="_TgoAYLXCEeamG-Ij7YnW7w" targetNode="_WexecLXAEeamG-Ij7YnW7w"> | ||
1046 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialTypeInterpratation/interpretationOf"/> | ||
1047 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialTypeInterpratation/interpretationOf"/> | ||
1048 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_04uNgLXCEeamG-Ij7YnW7w" description="_v4J-ALW_EeamG-Ij7YnW7w" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1049 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_04uNgbXCEeamG-Ij7YnW7w" showIcon="false"> | ||
1050 | <labelFormat>bold</labelFormat> | ||
1051 | </centerLabelStyle> | ||
1052 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_04uNgrXCEeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
1053 | </ownedStyle> | ||
1054 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1055 | </ownedDiagramElements> | ||
1056 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_2Sy-0LXCEeamG-Ij7YnW7w" name="[0..*] partialtypeinterpratation" sourceNode="_gf_hMLW_EeamG-Ij7YnW7w" targetNode="_TgoAYLXCEeamG-Ij7YnW7w"> | ||
1057 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/partialtypeinterpratation"/> | ||
1058 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/partialtypeinterpratation"/> | ||
1059 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_2Szl4LXCEeamG-Ij7YnW7w" description="_5K7J4LW_EeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1060 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_2Szl4bXCEeamG-Ij7YnW7w" showIcon="false"> | ||
1061 | <customFeatures>labelSize</customFeatures> | ||
1062 | </centerLabelStyle> | ||
1063 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_2Szl4rXCEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
1064 | <customFeatures>labelSize</customFeatures> | ||
1065 | </endLabelStyle> | ||
1066 | </ownedStyle> | ||
1067 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1068 | </ownedDiagramElements> | ||
1069 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_klNtULXDEeamG-Ij7YnW7w" name="[0..*] elements" sourceNode="_TgoAYLXCEeamG-Ij7YnW7w" targetNode="_5KnA0LW_EeamG-Ij7YnW7w"> | ||
1070 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialTypeInterpratation/elements"/> | ||
1071 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialTypeInterpratation/elements"/> | ||
1072 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_M5BNcL3JEeaj7tVusjQpHg" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1073 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/> | ||
1074 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_M5BNcb3JEeaj7tVusjQpHg" showIcon="false"/> | ||
1075 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_M5BNcr3JEeaj7tVusjQpHg" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
1076 | </ownedStyle> | ||
1077 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1078 | </ownedDiagramElements> | ||
1079 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_QrIkAL5UEea19paI6HZj1w" name="[1..1] openWorldElementPrototype" sourceNode="_gf_hMLW_EeamG-Ij7YnW7w" targetNode="_5KnA0LW_EeamG-Ij7YnW7w"> | ||
1080 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/openWorldElementPrototype"/> | ||
1081 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/openWorldElementPrototype"/> | ||
1082 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_UkL5M75UEea19paI6HZj1w" description="_UkL5ML5UEea19paI6HZj1w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1083 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_UkL5NL5UEea19paI6HZj1w" showIcon="false"> | ||
1084 | <labelFormat>bold</labelFormat> | ||
1085 | </centerLabelStyle> | ||
1086 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_UkL5Nb5UEea19paI6HZj1w" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
1087 | </ownedStyle> | ||
1088 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1089 | </ownedDiagramElements> | ||
1090 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> | ||
1091 | <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_MAfXJbW_EeamG-Ij7YnW7w"/> | ||
1092 | <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> | ||
1093 | <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Package']"/> | ||
1094 | <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Validation']"/> | ||
1095 | <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Archetype']/@ownedRepresentationExtensions[name='Entities%20With%20Archetypes']/@layers[name='Archetypes']"/> | ||
1096 | <target xmi:type="ecore:EPackage" href="PartialInterpretation.ecore#/"/> | ||
1097 | </ownedRepresentations> | ||
1098 | <ownedRepresentations xmi:type="diagram:DSemanticDiagram" xmi:id="_ccUTkLXDEeamG-Ij7YnW7w" name="type interpratation"> | ||
1099 | <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_ccUTkbXDEeamG-Ij7YnW7w" source="DANNOTATION_CUSTOMIZATION_KEY"> | ||
1100 | <data xmi:type="diagram:ComputedStyleDescriptionRegistry" xmi:id="_ccUTkrXDEeamG-Ij7YnW7w"> | ||
1101 | <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_ccUTk7XDEeamG-Ij7YnW7w" routingStyle="manhattan"> | ||
1102 | <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1103 | <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_ccUTlLXDEeamG-Ij7YnW7w" showIcon="false" labelExpression="service:render"> | ||
1104 | <labelFormat>bold</labelFormat> | ||
1105 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1106 | </centerLabelStyleDescription> | ||
1107 | <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_ccUTlbXDEeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel"> | ||
1108 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/> | ||
1109 | </endLabelStyleDescription> | ||
1110 | </computedStyleDescriptions> | ||
1111 | <computedStyleDescriptions xmi:type="style:BundledImageDescription" xmi:id="_ccUTlrXDEeamG-Ij7YnW7w" labelExpression="service:render" labelAlignment="LEFT" tooltipExpression="service:renderTooltip" sizeComputationExpression="1"> | ||
1112 | <borderColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1113 | <labelFormat>bold</labelFormat> | ||
1114 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1115 | <color xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1116 | </computedStyleDescriptions> | ||
1117 | <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_ccUTl7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan"> | ||
1118 | <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1119 | <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_ccUTmLXDEeamG-Ij7YnW7w" showIcon="false" labelExpression="service:render"> | ||
1120 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1121 | </centerLabelStyleDescription> | ||
1122 | <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_ccUTmbXDEeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel"> | ||
1123 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/> | ||
1124 | </endLabelStyleDescription> | ||
1125 | </computedStyleDescriptions> | ||
1126 | <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_QlTfMMF9Eea_b6UyFzv22g" sourceArrow="FillDiamond" routingStyle="manhattan"> | ||
1127 | <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1128 | <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_QlTfMcF9Eea_b6UyFzv22g" showIcon="false" labelExpression="service:render"> | ||
1129 | <labelFormat>bold</labelFormat> | ||
1130 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1131 | </centerLabelStyleDescription> | ||
1132 | <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_QlTfMsF9Eea_b6UyFzv22g" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel"> | ||
1133 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/> | ||
1134 | </endLabelStyleDescription> | ||
1135 | </computedStyleDescriptions> | ||
1136 | </data> | ||
1137 | </ownedAnnotationEntries> | ||
1138 | <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_ccUTmrXDEeamG-Ij7YnW7w" source="GMF_DIAGRAMS"> | ||
1139 | <data xmi:type="notation:Diagram" xmi:id="_ccUTm7XDEeamG-Ij7YnW7w" type="Sirius" element="_ccUTkLXDEeamG-Ij7YnW7w" measurementUnit="Pixel"> | ||
1140 | <children xmi:type="notation:Node" xmi:id="_ccUTnLXDEeamG-Ij7YnW7w" type="2003" element="_ccU7VbXDEeamG-Ij7YnW7w"> | ||
1141 | <children xmi:type="notation:Node" xmi:id="_ccUTnbXDEeamG-Ij7YnW7w" type="5007"/> | ||
1142 | <children xmi:type="notation:Node" xmi:id="_ccUTnrXDEeamG-Ij7YnW7w" type="7004"> | ||
1143 | <children xmi:type="notation:Node" xmi:id="_QlZl0MF9Eea_b6UyFzv22g" type="3010" element="_QlJHIMF9Eea_b6UyFzv22g"> | ||
1144 | <styles xmi:type="notation:FontStyle" xmi:id="_QlZl0cF9Eea_b6UyFzv22g" fontName="Segoe UI" fontHeight="8" bold="true"/> | ||
1145 | <layoutConstraint xmi:type="notation:Location" xmi:id="_QlZl0sF9Eea_b6UyFzv22g"/> | ||
1146 | </children> | ||
1147 | <children xmi:type="notation:Node" xmi:id="_QlaM4MF9Eea_b6UyFzv22g" type="3010" element="_QlLjYMF9Eea_b6UyFzv22g"> | ||
1148 | <styles xmi:type="notation:FontStyle" xmi:id="_QlaM4cF9Eea_b6UyFzv22g" fontName="Segoe UI" fontHeight="8" bold="true"/> | ||
1149 | <layoutConstraint xmi:type="notation:Location" xmi:id="_QlaM4sF9Eea_b6UyFzv22g"/> | ||
1150 | </children> | ||
1151 | <styles xmi:type="notation:SortingStyle" xmi:id="_ccUTn7XDEeamG-Ij7YnW7w"/> | ||
1152 | <styles xmi:type="notation:FilteringStyle" xmi:id="_ccUToLXDEeamG-Ij7YnW7w"/> | ||
1153 | </children> | ||
1154 | <styles xmi:type="notation:ShapeStyle" xmi:id="_ccUTobXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
1155 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccUTorXDEeamG-Ij7YnW7w" x="5" y="470" width="178" height="63"/> | ||
1156 | </children> | ||
1157 | <children xmi:type="notation:Node" xmi:id="_ccUTo7XDEeamG-Ij7YnW7w" type="2003" element="_ccU7V7XDEeamG-Ij7YnW7w"> | ||
1158 | <children xmi:type="notation:Node" xmi:id="_ccUTpLXDEeamG-Ij7YnW7w" type="5007"/> | ||
1159 | <children xmi:type="notation:Node" xmi:id="_ccUTpbXDEeamG-Ij7YnW7w" type="7004"> | ||
1160 | <styles xmi:type="notation:SortingStyle" xmi:id="_ccUTprXDEeamG-Ij7YnW7w"/> | ||
1161 | <styles xmi:type="notation:FilteringStyle" xmi:id="_ccUTp7XDEeamG-Ij7YnW7w"/> | ||
1162 | </children> | ||
1163 | <styles xmi:type="notation:ShapeStyle" xmi:id="_ccUTqLXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" fillColor="8047085"/> | ||
1164 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccUTqbXDEeamG-Ij7YnW7w" x="15" y="45"/> | ||
1165 | </children> | ||
1166 | <children xmi:type="notation:Node" xmi:id="_ccUTsbXDEeamG-Ij7YnW7w" type="2003" element="_ccU7YbXDEeamG-Ij7YnW7w"> | ||
1167 | <children xmi:type="notation:Node" xmi:id="_ccUTsrXDEeamG-Ij7YnW7w" type="5007"/> | ||
1168 | <children xmi:type="notation:Node" xmi:id="_ccUTs7XDEeamG-Ij7YnW7w" type="7004"> | ||
1169 | <styles xmi:type="notation:SortingStyle" xmi:id="_ccUTtLXDEeamG-Ij7YnW7w"/> | ||
1170 | <styles xmi:type="notation:FilteringStyle" xmi:id="_ccUTtbXDEeamG-Ij7YnW7w"/> | ||
1171 | </children> | ||
1172 | <styles xmi:type="notation:ShapeStyle" xmi:id="_ccUTtrXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" fillColor="8047085"/> | ||
1173 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccUTt7XDEeamG-Ij7YnW7w" x="247" y="165" height="41"/> | ||
1174 | </children> | ||
1175 | <children xmi:type="notation:Node" xmi:id="_ccUTxrXDEeamG-Ij7YnW7w" type="2003" element="_ccU7arXDEeamG-Ij7YnW7w"> | ||
1176 | <children xmi:type="notation:Node" xmi:id="_ccUTx7XDEeamG-Ij7YnW7w" type="5007"/> | ||
1177 | <children xmi:type="notation:Node" xmi:id="_ccUTyLXDEeamG-Ij7YnW7w" type="7004"> | ||
1178 | <children xmi:type="notation:Node" xmi:id="_ccUTybXDEeamG-Ij7YnW7w" visible="false" type="3010" element="_ccU7bbXDEeamG-Ij7YnW7w"> | ||
1179 | <styles xmi:type="notation:FontStyle" xmi:id="_ccUTyrXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" bold="true"/> | ||
1180 | <layoutConstraint xmi:type="notation:Location" xmi:id="_ccUTy7XDEeamG-Ij7YnW7w"/> | ||
1181 | </children> | ||
1182 | <children xmi:type="notation:Node" xmi:id="_ccUTzLXDEeamG-Ij7YnW7w" visible="false" type="3010" element="_ccU7cLXDEeamG-Ij7YnW7w"> | ||
1183 | <styles xmi:type="notation:FontStyle" xmi:id="_ccUTzbXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" bold="true"/> | ||
1184 | <layoutConstraint xmi:type="notation:Location" xmi:id="_ccUTzrXDEeamG-Ij7YnW7w"/> | ||
1185 | </children> | ||
1186 | <styles xmi:type="notation:SortingStyle" xmi:id="_ccUTz7XDEeamG-Ij7YnW7w"/> | ||
1187 | <styles xmi:type="notation:FilteringStyle" xmi:id="_ccUT0LXDEeamG-Ij7YnW7w"/> | ||
1188 | </children> | ||
1189 | <styles xmi:type="notation:ShapeStyle" xmi:id="_ccUT0bXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" italic="true" fillColor="8047085"/> | ||
1190 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccUT0rXDEeamG-Ij7YnW7w" x="387" y="165" height="38"/> | ||
1191 | </children> | ||
1192 | <children xmi:type="notation:Node" xmi:id="_ccUT6LXDEeamG-Ij7YnW7w" type="2003" element="_ccU7pLXDEeamG-Ij7YnW7w"> | ||
1193 | <children xmi:type="notation:Node" xmi:id="_ccUT6bXDEeamG-Ij7YnW7w" type="5007"/> | ||
1194 | <children xmi:type="notation:Node" xmi:id="_ccUT6rXDEeamG-Ij7YnW7w" type="7004"> | ||
1195 | <styles xmi:type="notation:SortingStyle" xmi:id="_ccUT67XDEeamG-Ij7YnW7w"/> | ||
1196 | <styles xmi:type="notation:FilteringStyle" xmi:id="_ccUT7LXDEeamG-Ij7YnW7w"/> | ||
1197 | </children> | ||
1198 | <styles xmi:type="notation:ShapeStyle" xmi:id="_ccUT7bXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" fillColor="8047085"/> | ||
1199 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccUT7rXDEeamG-Ij7YnW7w" x="387" y="222" height="43"/> | ||
1200 | </children> | ||
1201 | <children xmi:type="notation:Node" xmi:id="_ccUUBLXDEeamG-Ij7YnW7w" type="2003" element="_ccU7zrXDEeamG-Ij7YnW7w"> | ||
1202 | <children xmi:type="notation:Node" xmi:id="_ccUUBbXDEeamG-Ij7YnW7w" type="5007"/> | ||
1203 | <children xmi:type="notation:Node" xmi:id="_ccUUBrXDEeamG-Ij7YnW7w" type="7004"> | ||
1204 | <styles xmi:type="notation:SortingStyle" xmi:id="_ccUUB7XDEeamG-Ij7YnW7w"/> | ||
1205 | <styles xmi:type="notation:FilteringStyle" xmi:id="_ccUUCLXDEeamG-Ij7YnW7w"/> | ||
1206 | </children> | ||
1207 | <styles xmi:type="notation:ShapeStyle" xmi:id="_ccUUCbXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
1208 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccUUCrXDEeamG-Ij7YnW7w" x="370" y="355" width="168" height="63"/> | ||
1209 | </children> | ||
1210 | <styles xmi:type="notation:DiagramStyle" xmi:id="_ccUUC7XDEeamG-Ij7YnW7w"/> | ||
1211 | <edges xmi:type="notation:Edge" xmi:id="_ccUUDLXDEeamG-Ij7YnW7w" type="4001" element="_ccU7WrXDEeamG-Ij7YnW7w" source="_ccUTnLXDEeamG-Ij7YnW7w" target="_ccUTo7XDEeamG-Ij7YnW7w"> | ||
1212 | <children xmi:type="notation:Node" xmi:id="_ccUUDbXDEeamG-Ij7YnW7w" type="6001"> | ||
1213 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccUUDrXDEeamG-Ij7YnW7w" x="-30"/> | ||
1214 | </children> | ||
1215 | <children xmi:type="notation:Node" xmi:id="_ccUUD7XDEeamG-Ij7YnW7w" type="6002"> | ||
1216 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccUUELXDEeamG-Ij7YnW7w" x="61"/> | ||
1217 | </children> | ||
1218 | <children xmi:type="notation:Node" xmi:id="_ccUUEbXDEeamG-Ij7YnW7w" type="6003"> | ||
1219 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccUUErXDEeamG-Ij7YnW7w" x="-38"/> | ||
1220 | </children> | ||
1221 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_ccUUE7XDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
1222 | <styles xmi:type="notation:FontStyle" xmi:id="_ccUUFLXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1223 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ccUUFbXDEeamG-Ij7YnW7w" points="[-22, -49, -16, 396]$[-22, -396, -16, 49]"/> | ||
1224 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccUUFrXDEeamG-Ij7YnW7w" id="(0.42617349970291146,1.1311475409836065)"/> | ||
1225 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccUUF7XDEeamG-Ij7YnW7w" id="(0.5,0.5)"/> | ||
1226 | </edges> | ||
1227 | <edges xmi:type="notation:Edge" xmi:id="_ccUUGLXDEeamG-Ij7YnW7w" type="4001" element="_ccU7c7XDEeamG-Ij7YnW7w" source="_ccUTo7XDEeamG-Ij7YnW7w" target="_ccUTxrXDEeamG-Ij7YnW7w"> | ||
1228 | <children xmi:type="notation:Node" xmi:id="_ccUUGbXDEeamG-Ij7YnW7w" type="6001"> | ||
1229 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccUUGrXDEeamG-Ij7YnW7w" x="61" y="11"/> | ||
1230 | </children> | ||
1231 | <children xmi:type="notation:Node" xmi:id="_ccUUG7XDEeamG-Ij7YnW7w" type="6002"> | ||
1232 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccUUHLXDEeamG-Ij7YnW7w" x="42" y="10"/> | ||
1233 | </children> | ||
1234 | <children xmi:type="notation:Node" xmi:id="_ccUUHbXDEeamG-Ij7YnW7w" type="6003"> | ||
1235 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccUUHrXDEeamG-Ij7YnW7w" x="43" y="9"/> | ||
1236 | </children> | ||
1237 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_ccUUH7XDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
1238 | <styles xmi:type="notation:FontStyle" xmi:id="_ccUUILXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1239 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ccUUIbXDEeamG-Ij7YnW7w" points="[59, 20, -313, -206]$[386, 20, 14, -206]$[386, 120, 14, -106]"/> | ||
1240 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccUUIrXDEeamG-Ij7YnW7w" id="(0.5,0.0)"/> | ||
1241 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccUUI7XDEeamG-Ij7YnW7w" id="(0.5,2.7222222222222223)"/> | ||
1242 | </edges> | ||
1243 | <edges xmi:type="notation:Edge" xmi:id="_ccU6oLXDEeamG-Ij7YnW7w" type="4001" element="_ccU7g7XDEeamG-Ij7YnW7w" source="_ccUTo7XDEeamG-Ij7YnW7w" target="_ccUTsbXDEeamG-Ij7YnW7w"> | ||
1244 | <children xmi:type="notation:Node" xmi:id="_ccU6obXDEeamG-Ij7YnW7w" type="6001"> | ||
1245 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU6orXDEeamG-Ij7YnW7w" x="-6" y="-10"/> | ||
1246 | </children> | ||
1247 | <children xmi:type="notation:Node" xmi:id="_ccU6o7XDEeamG-Ij7YnW7w" type="6002"> | ||
1248 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU6pLXDEeamG-Ij7YnW7w" x="54" y="10"/> | ||
1249 | </children> | ||
1250 | <children xmi:type="notation:Node" xmi:id="_ccU6pbXDEeamG-Ij7YnW7w" type="6003"> | ||
1251 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU6prXDEeamG-Ij7YnW7w" x="-10" y="114"/> | ||
1252 | </children> | ||
1253 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_ccU6p7XDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
1254 | <styles xmi:type="notation:FontStyle" xmi:id="_ccU6qLXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1255 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ccU6qbXDEeamG-Ij7YnW7w" points="[59, 70, -173, -148]$[208, 70, -24, -148]$[208, 120, -24, -98]"/> | ||
1256 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccU6qrXDEeamG-Ij7YnW7w" id="(0.5,0.0)"/> | ||
1257 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccU6q7XDEeamG-Ij7YnW7w" id="(0.5,2.5128205128205128)"/> | ||
1258 | </edges> | ||
1259 | <edges xmi:type="notation:Edge" xmi:id="_ccU6rLXDEeamG-Ij7YnW7w" visible="false" type="4001" element="_ccU7h7XDEeamG-Ij7YnW7w" source="_ccUTxrXDEeamG-Ij7YnW7w" target="_ccUTxrXDEeamG-Ij7YnW7w"> | ||
1260 | <children xmi:type="notation:Node" xmi:id="_ccU6rbXDEeamG-Ij7YnW7w" type="6001"> | ||
1261 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU6rrXDEeamG-Ij7YnW7w" y="-10"/> | ||
1262 | </children> | ||
1263 | <children xmi:type="notation:Node" xmi:id="_ccU6r7XDEeamG-Ij7YnW7w" type="6002"> | ||
1264 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU6sLXDEeamG-Ij7YnW7w" y="10"/> | ||
1265 | </children> | ||
1266 | <children xmi:type="notation:Node" xmi:id="_ccU6sbXDEeamG-Ij7YnW7w" type="6003"> | ||
1267 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU6srXDEeamG-Ij7YnW7w" y="10"/> | ||
1268 | </children> | ||
1269 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_ccU6s7XDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
1270 | <styles xmi:type="notation:FontStyle" xmi:id="_ccU6tLXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
1271 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ccU6tbXDEeamG-Ij7YnW7w" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/> | ||
1272 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccU6trXDEeamG-Ij7YnW7w" id="(0.5,1.3611111111111112)"/> | ||
1273 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccU6t7XDEeamG-Ij7YnW7w" id="(0.5,1.3611111111111112)"/> | ||
1274 | </edges> | ||
1275 | <edges xmi:type="notation:Edge" xmi:id="_ccU63LXDEeamG-Ij7YnW7w" type="4001" element="_ccU7p7XDEeamG-Ij7YnW7w" source="_ccUT6LXDEeamG-Ij7YnW7w" target="_ccUTxrXDEeamG-Ij7YnW7w"> | ||
1276 | <children xmi:type="notation:Node" xmi:id="_ccU63bXDEeamG-Ij7YnW7w" type="6001"> | ||
1277 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU63rXDEeamG-Ij7YnW7w" x="3" y="-1"/> | ||
1278 | </children> | ||
1279 | <children xmi:type="notation:Node" xmi:id="_ccU637XDEeamG-Ij7YnW7w" type="6002"> | ||
1280 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU64LXDEeamG-Ij7YnW7w"/> | ||
1281 | </children> | ||
1282 | <children xmi:type="notation:Node" xmi:id="_ccU64bXDEeamG-Ij7YnW7w" type="6003"> | ||
1283 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU64rXDEeamG-Ij7YnW7w" x="-13" y="9"/> | ||
1284 | </children> | ||
1285 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_ccU647XDEeamG-Ij7YnW7w" routing="Tree"/> | ||
1286 | <styles xmi:type="notation:FontStyle" xmi:id="_ccU65LXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
1287 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ccU65bXDEeamG-Ij7YnW7w" points="[0, -49, 0, 4]$[0, -61, 0, -8]$[-1, -61, -1, -8]$[-1, -67, -1, -14]"/> | ||
1288 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccU65rXDEeamG-Ij7YnW7w" id="(0.5,1.1951219512195121)"/> | ||
1289 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccU657XDEeamG-Ij7YnW7w" id="(0.5,1.3611111111111112)"/> | ||
1290 | </edges> | ||
1291 | <edges xmi:type="notation:Edge" xmi:id="_ccU7MLXDEeamG-Ij7YnW7w" type="4001" element="_ccU7yrXDEeamG-Ij7YnW7w" source="_ccUTnLXDEeamG-Ij7YnW7w" target="_ccUTsbXDEeamG-Ij7YnW7w"> | ||
1292 | <children xmi:type="notation:Node" xmi:id="_ccU7MbXDEeamG-Ij7YnW7w" type="6001"> | ||
1293 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU7MrXDEeamG-Ij7YnW7w" x="15" y="-55"/> | ||
1294 | </children> | ||
1295 | <children xmi:type="notation:Node" xmi:id="_ccU7M7XDEeamG-Ij7YnW7w" type="6002"> | ||
1296 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU7NLXDEeamG-Ij7YnW7w" x="90" y="-208"/> | ||
1297 | </children> | ||
1298 | <children xmi:type="notation:Node" xmi:id="_ccU7NbXDEeamG-Ij7YnW7w" type="6003"> | ||
1299 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU7NrXDEeamG-Ij7YnW7w" x="23" y="10"/> | ||
1300 | </children> | ||
1301 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_ccU7N7XDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
1302 | <styles xmi:type="notation:FontStyle" xmi:id="_ccU7OLXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1303 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ccU7ObXDEeamG-Ij7YnW7w" points="[119, 10, -111, 296]$[233, 10, 3, 296]$[233, -286, 3, 0]"/> | ||
1304 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccU7OrXDEeamG-Ij7YnW7w" id="(0.32386363636363635,0.3278688524590164)"/> | ||
1305 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccU7O7XDEeamG-Ij7YnW7w" id="(0.3813559322033898,1.0)"/> | ||
1306 | </edges> | ||
1307 | <edges xmi:type="notation:Edge" xmi:id="_ccU7PLXDEeamG-Ij7YnW7w" type="4001" element="_ccU70LXDEeamG-Ij7YnW7w" source="_ccUUBLXDEeamG-Ij7YnW7w" target="_ccUT6LXDEeamG-Ij7YnW7w"> | ||
1308 | <children xmi:type="notation:Node" xmi:id="_ccU7PbXDEeamG-Ij7YnW7w" type="6001"> | ||
1309 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU7PrXDEeamG-Ij7YnW7w" x="3" y="71"/> | ||
1310 | </children> | ||
1311 | <children xmi:type="notation:Node" xmi:id="_ccU7P7XDEeamG-Ij7YnW7w" type="6002"> | ||
1312 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU7QLXDEeamG-Ij7YnW7w" x="20" y="6"/> | ||
1313 | </children> | ||
1314 | <children xmi:type="notation:Node" xmi:id="_ccU7QbXDEeamG-Ij7YnW7w" type="6003"> | ||
1315 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU7QrXDEeamG-Ij7YnW7w" x="-32" y="2"/> | ||
1316 | </children> | ||
1317 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_ccU7Q7XDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
1318 | <styles xmi:type="notation:FontStyle" xmi:id="_ccU7RLXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1319 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ccU7RbXDEeamG-Ij7YnW7w" points="[-30, 0, -15, 92]$[-30, -92, -15, 0]"/> | ||
1320 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccU7RrXDEeamG-Ij7YnW7w" id="(0.6325301204819277,0.0)"/> | ||
1321 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccU7R7XDEeamG-Ij7YnW7w" id="(0.6186440677966102,1.0)"/> | ||
1322 | </edges> | ||
1323 | <edges xmi:type="notation:Edge" xmi:id="_ccU7SLXDEeamG-Ij7YnW7w" type="4001" element="_ccU71LXDEeamG-Ij7YnW7w" source="_ccUTnLXDEeamG-Ij7YnW7w" target="_ccUUBLXDEeamG-Ij7YnW7w"> | ||
1324 | <children xmi:type="notation:Node" xmi:id="_ccU7SbXDEeamG-Ij7YnW7w" type="6001"> | ||
1325 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU7SrXDEeamG-Ij7YnW7w" x="162" y="-37"/> | ||
1326 | </children> | ||
1327 | <children xmi:type="notation:Node" xmi:id="_ccU7S7XDEeamG-Ij7YnW7w" type="6002"> | ||
1328 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU7TLXDEeamG-Ij7YnW7w" x="50" y="11"/> | ||
1329 | </children> | ||
1330 | <children xmi:type="notation:Node" xmi:id="_ccU7TbXDEeamG-Ij7YnW7w" type="6003"> | ||
1331 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ccU7TrXDEeamG-Ij7YnW7w" x="-52" y="-170"/> | ||
1332 | </children> | ||
1333 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_ccU7T7XDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
1334 | <styles xmi:type="notation:FontStyle" xmi:id="_ccU7ULXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1335 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ccU7UbXDEeamG-Ij7YnW7w" points="[151, -17, -380, 147]$[430, -17, -101, 147]$[430, -134, -101, 30]"/> | ||
1336 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccU7UrXDEeamG-Ij7YnW7w" id="(0.0,1.3114754098360655)"/> | ||
1337 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ccU7U7XDEeamG-Ij7YnW7w" id="(1.0,0.5081967213114754)"/> | ||
1338 | </edges> | ||
1339 | <edges xmi:type="notation:Edge" xmi:id="_klahoLXDEeamG-Ij7YnW7w" type="4001" element="_klCuMLXDEeamG-Ij7YnW7w" source="_ccUUBLXDEeamG-Ij7YnW7w" target="_ccUTsbXDEeamG-Ij7YnW7w"> | ||
1340 | <children xmi:type="notation:Node" xmi:id="_klbIsLXDEeamG-Ij7YnW7w" type="6001"> | ||
1341 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_klbIsbXDEeamG-Ij7YnW7w" x="-2" y="54"/> | ||
1342 | </children> | ||
1343 | <children xmi:type="notation:Node" xmi:id="_klbIsrXDEeamG-Ij7YnW7w" type="6002"> | ||
1344 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_klbIs7XDEeamG-Ij7YnW7w" x="5" y="67"/> | ||
1345 | </children> | ||
1346 | <children xmi:type="notation:Node" xmi:id="_klbItLXDEeamG-Ij7YnW7w" type="6003"> | ||
1347 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_klbItbXDEeamG-Ij7YnW7w" x="-2" y="10"/> | ||
1348 | </children> | ||
1349 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_klahobXDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
1350 | <styles xmi:type="notation:FontStyle" xmi:id="_klahorXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1351 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_klaho7XDEeamG-Ij7YnW7w" points="[-45, 30, 50, 181]$[-95, 30, 0, 181]$[-95, -151, 0, 0]"/> | ||
1352 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_klbItrXDEeamG-Ij7YnW7w" id="(0.2710843373493976,0.0)"/> | ||
1353 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_klbIt7XDEeamG-Ij7YnW7w" id="(0.6186440677966102,1.0)"/> | ||
1354 | </edges> | ||
1355 | <edges xmi:type="notation:Edge" xmi:id="_QlbbAMF9Eea_b6UyFzv22g" type="4001" element="_QlS4IMF9Eea_b6UyFzv22g" source="_ccUTnLXDEeamG-Ij7YnW7w" target="_ccUTsbXDEeamG-Ij7YnW7w"> | ||
1356 | <children xmi:type="notation:Node" xmi:id="_QlcCEMF9Eea_b6UyFzv22g" type="6001"> | ||
1357 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QlcCEcF9Eea_b6UyFzv22g" y="-10"/> | ||
1358 | </children> | ||
1359 | <children xmi:type="notation:Node" xmi:id="_QlcCEsF9Eea_b6UyFzv22g" type="6002"> | ||
1360 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QlcCE8F9Eea_b6UyFzv22g" y="10"/> | ||
1361 | </children> | ||
1362 | <children xmi:type="notation:Node" xmi:id="_QlcCFMF9Eea_b6UyFzv22g" type="6003"> | ||
1363 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QlcCFcF9Eea_b6UyFzv22g" y="10"/> | ||
1364 | </children> | ||
1365 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_QlbbAcF9Eea_b6UyFzv22g" routing="Rectilinear"/> | ||
1366 | <styles xmi:type="notation:FontStyle" xmi:id="_QlbbAsF9Eea_b6UyFzv22g" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1367 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_QlbbA8F9Eea_b6UyFzv22g" points="[5, 490, 5, 490]$[247, 165, 247, 165]"/> | ||
1368 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Qld3QMF9Eea_b6UyFzv22g" id="(0.42617349970291146,0.7049180327868853)"/> | ||
1369 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Qld3QcF9Eea_b6UyFzv22g" id="(0.5,0.4878048780487805)"/> | ||
1370 | </edges> | ||
1371 | <edges xmi:type="notation:Edge" xmi:id="_bL5d4NUaEear_rf-Vav0Gw" type="4001" element="_bLJ3ANUaEear_rf-Vav0Gw" source="_ccUUBLXDEeamG-Ij7YnW7w" target="_ccUUBLXDEeamG-Ij7YnW7w"> | ||
1372 | <children xmi:type="notation:Node" xmi:id="_bMEdANUaEear_rf-Vav0Gw" type="6001"> | ||
1373 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bMEdAdUaEear_rf-Vav0Gw" x="-3" y="-10"/> | ||
1374 | </children> | ||
1375 | <children xmi:type="notation:Node" xmi:id="_bMFrINUaEear_rf-Vav0Gw" type="6002"> | ||
1376 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bMFrIdUaEear_rf-Vav0Gw" x="16" y="10"/> | ||
1377 | </children> | ||
1378 | <children xmi:type="notation:Node" xmi:id="_bMGSMNUaEear_rf-Vav0Gw" type="6003"> | ||
1379 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bMGSMdUaEear_rf-Vav0Gw" x="6" y="4"/> | ||
1380 | </children> | ||
1381 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_bL5d4dUaEear_rf-Vav0Gw" routing="Rectilinear"/> | ||
1382 | <styles xmi:type="notation:FontStyle" xmi:id="_bL5d4tUaEear_rf-Vav0Gw" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1383 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_bL5d49UaEear_rf-Vav0Gw" points="[0, 25, 6, 45]$[59, 25, 65, 45]$[59, 55, 65, 75]$[-41, 55, -35, 75]$[-41, 41, -35, 61]"/> | ||
1384 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bMHgUNUaEear_rf-Vav0Gw" id="(1.0,0.32786885245901637)"/> | ||
1385 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_bMHgUdUaEear_rf-Vav0Gw" id="(0.963855421686747,0.0)"/> | ||
1386 | </edges> | ||
1387 | <edges xmi:type="notation:Edge" xmi:id="_6YFT4OW_EearOPSxyAbpKw" type="4001" element="_6W19wOW_EearOPSxyAbpKw" source="_ccUTnLXDEeamG-Ij7YnW7w" target="_ccUTo7XDEeamG-Ij7YnW7w"> | ||
1388 | <children xmi:type="notation:Node" xmi:id="_6YWZoOW_EearOPSxyAbpKw" type="6001"> | ||
1389 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6YWZoeW_EearOPSxyAbpKw" y="-10"/> | ||
1390 | </children> | ||
1391 | <children xmi:type="notation:Node" xmi:id="_6YduYOW_EearOPSxyAbpKw" type="6002"> | ||
1392 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6YduYeW_EearOPSxyAbpKw" y="10"/> | ||
1393 | </children> | ||
1394 | <children xmi:type="notation:Node" xmi:id="_6YeVcOW_EearOPSxyAbpKw" type="6003"> | ||
1395 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6YeVceW_EearOPSxyAbpKw" y="10"/> | ||
1396 | </children> | ||
1397 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_6YFT4eW_EearOPSxyAbpKw" routing="Rectilinear"/> | ||
1398 | <styles xmi:type="notation:FontStyle" xmi:id="_6YFT4uW_EearOPSxyAbpKw" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1399 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_6YFT4-W_EearOPSxyAbpKw" points="[5, 470, 5, 470]$[15, 45, 15, 45]"/> | ||
1400 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6Y3-EOW_EearOPSxyAbpKw" id="(0.5,0.49206349206349204)"/> | ||
1401 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6Y3-EeW_EearOPSxyAbpKw" id="(0.5,0.5)"/> | ||
1402 | </edges> | ||
1403 | <edges xmi:type="notation:Edge" xmi:id="_N_ukAPMVEeagPYxz1ZWLIQ" type="4001" element="_N-rbIPMVEeagPYxz1ZWLIQ" source="_ccUTnLXDEeamG-Ij7YnW7w" target="_ccUUBLXDEeamG-Ij7YnW7w"> | ||
1404 | <children xmi:type="notation:Node" xmi:id="_N_vLEPMVEeagPYxz1ZWLIQ" type="6001"> | ||
1405 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N_vLEfMVEeagPYxz1ZWLIQ" x="-22" y="-10"/> | ||
1406 | </children> | ||
1407 | <children xmi:type="notation:Node" xmi:id="_N_vLEvMVEeagPYxz1ZWLIQ" type="6002"> | ||
1408 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N_vLE_MVEeagPYxz1ZWLIQ" x="-7" y="10"/> | ||
1409 | </children> | ||
1410 | <children xmi:type="notation:Node" xmi:id="_N_vLFPMVEeagPYxz1ZWLIQ" type="6003"> | ||
1411 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_N_vLFfMVEeagPYxz1ZWLIQ" x="7" y="10"/> | ||
1412 | </children> | ||
1413 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_N_ukAfMVEeagPYxz1ZWLIQ" routing="Rectilinear"/> | ||
1414 | <styles xmi:type="notation:FontStyle" xmi:id="_N_ukAvMVEeagPYxz1ZWLIQ" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1415 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_N_ukA_MVEeagPYxz1ZWLIQ" points="[0, 45, -272, 114]$[272, 45, 0, 114]$[272, -69, 0, 0]"/> | ||
1416 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_N_vyIPMVEeagPYxz1ZWLIQ" id="(1.0,0.2459016393442623)"/> | ||
1417 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_N_vyIfMVEeagPYxz1ZWLIQ" id="(0.5,1.0)"/> | ||
1418 | </edges> | ||
1419 | </data> | ||
1420 | </ownedAnnotationEntries> | ||
1421 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_ccU7VbXDEeamG-Ij7YnW7w" name="PartialInterpretation" tooltipText="" outgoingEdges="_ccU7WrXDEeamG-Ij7YnW7w _ccU7yrXDEeamG-Ij7YnW7w _ccU71LXDEeamG-Ij7YnW7w _QlS4IMF9Eea_b6UyFzv22g _6W19wOW_EearOPSxyAbpKw _N-rbIPMVEeagPYxz1ZWLIQ" width="12" height="10"> | ||
1422 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialInterpretation"/> | ||
1423 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialInterpretation"/> | ||
1424 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
1425 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
1426 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
1427 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_QZ78oPMVEeagPYxz1ZWLIQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
1428 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
1429 | </ownedStyle> | ||
1430 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
1431 | <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_QlJHIMF9Eea_b6UyFzv22g" name="minNewElements : EInt = 0" tooltipText=""> | ||
1432 | <target xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//PartialInterpretation/minNewElements"/> | ||
1433 | <semanticElements xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//PartialInterpretation/minNewElements"/> | ||
1434 | <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_QlK8UMF9Eea_b6UyFzv22g" labelAlignment="LEFT" description="_ccUTlrXDEeamG-Ij7YnW7w"> | ||
1435 | <labelFormat>bold</labelFormat> | ||
1436 | </ownedStyle> | ||
1437 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
1438 | </ownedElements> | ||
1439 | <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_QlLjYMF9Eea_b6UyFzv22g" name="maxNewElements : EInt = 0" tooltipText=""> | ||
1440 | <target xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//PartialInterpretation/maxNewElements"/> | ||
1441 | <semanticElements xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//PartialInterpretation/maxNewElements"/> | ||
1442 | <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_QlLjYcF9Eea_b6UyFzv22g" labelAlignment="LEFT" description="_ccUTlrXDEeamG-Ij7YnW7w"> | ||
1443 | <labelFormat>bold</labelFormat> | ||
1444 | </ownedStyle> | ||
1445 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
1446 | </ownedElements> | ||
1447 | </ownedDiagramElements> | ||
1448 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_ccU7V7XDEeamG-Ij7YnW7w" name="LogicProblem" tooltipText="" outgoingEdges="_ccU7c7XDEeamG-Ij7YnW7w _ccU7g7XDEeamG-Ij7YnW7w" incomingEdges="_ccU7WrXDEeamG-Ij7YnW7w _6W19wOW_EearOPSxyAbpKw" width="12" height="10"> | ||
1449 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem"/> | ||
1450 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem"/> | ||
1451 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_ccU7WLXDEeamG-Ij7YnW7w"> | ||
1452 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
1453 | </decorations> | ||
1454 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
1455 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
1456 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
1457 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_ccU7WbXDEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
1458 | <customFeatures>backgroundColor</customFeatures> | ||
1459 | <customFeatures>foregroundColor</customFeatures> | ||
1460 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
1461 | </ownedStyle> | ||
1462 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
1463 | </ownedDiagramElements> | ||
1464 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_ccU7WrXDEeamG-Ij7YnW7w" name="[1..1] problem" sourceNode="_ccU7VbXDEeamG-Ij7YnW7w" targetNode="_ccU7V7XDEeamG-Ij7YnW7w"> | ||
1465 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/problem"/> | ||
1466 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/problem"/> | ||
1467 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_ccU7W7XDEeamG-Ij7YnW7w" description="_ccUTk7XDEeamG-Ij7YnW7w" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1468 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_ccU7XLXDEeamG-Ij7YnW7w" showIcon="false"> | ||
1469 | <customFeatures>labelSize</customFeatures> | ||
1470 | <labelFormat>bold</labelFormat> | ||
1471 | </centerLabelStyle> | ||
1472 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_ccU7XbXDEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
1473 | <customFeatures>labelSize</customFeatures> | ||
1474 | </endLabelStyle> | ||
1475 | </ownedStyle> | ||
1476 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1477 | </ownedDiagramElements> | ||
1478 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_ccU7YbXDEeamG-Ij7YnW7w" name="DefinedElement" tooltipText="" incomingEdges="_ccU7g7XDEeamG-Ij7YnW7w _ccU7yrXDEeamG-Ij7YnW7w _klCuMLXDEeamG-Ij7YnW7w _QlS4IMF9Eea_b6UyFzv22g" width="12" height="10"> | ||
1479 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/> | ||
1480 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/> | ||
1481 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_ccU7YrXDEeamG-Ij7YnW7w"> | ||
1482 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
1483 | </decorations> | ||
1484 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
1485 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
1486 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
1487 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_ccU7Y7XDEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
1488 | <customFeatures>backgroundColor</customFeatures> | ||
1489 | <customFeatures>foregroundColor</customFeatures> | ||
1490 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
1491 | </ownedStyle> | ||
1492 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
1493 | </ownedDiagramElements> | ||
1494 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_ccU7arXDEeamG-Ij7YnW7w" name="Type" tooltipText="" outgoingEdges="_ccU7h7XDEeamG-Ij7YnW7w" incomingEdges="_ccU7c7XDEeamG-Ij7YnW7w _ccU7h7XDEeamG-Ij7YnW7w _ccU7p7XDEeamG-Ij7YnW7w" width="12" height="10"> | ||
1495 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type"/> | ||
1496 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type"/> | ||
1497 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_ccU7a7XDEeamG-Ij7YnW7w"> | ||
1498 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
1499 | </decorations> | ||
1500 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
1501 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
1502 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
1503 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_ccU7bLXDEeamG-Ij7YnW7w" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
1504 | <customFeatures>backgroundColor</customFeatures> | ||
1505 | <customFeatures>foregroundColor</customFeatures> | ||
1506 | <labelFormat>italic</labelFormat> | ||
1507 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/> | ||
1508 | </ownedStyle> | ||
1509 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
1510 | <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_ccU7bbXDEeamG-Ij7YnW7w" name="name : EString" visible="false" tooltipText=""> | ||
1511 | <target xmi:type="ecore:EAttribute" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type/name"/> | ||
1512 | <semanticElements xmi:type="ecore:EAttribute" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type/name"/> | ||
1513 | <graphicalFilters xmi:type="diagram:HideFilter" xmi:id="_ccU7brXDEeamG-Ij7YnW7w"/> | ||
1514 | <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_ccU7b7XDEeamG-Ij7YnW7w" labelAlignment="LEFT" description="_ccUTlrXDEeamG-Ij7YnW7w"> | ||
1515 | <labelFormat>bold</labelFormat> | ||
1516 | </ownedStyle> | ||
1517 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
1518 | </ownedElements> | ||
1519 | <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_ccU7cLXDEeamG-Ij7YnW7w" name="isAbstract : EBoolean = false" visible="false" tooltipText=""> | ||
1520 | <target xmi:type="ecore:EAttribute" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type/isAbstract"/> | ||
1521 | <semanticElements xmi:type="ecore:EAttribute" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type/isAbstract"/> | ||
1522 | <graphicalFilters xmi:type="diagram:HideFilter" xmi:id="_ccU7cbXDEeamG-Ij7YnW7w"/> | ||
1523 | <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_ccU7crXDEeamG-Ij7YnW7w" labelAlignment="LEFT" description="_ccUTlrXDEeamG-Ij7YnW7w"> | ||
1524 | <labelFormat>bold</labelFormat> | ||
1525 | </ownedStyle> | ||
1526 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
1527 | </ownedElements> | ||
1528 | </ownedDiagramElements> | ||
1529 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_ccU7c7XDEeamG-Ij7YnW7w" name="[0..*] types" sourceNode="_ccU7V7XDEeamG-Ij7YnW7w" targetNode="_ccU7arXDEeamG-Ij7YnW7w"> | ||
1530 | <target xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/types"/> | ||
1531 | <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/types"/> | ||
1532 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_ccU7dLXDEeamG-Ij7YnW7w" description="_ccUTl7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1533 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_ccU7dbXDEeamG-Ij7YnW7w" showIcon="false"> | ||
1534 | <customFeatures>labelSize</customFeatures> | ||
1535 | </centerLabelStyle> | ||
1536 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_ccU7drXDEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
1537 | <customFeatures>labelSize</customFeatures> | ||
1538 | </endLabelStyle> | ||
1539 | </ownedStyle> | ||
1540 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1541 | </ownedDiagramElements> | ||
1542 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_ccU7g7XDEeamG-Ij7YnW7w" name="[0..*] elements" sourceNode="_ccU7V7XDEeamG-Ij7YnW7w" targetNode="_ccU7YbXDEeamG-Ij7YnW7w"> | ||
1543 | <target xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/elements"/> | ||
1544 | <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/elements"/> | ||
1545 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_ccU7hLXDEeamG-Ij7YnW7w" description="_ccUTl7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1546 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_ccU7hbXDEeamG-Ij7YnW7w" showIcon="false"> | ||
1547 | <customFeatures>labelSize</customFeatures> | ||
1548 | </centerLabelStyle> | ||
1549 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_ccU7hrXDEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
1550 | <customFeatures>labelSize</customFeatures> | ||
1551 | </endLabelStyle> | ||
1552 | </ownedStyle> | ||
1553 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1554 | </ownedDiagramElements> | ||
1555 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_ccU7h7XDEeamG-Ij7YnW7w" visible="false" sourceNode="_ccU7arXDEeamG-Ij7YnW7w" targetNode="_ccU7arXDEeamG-Ij7YnW7w" beginLabel="[0..*] supertypes" endLabel="[0..*] subtypes"> | ||
1556 | <target xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type/subtypes"/> | ||
1557 | <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type/subtypes"/> | ||
1558 | <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Type/supertypes"/> | ||
1559 | <graphicalFilters xmi:type="diagram:HideFilter" xmi:id="_ccU7iLXDEeamG-Ij7YnW7w"/> | ||
1560 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_ccU7ibXDEeamG-Ij7YnW7w" sourceArrow="InputArrow" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1561 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='Bi-directional%20EC_EReference%20']/@style"/> | ||
1562 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_ccU7irXDEeamG-Ij7YnW7w" showIcon="false"/> | ||
1563 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_ccU7i7XDEeamG-Ij7YnW7w" showIcon="false"/> | ||
1564 | </ownedStyle> | ||
1565 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='Bi-directional%20EC_EReference%20']"/> | ||
1566 | </ownedDiagramElements> | ||
1567 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_ccU7pLXDEeamG-Ij7YnW7w" name="TypeDeclaration" tooltipText="" outgoingEdges="_ccU7p7XDEeamG-Ij7YnW7w" incomingEdges="_ccU70LXDEeamG-Ij7YnW7w" width="12" height="10"> | ||
1568 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//TypeDeclaration"/> | ||
1569 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//TypeDeclaration"/> | ||
1570 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_ccU7pbXDEeamG-Ij7YnW7w"> | ||
1571 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
1572 | </decorations> | ||
1573 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
1574 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
1575 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
1576 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_ccU7prXDEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
1577 | <customFeatures>backgroundColor</customFeatures> | ||
1578 | <customFeatures>foregroundColor</customFeatures> | ||
1579 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
1580 | </ownedStyle> | ||
1581 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
1582 | </ownedDiagramElements> | ||
1583 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_ccU7p7XDEeamG-Ij7YnW7w" sourceNode="_ccU7pLXDEeamG-Ij7YnW7w" targetNode="_ccU7arXDEeamG-Ij7YnW7w"> | ||
1584 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//TypeDeclaration"/> | ||
1585 | <semanticElements xmi:type="ecore:EGenericType" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//TypeDeclaration/@eGenericSuperTypes.0"/> | ||
1586 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_ccU7qLXDEeamG-Ij7YnW7w"> | ||
1587 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
1588 | </decorations> | ||
1589 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_ccU7qbXDEeamG-Ij7YnW7w" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
1590 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
1591 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_ccU7qrXDEeamG-Ij7YnW7w" showIcon="false"> | ||
1592 | <labelFormat>italic</labelFormat> | ||
1593 | </beginLabelStyle> | ||
1594 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_ccU7q7XDEeamG-Ij7YnW7w" showIcon="false"/> | ||
1595 | </ownedStyle> | ||
1596 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
1597 | </ownedDiagramElements> | ||
1598 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_ccU7yrXDEeamG-Ij7YnW7w" name="[0..*] newElements" sourceNode="_ccU7VbXDEeamG-Ij7YnW7w" targetNode="_ccU7YbXDEeamG-Ij7YnW7w"> | ||
1599 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/newElements"/> | ||
1600 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/newElements"/> | ||
1601 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_ccU7y7XDEeamG-Ij7YnW7w" description="_ccUTl7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1602 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_ccU7zLXDEeamG-Ij7YnW7w" showIcon="false"> | ||
1603 | <customFeatures>labelSize</customFeatures> | ||
1604 | </centerLabelStyle> | ||
1605 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_ccU7zbXDEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
1606 | <customFeatures>labelSize</customFeatures> | ||
1607 | </endLabelStyle> | ||
1608 | </ownedStyle> | ||
1609 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1610 | </ownedDiagramElements> | ||
1611 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_ccU7zrXDEeamG-Ij7YnW7w" name="PartialTypeInterpratation" tooltipText="" outgoingEdges="_ccU70LXDEeamG-Ij7YnW7w _klCuMLXDEeamG-Ij7YnW7w _bLJ3ANUaEear_rf-Vav0Gw" incomingEdges="_ccU71LXDEeamG-Ij7YnW7w _bLJ3ANUaEear_rf-Vav0Gw _N-rbIPMVEeagPYxz1ZWLIQ" width="12" height="10"> | ||
1612 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialTypeInterpratation"/> | ||
1613 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialTypeInterpratation"/> | ||
1614 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
1615 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
1616 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
1617 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_ccU7z7XDEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
1618 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
1619 | </ownedStyle> | ||
1620 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
1621 | </ownedDiagramElements> | ||
1622 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_ccU70LXDEeamG-Ij7YnW7w" name="[1..1] interpretationOf" sourceNode="_ccU7zrXDEeamG-Ij7YnW7w" targetNode="_ccU7pLXDEeamG-Ij7YnW7w"> | ||
1623 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialTypeInterpratation/interpretationOf"/> | ||
1624 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialTypeInterpratation/interpretationOf"/> | ||
1625 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_ccU70bXDEeamG-Ij7YnW7w" description="_ccUTk7XDEeamG-Ij7YnW7w" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1626 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_ccU70rXDEeamG-Ij7YnW7w" showIcon="false"> | ||
1627 | <labelFormat>bold</labelFormat> | ||
1628 | </centerLabelStyle> | ||
1629 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_ccU707XDEeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
1630 | </ownedStyle> | ||
1631 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1632 | </ownedDiagramElements> | ||
1633 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_ccU71LXDEeamG-Ij7YnW7w" name="[0..*] partialtypeinterpratation" sourceNode="_ccU7VbXDEeamG-Ij7YnW7w" targetNode="_ccU7zrXDEeamG-Ij7YnW7w"> | ||
1634 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/partialtypeinterpratation"/> | ||
1635 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/partialtypeinterpratation"/> | ||
1636 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_ccU71bXDEeamG-Ij7YnW7w" description="_ccUTl7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1637 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_ccU71rXDEeamG-Ij7YnW7w" showIcon="false"> | ||
1638 | <customFeatures>labelSize</customFeatures> | ||
1639 | </centerLabelStyle> | ||
1640 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_ccU717XDEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
1641 | <customFeatures>labelSize</customFeatures> | ||
1642 | </endLabelStyle> | ||
1643 | </ownedStyle> | ||
1644 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1645 | </ownedDiagramElements> | ||
1646 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_klCuMLXDEeamG-Ij7YnW7w" name="[0..*] elements" sourceNode="_ccU7zrXDEeamG-Ij7YnW7w" targetNode="_ccU7YbXDEeamG-Ij7YnW7w"> | ||
1647 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialTypeInterpratation/elements"/> | ||
1648 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialTypeInterpratation/elements"/> | ||
1649 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_M5V9kL3JEeaj7tVusjQpHg" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1650 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/> | ||
1651 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_M5V9kb3JEeaj7tVusjQpHg" showIcon="false"/> | ||
1652 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_M5V9kr3JEeaj7tVusjQpHg" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
1653 | </ownedStyle> | ||
1654 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1655 | </ownedDiagramElements> | ||
1656 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_QlS4IMF9Eea_b6UyFzv22g" name="[1..1] openWorldElementPrototype" sourceNode="_ccU7VbXDEeamG-Ij7YnW7w" targetNode="_ccU7YbXDEeamG-Ij7YnW7w"> | ||
1657 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/openWorldElementPrototype"/> | ||
1658 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/openWorldElementPrototype"/> | ||
1659 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_QlUGQMF9Eea_b6UyFzv22g" description="_QlTfMMF9Eea_b6UyFzv22g" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1660 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_QlUGQcF9Eea_b6UyFzv22g" showIcon="false"> | ||
1661 | <customFeatures>labelSize</customFeatures> | ||
1662 | <labelFormat>bold</labelFormat> | ||
1663 | </centerLabelStyle> | ||
1664 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_QlUGQsF9Eea_b6UyFzv22g" showIcon="false" labelColor="39,76,114"> | ||
1665 | <customFeatures>labelSize</customFeatures> | ||
1666 | </endLabelStyle> | ||
1667 | </ownedStyle> | ||
1668 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1669 | </ownedDiagramElements> | ||
1670 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_bLJ3ANUaEear_rf-Vav0Gw" name="[0..*] supertypeInterpretation" sourceNode="_ccU7zrXDEeamG-Ij7YnW7w" targetNode="_ccU7zrXDEeamG-Ij7YnW7w"> | ||
1671 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialTypeInterpratation/supertypeInterpretation"/> | ||
1672 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialTypeInterpratation/supertypeInterpretation"/> | ||
1673 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_bLLsMNUaEear_rf-Vav0Gw" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1674 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/> | ||
1675 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_bLLsMdUaEear_rf-Vav0Gw" showIcon="false"> | ||
1676 | <customFeatures>labelSize</customFeatures> | ||
1677 | </centerLabelStyle> | ||
1678 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_bLLsMtUaEear_rf-Vav0Gw" showIcon="false" labelColor="39,76,114"> | ||
1679 | <customFeatures>labelSize</customFeatures> | ||
1680 | </endLabelStyle> | ||
1681 | </ownedStyle> | ||
1682 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1683 | </ownedDiagramElements> | ||
1684 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_6W19wOW_EearOPSxyAbpKw" name="[0..1] problemConainer" sourceNode="_ccU7VbXDEeamG-Ij7YnW7w" targetNode="_ccU7V7XDEeamG-Ij7YnW7w"> | ||
1685 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/problemConainer"/> | ||
1686 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/problemConainer"/> | ||
1687 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_6W3y8OW_EearOPSxyAbpKw" description="_ccUTl7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1688 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_6W3y8eW_EearOPSxyAbpKw" showIcon="false"> | ||
1689 | <customFeatures>labelSize</customFeatures> | ||
1690 | </centerLabelStyle> | ||
1691 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_6W3y8uW_EearOPSxyAbpKw" showIcon="false" labelColor="39,76,114"> | ||
1692 | <customFeatures>labelSize</customFeatures> | ||
1693 | </endLabelStyle> | ||
1694 | </ownedStyle> | ||
1695 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1696 | </ownedDiagramElements> | ||
1697 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_N-rbIPMVEeagPYxz1ZWLIQ" name="[0..*] preGeneratedElements" sourceNode="_ccU7VbXDEeamG-Ij7YnW7w" targetNode="_ccU7zrXDEeamG-Ij7YnW7w"> | ||
1698 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/preGeneratedElements"/> | ||
1699 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/preGeneratedElements"/> | ||
1700 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_N-spQPMVEeagPYxz1ZWLIQ" description="_ccUTl7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
1701 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_N-spQfMVEeagPYxz1ZWLIQ" showIcon="false"> | ||
1702 | <customFeatures>labelSize</customFeatures> | ||
1703 | </centerLabelStyle> | ||
1704 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_N-spQvMVEeagPYxz1ZWLIQ" showIcon="false" labelColor="39,76,114"> | ||
1705 | <customFeatures>labelSize</customFeatures> | ||
1706 | </endLabelStyle> | ||
1707 | </ownedStyle> | ||
1708 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
1709 | </ownedDiagramElements> | ||
1710 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> | ||
1711 | <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_ccU72LXDEeamG-Ij7YnW7w"/> | ||
1712 | <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> | ||
1713 | <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Package']"/> | ||
1714 | <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Validation']"/> | ||
1715 | <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Archetype']/@ownedRepresentationExtensions[name='Entities%20With%20Archetypes']/@layers[name='Archetypes']"/> | ||
1716 | <target xmi:type="ecore:EPackage" href="PartialInterpretation.ecore#/"/> | ||
1717 | </ownedRepresentations> | ||
1718 | <ownedRepresentations xmi:type="diagram:DSemanticDiagram" xmi:id="_pEmCsLXDEeamG-Ij7YnW7w" name="relation interpretation"> | ||
1719 | <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_pEmCsbXDEeamG-Ij7YnW7w" source="DANNOTATION_CUSTOMIZATION_KEY"> | ||
1720 | <data xmi:type="diagram:ComputedStyleDescriptionRegistry" xmi:id="_pEmCsrXDEeamG-Ij7YnW7w"> | ||
1721 | <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_pEmCs7XDEeamG-Ij7YnW7w" routingStyle="manhattan"> | ||
1722 | <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1723 | <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_pEmCtLXDEeamG-Ij7YnW7w" showIcon="false" labelExpression="service:render"> | ||
1724 | <labelFormat>bold</labelFormat> | ||
1725 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1726 | </centerLabelStyleDescription> | ||
1727 | <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_pEmCtbXDEeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel"> | ||
1728 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/> | ||
1729 | </endLabelStyleDescription> | ||
1730 | </computedStyleDescriptions> | ||
1731 | <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_pEmCt7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan"> | ||
1732 | <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1733 | <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_pEmCuLXDEeamG-Ij7YnW7w" showIcon="false" labelExpression="service:render"> | ||
1734 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1735 | </centerLabelStyleDescription> | ||
1736 | <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_pEmCubXDEeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel"> | ||
1737 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/> | ||
1738 | </endLabelStyleDescription> | ||
1739 | </computedStyleDescriptions> | ||
1740 | <computedStyleDescriptions xmi:type="style:BundledImageDescription" xmi:id="_RUg1QMAiEeaaj7sYFz2QKg" labelExpression="service:render" labelAlignment="LEFT" tooltipExpression="service:renderTooltip" sizeComputationExpression="1"> | ||
1741 | <borderColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1742 | <labelFormat>bold</labelFormat> | ||
1743 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1744 | <color xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1745 | </computedStyleDescriptions> | ||
1746 | <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_RU2McMAiEeaaj7sYFz2QKg" sourceArrow="FillDiamond" routingStyle="manhattan"> | ||
1747 | <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1748 | <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_RU2MccAiEeaaj7sYFz2QKg" showIcon="false" labelExpression="service:render"> | ||
1749 | <labelFormat>bold</labelFormat> | ||
1750 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> | ||
1751 | </centerLabelStyleDescription> | ||
1752 | <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_RU2McsAiEeaaj7sYFz2QKg" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel"> | ||
1753 | <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/> | ||
1754 | </endLabelStyleDescription> | ||
1755 | </computedStyleDescriptions> | ||
1756 | </data> | ||
1757 | </ownedAnnotationEntries> | ||
1758 | <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_pEmCu7XDEeamG-Ij7YnW7w" source="GMF_DIAGRAMS"> | ||
1759 | <data xmi:type="notation:Diagram" xmi:id="_pEmCvLXDEeamG-Ij7YnW7w" type="Sirius" element="_pEmCsLXDEeamG-Ij7YnW7w" measurementUnit="Pixel"> | ||
1760 | <children xmi:type="notation:Node" xmi:id="_pEmCvbXDEeamG-Ij7YnW7w" type="2003" element="_pEmrI7XDEeamG-Ij7YnW7w"> | ||
1761 | <children xmi:type="notation:Node" xmi:id="_pEmCvrXDEeamG-Ij7YnW7w" type="5007"/> | ||
1762 | <children xmi:type="notation:Node" xmi:id="_pEmCv7XDEeamG-Ij7YnW7w" type="7004"> | ||
1763 | <children xmi:type="notation:Node" xmi:id="_RVE18MAiEeaaj7sYFz2QKg" type="3010" element="_RUgOMMAiEeaaj7sYFz2QKg"> | ||
1764 | <styles xmi:type="notation:FontStyle" xmi:id="_RVE18cAiEeaaj7sYFz2QKg" fontName="Segoe UI" fontHeight="8" bold="true"/> | ||
1765 | <layoutConstraint xmi:type="notation:Location" xmi:id="_RVE18sAiEeaaj7sYFz2QKg"/> | ||
1766 | </children> | ||
1767 | <children xmi:type="notation:Node" xmi:id="_RVIgUMAiEeaaj7sYFz2QKg" type="3010" element="_RUiDYMAiEeaaj7sYFz2QKg"> | ||
1768 | <styles xmi:type="notation:FontStyle" xmi:id="_RVJHYMAiEeaaj7sYFz2QKg" fontName="Segoe UI" fontHeight="8" bold="true"/> | ||
1769 | <layoutConstraint xmi:type="notation:Location" xmi:id="_RVJHYcAiEeaaj7sYFz2QKg"/> | ||
1770 | </children> | ||
1771 | <styles xmi:type="notation:SortingStyle" xmi:id="_pEmCwLXDEeamG-Ij7YnW7w"/> | ||
1772 | <styles xmi:type="notation:FilteringStyle" xmi:id="_pEmCwbXDEeamG-Ij7YnW7w"/> | ||
1773 | </children> | ||
1774 | <styles xmi:type="notation:ShapeStyle" xmi:id="_pEmCwrXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
1775 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmCw7XDEeamG-Ij7YnW7w" x="195" y="490" width="153" height="48"/> | ||
1776 | </children> | ||
1777 | <children xmi:type="notation:Node" xmi:id="_pEmCxLXDEeamG-Ij7YnW7w" type="2003" element="_pEmrJbXDEeamG-Ij7YnW7w"> | ||
1778 | <children xmi:type="notation:Node" xmi:id="_pEmCxbXDEeamG-Ij7YnW7w" type="5007"/> | ||
1779 | <children xmi:type="notation:Node" xmi:id="_pEmCxrXDEeamG-Ij7YnW7w" type="7004"> | ||
1780 | <styles xmi:type="notation:SortingStyle" xmi:id="_pEmpwLXDEeamG-Ij7YnW7w"/> | ||
1781 | <styles xmi:type="notation:FilteringStyle" xmi:id="_pEmpwbXDEeamG-Ij7YnW7w"/> | ||
1782 | </children> | ||
1783 | <styles xmi:type="notation:ShapeStyle" xmi:id="_pEmpwrXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" fillColor="8047085"/> | ||
1784 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmpw7XDEeamG-Ij7YnW7w" x="212" y="30"/> | ||
1785 | </children> | ||
1786 | <children xmi:type="notation:Node" xmi:id="_pEmpy7XDEeamG-Ij7YnW7w" type="2003" element="_pEmrL7XDEeamG-Ij7YnW7w"> | ||
1787 | <children xmi:type="notation:Node" xmi:id="_pEmpzLXDEeamG-Ij7YnW7w" type="5007"/> | ||
1788 | <children xmi:type="notation:Node" xmi:id="_pEmpzbXDEeamG-Ij7YnW7w" type="7004"> | ||
1789 | <styles xmi:type="notation:SortingStyle" xmi:id="_pEmpzrXDEeamG-Ij7YnW7w"/> | ||
1790 | <styles xmi:type="notation:FilteringStyle" xmi:id="_pEmpz7XDEeamG-Ij7YnW7w"/> | ||
1791 | </children> | ||
1792 | <styles xmi:type="notation:ShapeStyle" xmi:id="_pEmp0LXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" fillColor="8047085"/> | ||
1793 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmp0bXDEeamG-Ij7YnW7w" x="740" y="537" height="41"/> | ||
1794 | </children> | ||
1795 | <children xmi:type="notation:Node" xmi:id="_pEmp2bXDEeamG-Ij7YnW7w" type="2003" element="_pEmrNbXDEeamG-Ij7YnW7w"> | ||
1796 | <children xmi:type="notation:Node" xmi:id="_pEmp2rXDEeamG-Ij7YnW7w" type="5007"/> | ||
1797 | <children xmi:type="notation:Node" xmi:id="_pEmp27XDEeamG-Ij7YnW7w" type="7004"> | ||
1798 | <styles xmi:type="notation:SortingStyle" xmi:id="_pEmp3LXDEeamG-Ij7YnW7w"/> | ||
1799 | <styles xmi:type="notation:FilteringStyle" xmi:id="_pEmp3bXDEeamG-Ij7YnW7w"/> | ||
1800 | </children> | ||
1801 | <styles xmi:type="notation:ShapeStyle" xmi:id="_pEmp3rXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" italic="true" fillColor="8047085"/> | ||
1802 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmp37XDEeamG-Ij7YnW7w" x="462" y="50" height="33"/> | ||
1803 | </children> | ||
1804 | <children xmi:type="notation:Node" xmi:id="_pEmp9LXDEeamG-Ij7YnW7w" type="2003" element="_pEmrYrXDEeamG-Ij7YnW7w"> | ||
1805 | <children xmi:type="notation:Node" xmi:id="_pEmp9bXDEeamG-Ij7YnW7w" type="5007"/> | ||
1806 | <children xmi:type="notation:Node" xmi:id="_pEmp9rXDEeamG-Ij7YnW7w" type="7004"> | ||
1807 | <styles xmi:type="notation:SortingStyle" xmi:id="_pEmp97XDEeamG-Ij7YnW7w"/> | ||
1808 | <styles xmi:type="notation:FilteringStyle" xmi:id="_pEmp-LXDEeamG-Ij7YnW7w"/> | ||
1809 | </children> | ||
1810 | <styles xmi:type="notation:ShapeStyle" xmi:id="_pEmp-bXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" fillColor="8047085"/> | ||
1811 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmp-rXDEeamG-Ij7YnW7w" x="472" y="170" height="14"/> | ||
1812 | </children> | ||
1813 | <children xmi:type="notation:Node" xmi:id="_pEmqELXDEeamG-Ij7YnW7w" type="2003" element="_pEmrfLXDEeamG-Ij7YnW7w"> | ||
1814 | <children xmi:type="notation:Node" xmi:id="_pEmqEbXDEeamG-Ij7YnW7w" type="5007"/> | ||
1815 | <children xmi:type="notation:Node" xmi:id="_pEmqErXDEeamG-Ij7YnW7w" type="7004"> | ||
1816 | <styles xmi:type="notation:SortingStyle" xmi:id="_pEmqE7XDEeamG-Ij7YnW7w"/> | ||
1817 | <styles xmi:type="notation:FilteringStyle" xmi:id="_pEmqFLXDEeamG-Ij7YnW7w"/> | ||
1818 | </children> | ||
1819 | <styles xmi:type="notation:ShapeStyle" xmi:id="_pEmqFbXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
1820 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqFrXDEeamG-Ij7YnW7w" x="462" y="395" width="178" height="63"/> | ||
1821 | </children> | ||
1822 | <children xmi:type="notation:Node" xmi:id="_7EeIoLXDEeamG-Ij7YnW7w" type="2003" element="_7EWz4LXDEeamG-Ij7YnW7w"> | ||
1823 | <children xmi:type="notation:Node" xmi:id="_7EevsLXDEeamG-Ij7YnW7w" type="5007"/> | ||
1824 | <children xmi:type="notation:Node" xmi:id="_7EevsbXDEeamG-Ij7YnW7w" type="7004"> | ||
1825 | <styles xmi:type="notation:SortingStyle" xmi:id="_7EevsrXDEeamG-Ij7YnW7w"/> | ||
1826 | <styles xmi:type="notation:FilteringStyle" xmi:id="_7Eevs7XDEeamG-Ij7YnW7w"/> | ||
1827 | </children> | ||
1828 | <styles xmi:type="notation:ShapeStyle" xmi:id="_7EeIobXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8" italic="true"/> | ||
1829 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7EeIorXDEeamG-Ij7YnW7w" x="725" y="40"/> | ||
1830 | </children> | ||
1831 | <children xmi:type="notation:Node" xmi:id="_n_b8ALXEEeamG-Ij7YnW7w" type="2003" element="_n-_3ILXEEeamG-Ij7YnW7w"> | ||
1832 | <children xmi:type="notation:Node" xmi:id="_n_cjELXEEeamG-Ij7YnW7w" type="5007"/> | ||
1833 | <children xmi:type="notation:Node" xmi:id="_n_cjEbXEEeamG-Ij7YnW7w" type="7004"> | ||
1834 | <styles xmi:type="notation:SortingStyle" xmi:id="_n_cjErXEEeamG-Ij7YnW7w"/> | ||
1835 | <styles xmi:type="notation:FilteringStyle" xmi:id="_n_cjE7XEEeamG-Ij7YnW7w"/> | ||
1836 | </children> | ||
1837 | <styles xmi:type="notation:ShapeStyle" xmi:id="_n_b8AbXEEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
1838 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_n_b8ArXEEeamG-Ij7YnW7w" x="770" y="395" width="120" height="43"/> | ||
1839 | </children> | ||
1840 | <children xmi:type="notation:Node" xmi:id="__5rHkLXEEeamG-Ij7YnW7w" type="2003" element="__5SGALXEEeamG-Ij7YnW7w"> | ||
1841 | <children xmi:type="notation:Node" xmi:id="__5ruoLXEEeamG-Ij7YnW7w" type="5007"/> | ||
1842 | <children xmi:type="notation:Node" xmi:id="__5ruobXEEeamG-Ij7YnW7w" type="7004"> | ||
1843 | <styles xmi:type="notation:SortingStyle" xmi:id="__5ruorXEEeamG-Ij7YnW7w"/> | ||
1844 | <styles xmi:type="notation:FilteringStyle" xmi:id="__5ruo7XEEeamG-Ij7YnW7w"/> | ||
1845 | </children> | ||
1846 | <styles xmi:type="notation:ShapeStyle" xmi:id="__5rHkbXEEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
1847 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="__5rHkrXEEeamG-Ij7YnW7w" x="645" y="467" width="173" height="48"/> | ||
1848 | </children> | ||
1849 | <children xmi:type="notation:Node" xmi:id="_ERrCkLXFEeamG-Ij7YnW7w" type="2003" element="_ERNIgLXFEeamG-Ij7YnW7w"> | ||
1850 | <children xmi:type="notation:Node" xmi:id="_ERrCk7XFEeamG-Ij7YnW7w" type="5007"/> | ||
1851 | <children xmi:type="notation:Node" xmi:id="_ERrClLXFEeamG-Ij7YnW7w" type="7004"> | ||
1852 | <styles xmi:type="notation:SortingStyle" xmi:id="_ERrClbXFEeamG-Ij7YnW7w"/> | ||
1853 | <styles xmi:type="notation:FilteringStyle" xmi:id="_ERrClrXFEeamG-Ij7YnW7w"/> | ||
1854 | </children> | ||
1855 | <styles xmi:type="notation:ShapeStyle" xmi:id="_ERrCkbXFEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
1856 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ERrCkrXFEeamG-Ij7YnW7w" x="830" y="468" width="163" height="46"/> | ||
1857 | </children> | ||
1858 | <children xmi:type="notation:Node" xmi:id="_HsPE8LXFEeamG-Ij7YnW7w" type="2003" element="_Hr5GsLXFEeamG-Ij7YnW7w"> | ||
1859 | <children xmi:type="notation:Node" xmi:id="_HsPsALXFEeamG-Ij7YnW7w" type="5007"/> | ||
1860 | <children xmi:type="notation:Node" xmi:id="_HsPsAbXFEeamG-Ij7YnW7w" type="7004"> | ||
1861 | <styles xmi:type="notation:SortingStyle" xmi:id="_HsPsArXFEeamG-Ij7YnW7w"/> | ||
1862 | <styles xmi:type="notation:FilteringStyle" xmi:id="_HsPsA7XFEeamG-Ij7YnW7w"/> | ||
1863 | </children> | ||
1864 | <styles xmi:type="notation:ShapeStyle" xmi:id="_HsPE8bXFEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
1865 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_HsPE8rXFEeamG-Ij7YnW7w" x="1050" y="470" width="120" height="35"/> | ||
1866 | </children> | ||
1867 | <children xmi:type="notation:Node" xmi:id="_KRyK4LXFEeamG-Ij7YnW7w" type="2003" element="_KReB0LXFEeamG-Ij7YnW7w"> | ||
1868 | <children xmi:type="notation:Node" xmi:id="_KRyx8LXFEeamG-Ij7YnW7w" type="5007"/> | ||
1869 | <children xmi:type="notation:Node" xmi:id="_KRyx8bXFEeamG-Ij7YnW7w" type="7004"> | ||
1870 | <children xmi:type="notation:Node" xmi:id="_cAdMELXFEeamG-Ij7YnW7w" type="3010" element="_cAH04LXFEeamG-Ij7YnW7w"> | ||
1871 | <styles xmi:type="notation:FontStyle" xmi:id="_cAdMEbXFEeamG-Ij7YnW7w" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/> | ||
1872 | <layoutConstraint xmi:type="notation:Location" xmi:id="_cAdMErXFEeamG-Ij7YnW7w"/> | ||
1873 | </children> | ||
1874 | <styles xmi:type="notation:SortingStyle" xmi:id="_KRyx8rXFEeamG-Ij7YnW7w"/> | ||
1875 | <styles xmi:type="notation:FilteringStyle" xmi:id="_KRyx87XFEeamG-Ij7YnW7w"/> | ||
1876 | </children> | ||
1877 | <styles xmi:type="notation:ShapeStyle" xmi:id="_KRyK4bXFEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
1878 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KRyK4rXFEeamG-Ij7YnW7w" x="1032" y="534" width="155" height="48"/> | ||
1879 | </children> | ||
1880 | <children xmi:type="notation:Shape" xmi:id="_AnFKsLXGEeamG-Ij7YnW7w" type="Note" fontName="Segoe UI" description="TODO" fillColor="13369343" transparency="0" lineColor="6737151" lineWidth="1"> | ||
1881 | <children xmi:type="notation:BasicDecorationNode" xmi:id="_AnFKtLXGEeamG-Ij7YnW7w" type="DiagramName"> | ||
1882 | <element xsi:nil="true"/> | ||
1883 | </children> | ||
1884 | <children xmi:type="notation:BasicDecorationNode" xmi:id="_AnFKtbXGEeamG-Ij7YnW7w" type="Description"> | ||
1885 | <element xsi:nil="true"/> | ||
1886 | </children> | ||
1887 | <styles xmi:type="notation:TextStyle" xmi:id="_AnFKsbXGEeamG-Ij7YnW7w"/> | ||
1888 | <styles xmi:type="notation:LineTypeStyle" xmi:id="_AnFKsrXGEeamG-Ij7YnW7w"/> | ||
1889 | <element xsi:nil="true"/> | ||
1890 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AnFKs7XGEeamG-Ij7YnW7w" x="1059" y="600"/> | ||
1891 | </children> | ||
1892 | <styles xmi:type="notation:DiagramStyle" xmi:id="_pEmqJbXDEeamG-Ij7YnW7w"/> | ||
1893 | <edges xmi:type="notation:Edge" xmi:id="_pEmqJrXDEeamG-Ij7YnW7w" type="4001" element="_pEmrKLXDEeamG-Ij7YnW7w" source="_pEmCvbXDEeamG-Ij7YnW7w" target="_pEmCxLXDEeamG-Ij7YnW7w"> | ||
1894 | <children xmi:type="notation:Node" xmi:id="_pEmqJ7XDEeamG-Ij7YnW7w" type="6001"> | ||
1895 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqKLXDEeamG-Ij7YnW7w" x="3" y="-44"/> | ||
1896 | </children> | ||
1897 | <children xmi:type="notation:Node" xmi:id="_pEmqKbXDEeamG-Ij7YnW7w" type="6002"> | ||
1898 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqKrXDEeamG-Ij7YnW7w" x="59"/> | ||
1899 | </children> | ||
1900 | <children xmi:type="notation:Node" xmi:id="_pEmqK7XDEeamG-Ij7YnW7w" type="6003"> | ||
1901 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqLLXDEeamG-Ij7YnW7w" x="-51"/> | ||
1902 | </children> | ||
1903 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_pEmqLbXDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
1904 | <styles xmi:type="notation:FontStyle" xmi:id="_pEmqLrXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1905 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_pEmqL7XDEeamG-Ij7YnW7w" points="[-15, -49, -16, 411]$[-15, -411, -16, 49]"/> | ||
1906 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pEmqMLXDEeamG-Ij7YnW7w" id="(0.49673202614379086,1.065217391304348)"/> | ||
1907 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pEmqMbXDEeamG-Ij7YnW7w" id="(0.5,0.5)"/> | ||
1908 | </edges> | ||
1909 | <edges xmi:type="notation:Edge" xmi:id="_pEmqSrXDEeamG-Ij7YnW7w" type="4001" element="_pEmrSbXDEeamG-Ij7YnW7w" source="_pEmCxLXDEeamG-Ij7YnW7w" target="_pEmp2bXDEeamG-Ij7YnW7w"> | ||
1910 | <children xmi:type="notation:Node" xmi:id="_pEmqS7XDEeamG-Ij7YnW7w" type="6001"> | ||
1911 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqTLXDEeamG-Ij7YnW7w" x="24" y="9"/> | ||
1912 | </children> | ||
1913 | <children xmi:type="notation:Node" xmi:id="_pEmqTbXDEeamG-Ij7YnW7w" type="6002"> | ||
1914 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqTrXDEeamG-Ij7YnW7w" x="98" y="10"/> | ||
1915 | </children> | ||
1916 | <children xmi:type="notation:Node" xmi:id="_pEmqT7XDEeamG-Ij7YnW7w" type="6003"> | ||
1917 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqULXDEeamG-Ij7YnW7w" x="1" y="-1"/> | ||
1918 | </children> | ||
1919 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_pEmqUbXDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
1920 | <styles xmi:type="notation:FontStyle" xmi:id="_pEmqUrXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1921 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_pEmqU7XDEeamG-Ij7YnW7w" points="[59, 39, -191, -104]$[191, 39, -59, -104]"/> | ||
1922 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pEmqVLXDEeamG-Ij7YnW7w" id="(0.5,0.0)"/> | ||
1923 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pEmqVbXDEeamG-Ij7YnW7w" id="(0.5,3.161290322580645)"/> | ||
1924 | </edges> | ||
1925 | <edges xmi:type="notation:Edge" xmi:id="_pEmqYrXDEeamG-Ij7YnW7w" visible="false" type="4001" element="_pEmrUbXDEeamG-Ij7YnW7w" source="_pEmCxLXDEeamG-Ij7YnW7w" target="_pEmpy7XDEeamG-Ij7YnW7w"> | ||
1926 | <children xmi:type="notation:Node" xmi:id="_pEmqY7XDEeamG-Ij7YnW7w" type="6001"> | ||
1927 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqZLXDEeamG-Ij7YnW7w" x="-23" y="-13"/> | ||
1928 | </children> | ||
1929 | <children xmi:type="notation:Node" xmi:id="_pEmqZbXDEeamG-Ij7YnW7w" type="6002"> | ||
1930 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqZrXDEeamG-Ij7YnW7w" x="41"/> | ||
1931 | </children> | ||
1932 | <children xmi:type="notation:Node" xmi:id="_pEmqZ7XDEeamG-Ij7YnW7w" type="6003"> | ||
1933 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqaLXDEeamG-Ij7YnW7w" x="-37"/> | ||
1934 | </children> | ||
1935 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_pEmqabXDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
1936 | <styles xmi:type="notation:FontStyle" xmi:id="_pEmqarXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1937 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_pEmqa7XDEeamG-Ij7YnW7w" points="[-59, 45, 75, -243]$[-158, 45, -24, -243]$[-158, 190, -24, -98]"/> | ||
1938 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pEmqbLXDEeamG-Ij7YnW7w" id="(0.5,0.0)"/> | ||
1939 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pEmqbbXDEeamG-Ij7YnW7w" id="(0.5,2.5128205128205128)"/> | ||
1940 | </edges> | ||
1941 | <edges xmi:type="notation:Edge" xmi:id="_pEmqhrXDEeamG-Ij7YnW7w" type="4001" element="_pEmrZbXDEeamG-Ij7YnW7w" source="_pEmp9LXDEeamG-Ij7YnW7w" target="_pEmp2bXDEeamG-Ij7YnW7w"> | ||
1942 | <children xmi:type="notation:Node" xmi:id="_pEmqh7XDEeamG-Ij7YnW7w" type="6001"> | ||
1943 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqiLXDEeamG-Ij7YnW7w" x="-46"/> | ||
1944 | </children> | ||
1945 | <children xmi:type="notation:Node" xmi:id="_pEmqibXDEeamG-Ij7YnW7w" type="6002"> | ||
1946 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqirXDEeamG-Ij7YnW7w" x="14" y="-2"/> | ||
1947 | </children> | ||
1948 | <children xmi:type="notation:Node" xmi:id="_pEmqi7XDEeamG-Ij7YnW7w" type="6003"> | ||
1949 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqjLXDEeamG-Ij7YnW7w" x="-32" y="9"/> | ||
1950 | </children> | ||
1951 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_pEmqjbXDEeamG-Ij7YnW7w" routing="Tree"/> | ||
1952 | <styles xmi:type="notation:FontStyle" xmi:id="_pEmqjrXDEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
1953 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_pEmqj7XDEeamG-Ij7YnW7w" points="[0, -159, 12, 59]$[0, -224, 12, -6]$[0, -224, 12, -6]$[0, -240, 12, -22]"/> | ||
1954 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pEmqkLXDEeamG-Ij7YnW7w" id="(0.5,4.083333333333333)"/> | ||
1955 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pEmqkbXDEeamG-Ij7YnW7w" id="(0.5,1.5806451612903225)"/> | ||
1956 | </edges> | ||
1957 | <edges xmi:type="notation:Edge" xmi:id="_pEmqtrXDEeamG-Ij7YnW7w" type="4001" element="_pEmrhLXDEeamG-Ij7YnW7w" source="_pEmqELXDEeamG-Ij7YnW7w" target="_pEmp9LXDEeamG-Ij7YnW7w"> | ||
1958 | <children xmi:type="notation:Node" xmi:id="_pEmqt7XDEeamG-Ij7YnW7w" type="6001"> | ||
1959 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmquLXDEeamG-Ij7YnW7w" x="66" y="-64"/> | ||
1960 | </children> | ||
1961 | <children xmi:type="notation:Node" xmi:id="_pEmqubXDEeamG-Ij7YnW7w" type="6002"> | ||
1962 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqurXDEeamG-Ij7YnW7w" x="-25"/> | ||
1963 | </children> | ||
1964 | <children xmi:type="notation:Node" xmi:id="_pEmqu7XDEeamG-Ij7YnW7w" type="6003"> | ||
1965 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmqvLXDEeamG-Ij7YnW7w" x="-115"/> | ||
1966 | </children> | ||
1967 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_pEmqvbXDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
1968 | <styles xmi:type="notation:FontStyle" xmi:id="_pEmqvrXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1969 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_pEmqv7XDEeamG-Ij7YnW7w" points="[23, 0, -5, 186]$[23, -186, -5, 0]"/> | ||
1970 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pEmqwLXDEeamG-Ij7YnW7w" id="(0.3125,0.0)"/> | ||
1971 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pEmqwbXDEeamG-Ij7YnW7w" id="(0.5934959349593496,1.0)"/> | ||
1972 | </edges> | ||
1973 | <edges xmi:type="notation:Edge" xmi:id="_pEmq2rXDEeamG-Ij7YnW7w" type="4001" element="_pEmrkLXDEeamG-Ij7YnW7w" source="_pEmCvbXDEeamG-Ij7YnW7w" target="_pEmqELXDEeamG-Ij7YnW7w"> | ||
1974 | <children xmi:type="notation:Node" xmi:id="_pEmq27XDEeamG-Ij7YnW7w" type="6001"> | ||
1975 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmq3LXDEeamG-Ij7YnW7w" x="1" y="-12"/> | ||
1976 | </children> | ||
1977 | <children xmi:type="notation:Node" xmi:id="_pEmq3bXDEeamG-Ij7YnW7w" type="6002"> | ||
1978 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmq3rXDEeamG-Ij7YnW7w" x="71" y="10"/> | ||
1979 | </children> | ||
1980 | <children xmi:type="notation:Node" xmi:id="_pEmq37XDEeamG-Ij7YnW7w" type="6003"> | ||
1981 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmq4LXDEeamG-Ij7YnW7w" x="-47" y="-51"/> | ||
1982 | </children> | ||
1983 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_pEmq4bXDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
1984 | <styles xmi:type="notation:FontStyle" xmi:id="_pEmq4rXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
1985 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_pEmq47XDEeamG-Ij7YnW7w" points="[0, -58, -116, 87]$[216, -58, 100, 87]$[216, -119, 100, 26]"/> | ||
1986 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pEmq5LXDEeamG-Ij7YnW7w" id="(1.0,1.8478260869565217)"/> | ||
1987 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pEmq5bXDEeamG-Ij7YnW7w" id="(0.0,0.5737704918032787)"/> | ||
1988 | </edges> | ||
1989 | <edges xmi:type="notation:Edge" xmi:id="_pEmq8rXDEeamG-Ij7YnW7w" visible="false" type="4001" element="_pEmrmLXDEeamG-Ij7YnW7w" source="_pEmCvbXDEeamG-Ij7YnW7w" target="_pEmpy7XDEeamG-Ij7YnW7w"> | ||
1990 | <children xmi:type="notation:Node" xmi:id="_pEmq87XDEeamG-Ij7YnW7w" type="6001"> | ||
1991 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmq9LXDEeamG-Ij7YnW7w" x="-4" y="55"/> | ||
1992 | </children> | ||
1993 | <children xmi:type="notation:Node" xmi:id="_pEmq9bXDEeamG-Ij7YnW7w" type="6002"> | ||
1994 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmq9rXDEeamG-Ij7YnW7w" x="173" y="-16"/> | ||
1995 | </children> | ||
1996 | <children xmi:type="notation:Node" xmi:id="_pEmq97XDEeamG-Ij7YnW7w" type="6003"> | ||
1997 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pEmq-LXDEeamG-Ij7YnW7w" x="-28" y="10"/> | ||
1998 | </children> | ||
1999 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_pEmq-bXDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
2000 | <styles xmi:type="notation:FontStyle" xmi:id="_pEmq-rXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
2001 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_pEmq-7XDEeamG-Ij7YnW7w" points="[0, 0, 129, 231]$[0, -138, 129, 93]$[-129, -138, 0, 93]$[-129, -231, 0, 0]"/> | ||
2002 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pEmq_LXDEeamG-Ij7YnW7w" id="(0.37748344370860926,0.0)"/> | ||
2003 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_pEmq_bXDEeamG-Ij7YnW7w" id="(0.3813559322033898,1.0)"/> | ||
2004 | </edges> | ||
2005 | <edges xmi:type="notation:Edge" xmi:id="_7EfWwLXDEeamG-Ij7YnW7w" type="4001" element="_7EbsYLXDEeamG-Ij7YnW7w" source="_pEmp2bXDEeamG-Ij7YnW7w" target="_7EeIoLXDEeamG-Ij7YnW7w"> | ||
2006 | <children xmi:type="notation:Node" xmi:id="_7EfWxLXDEeamG-Ij7YnW7w" type="6001"> | ||
2007 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7EfWxbXDEeamG-Ij7YnW7w" x="-18" y="-11"/> | ||
2008 | </children> | ||
2009 | <children xmi:type="notation:Node" xmi:id="_7EfWxrXDEeamG-Ij7YnW7w" type="6002"> | ||
2010 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7EfWx7XDEeamG-Ij7YnW7w" x="3" y="10"/> | ||
2011 | </children> | ||
2012 | <children xmi:type="notation:Node" xmi:id="_7Ef90LXDEeamG-Ij7YnW7w" type="6003"> | ||
2013 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7Ef90bXDEeamG-Ij7YnW7w" x="-97" y="44"/> | ||
2014 | </children> | ||
2015 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_7EfWwbXDEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
2016 | <styles xmi:type="notation:FontStyle" xmi:id="_7EfWwrXDEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
2017 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_7EfWw7XDEeamG-Ij7YnW7w" points="[59, 4, -204, -17]$[204, 4, -59, -17]"/> | ||
2018 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_7Ef90rXDEeamG-Ij7YnW7w" id="(0.5,0.48484848484848486)"/> | ||
2019 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_7Ef907XDEeamG-Ij7YnW7w" id="(0.5,0.5)"/> | ||
2020 | </edges> | ||
2021 | <edges xmi:type="notation:Edge" xmi:id="_QSg-QLXFEeamG-Ij7YnW7w" type="4001" element="_QSMOILXFEeamG-Ij7YnW7w" source="_pEmqELXDEeamG-Ij7YnW7w" target="_n_b8ALXEEeamG-Ij7YnW7w"> | ||
2022 | <children xmi:type="notation:Node" xmi:id="_QSg-RLXFEeamG-Ij7YnW7w" type="6001"> | ||
2023 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QSg-RbXFEeamG-Ij7YnW7w" x="-14" y="-14"/> | ||
2024 | </children> | ||
2025 | <children xmi:type="notation:Node" xmi:id="_QSg-RrXFEeamG-Ij7YnW7w" type="6002"> | ||
2026 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QSg-R7XFEeamG-Ij7YnW7w" y="10"/> | ||
2027 | </children> | ||
2028 | <children xmi:type="notation:Node" xmi:id="_QSg-SLXFEeamG-Ij7YnW7w" type="6003"> | ||
2029 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QSg-SbXFEeamG-Ij7YnW7w" y="10"/> | ||
2030 | </children> | ||
2031 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_QSg-QbXFEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
2032 | <styles xmi:type="notation:FontStyle" xmi:id="_QSg-QrXFEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
2033 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_QSg-Q7XFEeamG-Ij7YnW7w" points="[73, 20, -164, -21]$[205, 20, -32, -21]"/> | ||
2034 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_QShlULXFEeamG-Ij7YnW7w" id="(0.5852272727272727,0.0)"/> | ||
2035 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_QShlUbXFEeamG-Ij7YnW7w" id="(0.2711864406779661,1.0)"/> | ||
2036 | </edges> | ||
2037 | <edges xmi:type="notation:Edge" xmi:id="_Z8ZpoLXFEeamG-Ij7YnW7w" type="4001" element="_Z8EScLXFEeamG-Ij7YnW7w" source="__5rHkLXEEeamG-Ij7YnW7w" target="_n_b8ALXEEeamG-Ij7YnW7w"> | ||
2038 | <children xmi:type="notation:Node" xmi:id="_Z8ZppLXFEeamG-Ij7YnW7w" type="6001"> | ||
2039 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z8ZppbXFEeamG-Ij7YnW7w" y="-10"/> | ||
2040 | </children> | ||
2041 | <children xmi:type="notation:Node" xmi:id="_Z8aQsLXFEeamG-Ij7YnW7w" type="6002"> | ||
2042 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z8aQsbXFEeamG-Ij7YnW7w" y="10"/> | ||
2043 | </children> | ||
2044 | <children xmi:type="notation:Node" xmi:id="_Z8aQsrXFEeamG-Ij7YnW7w" type="6003"> | ||
2045 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z8aQs7XFEeamG-Ij7YnW7w" y="10"/> | ||
2046 | </children> | ||
2047 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_Z8ZpobXFEeamG-Ij7YnW7w" routing="Tree"/> | ||
2048 | <styles xmi:type="notation:FontStyle" xmi:id="_Z8ZporXFEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
2049 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Z8Zpo7XFEeamG-Ij7YnW7w" points="[0, 0, -90, 31]$[90, -31, 0, 0]"/> | ||
2050 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Z8aQtLXFEeamG-Ij7YnW7w" id="(0.49707602339181284,0.0)"/> | ||
2051 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Z8aQtbXFEeamG-Ij7YnW7w" id="(0.5,0.5)"/> | ||
2052 | </edges> | ||
2053 | <edges xmi:type="notation:Edge" xmi:id="_aX1BYLXFEeamG-Ij7YnW7w" type="4001" element="_aXV5MLXFEeamG-Ij7YnW7w" source="_ERrCkLXFEeamG-Ij7YnW7w" target="_n_b8ALXEEeamG-Ij7YnW7w"> | ||
2054 | <children xmi:type="notation:Node" xmi:id="_aX1BZLXFEeamG-Ij7YnW7w" type="6001"> | ||
2055 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aX1BZbXFEeamG-Ij7YnW7w" y="-10"/> | ||
2056 | </children> | ||
2057 | <children xmi:type="notation:Node" xmi:id="_aX1BZrXFEeamG-Ij7YnW7w" type="6002"> | ||
2058 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aX1BZ7XFEeamG-Ij7YnW7w" y="10"/> | ||
2059 | </children> | ||
2060 | <children xmi:type="notation:Node" xmi:id="_aX1BaLXFEeamG-Ij7YnW7w" type="6003"> | ||
2061 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aX1BabXFEeamG-Ij7YnW7w" y="10"/> | ||
2062 | </children> | ||
2063 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_aX1BYbXFEeamG-Ij7YnW7w" routing="Tree"/> | ||
2064 | <styles xmi:type="notation:FontStyle" xmi:id="_aX1BYrXFEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
2065 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_aX1BY7XFEeamG-Ij7YnW7w" points="[0, 0, 20, 33]$[-20, -33, 0, 0]"/> | ||
2066 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_aX1ocLXFEeamG-Ij7YnW7w" id="(0.5900621118012422,0.0)"/> | ||
2067 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_aX1ocbXFEeamG-Ij7YnW7w" id="(0.2711864406779661,1.0)"/> | ||
2068 | </edges> | ||
2069 | <edges xmi:type="notation:Edge" xmi:id="_aqyZoLXFEeamG-Ij7YnW7w" type="4001" element="_aqZYELXFEeamG-Ij7YnW7w" source="_HsPE8LXFEeamG-Ij7YnW7w" target="_n_b8ALXEEeamG-Ij7YnW7w"> | ||
2070 | <children xmi:type="notation:Node" xmi:id="_aqyZpLXFEeamG-Ij7YnW7w" type="6001"> | ||
2071 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aqyZpbXFEeamG-Ij7YnW7w" y="-10"/> | ||
2072 | </children> | ||
2073 | <children xmi:type="notation:Node" xmi:id="_aqzAsLXFEeamG-Ij7YnW7w" type="6002"> | ||
2074 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aqzAsbXFEeamG-Ij7YnW7w" y="10"/> | ||
2075 | </children> | ||
2076 | <children xmi:type="notation:Node" xmi:id="_aqzAsrXFEeamG-Ij7YnW7w" type="6003"> | ||
2077 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_aqzAs7XFEeamG-Ij7YnW7w" y="10"/> | ||
2078 | </children> | ||
2079 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_aqyZobXFEeamG-Ij7YnW7w" routing="Tree"/> | ||
2080 | <styles xmi:type="notation:FontStyle" xmi:id="_aqyZorXFEeamG-Ij7YnW7w" fontName="Segoe UI" fontHeight="8"/> | ||
2081 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_aqyZo7XFEeamG-Ij7YnW7w" points="[0, 0, 82, 60]$[-82, -60, 0, 0]"/> | ||
2082 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_aqzAtLXFEeamG-Ij7YnW7w" id="(0.4661016949152542,0.0)"/> | ||
2083 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_aqzAtbXFEeamG-Ij7YnW7w" id="(0.2711864406779661,1.0)"/> | ||
2084 | </edges> | ||
2085 | <edges xmi:type="notation:Edge" xmi:id="_jDM2ELXFEeamG-Ij7YnW7w" type="4001" element="_jC230LXFEeamG-Ij7YnW7w" source="_HsPE8LXFEeamG-Ij7YnW7w" target="_KRyK4LXFEeamG-Ij7YnW7w"> | ||
2086 | <children xmi:type="notation:Node" xmi:id="_jDM2FLXFEeamG-Ij7YnW7w" type="6001"> | ||
2087 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jDM2FbXFEeamG-Ij7YnW7w" x="-1" y="-47"/> | ||
2088 | </children> | ||
2089 | <children xmi:type="notation:Node" xmi:id="_jDM2FrXFEeamG-Ij7YnW7w" type="6002"> | ||
2090 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jDM2F7XFEeamG-Ij7YnW7w" y="10"/> | ||
2091 | </children> | ||
2092 | <children xmi:type="notation:Node" xmi:id="_jDNdILXFEeamG-Ij7YnW7w" type="6003"> | ||
2093 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jDNdIbXFEeamG-Ij7YnW7w" y="10"/> | ||
2094 | </children> | ||
2095 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_jDM2EbXFEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
2096 | <styles xmi:type="notation:FontStyle" xmi:id="_jDM2ErXFEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
2097 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_jDM2E7XFEeamG-Ij7YnW7w" points="[0, 20, 1, -34]$[0, 45, 1, -9]"/> | ||
2098 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_th_wMLXFEeamG-Ij7YnW7w" id="(0.5,0.5)"/> | ||
2099 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_jDNdIrXFEeamG-Ij7YnW7w" id="(0.49677419354838703,0.20833333333333334)"/> | ||
2100 | </edges> | ||
2101 | <edges xmi:type="notation:Edge" xmi:id="_xIpt0LXFEeamG-Ij7YnW7w" type="4001" element="_xIQsQLXFEeamG-Ij7YnW7w" source="__5rHkLXEEeamG-Ij7YnW7w" target="_pEmpy7XDEeamG-Ij7YnW7w"> | ||
2102 | <children xmi:type="notation:Node" xmi:id="_xIpt1LXFEeamG-Ij7YnW7w" type="6001"> | ||
2103 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xIpt1bXFEeamG-Ij7YnW7w" x="-57" y="-13"/> | ||
2104 | </children> | ||
2105 | <children xmi:type="notation:Node" xmi:id="_xIpt1rXFEeamG-Ij7YnW7w" type="6002"> | ||
2106 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xIpt17XFEeamG-Ij7YnW7w" x="13"/> | ||
2107 | </children> | ||
2108 | <children xmi:type="notation:Node" xmi:id="_xIpt2LXFEeamG-Ij7YnW7w" type="6003"> | ||
2109 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xIqU4LXFEeamG-Ij7YnW7w" x="1" y="10"/> | ||
2110 | </children> | ||
2111 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_xIpt0bXFEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
2112 | <styles xmi:type="notation:FontStyle" xmi:id="_xIpt0rXFEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
2113 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_xIpt07XFEeamG-Ij7YnW7w" points="[0, 0, -94, -24]$[0, 43, -94, 19]$[45, 43, -49, 19]"/> | ||
2114 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_xIqU4bXFEeamG-Ij7YnW7w" id="(0.29239766081871343,1.0)"/> | ||
2115 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_xIqU4rXFEeamG-Ij7YnW7w" id="(0.4152542372881356,0.0)"/> | ||
2116 | </edges> | ||
2117 | <edges xmi:type="notation:Edge" xmi:id="_2W2RALXFEeamG-Ij7YnW7w" type="4001" element="_2WivALXFEeamG-Ij7YnW7w" source="_ERrCkLXFEeamG-Ij7YnW7w" target="_pEmpy7XDEeamG-Ij7YnW7w"> | ||
2118 | <children xmi:type="notation:Node" xmi:id="_2W24ELXFEeamG-Ij7YnW7w" type="6001"> | ||
2119 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2W24EbXFEeamG-Ij7YnW7w" x="34" y="22"/> | ||
2120 | </children> | ||
2121 | <children xmi:type="notation:Node" xmi:id="_2W24ErXFEeamG-Ij7YnW7w" type="6002"> | ||
2122 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2W24E7XFEeamG-Ij7YnW7w" x="-10" y="4"/> | ||
2123 | </children> | ||
2124 | <children xmi:type="notation:Node" xmi:id="_2W24FLXFEeamG-Ij7YnW7w" type="6003"> | ||
2125 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2W24FbXFEeamG-Ij7YnW7w" x="-20" y="-10"/> | ||
2126 | </children> | ||
2127 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_2W2RAbXFEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
2128 | <styles xmi:type="notation:FontStyle" xmi:id="_2W2RArXFEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
2129 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_2W2RA7XFEeamG-Ij7YnW7w" points="[-11, 0, 91, -25]$[-11, 38, 91, 13]$[-53, 38, 49, 13]"/> | ||
2130 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_2W24FrXFEeamG-Ij7YnW7w" id="(0.5031055900621118,1.0)"/> | ||
2131 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_2W24F7XFEeamG-Ij7YnW7w" id="(0.5847457627118644,0.0)"/> | ||
2132 | </edges> | ||
2133 | <edges xmi:type="notation:Edge" xmi:id="_5HYe8LXFEeamG-Ij7YnW7w" type="4001" element="_5HFkALXFEeamG-Ij7YnW7w" source="_ERrCkLXFEeamG-Ij7YnW7w" target="_pEmpy7XDEeamG-Ij7YnW7w"> | ||
2134 | <children xmi:type="notation:Node" xmi:id="_5HYe9LXFEeamG-Ij7YnW7w" type="6001"> | ||
2135 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5HYe9bXFEeamG-Ij7YnW7w" x="-1" y="-13"/> | ||
2136 | </children> | ||
2137 | <children xmi:type="notation:Node" xmi:id="_5HYe9rXFEeamG-Ij7YnW7w" type="6002"> | ||
2138 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5HYe97XFEeamG-Ij7YnW7w" x="-14" y="10"/> | ||
2139 | </children> | ||
2140 | <children xmi:type="notation:Node" xmi:id="_5HYe-LXFEeamG-Ij7YnW7w" type="6003"> | ||
2141 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_5HYe-bXFEeamG-Ij7YnW7w" x="-23" y="-10"/> | ||
2142 | </children> | ||
2143 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_5HYe8bXFEeamG-Ij7YnW7w" routing="Rectilinear"/> | ||
2144 | <styles xmi:type="notation:FontStyle" xmi:id="_5HYe8rXFEeamG-Ij7YnW7w" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
2145 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_5HYe87XFEeamG-Ij7YnW7w" points="[-45, 0, 95, -25]$[-45, 48, 95, 23]$[-102, 48, 38, 23]"/> | ||
2146 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5HZGALXFEeamG-Ij7YnW7w" id="(0.8074534161490683,1.0)"/> | ||
2147 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_5HZGAbXFEeamG-Ij7YnW7w" id="(0.6779661016949152,0.0)"/> | ||
2148 | </edges> | ||
2149 | <edges xmi:type="notation:Connector" xmi:id="_CjcJsLXGEeamG-Ij7YnW7w" type="NoteAttachment" source="_AnFKsLXGEeamG-Ij7YnW7w" target="_KRyK4LXFEeamG-Ij7YnW7w" lineWidth="1"> | ||
2150 | <styles xmi:type="notation:ArrowStyle" xmi:id="_CjcJsbXGEeamG-Ij7YnW7w"/> | ||
2151 | <styles xmi:type="notation:LineTypeStyle" xmi:id="_CjcJsrXGEeamG-Ij7YnW7w"/> | ||
2152 | <element xsi:nil="true"/> | ||
2153 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_CjcJs7XGEeamG-Ij7YnW7w" points="[0, 0, -6, 43]$[-3, -20, -9, 23]"/> | ||
2154 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Cjel8LXGEeamG-Ij7YnW7w" id="(0.43,0.0)"/> | ||
2155 | </edges> | ||
2156 | <edges xmi:type="notation:Edge" xmi:id="_lcc_oL3MEeaj7tVusjQpHg" type="4001" element="_lb3w0L3MEeaj7tVusjQpHg" source="_pEmqELXDEeamG-Ij7YnW7w" target="_7EeIoLXDEeamG-Ij7YnW7w"> | ||
2157 | <children xmi:type="notation:Node" xmi:id="_lcdmsL3MEeaj7tVusjQpHg" type="6001"> | ||
2158 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lcdmsb3MEeaj7tVusjQpHg" y="-10"/> | ||
2159 | </children> | ||
2160 | <children xmi:type="notation:Node" xmi:id="_lcdmsr3MEeaj7tVusjQpHg" type="6002"> | ||
2161 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lcdms73MEeaj7tVusjQpHg" y="10"/> | ||
2162 | </children> | ||
2163 | <children xmi:type="notation:Node" xmi:id="_lcdmtL3MEeaj7tVusjQpHg" type="6003"> | ||
2164 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_lcdmtb3MEeaj7tVusjQpHg" y="10"/> | ||
2165 | </children> | ||
2166 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_lcc_ob3MEeaj7tVusjQpHg" routing="Rectilinear"/> | ||
2167 | <styles xmi:type="notation:FontStyle" xmi:id="_lcc_or3MEeaj7tVusjQpHg" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
2168 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_lcc_o73MEeaj7tVusjQpHg" points="[0, 0, -174, 257]$[174, -257, 0, 0]"/> | ||
2169 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_lceNwL3MEeaj7tVusjQpHg" id="(0.8409090909090909,0.0)"/> | ||
2170 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_lceNwb3MEeaj7tVusjQpHg" id="(0.5,1.0)"/> | ||
2171 | </edges> | ||
2172 | <edges xmi:type="notation:Edge" xmi:id="_oQo-gL3MEeaj7tVusjQpHg" type="4001" element="_oQIBIL3MEeaj7tVusjQpHg" source="_pEmqELXDEeamG-Ij7YnW7w" target="_7EeIoLXDEeamG-Ij7YnW7w"> | ||
2173 | <children xmi:type="notation:Node" xmi:id="_oQplkL3MEeaj7tVusjQpHg" type="6001"> | ||
2174 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oQplkb3MEeaj7tVusjQpHg" x="-32" y="-10"/> | ||
2175 | </children> | ||
2176 | <children xmi:type="notation:Node" xmi:id="_oQplkr3MEeaj7tVusjQpHg" type="6002"> | ||
2177 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oQplk73MEeaj7tVusjQpHg" x="4" y="10"/> | ||
2178 | </children> | ||
2179 | <children xmi:type="notation:Node" xmi:id="_oQpllL3MEeaj7tVusjQpHg" type="6003"> | ||
2180 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oQpllb3MEeaj7tVusjQpHg" x="-4" y="10"/> | ||
2181 | </children> | ||
2182 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_oQo-gb3MEeaj7tVusjQpHg" routing="Rectilinear"/> | ||
2183 | <styles xmi:type="notation:FontStyle" xmi:id="_oQo-gr3MEeaj7tVusjQpHg" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
2184 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_oQo-g73MEeaj7tVusjQpHg" points="[26, 0, -195, 257]$[26, -110, -195, 147]$[221, -110, 0, 147]$[221, -257, 0, 0]"/> | ||
2185 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_oQpllr3MEeaj7tVusjQpHg" id="(0.75,0.0)"/> | ||
2186 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_oQpll73MEeaj7tVusjQpHg" id="(0.7627118644067796,1.0)"/> | ||
2187 | </edges> | ||
2188 | <edges xmi:type="notation:Edge" xmi:id="_RVMxwMAiEeaaj7sYFz2QKg" type="4001" element="_RU0XQMAiEeaaj7sYFz2QKg" source="_pEmCvbXDEeamG-Ij7YnW7w" target="_pEmpy7XDEeamG-Ij7YnW7w"> | ||
2189 | <children xmi:type="notation:Node" xmi:id="_RVRqQMAiEeaaj7sYFz2QKg" type="6001"> | ||
2190 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RVRqQcAiEeaaj7sYFz2QKg" x="10" y="-10"/> | ||
2191 | </children> | ||
2192 | <children xmi:type="notation:Node" xmi:id="_RVSRUMAiEeaaj7sYFz2QKg" type="6002"> | ||
2193 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RVSRUcAiEeaaj7sYFz2QKg" x="97" y="10"/> | ||
2194 | </children> | ||
2195 | <children xmi:type="notation:Node" xmi:id="_RVS4YMAiEeaaj7sYFz2QKg" type="6003"> | ||
2196 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_RVS4YcAiEeaaj7sYFz2QKg" x="11" y="10"/> | ||
2197 | </children> | ||
2198 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_RVMxwcAiEeaaj7sYFz2QKg" routing="Rectilinear"/> | ||
2199 | <styles xmi:type="notation:FontStyle" xmi:id="_RVMxwsAiEeaaj7sYFz2QKg" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
2200 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_RVMxw8AiEeaaj7sYFz2QKg" points="[1, 23, -528, -20]$[1, 57, -528, 14]$[470, 57, -59, 14]"/> | ||
2201 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_RVY_AMAiEeaaj7sYFz2QKg" id="(0.49673202614379086,0.5)"/> | ||
2202 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_RVY_AcAiEeaaj7sYFz2QKg" id="(0.5,0.4878048780487805)"/> | ||
2203 | </edges> | ||
2204 | <edges xmi:type="notation:Edge" xmi:id="_1x68MPMUEeagPYxz1ZWLIQ" type="4001" element="_1xkW4PMUEeagPYxz1ZWLIQ" source="_pEmCvbXDEeamG-Ij7YnW7w" target="_pEmCxLXDEeamG-Ij7YnW7w"> | ||
2205 | <children xmi:type="notation:Node" xmi:id="_1yHwgPMUEeagPYxz1ZWLIQ" type="6001"> | ||
2206 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1yHwgfMUEeagPYxz1ZWLIQ" y="-10"/> | ||
2207 | </children> | ||
2208 | <children xmi:type="notation:Node" xmi:id="_1yJlsPMUEeagPYxz1ZWLIQ" type="6002"> | ||
2209 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1yJlsfMUEeagPYxz1ZWLIQ" y="10"/> | ||
2210 | </children> | ||
2211 | <children xmi:type="notation:Node" xmi:id="_1yKMwPMUEeagPYxz1ZWLIQ" type="6003"> | ||
2212 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1yKMwfMUEeagPYxz1ZWLIQ" y="10"/> | ||
2213 | </children> | ||
2214 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_1x68MfMUEeagPYxz1ZWLIQ" routing="Rectilinear"/> | ||
2215 | <styles xmi:type="notation:FontStyle" xmi:id="_1x68MvMUEeagPYxz1ZWLIQ" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
2216 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_1x68M_MUEeagPYxz1ZWLIQ" points="[195, 490, 195, 490]$[212, 30, 212, 30]"/> | ||
2217 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1yQ6cPMUEeagPYxz1ZWLIQ" id="(0.49673202614379086,0.5)"/> | ||
2218 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1yQ6cfMUEeagPYxz1ZWLIQ" id="(0.5,0.5)"/> | ||
2219 | </edges> | ||
2220 | <edges xmi:type="notation:Edge" xmi:id="_3fl-8PMUEeagPYxz1ZWLIQ" type="4001" element="_3d9AMPMUEeagPYxz1ZWLIQ" source="_pEmCvbXDEeamG-Ij7YnW7w" target="_ERrCkLXFEeamG-Ij7YnW7w"> | ||
2221 | <children xmi:type="notation:Node" xmi:id="_3fnNEPMUEeagPYxz1ZWLIQ" type="6001"> | ||
2222 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3fnNEfMUEeagPYxz1ZWLIQ" x="-14" y="-10"/> | ||
2223 | </children> | ||
2224 | <children xmi:type="notation:Node" xmi:id="_3fnNEvMUEeagPYxz1ZWLIQ" type="6002"> | ||
2225 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3fnNE_MUEeagPYxz1ZWLIQ" x="118" y="10"/> | ||
2226 | </children> | ||
2227 | <children xmi:type="notation:Node" xmi:id="_3fnNFPMUEeagPYxz1ZWLIQ" type="6003"> | ||
2228 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_3fnNFfMUEeagPYxz1ZWLIQ" x="-155" y="10"/> | ||
2229 | </children> | ||
2230 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_3fl-8fMUEeagPYxz1ZWLIQ" routing="Rectilinear"/> | ||
2231 | <styles xmi:type="notation:FontStyle" xmi:id="_3fl-8vMUEeagPYxz1ZWLIQ" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
2232 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_3fl-8_MUEeagPYxz1ZWLIQ" points="[-96, 23, -580, 45]$[-96, 97, -580, 119]$[594, 97, 110, 119]$[594, -1, 110, 21]"/> | ||
2233 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_3fn0IPMUEeagPYxz1ZWLIQ" id="(1.0,0.5)"/> | ||
2234 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_3fn0IfMUEeagPYxz1ZWLIQ" id="(0.0,0.5227272727272727)"/> | ||
2235 | </edges> | ||
2236 | </data> | ||
2237 | </ownedAnnotationEntries> | ||
2238 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_pEmrI7XDEeamG-Ij7YnW7w" name="PartialInterpretation" tooltipText="" outgoingEdges="_pEmrKLXDEeamG-Ij7YnW7w _pEmrkLXDEeamG-Ij7YnW7w _pEmrmLXDEeamG-Ij7YnW7w _RU0XQMAiEeaaj7sYFz2QKg _1xkW4PMUEeagPYxz1ZWLIQ _3d9AMPMUEeagPYxz1ZWLIQ" width="12" height="10"> | ||
2239 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialInterpretation"/> | ||
2240 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialInterpretation"/> | ||
2241 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2242 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2243 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2244 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_QaSh8PMVEeagPYxz1ZWLIQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
2245 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
2246 | </ownedStyle> | ||
2247 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2248 | <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_RUgOMMAiEeaaj7sYFz2QKg" name="minNewElements : EInt = 0" tooltipText=""> | ||
2249 | <target xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//PartialInterpretation/minNewElements"/> | ||
2250 | <semanticElements xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//PartialInterpretation/minNewElements"/> | ||
2251 | <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_RUhcUMAiEeaaj7sYFz2QKg" labelAlignment="LEFT" description="_RUg1QMAiEeaaj7sYFz2QKg"> | ||
2252 | <labelFormat>bold</labelFormat> | ||
2253 | </ownedStyle> | ||
2254 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
2255 | </ownedElements> | ||
2256 | <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_RUiDYMAiEeaaj7sYFz2QKg" name="maxNewElements : EInt = 0" tooltipText=""> | ||
2257 | <target xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//PartialInterpretation/maxNewElements"/> | ||
2258 | <semanticElements xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//PartialInterpretation/maxNewElements"/> | ||
2259 | <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_RUiqcMAiEeaaj7sYFz2QKg" labelAlignment="LEFT" description="_RUg1QMAiEeaaj7sYFz2QKg"> | ||
2260 | <labelFormat>bold</labelFormat> | ||
2261 | </ownedStyle> | ||
2262 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
2263 | </ownedElements> | ||
2264 | </ownedDiagramElements> | ||
2265 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_pEmrJbXDEeamG-Ij7YnW7w" name="LogicProblem" tooltipText="" outgoingEdges="_pEmrSbXDEeamG-Ij7YnW7w _pEmrUbXDEeamG-Ij7YnW7w" incomingEdges="_pEmrKLXDEeamG-Ij7YnW7w _1xkW4PMUEeagPYxz1ZWLIQ" width="12" height="10"> | ||
2266 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem"/> | ||
2267 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem"/> | ||
2268 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_pEmrJrXDEeamG-Ij7YnW7w"> | ||
2269 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
2270 | </decorations> | ||
2271 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2272 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2273 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2274 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_pEmrJ7XDEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
2275 | <customFeatures>backgroundColor</customFeatures> | ||
2276 | <customFeatures>foregroundColor</customFeatures> | ||
2277 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
2278 | </ownedStyle> | ||
2279 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2280 | </ownedDiagramElements> | ||
2281 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_pEmrKLXDEeamG-Ij7YnW7w" name="[1..1] problem" sourceNode="_pEmrI7XDEeamG-Ij7YnW7w" targetNode="_pEmrJbXDEeamG-Ij7YnW7w"> | ||
2282 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/problem"/> | ||
2283 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/problem"/> | ||
2284 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_pEmrKbXDEeamG-Ij7YnW7w" description="_pEmCs7XDEeamG-Ij7YnW7w" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2285 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_pEmrKrXDEeamG-Ij7YnW7w" showIcon="false"> | ||
2286 | <customFeatures>labelSize</customFeatures> | ||
2287 | <labelFormat>bold</labelFormat> | ||
2288 | </centerLabelStyle> | ||
2289 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_pEmrK7XDEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
2290 | <customFeatures>labelSize</customFeatures> | ||
2291 | </endLabelStyle> | ||
2292 | </ownedStyle> | ||
2293 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2294 | </ownedDiagramElements> | ||
2295 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_pEmrL7XDEeamG-Ij7YnW7w" name="DefinedElement" tooltipText="" incomingEdges="_pEmrUbXDEeamG-Ij7YnW7w _pEmrmLXDEeamG-Ij7YnW7w _xIQsQLXFEeamG-Ij7YnW7w _2WivALXFEeamG-Ij7YnW7w _5HFkALXFEeamG-Ij7YnW7w _RU0XQMAiEeaaj7sYFz2QKg" width="12" height="10"> | ||
2296 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/> | ||
2297 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/> | ||
2298 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_pEmrMLXDEeamG-Ij7YnW7w"> | ||
2299 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
2300 | </decorations> | ||
2301 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2302 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2303 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2304 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_pEmrMbXDEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
2305 | <customFeatures>backgroundColor</customFeatures> | ||
2306 | <customFeatures>foregroundColor</customFeatures> | ||
2307 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
2308 | </ownedStyle> | ||
2309 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2310 | </ownedDiagramElements> | ||
2311 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_pEmrNbXDEeamG-Ij7YnW7w" name="Relation" tooltipText="" outgoingEdges="_7EbsYLXDEeamG-Ij7YnW7w" incomingEdges="_pEmrSbXDEeamG-Ij7YnW7w _pEmrZbXDEeamG-Ij7YnW7w" width="12" height="10"> | ||
2312 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Relation"/> | ||
2313 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Relation"/> | ||
2314 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_pEmrNrXDEeamG-Ij7YnW7w"> | ||
2315 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
2316 | </decorations> | ||
2317 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2318 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2319 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2320 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_pEmrN7XDEeamG-Ij7YnW7w" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
2321 | <customFeatures>backgroundColor</customFeatures> | ||
2322 | <customFeatures>foregroundColor</customFeatures> | ||
2323 | <labelFormat>italic</labelFormat> | ||
2324 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/> | ||
2325 | </ownedStyle> | ||
2326 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2327 | </ownedDiagramElements> | ||
2328 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_pEmrSbXDEeamG-Ij7YnW7w" name="[0..*] relations" sourceNode="_pEmrJbXDEeamG-Ij7YnW7w" targetNode="_pEmrNbXDEeamG-Ij7YnW7w"> | ||
2329 | <target xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/relations"/> | ||
2330 | <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/relations"/> | ||
2331 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_pEmrSrXDEeamG-Ij7YnW7w" description="_pEmCt7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2332 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_pEmrS7XDEeamG-Ij7YnW7w" showIcon="false"> | ||
2333 | <customFeatures>labelSize</customFeatures> | ||
2334 | </centerLabelStyle> | ||
2335 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_pEmrTLXDEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
2336 | <customFeatures>labelSize</customFeatures> | ||
2337 | </endLabelStyle> | ||
2338 | </ownedStyle> | ||
2339 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2340 | </ownedDiagramElements> | ||
2341 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_pEmrUbXDEeamG-Ij7YnW7w" name="[0..*] elements" visible="false" sourceNode="_pEmrJbXDEeamG-Ij7YnW7w" targetNode="_pEmrL7XDEeamG-Ij7YnW7w"> | ||
2342 | <target xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/elements"/> | ||
2343 | <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem/elements"/> | ||
2344 | <graphicalFilters xmi:type="diagram:HideFilter" xmi:id="_x9broLXDEeamG-Ij7YnW7w"/> | ||
2345 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_pEmrUrXDEeamG-Ij7YnW7w" description="_pEmCt7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2346 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_pEmrU7XDEeamG-Ij7YnW7w" showIcon="false"> | ||
2347 | <customFeatures>labelSize</customFeatures> | ||
2348 | </centerLabelStyle> | ||
2349 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_pEmrVLXDEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
2350 | <customFeatures>labelSize</customFeatures> | ||
2351 | </endLabelStyle> | ||
2352 | </ownedStyle> | ||
2353 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2354 | </ownedDiagramElements> | ||
2355 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_pEmrYrXDEeamG-Ij7YnW7w" name="RelationDeclaration" tooltipText="" outgoingEdges="_pEmrZbXDEeamG-Ij7YnW7w" incomingEdges="_pEmrhLXDEeamG-Ij7YnW7w" width="12" height="10"> | ||
2356 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//RelationDeclaration"/> | ||
2357 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//RelationDeclaration"/> | ||
2358 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_pEmrY7XDEeamG-Ij7YnW7w"> | ||
2359 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
2360 | </decorations> | ||
2361 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2362 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2363 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2364 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_pEmrZLXDEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" backgroundColor="237,201,122" foregroundColor="237,201,122"> | ||
2365 | <customFeatures>backgroundColor</customFeatures> | ||
2366 | <customFeatures>foregroundColor</customFeatures> | ||
2367 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
2368 | </ownedStyle> | ||
2369 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2370 | </ownedDiagramElements> | ||
2371 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_pEmrZbXDEeamG-Ij7YnW7w" sourceNode="_pEmrYrXDEeamG-Ij7YnW7w" targetNode="_pEmrNbXDEeamG-Ij7YnW7w"> | ||
2372 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//RelationDeclaration"/> | ||
2373 | <semanticElements xmi:type="ecore:EGenericType" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//RelationDeclaration/@eGenericSuperTypes.0"/> | ||
2374 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_pEmrZrXDEeamG-Ij7YnW7w"> | ||
2375 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
2376 | </decorations> | ||
2377 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_pEmrZ7XDEeamG-Ij7YnW7w" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
2378 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
2379 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_pEmraLXDEeamG-Ij7YnW7w" showIcon="false"> | ||
2380 | <labelFormat>italic</labelFormat> | ||
2381 | </beginLabelStyle> | ||
2382 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_pEmrabXDEeamG-Ij7YnW7w" showIcon="false"/> | ||
2383 | </ownedStyle> | ||
2384 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
2385 | </ownedDiagramElements> | ||
2386 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_pEmrfLXDEeamG-Ij7YnW7w" name="PartialRelationInterpretation" tooltipText="" outgoingEdges="_pEmrhLXDEeamG-Ij7YnW7w _QSMOILXFEeamG-Ij7YnW7w _lb3w0L3MEeaj7tVusjQpHg _oQIBIL3MEeaj7tVusjQpHg" incomingEdges="_pEmrkLXDEeamG-Ij7YnW7w" width="12" height="10"> | ||
2387 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialRelationInterpretation"/> | ||
2388 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialRelationInterpretation"/> | ||
2389 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2390 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2391 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2392 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_ybOiAMAjEeaaj7sYFz2QKg" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
2393 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
2394 | </ownedStyle> | ||
2395 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2396 | </ownedDiagramElements> | ||
2397 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_pEmrhLXDEeamG-Ij7YnW7w" name="[1..1] interpretationOf" sourceNode="_pEmrfLXDEeamG-Ij7YnW7w" targetNode="_pEmrYrXDEeamG-Ij7YnW7w"> | ||
2398 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialRelationInterpretation/interpretationOf"/> | ||
2399 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialRelationInterpretation/interpretationOf"/> | ||
2400 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_pEmrhbXDEeamG-Ij7YnW7w" description="_pEmCs7XDEeamG-Ij7YnW7w" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2401 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_pEmrhrXDEeamG-Ij7YnW7w" showIcon="false"> | ||
2402 | <labelFormat>bold</labelFormat> | ||
2403 | </centerLabelStyle> | ||
2404 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_pEmrh7XDEeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
2405 | </ownedStyle> | ||
2406 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2407 | </ownedDiagramElements> | ||
2408 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_pEmrkLXDEeamG-Ij7YnW7w" name="[0..*] partialrelationinterpretation" sourceNode="_pEmrI7XDEeamG-Ij7YnW7w" targetNode="_pEmrfLXDEeamG-Ij7YnW7w"> | ||
2409 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/partialrelationinterpretation"/> | ||
2410 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/partialrelationinterpretation"/> | ||
2411 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_pEmrkbXDEeamG-Ij7YnW7w" description="_pEmCt7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2412 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_pEmrkrXDEeamG-Ij7YnW7w" showIcon="false"> | ||
2413 | <customFeatures>labelSize</customFeatures> | ||
2414 | </centerLabelStyle> | ||
2415 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_pEmrk7XDEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
2416 | <customFeatures>labelSize</customFeatures> | ||
2417 | </endLabelStyle> | ||
2418 | </ownedStyle> | ||
2419 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2420 | </ownedDiagramElements> | ||
2421 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_pEmrmLXDEeamG-Ij7YnW7w" name="[0..*] newElements" visible="false" sourceNode="_pEmrI7XDEeamG-Ij7YnW7w" targetNode="_pEmrL7XDEeamG-Ij7YnW7w"> | ||
2422 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/newElements"/> | ||
2423 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/newElements"/> | ||
2424 | <graphicalFilters xmi:type="diagram:HideFilter" xmi:id="_xG99sLXDEeamG-Ij7YnW7w"/> | ||
2425 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_pEmrmbXDEeamG-Ij7YnW7w" description="_pEmCt7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2426 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_pEmrmrXDEeamG-Ij7YnW7w" showIcon="false"> | ||
2427 | <customFeatures>labelSize</customFeatures> | ||
2428 | </centerLabelStyle> | ||
2429 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_pEmrm7XDEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
2430 | <customFeatures>labelSize</customFeatures> | ||
2431 | </endLabelStyle> | ||
2432 | </ownedStyle> | ||
2433 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2434 | </ownedDiagramElements> | ||
2435 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_7EWz4LXDEeamG-Ij7YnW7w" name="TypeReference" tooltipText="" incomingEdges="_7EbsYLXDEeamG-Ij7YnW7w _lb3w0L3MEeaj7tVusjQpHg _oQIBIL3MEeaj7tVusjQpHg" width="12" height="10"> | ||
2436 | <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//TypeReference"/> | ||
2437 | <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//TypeReference"/> | ||
2438 | <decorations xmi:type="viewpoint:Decoration" xmi:id="_7EZ3MLXDEeamG-Ij7YnW7w"> | ||
2439 | <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/> | ||
2440 | </decorations> | ||
2441 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2442 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2443 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2444 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_7EWz4bXDEeamG-Ij7YnW7w" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="228,228,228"> | ||
2445 | <labelFormat>italic</labelFormat> | ||
2446 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/> | ||
2447 | </ownedStyle> | ||
2448 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2449 | </ownedDiagramElements> | ||
2450 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_7EbsYLXDEeamG-Ij7YnW7w" name="[0..*] parameters" sourceNode="_pEmrNbXDEeamG-Ij7YnW7w" targetNode="_7EWz4LXDEeamG-Ij7YnW7w"> | ||
2451 | <target xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Relation/parameters"/> | ||
2452 | <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//Relation/parameters"/> | ||
2453 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_7EbsYbXDEeamG-Ij7YnW7w" description="_pEmCt7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2454 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_7EbsYrXDEeamG-Ij7YnW7w" showIcon="false"> | ||
2455 | <customFeatures>labelSize</customFeatures> | ||
2456 | </centerLabelStyle> | ||
2457 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_7EbsY7XDEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
2458 | <customFeatures>labelSize</customFeatures> | ||
2459 | </endLabelStyle> | ||
2460 | </ownedStyle> | ||
2461 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2462 | </ownedDiagramElements> | ||
2463 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_n-_3ILXEEeamG-Ij7YnW7w" name="RelationLink" tooltipText="" incomingEdges="_QSMOILXFEeamG-Ij7YnW7w _Z8EScLXFEeamG-Ij7YnW7w _aXV5MLXFEeamG-Ij7YnW7w _aqZYELXFEeamG-Ij7YnW7w" width="12" height="10"> | ||
2464 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//RelationLink"/> | ||
2465 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//RelationLink"/> | ||
2466 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2467 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2468 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2469 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_SP0_gLXFEeamG-Ij7YnW7w" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="228,228,228"> | ||
2470 | <labelFormat>italic</labelFormat> | ||
2471 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/> | ||
2472 | </ownedStyle> | ||
2473 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2474 | </ownedDiagramElements> | ||
2475 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="__5SGALXEEeamG-Ij7YnW7w" name="UnaryElementRelationLink" tooltipText="" outgoingEdges="_Z8EScLXFEeamG-Ij7YnW7w _xIQsQLXFEeamG-Ij7YnW7w" width="12" height="10"> | ||
2476 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//UnaryElementRelationLink"/> | ||
2477 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//UnaryElementRelationLink"/> | ||
2478 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2479 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2480 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2481 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="__5StELXEEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
2482 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
2483 | </ownedStyle> | ||
2484 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2485 | </ownedDiagramElements> | ||
2486 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_ERNIgLXFEeamG-Ij7YnW7w" name="BinaryElementRelationLink" tooltipText="" outgoingEdges="_aXV5MLXFEeamG-Ij7YnW7w _2WivALXFEeamG-Ij7YnW7w _5HFkALXFEeamG-Ij7YnW7w" incomingEdges="_3d9AMPMUEeagPYxz1ZWLIQ" width="12" height="10"> | ||
2487 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//BinaryElementRelationLink"/> | ||
2488 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//BinaryElementRelationLink"/> | ||
2489 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2490 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2491 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2492 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_ERNvkLXFEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
2493 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
2494 | </ownedStyle> | ||
2495 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2496 | </ownedDiagramElements> | ||
2497 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_Hr5GsLXFEeamG-Ij7YnW7w" name="NaryRelationLink" tooltipText="" outgoingEdges="_aqZYELXFEeamG-Ij7YnW7w _jC230LXFEeamG-Ij7YnW7w" width="12" height="10"> | ||
2498 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//NaryRelationLink"/> | ||
2499 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//NaryRelationLink"/> | ||
2500 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2501 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2502 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2503 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_Hr5twLXFEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
2504 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
2505 | </ownedStyle> | ||
2506 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2507 | </ownedDiagramElements> | ||
2508 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_KReB0LXFEeamG-Ij7YnW7w" name="NaryRelationLinkElement" tooltipText="" incomingEdges="_jC230LXFEeamG-Ij7YnW7w" width="12" height="10"> | ||
2509 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//NaryRelationLinkElement"/> | ||
2510 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//NaryRelationLinkElement"/> | ||
2511 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
2512 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
2513 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
2514 | <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_dT6_ELXFEeamG-Ij7YnW7w" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | ||
2515 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | ||
2516 | </ownedStyle> | ||
2517 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | ||
2518 | <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_cAH04LXFEeamG-Ij7YnW7w" name="index : EInt" tooltipText=""> | ||
2519 | <target xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//NaryRelationLinkElement/index"/> | ||
2520 | <semanticElements xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//NaryRelationLinkElement/index"/> | ||
2521 | <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_dT7mILXFEeamG-Ij7YnW7w" labelAlignment="LEFT"> | ||
2522 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/> | ||
2523 | </ownedStyle> | ||
2524 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
2525 | </ownedElements> | ||
2526 | </ownedDiagramElements> | ||
2527 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_QSMOILXFEeamG-Ij7YnW7w" name="[0..*] relationlinks" sourceNode="_pEmrfLXDEeamG-Ij7YnW7w" targetNode="_n-_3ILXEEeamG-Ij7YnW7w"> | ||
2528 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialRelationInterpretation/relationlinks"/> | ||
2529 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialRelationInterpretation/relationlinks"/> | ||
2530 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_QSMOIbXFEeamG-Ij7YnW7w" description="_pEmCt7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2531 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_QSMOIrXFEeamG-Ij7YnW7w" showIcon="false"> | ||
2532 | <customFeatures>labelSize</customFeatures> | ||
2533 | </centerLabelStyle> | ||
2534 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_QSMOI7XFEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
2535 | <customFeatures>labelSize</customFeatures> | ||
2536 | </endLabelStyle> | ||
2537 | </ownedStyle> | ||
2538 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2539 | </ownedDiagramElements> | ||
2540 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_Z8EScLXFEeamG-Ij7YnW7w" sourceNode="__5SGALXEEeamG-Ij7YnW7w" targetNode="_n-_3ILXEEeamG-Ij7YnW7w"> | ||
2541 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//UnaryElementRelationLink"/> | ||
2542 | <semanticElements xmi:type="ecore:EGenericType" href="PartialInterpretation.ecore#//UnaryElementRelationLink/@eGenericSuperTypes.0"/> | ||
2543 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_Z8E5gLXFEeamG-Ij7YnW7w" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
2544 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
2545 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_Z8E5gbXFEeamG-Ij7YnW7w" showIcon="false"> | ||
2546 | <labelFormat>italic</labelFormat> | ||
2547 | </beginLabelStyle> | ||
2548 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_Z8E5grXFEeamG-Ij7YnW7w" showIcon="false"/> | ||
2549 | </ownedStyle> | ||
2550 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
2551 | </ownedDiagramElements> | ||
2552 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_aXV5MLXFEeamG-Ij7YnW7w" sourceNode="_ERNIgLXFEeamG-Ij7YnW7w" targetNode="_n-_3ILXEEeamG-Ij7YnW7w"> | ||
2553 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//BinaryElementRelationLink"/> | ||
2554 | <semanticElements xmi:type="ecore:EGenericType" href="PartialInterpretation.ecore#//BinaryElementRelationLink/@eGenericSuperTypes.0"/> | ||
2555 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_aXV5MbXFEeamG-Ij7YnW7w" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
2556 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
2557 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_aXV5MrXFEeamG-Ij7YnW7w" showIcon="false"> | ||
2558 | <labelFormat>italic</labelFormat> | ||
2559 | </beginLabelStyle> | ||
2560 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_aXV5M7XFEeamG-Ij7YnW7w" showIcon="false"/> | ||
2561 | </ownedStyle> | ||
2562 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
2563 | </ownedDiagramElements> | ||
2564 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_aqZYELXFEeamG-Ij7YnW7w" sourceNode="_Hr5GsLXFEeamG-Ij7YnW7w" targetNode="_n-_3ILXEEeamG-Ij7YnW7w"> | ||
2565 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//NaryRelationLink"/> | ||
2566 | <semanticElements xmi:type="ecore:EGenericType" href="PartialInterpretation.ecore#//NaryRelationLink/@eGenericSuperTypes.0"/> | ||
2567 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_aqZYEbXFEeamG-Ij7YnW7w" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
2568 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | ||
2569 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_aqZYErXFEeamG-Ij7YnW7w" showIcon="false"> | ||
2570 | <labelFormat>italic</labelFormat> | ||
2571 | </beginLabelStyle> | ||
2572 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_aqZYE7XFEeamG-Ij7YnW7w" showIcon="false"/> | ||
2573 | </ownedStyle> | ||
2574 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | ||
2575 | </ownedDiagramElements> | ||
2576 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_jC230LXFEeamG-Ij7YnW7w" name="[0..*] elements" sourceNode="_Hr5GsLXFEeamG-Ij7YnW7w" targetNode="_KReB0LXFEeamG-Ij7YnW7w"> | ||
2577 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//NaryRelationLink/elements"/> | ||
2578 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//NaryRelationLink/elements"/> | ||
2579 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_jC3e4LXFEeamG-Ij7YnW7w" description="_pEmCt7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2580 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_jC3e4bXFEeamG-Ij7YnW7w" showIcon="false"> | ||
2581 | <customFeatures>labelSize</customFeatures> | ||
2582 | </centerLabelStyle> | ||
2583 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_jC3e4rXFEeamG-Ij7YnW7w" showIcon="false" labelColor="39,76,114"> | ||
2584 | <customFeatures>labelSize</customFeatures> | ||
2585 | </endLabelStyle> | ||
2586 | </ownedStyle> | ||
2587 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2588 | </ownedDiagramElements> | ||
2589 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_xIQsQLXFEeamG-Ij7YnW7w" name="[1..1] param1" sourceNode="__5SGALXEEeamG-Ij7YnW7w" targetNode="_pEmrL7XDEeamG-Ij7YnW7w"> | ||
2590 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//UnaryElementRelationLink/param1"/> | ||
2591 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//UnaryElementRelationLink/param1"/> | ||
2592 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_0-ev4LXFEeamG-Ij7YnW7w" description="_pEmCs7XDEeamG-Ij7YnW7w" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2593 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_0-ev4bXFEeamG-Ij7YnW7w" showIcon="false"> | ||
2594 | <labelFormat>bold</labelFormat> | ||
2595 | </centerLabelStyle> | ||
2596 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_0-ev4rXFEeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
2597 | </ownedStyle> | ||
2598 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2599 | </ownedDiagramElements> | ||
2600 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_2WivALXFEeamG-Ij7YnW7w" name="[1..1] param1" sourceNode="_ERNIgLXFEeamG-Ij7YnW7w" targetNode="_pEmrL7XDEeamG-Ij7YnW7w"> | ||
2601 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//BinaryElementRelationLink/param1"/> | ||
2602 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//BinaryElementRelationLink/param1"/> | ||
2603 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_4Yv3ULXFEeamG-Ij7YnW7w" description="_pEmCs7XDEeamG-Ij7YnW7w" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2604 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_4Yv3UbXFEeamG-Ij7YnW7w" showIcon="false"> | ||
2605 | <labelFormat>bold</labelFormat> | ||
2606 | </centerLabelStyle> | ||
2607 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_4Yv3UrXFEeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
2608 | </ownedStyle> | ||
2609 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2610 | </ownedDiagramElements> | ||
2611 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_5HFkALXFEeamG-Ij7YnW7w" name="[1..1] param2" sourceNode="_ERNIgLXFEeamG-Ij7YnW7w" targetNode="_pEmrL7XDEeamG-Ij7YnW7w"> | ||
2612 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//BinaryElementRelationLink/param2"/> | ||
2613 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//BinaryElementRelationLink/param2"/> | ||
2614 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_8S8cALXFEeamG-Ij7YnW7w" description="_pEmCs7XDEeamG-Ij7YnW7w" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2615 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_8S8cAbXFEeamG-Ij7YnW7w" showIcon="false"> | ||
2616 | <labelFormat>bold</labelFormat> | ||
2617 | </centerLabelStyle> | ||
2618 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_8S8cArXFEeamG-Ij7YnW7w" labelSize="6" showIcon="false" labelColor="39,76,114"/> | ||
2619 | </ownedStyle> | ||
2620 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2621 | </ownedDiagramElements> | ||
2622 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_lb3w0L3MEeaj7tVusjQpHg" name="[0..1] param1" sourceNode="_pEmrfLXDEeamG-Ij7YnW7w" targetNode="_7EWz4LXDEeamG-Ij7YnW7w"> | ||
2623 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialRelationInterpretation/param1"/> | ||
2624 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialRelationInterpretation/param1"/> | ||
2625 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_lb4X4L3MEeaj7tVusjQpHg" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2626 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/> | ||
2627 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_lb4X4b3MEeaj7tVusjQpHg" showIcon="false"> | ||
2628 | <customFeatures>labelSize</customFeatures> | ||
2629 | </centerLabelStyle> | ||
2630 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_lb4X4r3MEeaj7tVusjQpHg" showIcon="false" labelColor="39,76,114"> | ||
2631 | <customFeatures>labelSize</customFeatures> | ||
2632 | </endLabelStyle> | ||
2633 | </ownedStyle> | ||
2634 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2635 | </ownedDiagramElements> | ||
2636 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_oQIBIL3MEeaj7tVusjQpHg" name="[0..1] param2" sourceNode="_pEmrfLXDEeamG-Ij7YnW7w" targetNode="_7EWz4LXDEeamG-Ij7YnW7w"> | ||
2637 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialRelationInterpretation/param2"/> | ||
2638 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialRelationInterpretation/param2"/> | ||
2639 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_oQIoML3MEeaj7tVusjQpHg" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2640 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/> | ||
2641 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_oQIoMb3MEeaj7tVusjQpHg" showIcon="false"> | ||
2642 | <customFeatures>labelSize</customFeatures> | ||
2643 | </centerLabelStyle> | ||
2644 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_oQIoMr3MEeaj7tVusjQpHg" showIcon="false" labelColor="39,76,114"> | ||
2645 | <customFeatures>labelSize</customFeatures> | ||
2646 | </endLabelStyle> | ||
2647 | </ownedStyle> | ||
2648 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2649 | </ownedDiagramElements> | ||
2650 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_RU0XQMAiEeaaj7sYFz2QKg" name="[1..1] openWorldElementPrototype" sourceNode="_pEmrI7XDEeamG-Ij7YnW7w" targetNode="_pEmrL7XDEeamG-Ij7YnW7w"> | ||
2651 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/openWorldElementPrototype"/> | ||
2652 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/openWorldElementPrototype"/> | ||
2653 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_RU2Mc8AiEeaaj7sYFz2QKg" description="_RU2McMAiEeaaj7sYFz2QKg" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2654 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_RU2MdMAiEeaaj7sYFz2QKg" showIcon="false"> | ||
2655 | <customFeatures>labelSize</customFeatures> | ||
2656 | <labelFormat>bold</labelFormat> | ||
2657 | </centerLabelStyle> | ||
2658 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_RU2MdcAiEeaaj7sYFz2QKg" showIcon="false" labelColor="39,76,114"> | ||
2659 | <customFeatures>labelSize</customFeatures> | ||
2660 | </endLabelStyle> | ||
2661 | </ownedStyle> | ||
2662 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2663 | </ownedDiagramElements> | ||
2664 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_1xkW4PMUEeagPYxz1ZWLIQ" name="[0..1] problemConainer" sourceNode="_pEmrI7XDEeamG-Ij7YnW7w" targetNode="_pEmrJbXDEeamG-Ij7YnW7w"> | ||
2665 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/problemConainer"/> | ||
2666 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/problemConainer"/> | ||
2667 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_1xmzIPMUEeagPYxz1ZWLIQ" description="_pEmCt7XDEeamG-Ij7YnW7w" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2668 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_1xmzIfMUEeagPYxz1ZWLIQ" showIcon="false"> | ||
2669 | <customFeatures>labelSize</customFeatures> | ||
2670 | </centerLabelStyle> | ||
2671 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_1xmzIvMUEeagPYxz1ZWLIQ" showIcon="false" labelColor="39,76,114"> | ||
2672 | <customFeatures>labelSize</customFeatures> | ||
2673 | </endLabelStyle> | ||
2674 | </ownedStyle> | ||
2675 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2676 | </ownedDiagramElements> | ||
2677 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_3d9AMPMUEeagPYxz1ZWLIQ" name="[0..*] pregeneratedRelationLinks" sourceNode="_pEmrI7XDEeamG-Ij7YnW7w" targetNode="_ERNIgLXFEeamG-Ij7YnW7w"> | ||
2678 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/pregeneratedRelationLinks"/> | ||
2679 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/pregeneratedRelationLinks"/> | ||
2680 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_3d9nQPMUEeagPYxz1ZWLIQ" routingStyle="manhattan" strokeColor="0,0,0"> | ||
2681 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/> | ||
2682 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_3d9nQfMUEeagPYxz1ZWLIQ" showIcon="false"> | ||
2683 | <customFeatures>labelSize</customFeatures> | ||
2684 | </centerLabelStyle> | ||
2685 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_3d9nQvMUEeagPYxz1ZWLIQ" showIcon="false" labelColor="39,76,114"> | ||
2686 | <customFeatures>labelSize</customFeatures> | ||
2687 | </endLabelStyle> | ||
2688 | </ownedStyle> | ||
2689 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
2690 | </ownedDiagramElements> | ||
2691 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> | ||
2692 | <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_pEmrqrXDEeamG-Ij7YnW7w"/> | ||
2693 | <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> | ||
2694 | <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Package']"/> | ||
2695 | <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@additionalLayers[name='Validation']"/> | ||
2696 | <activatedLayers xmi:type="description_1:AdditionalLayer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Archetype']/@ownedRepresentationExtensions[name='Entities%20With%20Archetypes']/@layers[name='Archetypes']"/> | ||
2697 | <target xmi:type="ecore:EPackage" href="PartialInterpretation.ecore#/"/> | ||
2698 | </ownedRepresentations> | ||
2699 | <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/> | ||
2700 | </ownedViews> | ||
2701 | <ownedViews xmi:type="viewpoint:DRepresentationContainer" xmi:id="_LRdt8LW_EeamG-Ij7YnW7w"> | ||
2702 | <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Review']"/> | ||
2703 | </ownedViews> | ||
2704 | <ownedViews xmi:type="viewpoint:DRepresentationContainer" xmi:id="_LRimcLW_EeamG-Ij7YnW7w"> | ||
2705 | <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Archetype']"/> | ||
2706 | </ownedViews> | ||
2707 | <ownedViews xmi:type="viewpoint:DRepresentationContainer" xmi:id="_LRrwYLW_EeamG-Ij7YnW7w"> | ||
2708 | <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Generation']"/> | ||
2709 | </ownedViews> | ||
2710 | </viewpoint:DAnalysis> | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore new file mode 100644 index 00000000..fd7ca595 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore | |||
@@ -0,0 +1,76 @@ | |||
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="partialinterpretation" nsURI="http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
4 | nsPrefix="partialinterpretation"> | ||
5 | <eClassifiers xsi:type="ecore:EClass" name="PartialInterpretation"> | ||
6 | <eStructuralFeatures xsi:type="ecore:EReference" name="problem" lowerBound="1" | ||
7 | eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem"/> | ||
8 | <eStructuralFeatures xsi:type="ecore:EReference" name="partialconstantinterpretation" | ||
9 | upperBound="-1" eType="#//PartialConstantInterpretation" containment="true"/> | ||
10 | <eStructuralFeatures xsi:type="ecore:EReference" name="partialrelationinterpretation" | ||
11 | upperBound="-1" eType="#//PartialRelationInterpretation" containment="true"/> | ||
12 | <eStructuralFeatures xsi:type="ecore:EReference" name="partialfunctioninterpretation" | ||
13 | upperBound="-1" eType="#//PartialFunctionInterpretation" containment="true"/> | ||
14 | <eStructuralFeatures xsi:type="ecore:EReference" name="newElements" upperBound="-1" | ||
15 | eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement" | ||
16 | containment="true"/> | ||
17 | <eStructuralFeatures xsi:type="ecore:EReference" name="partialtypeinterpratation" | ||
18 | upperBound="-1" eType="#//PartialTypeInterpratation" containment="true"/> | ||
19 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="minNewElements" lowerBound="1" | ||
20 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="0" | ||
21 | iD="true"/> | ||
22 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="maxNewElements" lowerBound="1" | ||
23 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="0"/> | ||
24 | <eStructuralFeatures xsi:type="ecore:EReference" name="openWorldElementPrototype" | ||
25 | lowerBound="1" eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement" | ||
26 | containment="true"/> | ||
27 | <eStructuralFeatures xsi:type="ecore:EReference" name="problemConainer" eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//LogicProblem" | ||
28 | containment="true"/> | ||
29 | <eStructuralFeatures xsi:type="ecore:EReference" name="pregeneratedRelationLinks" | ||
30 | upperBound="-1" eType="#//BinaryElementRelationLink"/> | ||
31 | <eStructuralFeatures xsi:type="ecore:EReference" name="preGeneratedElements" upperBound="-1" | ||
32 | eType="#//PartialTypeInterpratation" containment="true"/> | ||
33 | </eClassifiers> | ||
34 | <eClassifiers xsi:type="ecore:EClass" name="PartialConstantInterpretation"> | ||
35 | <eStructuralFeatures xsi:type="ecore:EReference" name="interpretationOf" lowerBound="1" | ||
36 | eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//ConstantDeclaration"/> | ||
37 | </eClassifiers> | ||
38 | <eClassifiers xsi:type="ecore:EClass" name="PartialRelationInterpretation"> | ||
39 | <eStructuralFeatures xsi:type="ecore:EReference" name="interpretationOf" lowerBound="1" | ||
40 | eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//RelationDeclaration"/> | ||
41 | <eStructuralFeatures xsi:type="ecore:EReference" name="relationlinks" upperBound="-1" | ||
42 | eType="#//RelationLink" containment="true"/> | ||
43 | <eStructuralFeatures xsi:type="ecore:EReference" name="param1" eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//TypeReference"/> | ||
44 | <eStructuralFeatures xsi:type="ecore:EReference" name="param2" eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//TypeReference"/> | ||
45 | </eClassifiers> | ||
46 | <eClassifiers xsi:type="ecore:EClass" name="PartialFunctionInterpretation"> | ||
47 | <eStructuralFeatures xsi:type="ecore:EReference" name="interpretationOf" lowerBound="1" | ||
48 | eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//FunctionDeclaration"/> | ||
49 | </eClassifiers> | ||
50 | <eClassifiers xsi:type="ecore:EClass" name="PartialTypeInterpratation"> | ||
51 | <eStructuralFeatures xsi:type="ecore:EReference" name="interpretationOf" lowerBound="1" | ||
52 | eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//TypeDeclaration"/> | ||
53 | <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1" | ||
54 | eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/> | ||
55 | <eStructuralFeatures xsi:type="ecore:EReference" name="supertypeInterpretation" | ||
56 | upperBound="-1" eType="#//PartialTypeInterpratation"/> | ||
57 | </eClassifiers> | ||
58 | <eClassifiers xsi:type="ecore:EClass" name="RelationLink" abstract="true"/> | ||
59 | <eClassifiers xsi:type="ecore:EClass" name="UnaryElementRelationLink" eSuperTypes="#//RelationLink"> | ||
60 | <eStructuralFeatures xsi:type="ecore:EReference" name="param1" lowerBound="1" | ||
61 | eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/> | ||
62 | </eClassifiers> | ||
63 | <eClassifiers xsi:type="ecore:EClass" name="BinaryElementRelationLink" eSuperTypes="#//RelationLink"> | ||
64 | <eStructuralFeatures xsi:type="ecore:EReference" name="param1" lowerBound="1" | ||
65 | eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/> | ||
66 | <eStructuralFeatures xsi:type="ecore:EReference" name="param2" lowerBound="1" | ||
67 | eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/> | ||
68 | </eClassifiers> | ||
69 | <eClassifiers xsi:type="ecore:EClass" name="NaryRelationLink" eSuperTypes="#//RelationLink"> | ||
70 | <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1" | ||
71 | eType="#//NaryRelationLinkElement" containment="true"/> | ||
72 | </eClassifiers> | ||
73 | <eClassifiers xsi:type="ecore:EClass" name="NaryRelationLinkElement"> | ||
74 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="index" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/> | ||
75 | </eClassifiers> | ||
76 | </ecore:EPackage> | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.genmodel b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.genmodel new file mode 100644 index 00000000..e244d0cd --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.genmodel | |||
@@ -0,0 +1,49 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" | ||
3 | xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen" | ||
4 | modelPluginID="hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage" | ||
5 | modelName="PartialInterpretation" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" | ||
6 | importerID="org.eclipse.emf.importer.ecore" complianceLevel="8.0" copyrightFields="false" | ||
7 | usedGenPackages="../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.genmodel#//logiclanguage ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.genmodel#//logicproblem" | ||
8 | operationReflection="true" importOrganizing="true"> | ||
9 | <foreignModel>PartialInterpretation.ecore</foreignModel> | ||
10 | <genPackages prefix="Partialinterpretation" basePackage="hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage" | ||
11 | disposableProviderFactory="true" ecorePackage="PartialInterpretation.ecore#/"> | ||
12 | <genClasses ecoreClass="PartialInterpretation.ecore#//PartialInterpretation"> | ||
13 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialInterpretation/problem"/> | ||
14 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialInterpretation/partialconstantinterpretation"/> | ||
15 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialInterpretation/partialrelationinterpretation"/> | ||
16 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialInterpretation/partialfunctioninterpretation"/> | ||
17 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialInterpretation/newElements"/> | ||
18 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialInterpretation/partialtypeinterpratation"/> | ||
19 | </genClasses> | ||
20 | <genClasses ecoreClass="PartialInterpretation.ecore#//PartialConstantInterpretation"> | ||
21 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialConstantInterpretation/interpretationOf"/> | ||
22 | </genClasses> | ||
23 | <genClasses ecoreClass="PartialInterpretation.ecore#//PartialRelationInterpretation"> | ||
24 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialRelationInterpretation/interpretationOf"/> | ||
25 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialRelationInterpretation/relationlinks"/> | ||
26 | </genClasses> | ||
27 | <genClasses ecoreClass="PartialInterpretation.ecore#//PartialFunctionInterpretation"> | ||
28 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialFunctionInterpretation/interpretationOf"/> | ||
29 | </genClasses> | ||
30 | <genClasses ecoreClass="PartialInterpretation.ecore#//PartialTypeInterpratation"> | ||
31 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialTypeInterpratation/interpretationOf"/> | ||
32 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialTypeInterpratation/elements"/> | ||
33 | </genClasses> | ||
34 | <genClasses image="false" ecoreClass="PartialInterpretation.ecore#//RelationLink"/> | ||
35 | <genClasses ecoreClass="PartialInterpretation.ecore#//UnaryElementRelationLink"> | ||
36 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//UnaryElementRelationLink/param1"/> | ||
37 | </genClasses> | ||
38 | <genClasses ecoreClass="PartialInterpretation.ecore#//BinaryElementRelationLink"> | ||
39 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//BinaryElementRelationLink/param1"/> | ||
40 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//BinaryElementRelationLink/param2"/> | ||
41 | </genClasses> | ||
42 | <genClasses ecoreClass="PartialInterpretation.ecore#//NaryRelationLink"> | ||
43 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//NaryRelationLink/elements"/> | ||
44 | </genClasses> | ||
45 | <genClasses ecoreClass="PartialInterpretation.ecore#//NaryRelationLinkElement"> | ||
46 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute PartialInterpretation.ecore#//NaryRelationLinkElement/index"/> | ||
47 | </genClasses> | ||
48 | </genPackages> | ||
49 | </genmodel:GenModel> | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/plugin.properties b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/plugin.properties new file mode 100644 index 00000000..41436684 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/plugin.properties | |||
@@ -0,0 +1,4 @@ | |||
1 | # | ||
2 | |||
3 | pluginName = PartialInterpretation Model | ||
4 | providerName = www.example.org | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/plugin.xml b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/plugin.xml new file mode 100644 index 00000000..b9248505 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/plugin.xml | |||
@@ -0,0 +1,17 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <?eclipse version="3.0"?> | ||
3 | |||
4 | <!-- | ||
5 | --> | ||
6 | |||
7 | <plugin> | ||
8 | |||
9 | <extension point="org.eclipse.emf.ecore.generated_package"> | ||
10 | <!-- @generated PartialInterpretation --> | ||
11 | <package | ||
12 | uri="http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" | ||
13 | class="hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage" | ||
14 | genModel="model/PartialInterpretation.genmodel"/> | ||
15 | </extension> | ||
16 | |||
17 | </plugin> | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend new file mode 100644 index 00000000..eeccbf76 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend | |||
@@ -0,0 +1,112 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDeclaration | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDeclaration | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.patterns.SupertypeStarMatcher | ||
13 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation | ||
14 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation | ||
15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation | ||
17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation | ||
18 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationFactory | ||
19 | import java.util.HashMap | ||
20 | import java.util.Map | ||
21 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine | ||
22 | import org.eclipse.viatra.query.runtime.emf.EMFScope | ||
23 | import org.eclipse.xtend.lib.annotations.Data | ||
24 | |||
25 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
26 | |||
27 | @Data class Problem2PartialInterpretationTrace { | ||
28 | Map<TypeDeclaration, PartialTypeInterpratation> type2Interpretation = new HashMap | ||
29 | Map<RelationDeclaration, PartialRelationInterpretation> relation2Interpretation = new HashMap | ||
30 | } | ||
31 | |||
32 | class PartialInterpretationInitialiser { | ||
33 | val extension PartialinterpretationFactory factory = PartialinterpretationFactory.eINSTANCE | ||
34 | val extension LogiclanguageFactory factory2 = LogiclanguageFactory.eINSTANCE | ||
35 | |||
36 | /** | ||
37 | * Initialises an empty partial interpretation from a logic problem | ||
38 | */ | ||
39 | def TracedOutput<PartialInterpretation,Problem2PartialInterpretationTrace> initialisePartialInterpretation( | ||
40 | LogicProblem problem, | ||
41 | int minNewElement, int maxNewElement) | ||
42 | { | ||
43 | val engine = ViatraQueryEngine.on(new EMFScope(problem)) | ||
44 | val trace = new Problem2PartialInterpretationTrace | ||
45 | |||
46 | val res = createPartialInterpretation => [ | ||
47 | it.problem = problem | ||
48 | it.openWorldElementPrototype = createDefinedElement => [it.name = "Symbolic New Element"] | ||
49 | it.minNewElements = minNewElement | ||
50 | it.maxNewElements = maxNewElement | ||
51 | |||
52 | for(typeDeclaration : problem.types.filter(TypeDeclaration)) { | ||
53 | it.partialtypeinterpratation += typeDeclaration.initialisePartialTypeInterpretation(engine,trace) | ||
54 | } | ||
55 | problem.connectSuperypes(trace) | ||
56 | |||
57 | it.partialrelationinterpretation += problem.relations.filter(RelationDeclaration) | ||
58 | .map[initialisePartialRelationInterpretation(trace)] | ||
59 | it.partialfunctioninterpretation += problem.functions.filter(FunctionDeclaration) | ||
60 | .map[initialisePartialFunctionInterpretation(trace)] | ||
61 | it.partialconstantinterpretation += problem.constants.filter(ConstantDeclaration) | ||
62 | .map[initialisePartialConstantDeclaration(trace)] | ||
63 | ] | ||
64 | |||
65 | return new TracedOutput(res,trace) | ||
66 | } | ||
67 | |||
68 | /** | ||
69 | * Initialize type with existing elements | ||
70 | */ | ||
71 | def private initialisePartialTypeInterpretation(TypeDeclaration t, ViatraQueryEngine engine, Problem2PartialInterpretationTrace trace) { | ||
72 | val supertypeMatcher = SupertypeStarMatcher.on(engine) | ||
73 | val res = createPartialTypeInterpratation => [ | ||
74 | it.interpretationOf = t | ||
75 | it.elements += supertypeMatcher.getAllValuesOfsubtype(t) | ||
76 | .filter(TypeDefinition) | ||
77 | .map[elements].flatten | ||
78 | ] | ||
79 | trace.type2Interpretation.put(t,res) | ||
80 | return res | ||
81 | } | ||
82 | |||
83 | def private connectSuperypes(LogicProblem problem, Problem2PartialInterpretationTrace trace) { | ||
84 | for(typeDeclaration : problem.types.filter(TypeDeclaration)) { | ||
85 | val supertypes = typeDeclaration.<Type>transitiveClosurePlus[it.supertypes] | ||
86 | for(supertype : supertypes.filter(TypeDeclaration)) { | ||
87 | typeDeclaration.lookup(trace.type2Interpretation).supertypeInterpretation += supertype.lookup(trace.type2Interpretation) | ||
88 | //println('''«typeDeclaration.name» --> «supertype.name»''') | ||
89 | } | ||
90 | } | ||
91 | } | ||
92 | |||
93 | def private initialisePartialRelationInterpretation(RelationDeclaration r, Problem2PartialInterpretationTrace trace) { | ||
94 | val res = createPartialRelationInterpretation => [ | ||
95 | it.interpretationOf = r | ||
96 | if(r.parameters.size==2) { | ||
97 | it.param1 = r.parameters.get(0) | ||
98 | it.param2 = r.parameters.get(1) | ||
99 | } else throw new UnsupportedOperationException | ||
100 | ] | ||
101 | trace.relation2Interpretation.put(r,res) | ||
102 | return res | ||
103 | } | ||
104 | |||
105 | def private PartialConstantInterpretation initialisePartialConstantDeclaration(ConstantDeclaration c, Problem2PartialInterpretationTrace trace) { | ||
106 | throw new UnsupportedOperationException | ||
107 | } | ||
108 | |||
109 | def private PartialFunctionInterpretation initialisePartialFunctionInterpretation(FunctionDeclaration f, Problem2PartialInterpretationTrace trace) { | ||
110 | throw new UnsupportedOperationException | ||
111 | } | ||
112 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/Descriptor.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/Descriptor.xtend new file mode 100644 index 00000000..41482b28 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/Descriptor.xtend | |||
@@ -0,0 +1,214 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood | ||
2 | |||
3 | import java.util.HashMap | ||
4 | import java.util.Map | ||
5 | import java.util.Set | ||
6 | import org.eclipse.xtend.lib.annotations.Data | ||
7 | |||
8 | @Data abstract class AbstractNodeDescriptor { | ||
9 | long dataHash | ||
10 | |||
11 | // @Pure | ||
12 | // @Override | ||
13 | // override public boolean equals(Object obj) { | ||
14 | // if (this === obj) | ||
15 | // return true; | ||
16 | // if (obj === null) | ||
17 | // return false; | ||
18 | // if (getClass() != obj.getClass()) | ||
19 | // return false; | ||
20 | // val AbstractNodeDescriptor other = obj as AbstractNodeDescriptor; | ||
21 | // if (other.dataHash != this.dataHash) | ||
22 | // return false; | ||
23 | // return true; | ||
24 | // } | ||
25 | } | ||
26 | |||
27 | @Data class LocalNodeDescriptor extends AbstractNodeDescriptor{ | ||
28 | Set<String> types | ||
29 | String id; | ||
30 | new(String id, Set<String> types) { | ||
31 | super(calcualteDataHash(id,types)) | ||
32 | this.types = types | ||
33 | this.id = id | ||
34 | } | ||
35 | |||
36 | def private static calcualteDataHash(String id, Set<String> types) { | ||
37 | val int prime = 31; | ||
38 | var result = 0 | ||
39 | if(id !== null) | ||
40 | result = id.hashCode(); | ||
41 | if(types !== null) { | ||
42 | result = prime * result + types.hashCode | ||
43 | } | ||
44 | return result | ||
45 | } | ||
46 | |||
47 | override hashCode() { | ||
48 | return this.dataHash.hashCode | ||
49 | } | ||
50 | |||
51 | override toString() { | ||
52 | return class.name + this.dataHash | ||
53 | } | ||
54 | |||
55 | // @Pure | ||
56 | // @Override | ||
57 | // override public boolean equals(Object obj) { | ||
58 | // if (this === obj) | ||
59 | // return true; | ||
60 | // if (obj === null) | ||
61 | // return false; | ||
62 | // if (getClass() != obj.getClass()) | ||
63 | // return false; | ||
64 | // val AbstractNodeDescriptor other = obj as AbstractNodeDescriptor; | ||
65 | // if (other.dataHash != this.dataHash) | ||
66 | // return false; | ||
67 | // return true; | ||
68 | // } | ||
69 | |||
70 | // @Pure | ||
71 | // override public boolean equals(Object obj) { | ||
72 | // if (this === obj) | ||
73 | // return true; | ||
74 | // if (obj === null) | ||
75 | // return false; | ||
76 | // if (getClass() != obj.getClass()) | ||
77 | // return false; | ||
78 | // if (!super.equals(obj)) | ||
79 | // return false; | ||
80 | // val LocalNodeDescriptor other = obj as LocalNodeDescriptor; | ||
81 | // if (this.clazz === null) { | ||
82 | // if (other.clazz != null) | ||
83 | // return false; | ||
84 | // } else if (!this.clazz.equals(other.clazz)) | ||
85 | // return false; | ||
86 | // return true; | ||
87 | // } | ||
88 | } | ||
89 | |||
90 | @Data class IncomingRelation<FROM> { | ||
91 | FROM from | ||
92 | String type | ||
93 | } | ||
94 | |||
95 | @Data class OutgoingRelation<TO> { | ||
96 | TO to | ||
97 | String type | ||
98 | } | ||
99 | |||
100 | @Data class FurtherNodeDescriptor<NodeRep> extends AbstractNodeDescriptor{ | ||
101 | |||
102 | NodeRep previousRepresentation | ||
103 | Map<IncomingRelation<NodeRep>,Integer> incomingEdges | ||
104 | Map<OutgoingRelation<NodeRep>,Integer> outgoingEdges | ||
105 | |||
106 | new( | ||
107 | NodeRep previousRepresentation, | ||
108 | Map<IncomingRelation<NodeRep>,Integer> incomingEdges, | ||
109 | Map<OutgoingRelation<NodeRep>,Integer> outgoingEdges) | ||
110 | { | ||
111 | super(calculateDataHash(previousRepresentation,incomingEdges,outgoingEdges)) | ||
112 | this.previousRepresentation = previousRepresentation | ||
113 | this.incomingEdges = new HashMap(incomingEdges) | ||
114 | this.outgoingEdges = new HashMap(outgoingEdges) | ||
115 | } | ||
116 | |||
117 | static def private <NodeRep> int calculateDataHash( | ||
118 | NodeRep previousRepresentation, | ||
119 | Map<IncomingRelation<NodeRep>,Integer> incomingEdges, | ||
120 | Map<OutgoingRelation<NodeRep>,Integer> outgoingEdges) | ||
121 | { | ||
122 | val int prime = 31; | ||
123 | var int result = previousRepresentation.hashCode; | ||
124 | if(incomingEdges !== null) | ||
125 | result = prime * result + incomingEdges.hashCode(); | ||
126 | if(outgoingEdges !== null) | ||
127 | result = prime * result + outgoingEdges.hashCode(); | ||
128 | return result; | ||
129 | } | ||
130 | |||
131 | override hashCode() { | ||
132 | return this.dataHash.hashCode | ||
133 | } | ||
134 | |||
135 | override toString() { | ||
136 | return class.name + dataHash | ||
137 | // return '''[«previousRepresentation»,(«FOR | ||
138 | // in: incomingEdges.entrySet»(«in.key.type.name»=«in.key.from»,«in.value»)«ENDFOR»),(«FOR | ||
139 | // out: outgoingEdges.entrySet»(«out.key.type.name»=«out.key.to»,«out.value»)«ENDFOR»),«FOR | ||
140 | // att: attributeValues»(«att.type.name»=«att.value»)«ENDFOR»]''' | ||
141 | } | ||
142 | |||
143 | // @Pure | ||
144 | // @Override | ||
145 | // override public boolean equals(Object obj) { | ||
146 | // if (this === obj) | ||
147 | // return true; | ||
148 | // if (obj === null) | ||
149 | // return false; | ||
150 | // if (getClass() != obj.getClass()) | ||
151 | // return false; | ||
152 | // val AbstractNodeDescriptor other = obj as AbstractNodeDescriptor; | ||
153 | // if (other.dataHash != this.dataHash) | ||
154 | // return false; | ||
155 | // return true; | ||
156 | // } | ||
157 | |||
158 | // @Pure | ||
159 | // override public boolean equals(Object obj) { | ||
160 | // if (this === obj) | ||
161 | // return true; | ||
162 | // if (obj === null) | ||
163 | // return false; | ||
164 | // if (getClass() != obj.getClass()) | ||
165 | // return false; | ||
166 | // if (!super.equals(obj)) | ||
167 | // return false; | ||
168 | // val FurtherNodeDescriptor<?> other = obj as FurtherNodeDescriptor<?>; | ||
169 | // if (this.previousRepresentation === null) { | ||
170 | // if (other.previousRepresentation != null) | ||
171 | // return false; | ||
172 | // | ||
173 | // } | ||
174 | //// } else if (!this.previousRepresentation.equals(other.previousRepresentation)) | ||
175 | //// return false; | ||
176 | // if (this.incomingEdges === null) { | ||
177 | // if (other.incomingEdges != null) | ||
178 | // return false; | ||
179 | // } else if (!this.incomingEdges.equals(other.incomingEdges)) | ||
180 | // return false; | ||
181 | // if (this.outgoingEdges === null) { | ||
182 | // if (other.outgoingEdges != null) | ||
183 | // return false; | ||
184 | // } else if (!this.outgoingEdges.equals(other.outgoingEdges)) | ||
185 | // return false; | ||
186 | // if (this.attributeValues === null) { | ||
187 | // if (other.attributeValues != null) | ||
188 | // return false; | ||
189 | // } else if (!this.attributeValues.equals(other.attributeValues)) | ||
190 | // return false; | ||
191 | // return true; | ||
192 | // } | ||
193 | } | ||
194 | |||
195 | /* | ||
196 | @Data | ||
197 | class ModelDescriptor { | ||
198 | int dataHash | ||
199 | int unknownElements | ||
200 | Map<? extends AbstractNodeDescriptor,Integer> knownElements | ||
201 | |||
202 | public new(Map<? extends AbstractNodeDescriptor,Integer> knownElements, int unknownElements) { | ||
203 | this.dataHash = calculateDataHash(knownElements,unknownElements) | ||
204 | this.unknownElements = unknownElements | ||
205 | this.knownElements = knownElements | ||
206 | } | ||
207 | |||
208 | def private static calculateDataHash(Map<? extends AbstractNodeDescriptor,Integer> knownElements, int unknownElements) | ||
209 | { | ||
210 | val int prime = 31; | ||
211 | return knownElements.hashCode * prime + unknownElements.hashCode | ||
212 | } | ||
213 | } | ||
214 | */ \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/FurtherNodeDescriptorWithEquivalenceCounter.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/FurtherNodeDescriptorWithEquivalenceCounter.xtend new file mode 100644 index 00000000..22e890a2 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/FurtherNodeDescriptorWithEquivalenceCounter.xtend | |||
@@ -0,0 +1,16 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood | ||
2 | |||
3 | import java.util.Map | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
5 | |||
6 | class FurtherNodeDescriptorWithEquivalenceCounter extends FurtherNodeDescriptor<AbstractNodeDescriptor> { | ||
7 | |||
8 | new(AbstractNodeDescriptor previousRepresentation, | ||
9 | Map<IncomingRelation<AbstractNodeDescriptor>, Integer> incomingEdges, | ||
10 | Map<OutgoingRelation<AbstractNodeDescriptor>, Integer> outgoingEdges, | ||
11 | Map<DefinedElement, FurtherNodeDescriptor<AbstractNodeDescriptor>> node2Representation) | ||
12 | { | ||
13 | super(previousRepresentation, incomingEdges, outgoingEdges) | ||
14 | } | ||
15 | |||
16 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/NeighbourhoodWithTraces.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/NeighbourhoodWithTraces.xtend new file mode 100644 index 00000000..76cc4ae1 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/NeighbourhoodWithTraces.xtend | |||
@@ -0,0 +1,11 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
4 | import java.util.Map | ||
5 | import org.eclipse.xtend.lib.annotations.Data | ||
6 | |||
7 | @Data class NeighbourhoodWithTraces<ModelRep,NodeRep> { | ||
8 | ModelRep modelRepresentation | ||
9 | Map<DefinedElement,? extends NodeRep> nodeRepresentations | ||
10 | NeighbourhoodWithTraces<ModelRep,NodeRep> previousRepresentation | ||
11 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2Hash.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2Hash.xtend new file mode 100644 index 00000000..d474877d --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2Hash.xtend | |||
@@ -0,0 +1,25 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood | ||
2 | |||
3 | import java.util.Map | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
5 | |||
6 | class PartialInterpretation2Hash extends PartialInterpretation2NeighbourhoodRepresentation<Integer, Integer>{ | ||
7 | |||
8 | protected new() { | ||
9 | super(false, true) | ||
10 | } | ||
11 | |||
12 | override protected createLocalRepresentation(Map<DefinedElement, LocalNodeDescriptor> node2Representation, Map<LocalNodeDescriptor, Integer> representation2Amount) { | ||
13 | return new NeighbourhoodWithTraces( | ||
14 | representation2Amount.hashCode,node2Representation.mapValues[it.hashCode], | ||
15 | null) | ||
16 | } | ||
17 | |||
18 | override protected createFurtherRepresentation(Map<FurtherNodeDescriptor<Integer>, Integer> nodeDescriptors, Map<DefinedElement, FurtherNodeDescriptor<Integer>> node2Representation, NeighbourhoodWithTraces<Integer, Integer> previous, boolean deepRepresentation) { | ||
19 | return new NeighbourhoodWithTraces( | ||
20 | nodeDescriptors.hashCode, | ||
21 | node2Representation.mapValues[it.hashCode], | ||
22 | if(deepRepresentation) {previous} else {null}) | ||
23 | } | ||
24 | |||
25 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2ImmutableTypeLattice.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2ImmutableTypeLattice.xtend new file mode 100644 index 00000000..31181370 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2ImmutableTypeLattice.xtend | |||
@@ -0,0 +1,24 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
4 | import java.util.Map | ||
5 | |||
6 | class PartialInterpretation2ImmutableTypeLattice extends | ||
7 | PartialInterpretation2NeighbourhoodRepresentation<Map<? extends AbstractNodeDescriptor,Integer>, AbstractNodeDescriptor>{ | ||
8 | |||
9 | public new() { | ||
10 | super(false, true) | ||
11 | } | ||
12 | |||
13 | override protected createLocalRepresentation(Map<DefinedElement, LocalNodeDescriptor> node2Representation, Map<LocalNodeDescriptor, Integer> representation2Amount) { | ||
14 | return new NeighbourhoodWithTraces(node2Representation.immutableCopy,node2Representation.immutableCopy,null) | ||
15 | } | ||
16 | |||
17 | override protected createFurtherRepresentation(Map<FurtherNodeDescriptor<AbstractNodeDescriptor>, Integer> nodeDescriptors, Map<DefinedElement, FurtherNodeDescriptor<AbstractNodeDescriptor>> node2Representation, NeighbourhoodWithTraces<Map<? extends AbstractNodeDescriptor, Integer>, AbstractNodeDescriptor> previous, boolean deepRepresentation) { | ||
18 | if(deepRepresentation) { | ||
19 | return new NeighbourhoodWithTraces<Map<? extends AbstractNodeDescriptor, Integer>, AbstractNodeDescriptor>(nodeDescriptors,node2Representation,previous) | ||
20 | } else { | ||
21 | return new NeighbourhoodWithTraces<Map<? extends AbstractNodeDescriptor, Integer>, AbstractNodeDescriptor>(nodeDescriptors,node2Representation,null) | ||
22 | } | ||
23 | } | ||
24 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2ImmutableTypeLatticeWithEquivalenceCounter.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2ImmutableTypeLatticeWithEquivalenceCounter.xtend new file mode 100644 index 00000000..251a82f0 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2ImmutableTypeLatticeWithEquivalenceCounter.xtend | |||
@@ -0,0 +1,56 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
4 | import java.util.Map | ||
5 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
6 | import java.util.HashMap | ||
7 | |||
8 | class PartialInterpretation2ImmutableTypeLatticeWithEquivalenceCounter extends | ||
9 | PartialInterpretation2NeighbourhoodRepresentation< | ||
10 | Map<? extends AbstractNodeDescriptor,Integer>, // <- Model Descriptor | ||
11 | AbstractNodeDescriptor> // <- Node Descriptor | ||
12 | { | ||
13 | |||
14 | protected new() { | ||
15 | super(true,false) | ||
16 | } | ||
17 | |||
18 | override protected createLocalRepresentation(Map<DefinedElement, LocalNodeDescriptor> node2Representation, Map<LocalNodeDescriptor, Integer> representation2Amount) { | ||
19 | return new NeighbourhoodWithTraces(node2Representation.immutableCopy,node2Representation.immutableCopy,null) | ||
20 | } | ||
21 | |||
22 | override protected createFurtherRepresentation( | ||
23 | Map<FurtherNodeDescriptor<AbstractNodeDescriptor>, Integer> nodeDescriptors, | ||
24 | Map<DefinedElement, FurtherNodeDescriptor<AbstractNodeDescriptor>> node2Representation, | ||
25 | NeighbourhoodWithTraces<Map<? extends AbstractNodeDescriptor, Integer>, AbstractNodeDescriptor> previous, | ||
26 | boolean deepRepresentation | ||
27 | ) { | ||
28 | if(deepRepresentation) { | ||
29 | return new NeighbourhoodWithTraces<Map<? extends AbstractNodeDescriptor, Integer>, AbstractNodeDescriptor>(nodeDescriptors,node2Representation,previous) | ||
30 | } else { | ||
31 | return new NeighbourhoodWithTraces<Map<? extends AbstractNodeDescriptor, Integer>, AbstractNodeDescriptor>(nodeDescriptors,node2Representation,null) | ||
32 | } | ||
33 | } | ||
34 | |||
35 | public def finalRepresentation(NeighbourhoodWithTraces<Map<? extends AbstractNodeDescriptor, Integer>,AbstractNodeDescriptor> representation) { | ||
36 | val node2Representation = representation.nodeRepresentations | ||
37 | val node2LocalRepresentation = new HashMap | ||
38 | //val localRepresentation2Node = new HashMap | ||
39 | for(entry: node2Representation.entrySet) { | ||
40 | val node = entry.key | ||
41 | val localNodeDescriptor = entry.value.toLocalDescriptor | ||
42 | node2LocalRepresentation.put(node,localNodeDescriptor) | ||
43 | } | ||
44 | |||
45 | } | ||
46 | |||
47 | public def LocalNodeDescriptor toLocalDescriptor(AbstractNodeDescriptor descriptor) { | ||
48 | if(descriptor instanceof LocalNodeDescriptor) { | ||
49 | return descriptor | ||
50 | } else if(descriptor instanceof FurtherNodeDescriptor<?>) { | ||
51 | (descriptor.previousRepresentation as AbstractNodeDescriptor).toLocalDescriptor | ||
52 | } else throw new IllegalArgumentException('''Unsupported descriptor type: «descriptor.class.simpleName»''') | ||
53 | } | ||
54 | |||
55 | |||
56 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend new file mode 100644 index 00000000..df6fb6ae --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend | |||
@@ -0,0 +1,345 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
8 | import java.util.HashMap | ||
9 | import java.util.HashSet | ||
10 | import java.util.LinkedList | ||
11 | import java.util.List | ||
12 | import java.util.Map | ||
13 | import java.util.Set | ||
14 | |||
15 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | ||
16 | |||
17 | abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresentation,NodeRepresentation> { | ||
18 | private val boolean deepRepresentation | ||
19 | private val boolean mergeSimilarNeighbourhood | ||
20 | |||
21 | protected new(boolean deeprepresentation, boolean mergeSimilarNeighbourhood) { | ||
22 | this.deepRepresentation = deeprepresentation | ||
23 | this.mergeSimilarNeighbourhood = mergeSimilarNeighbourhood | ||
24 | } | ||
25 | |||
26 | public static val FixPointRage = -1 | ||
27 | public static val FullParallels = Integer.MAX_VALUE | ||
28 | public static val MaxNumbers = Integer.MAX_VALUE | ||
29 | |||
30 | /** | ||
31 | * Creates a neighbourhood representation with traces | ||
32 | * @param model The model to be represented. | ||
33 | * @param range The range of the neighbourhood. | ||
34 | * @param parallels The maximal number of parallel references to be differentiated. | ||
35 | */ | ||
36 | def public createRepresentation(PartialInterpretation model, int range, int parallels, int maxNumber) { | ||
37 | return createRepresentation(model,range,parallels,maxNumber,null,null) | ||
38 | } | ||
39 | |||
40 | def public createRepresentation( | ||
41 | PartialInterpretation model, | ||
42 | int range, int parallels, int maxNumber, | ||
43 | Set<TypeDeclaration> relevantTypes, Set<RelationDeclaration> relevantRelations) | ||
44 | { | ||
45 | val Map<DefinedElement, Set<String>> types = new HashMap | ||
46 | fillTypes(model,types,relevantTypes) | ||
47 | val Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations = new HashMap; | ||
48 | val Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations = new HashMap; | ||
49 | fillReferences(model,IncomingRelations,OutgoingRelations,relevantRelations) | ||
50 | |||
51 | val res = doRecursiveNeighbourCalculation(model,types,IncomingRelations,OutgoingRelations,range,parallels,maxNumber); | ||
52 | |||
53 | return res; | ||
54 | } | ||
55 | |||
56 | def private isRelevant(TypeDeclaration t, Set<TypeDeclaration> relevantTypes) { | ||
57 | if(relevantTypes === null) { | ||
58 | return true | ||
59 | } else { | ||
60 | return relevantTypes.contains(t) | ||
61 | } | ||
62 | } | ||
63 | def private isRelevant(RelationDeclaration r, Set<RelationDeclaration> relevantRelations) { | ||
64 | if(relevantRelations === null) { | ||
65 | return true | ||
66 | } else { | ||
67 | return relevantRelations.contains(r) | ||
68 | } | ||
69 | } | ||
70 | |||
71 | /** | ||
72 | * Creates a neighbourhood representation with traces | ||
73 | * @param model The model to be represented. | ||
74 | * @param IncomingRelations Requires the previously indexed incoming references. | ||
75 | * @param OutgoingRelations Requires the previously indexed outgoing references. | ||
76 | * @param range The range of the neighbourhood. | ||
77 | * @param parallels The maximal number of parallel references to be differentiated. | ||
78 | */ | ||
79 | def private NeighbourhoodWithTraces<ModelRepresentation,NodeRepresentation> doRecursiveNeighbourCalculation( | ||
80 | PartialInterpretation model, | ||
81 | Map<DefinedElement, Set<String>> types, | ||
82 | Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations, | ||
83 | Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations, | ||
84 | int range, int parallels, int maxNumber) | ||
85 | { | ||
86 | if(range == 0){ | ||
87 | val r = calculateLocalNodeDescriptors(model,types,maxNumber) | ||
88 | val res = this.createLocalRepresentation(r.value,r.key) | ||
89 | if(res.modelRepresentation === null) { | ||
90 | throw new IllegalArgumentException('''Model representation is null''') | ||
91 | } else if(res.nodeRepresentations === null || res.nodeRepresentations.empty) { | ||
92 | throw new IllegalArgumentException('''No node representation''') | ||
93 | } else if(res.previousRepresentation !== null) { | ||
94 | throw new IllegalArgumentException('''The previous representation of the first neighbourhood have to be null''') | ||
95 | } else return res | ||
96 | } else if(range > 0) { | ||
97 | val previous = doRecursiveNeighbourCalculation(model,types,IncomingRelations,OutgoingRelations,range-1,parallels,maxNumber) | ||
98 | val r = calculateFurtherNodeDescriptors(model,previous,IncomingRelations,OutgoingRelations,parallels,maxNumber) | ||
99 | //println('''Level «range» finished.''') | ||
100 | val res = createFurtherRepresentation(r.key,r.value,previous,deepRepresentation) | ||
101 | if(res.modelRepresentation === null) { | ||
102 | throw new IllegalArgumentException('''Model representation is null''') | ||
103 | } else if(res.nodeRepresentations === null || res.nodeRepresentations.empty) { | ||
104 | throw new IllegalArgumentException('''No node representation''') | ||
105 | } else if(res.previousRepresentation === null && deepRepresentation) { | ||
106 | throw new IllegalArgumentException('''Need previous representations''') | ||
107 | } else return res | ||
108 | } else if (range == FixPointRage) { | ||
109 | return refineUntilFixpoint(model,types,IncomingRelations,OutgoingRelations,parallels,maxNumber) | ||
110 | } | ||
111 | } | ||
112 | |||
113 | def private refineUntilFixpoint( | ||
114 | PartialInterpretation model, | ||
115 | Map<DefinedElement, Set<String>> types, | ||
116 | Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations, | ||
117 | Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations, | ||
118 | int parallels, int maxNumbers) | ||
119 | { | ||
120 | var lastRange = 0 | ||
121 | val last = calculateLocalNodeDescriptors(model,types,maxNumbers) | ||
122 | var lastRepresentation = this.createLocalRepresentation(last.value,last.key) | ||
123 | //println('''Level 0 finished.''') | ||
124 | var boolean hasRefined | ||
125 | do { | ||
126 | val nextRange = lastRange+1 | ||
127 | val next = calculateFurtherNodeDescriptors(model,lastRepresentation,IncomingRelations,OutgoingRelations,parallels,maxNumbers) | ||
128 | val nextRepresentation = createFurtherRepresentation(next.key,next.value,lastRepresentation,deepRepresentation) | ||
129 | |||
130 | val previousNumberOfTypes =lastRepresentation.nodeRepresentations.values.toSet.size | ||
131 | val nextNumberOfTypes = nextRepresentation.nodeRepresentations.values.toSet.size | ||
132 | hasRefined = nextNumberOfTypes > previousNumberOfTypes | ||
133 | |||
134 | lastRange = nextRange | ||
135 | lastRepresentation = nextRepresentation | ||
136 | |||
137 | // if(hasRefined) { | ||
138 | // println('''Level «nextRange» is calculated, number of types is refined: «previousNumberOfTypes» -> «nextNumberOfTypes»''') | ||
139 | // } else { | ||
140 | // println('''Level «nextRange» is calculated, but the number of types is not refined: «previousNumberOfTypes» = «nextNumberOfTypes»''') | ||
141 | // } | ||
142 | } while (hasRefined) | ||
143 | return lastRepresentation | ||
144 | } | ||
145 | |||
146 | def private getElements(PartialInterpretation model) { | ||
147 | return model.problem.elements + model.newElements | ||
148 | } | ||
149 | |||
150 | def private fillTypes(PartialInterpretation model, Map<DefinedElement, Set<String>> node2Type, Set<TypeDeclaration> relevantTypes) { | ||
151 | for(element : model.elements) { | ||
152 | node2Type.put(element, new HashSet) | ||
153 | } | ||
154 | |||
155 | // for(typeDefinition : model.problem.types.filter(TypeDefinition)) { | ||
156 | // // Dont need | ||
157 | // } | ||
158 | for(typeInterpretation : model.partialtypeinterpratation) { | ||
159 | val type = typeInterpretation.interpretationOf | ||
160 | if(type.isRelevant(relevantTypes)) { | ||
161 | for(element : typeInterpretation.elements) { | ||
162 | element.lookup(node2Type).add(type.name) | ||
163 | } | ||
164 | } | ||
165 | } | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * Indexes the references | ||
170 | */ | ||
171 | def private fillReferences(PartialInterpretation model, | ||
172 | Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations, | ||
173 | Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations, | ||
174 | Set<RelationDeclaration> relevantRelations) | ||
175 | { | ||
176 | for(object : model.elements) { | ||
177 | IncomingRelations.put(object,new LinkedList) | ||
178 | OutgoingRelations.put(object,new LinkedList) | ||
179 | } | ||
180 | for(relationInterpretation : model.partialrelationinterpretation) { | ||
181 | val type = relationInterpretation.interpretationOf | ||
182 | if(type.isRelevant(relevantRelations)) { | ||
183 | for(link : relationInterpretation.relationlinks) { | ||
184 | if(link instanceof BinaryElementRelationLink) { | ||
185 | OutgoingRelations.get(link.param1) += new OutgoingRelation(link.param2,type.name) | ||
186 | IncomingRelations.get(link.param2) += new IncomingRelation(link.param1,type.name) | ||
187 | } else throw new UnsupportedOperationException | ||
188 | } | ||
189 | } | ||
190 | } | ||
191 | } | ||
192 | |||
193 | /** | ||
194 | * Creates a local representation of the objects (aka zero range neighbourhood) | ||
195 | */ | ||
196 | def abstract protected NeighbourhoodWithTraces<ModelRepresentation,NodeRepresentation> createLocalRepresentation( | ||
197 | Map<DefinedElement, LocalNodeDescriptor> node2Representation, | ||
198 | Map<LocalNodeDescriptor, Integer> representation2Amount | ||
199 | ) | ||
200 | |||
201 | /** | ||
202 | * Creates a | ||
203 | */ | ||
204 | def abstract protected NeighbourhoodWithTraces<ModelRepresentation,NodeRepresentation> createFurtherRepresentation( | ||
205 | Map<FurtherNodeDescriptor<NodeRepresentation>, Integer> nodeDescriptors, | ||
206 | Map<DefinedElement, FurtherNodeDescriptor<NodeRepresentation>> node2Representation, | ||
207 | NeighbourhoodWithTraces<ModelRepresentation,NodeRepresentation> previous, | ||
208 | boolean deepRepresentation | ||
209 | ) | ||
210 | |||
211 | def private addOne(int original, int max) { | ||
212 | if(original == Integer.MAX_VALUE) return Integer.MAX_VALUE | ||
213 | if(original +1 > max) return Integer.MAX_VALUE | ||
214 | else return original+1 | ||
215 | } | ||
216 | |||
217 | private def calculateIncomingEdges(Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations, | ||
218 | DefinedElement object, Map<DefinedElement, ? extends NodeRepresentation> previousNodeRepresentations, int parallel) | ||
219 | { | ||
220 | val Map<IncomingRelation<NodeRepresentation>, Integer> res = new HashMap | ||
221 | for (incomingConcreteEdge : IncomingRelations.get(object)) { | ||
222 | val IncomingRelation<NodeRepresentation> e = new IncomingRelation( | ||
223 | previousNodeRepresentations.get(incomingConcreteEdge.from), incomingConcreteEdge.type) | ||
224 | if (res.containsKey(e)) { | ||
225 | res.put(e, addOne(res.get(e),parallel)) | ||
226 | } else { | ||
227 | res.put(e, 1) | ||
228 | } | ||
229 | } | ||
230 | return res | ||
231 | } | ||
232 | |||
233 | private def calcuateOutgoingEdges(Map<DefinedElement,List<OutgoingRelation<DefinedElement>>> OutgoingRelations, | ||
234 | DefinedElement object, Map<DefinedElement, ? extends NodeRepresentation> previousNodeRepresentations, int parallel) | ||
235 | { | ||
236 | val Map<OutgoingRelation<NodeRepresentation>,Integer> res= new HashMap | ||
237 | for(outgoingConcreteEdge : OutgoingRelations.get(object)) { | ||
238 | val OutgoingRelation<NodeRepresentation> e = | ||
239 | new OutgoingRelation( | ||
240 | previousNodeRepresentations.get(outgoingConcreteEdge.to), | ||
241 | outgoingConcreteEdge.type) | ||
242 | if(res.containsKey(e)) { | ||
243 | res.put(e,addOne(res.get(e),parallel)) | ||
244 | } else { | ||
245 | res.put(e,1) | ||
246 | } | ||
247 | } | ||
248 | return res; | ||
249 | } | ||
250 | |||
251 | /*def private <KEY,VALUE> void addOrCreate_Set(Map<KEY,Set<VALUE>> map, KEY key, VALUE value) { | ||
252 | var Set<VALUE> s; | ||
253 | if(map.containsKey(key)) { | ||
254 | s = map.get(key); | ||
255 | } else { | ||
256 | s = new HashSet | ||
257 | map.put(key,s) | ||
258 | } | ||
259 | s.add(value) | ||
260 | }*/ | ||
261 | |||
262 | |||
263 | private def calculateFurtherNodeDescriptors( | ||
264 | PartialInterpretation model, | ||
265 | NeighbourhoodWithTraces<ModelRepresentation, NodeRepresentation> previous, | ||
266 | Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations, | ||
267 | Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations, | ||
268 | int parallels, int maxNumber) | ||
269 | { | ||
270 | val previousNodeRepresentations = previous.nodeRepresentations | ||
271 | val node2Representation = new HashMap<DefinedElement,FurtherNodeDescriptor<NodeRepresentation>> | ||
272 | val Map<FurtherNodeDescriptor<NodeRepresentation>,Integer> descriptor2Number = | ||
273 | if(this.mergeSimilarNeighbourhood){ new HashMap } else { null } | ||
274 | val Map<FurtherNodeDescriptor<NodeRepresentation>,FurtherNodeDescriptor<NodeRepresentation>> uniqueDescription = | ||
275 | if(this.mergeSimilarNeighbourhood){ new HashMap } else { null } | ||
276 | |||
277 | for(object: model.elements) { | ||
278 | val incomingEdges = this.calculateIncomingEdges(IncomingRelations, object, previousNodeRepresentations,parallels) | ||
279 | val outgoingEdges = this.calcuateOutgoingEdges(OutgoingRelations,object, previousNodeRepresentations,parallels) | ||
280 | |||
281 | val previousType = previousNodeRepresentations.get(object) | ||
282 | |||
283 | if(previousType === null) { | ||
284 | println("Error in state coder") | ||
285 | } | ||
286 | |||
287 | val nodeDescriptor = new FurtherNodeDescriptor( | ||
288 | previousType, | ||
289 | incomingEdges, | ||
290 | outgoingEdges) | ||
291 | |||
292 | if(this.mergeSimilarNeighbourhood) { | ||
293 | if(descriptor2Number.containsKey(nodeDescriptor)) { | ||
294 | descriptor2Number.put( | ||
295 | nodeDescriptor, | ||
296 | addOne(descriptor2Number.get(nodeDescriptor),maxNumber) | ||
297 | ) | ||
298 | node2Representation.put(object,uniqueDescription.get(nodeDescriptor)) | ||
299 | } else { | ||
300 | descriptor2Number.put(nodeDescriptor,1) | ||
301 | uniqueDescription.put(nodeDescriptor,nodeDescriptor) | ||
302 | node2Representation.put(object,nodeDescriptor) | ||
303 | } | ||
304 | } else { | ||
305 | node2Representation.put(object,nodeDescriptor) | ||
306 | } | ||
307 | } | ||
308 | |||
309 | return descriptor2Number -> node2Representation | ||
310 | } | ||
311 | |||
312 | private def calculateLocalNodeDescriptors( | ||
313 | PartialInterpretation model, | ||
314 | Map<DefinedElement, Set<String>> types, | ||
315 | int maxNumber) | ||
316 | { | ||
317 | val Map<DefinedElement, LocalNodeDescriptor> node2Representation = new HashMap | ||
318 | val Map<LocalNodeDescriptor, Integer> representation2Amount = | ||
319 | if(mergeSimilarNeighbourhood){ new HashMap } else { null } | ||
320 | val Map<LocalNodeDescriptor, LocalNodeDescriptor> uniqueRepresentation = | ||
321 | if(this.mergeSimilarNeighbourhood){ new HashMap } else { null } | ||
322 | |||
323 | for(element : model.elements) { | ||
324 | var newDescriptor = new LocalNodeDescriptor(element.name,element.lookup(types)) | ||
325 | if(this.mergeSimilarNeighbourhood){ | ||
326 | if(uniqueRepresentation.containsKey(newDescriptor)) { | ||
327 | newDescriptor = newDescriptor.lookup(uniqueRepresentation) | ||
328 | node2Representation.put(element,newDescriptor) | ||
329 | representation2Amount.put( | ||
330 | newDescriptor, | ||
331 | addOne(newDescriptor.lookup(representation2Amount),maxNumber) | ||
332 | ) | ||
333 | } else { | ||
334 | uniqueRepresentation.put(newDescriptor,newDescriptor) | ||
335 | node2Representation.put(element,newDescriptor) | ||
336 | representation2Amount.put(newDescriptor, 1) | ||
337 | } | ||
338 | } else { | ||
339 | node2Representation.put(element,newDescriptor) | ||
340 | } | ||
341 | } | ||
342 | |||
343 | return representation2Amount -> node2Representation | ||
344 | } | ||
345 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/IdentifierBasedStateCoderFactory.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/IdentifierBasedStateCoderFactory.xtend new file mode 100644 index 00000000..c421ace6 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/IdentifierBasedStateCoderFactory.xtend | |||
@@ -0,0 +1,129 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation | ||
9 | import java.util.ArrayList | ||
10 | import java.util.Comparator | ||
11 | import java.util.LinkedList | ||
12 | import java.util.List | ||
13 | import java.util.SortedSet | ||
14 | import java.util.TreeSet | ||
15 | import org.eclipse.emf.common.notify.Notifier | ||
16 | import org.eclipse.viatra.dse.statecode.IStateCoder | ||
17 | import org.eclipse.viatra.dse.statecode.IStateCoderFactory | ||
18 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | ||
19 | import org.eclipse.xtend.lib.annotations.Accessors | ||
20 | import org.eclipse.xtend.lib.annotations.Data | ||
21 | |||
22 | class IdentifierBasedStateCoderFactory implements IStateCoderFactory{ | ||
23 | |||
24 | val List<IdentifierBasedStateCoder> statecoders = new LinkedList | ||
25 | synchronized override createStateCoder() { | ||
26 | val res = new IdentifierBasedStateCoder | ||
27 | statecoders += res | ||
28 | return res | ||
29 | } | ||
30 | def getSumStatecoderRuntime() { | ||
31 | statecoders.map[statecoderRuntime].reduce[p1, p2|p1+p2] | ||
32 | } | ||
33 | } | ||
34 | |||
35 | @Data | ||
36 | class RelationStatecoder { | ||
37 | String relationName | ||
38 | SortedSet<Pair<Integer,Integer>> links; | ||
39 | |||
40 | static val comparator= new Comparator<Pair<Integer,Integer>>() { | ||
41 | override compare(Pair<Integer, Integer> o1, Pair<Integer, Integer> o2) { | ||
42 | if(o1.key > o2.key) { | ||
43 | return 1 | ||
44 | } else if(o1.key < o2.key) { | ||
45 | return -1 | ||
46 | } else { | ||
47 | return Integer.compare(o1.value,o2.value) | ||
48 | } | ||
49 | } | ||
50 | } | ||
51 | |||
52 | new(String relationName) { | ||
53 | this.relationName = relationName | ||
54 | links = new TreeSet(comparator) | ||
55 | } | ||
56 | } | ||
57 | |||
58 | @Data | ||
59 | class IdentifierBasedStateCode { | ||
60 | int numberOfNewElement | ||
61 | SortedSet<RelationStatecoder> relationStatecoders | ||
62 | |||
63 | private static val comparator = new Comparator<RelationStatecoder>() { | ||
64 | override compare(RelationStatecoder o1, RelationStatecoder o2) { | ||
65 | o1.relationName.compareTo(o2.relationName) | ||
66 | } | ||
67 | } | ||
68 | |||
69 | public new(int numberOfNewElements) { | ||
70 | this.numberOfNewElement = numberOfNewElements | ||
71 | this.relationStatecoders = new TreeSet(comparator) | ||
72 | } | ||
73 | } | ||
74 | |||
75 | class IdentifierBasedStateCoder implements IStateCoder{ | ||
76 | var PartialInterpretation model = null | ||
77 | |||
78 | @Accessors(PUBLIC_GETTER) var long statecoderRuntime = 0 | ||
79 | |||
80 | override createActivationCode(IPatternMatch match) { | ||
81 | val startTime = System.nanoTime | ||
82 | val res = new ArrayList(match.parameterNames.size) | ||
83 | var index = 0 | ||
84 | while(index < match.parameterNames.size) { | ||
85 | res.add(getID(match.get(index))) | ||
86 | index++ | ||
87 | } | ||
88 | statecoderRuntime += (System.nanoTime - startTime) | ||
89 | return match.specification.fullyQualifiedName -> res | ||
90 | } | ||
91 | |||
92 | override createStateCode() { | ||
93 | val startTime = System.nanoTime | ||
94 | val res = new IdentifierBasedStateCode(model.newElements.size) | ||
95 | for(relation : model.partialrelationinterpretation) { | ||
96 | val relationCoder = new RelationStatecoder(relation.interpretationOf.name) | ||
97 | for(link: relation.relationlinks.filter(BinaryElementRelationLink)) { | ||
98 | relationCoder.links+=link.param1.ID -> link.param2.ID | ||
99 | } | ||
100 | res.relationStatecoders+=relationCoder | ||
101 | } | ||
102 | statecoderRuntime += (System.nanoTime - startTime) | ||
103 | return res | ||
104 | } | ||
105 | |||
106 | def getID(Object element) { | ||
107 | if(element instanceof DefinedElement) { | ||
108 | val container = element.eContainer | ||
109 | if(container instanceof LogicProblem) { | ||
110 | return -container.elements.indexOf(element)-1 | ||
111 | } else if(container instanceof PartialInterpretation){ | ||
112 | return container.newElements.indexOf(element)+1 | ||
113 | } | ||
114 | } else if(element instanceof PartialInterpretation || element instanceof LogicProblem) { | ||
115 | return 0 | ||
116 | } else if(element instanceof PartialRelationInterpretation) { | ||
117 | return element.interpretationOf.name.hashCode | ||
118 | } else if(element instanceof PartialTypeInterpratation) { | ||
119 | return element.interpretationOf.name.hashCode | ||
120 | } else { | ||
121 | println(element) | ||
122 | throw new UnsupportedOperationException('''Unsupported type: «element.class.simpleName»''') | ||
123 | } | ||
124 | } | ||
125 | |||
126 | override init(Notifier notifier) { | ||
127 | model = notifier as PartialInterpretation | ||
128 | } | ||
129 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend new file mode 100644 index 00000000..5fb85b0c --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend | |||
@@ -0,0 +1,206 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.AbstractNodeDescriptor | ||
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2ImmutableTypeLattice | ||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage | ||
7 | import java.util.ArrayList | ||
8 | import java.util.LinkedList | ||
9 | import java.util.List | ||
10 | import java.util.Map | ||
11 | import org.eclipse.emf.common.notify.Notifier | ||
12 | import org.eclipse.emf.ecore.EClass | ||
13 | import org.eclipse.emf.ecore.EObject | ||
14 | import org.eclipse.emf.ecore.EStructuralFeature | ||
15 | import org.eclipse.viatra.dse.statecode.IStateCoder | ||
16 | import org.eclipse.viatra.dse.statecode.IStateCoderFactory | ||
17 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | ||
18 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine | ||
19 | import org.eclipse.viatra.query.runtime.base.api.FeatureListener | ||
20 | import org.eclipse.viatra.query.runtime.base.api.IndexingLevel | ||
21 | import org.eclipse.viatra.query.runtime.base.api.InstanceListener | ||
22 | import org.eclipse.viatra.query.runtime.emf.EMFBaseIndexWrapper | ||
23 | import org.eclipse.viatra.query.runtime.emf.EMFScope | ||
24 | import org.eclipse.xtend.lib.annotations.Accessors | ||
25 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
26 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
27 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation | ||
28 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation | ||
29 | import java.util.Set | ||
30 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
31 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
32 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2NeighbourhoodRepresentation | ||
33 | |||
34 | class NeighbourhoodBasedStateCoderFactory implements IStateCoderFactory { | ||
35 | val List<NeighbourhoodBasedPartialInterpretationStateCoder> statecoders = new LinkedList | ||
36 | |||
37 | val int range | ||
38 | val int parallels | ||
39 | val int maxNumber | ||
40 | val Set<TypeDeclaration> relevantTypes | ||
41 | val Set<RelationDeclaration> relevantRelations | ||
42 | |||
43 | public new() { | ||
44 | this.range = PartialInterpretation2NeighbourhoodRepresentation::FixPointRage | ||
45 | this.parallels = PartialInterpretation2NeighbourhoodRepresentation::FullParallels | ||
46 | this.maxNumber = PartialInterpretation2NeighbourhoodRepresentation::MaxNumbers | ||
47 | this.relevantTypes = null | ||
48 | this.relevantRelations = null | ||
49 | } | ||
50 | |||
51 | public new(int range, int parallels, int maxNumber, Set<TypeDeclaration> relevantTypes, Set<RelationDeclaration> relevantRelations) { | ||
52 | this.range = range | ||
53 | this.parallels = parallels | ||
54 | this.maxNumber = maxNumber | ||
55 | this.relevantTypes = relevantTypes | ||
56 | this.relevantRelations = relevantRelations | ||
57 | } | ||
58 | |||
59 | synchronized override createStateCoder() { | ||
60 | val res = new NeighbourhoodBasedPartialInterpretationStateCoder(statecoders.size, | ||
61 | range,parallels,maxNumber,relevantTypes,relevantRelations) | ||
62 | statecoders += res | ||
63 | return res | ||
64 | } | ||
65 | def getSumStatecoderRuntime() { | ||
66 | statecoders.map[statecoderRuntime].reduce[p1, p2|p1+p2] | ||
67 | } | ||
68 | } | ||
69 | |||
70 | class NeighbourhoodBasedPartialInterpretationStateCoder implements IStateCoder{ | ||
71 | val int id; | ||
72 | val int range | ||
73 | val int parallels | ||
74 | val int maxNumber | ||
75 | val Set<TypeDeclaration> relevantTypes | ||
76 | val Set<RelationDeclaration> relevantRelations | ||
77 | |||
78 | val calculator = | ||
79 | new PartialInterpretation2ImmutableTypeLattice | ||
80 | var PartialInterpretation target | ||
81 | |||
82 | private var Map<DefinedElement, ? extends AbstractNodeDescriptor> nodeRepresentations = null | ||
83 | private var Map<? extends AbstractNodeDescriptor, Integer> modelRepresentation = null | ||
84 | |||
85 | /*public new(int id) { | ||
86 | this.id = id | ||
87 | this.range = PartialInterpretation2NeighbourhoodRepresentation::FixPointRage | ||
88 | this.parallels = PartialInterpretation2NeighbourhoodRepresentation::FullParallels | ||
89 | this.maxNumber = maxNumber = PartialInterpretation2NeighbourhoodRepresentation::MaxNumbers | ||
90 | this.relevantTypes = relevantTypes | ||
91 | this.relevantRelations = relevantRelations | ||
92 | }*/ | ||
93 | |||
94 | public new(int id, int range, int parallels, int maxNumber, Set<TypeDeclaration> relevantTypes, Set<RelationDeclaration> relevantRelations) { | ||
95 | this.id = id | ||
96 | this.range = range | ||
97 | this.parallels = parallels | ||
98 | this.maxNumber = maxNumber | ||
99 | this.relevantTypes = relevantTypes | ||
100 | this.relevantRelations = relevantRelations | ||
101 | } | ||
102 | |||
103 | @Accessors(PUBLIC_GETTER) var long statecoderRuntime = 0 | ||
104 | |||
105 | // val range = -1 | ||
106 | // val par = Integer.MAX_VALUE | ||
107 | //val deeprepresentation = false | ||
108 | |||
109 | ///////// | ||
110 | // Caching version | ||
111 | ///////// | ||
112 | synchronized private def refreshStateCodes() { | ||
113 | if(this.nodeRepresentations === null || this.modelRepresentation === null) { | ||
114 | val startTime = System.nanoTime | ||
115 | //relevantObjects.forEach[println(it)] | ||
116 | val code = calculator.createRepresentation(target,range,parallels,maxNumber,relevantTypes,relevantRelations) | ||
117 | this.modelRepresentation = code.modelRepresentation | ||
118 | this.nodeRepresentations = code.nodeRepresentations | ||
119 | statecoderRuntime += (System.nanoTime - startTime) | ||
120 | } | ||
121 | } | ||
122 | synchronized override createActivationCode(IPatternMatch match) { | ||
123 | refreshStateCodes | ||
124 | |||
125 | val startTime = System.nanoTime | ||
126 | val size = match.specification.parameters.size | ||
127 | val res = new ArrayList(size) | ||
128 | var int index = 0 | ||
129 | while(index < size) { | ||
130 | res.add(getCode(match.get(index))) | ||
131 | index++ | ||
132 | } | ||
133 | statecoderRuntime += (System.nanoTime - startTime) | ||
134 | return match.specification.fullyQualifiedName->res.hashCode | ||
135 | } | ||
136 | |||
137 | def private getCode(Object o) { | ||
138 | if(o instanceof DefinedElement) { | ||
139 | this.nodeRepresentations.get(o) | ||
140 | } else if(o instanceof PartialInterpretation || o instanceof LogicProblem) { | ||
141 | return null | ||
142 | } else if(o instanceof PartialRelationInterpretation) { | ||
143 | return o.interpretationOf.name | ||
144 | } else if(o instanceof PartialTypeInterpratation) { | ||
145 | return o.interpretationOf.name | ||
146 | } else { | ||
147 | throw new UnsupportedOperationException('''Unsupported type: «o.class.simpleName»''') | ||
148 | } | ||
149 | } | ||
150 | |||
151 | synchronized override createStateCode() { | ||
152 | refreshStateCodes | ||
153 | return this.modelRepresentation.hashCode | ||
154 | } | ||
155 | ///////// | ||
156 | // Caching version | ||
157 | ///////// | ||
158 | |||
159 | ///////// | ||
160 | // Recalculating version | ||
161 | ///////// | ||
162 | // synchronized override createActivationCode(IPatternMatch match) { | ||
163 | // val nodes = calculator.createRepresentation(getRelevantObjects().toList,range,par).nodeRepresentations | ||
164 | // val res = match.toArray.map[objectInMatch | | ||
165 | // nodes.get(objectInMatch) | ||
166 | // ] | ||
167 | // return res | ||
168 | // } | ||
169 | // | ||
170 | // override createStateCode() { | ||
171 | // return this.calculator.createRepresentation(getRelevantObjects().toList,range,par).modelRepresentation | ||
172 | // } | ||
173 | ///////// | ||
174 | // Recalculating version | ||
175 | ///////// | ||
176 | |||
177 | override init(Notifier notifier) { | ||
178 | this.target = notifier as PartialInterpretation | ||
179 | val queryEngine = ViatraQueryEngine.on(new EMFScope(notifier)) | ||
180 | val baseIndex = queryEngine.getBaseIndex() as EMFBaseIndexWrapper | ||
181 | val navigationHelper = baseIndex.getNavigationHelper(); | ||
182 | |||
183 | val classes = PartialinterpretationPackage.eINSTANCE.EClassifiers.filter(EClass).toSet | ||
184 | val features = classes.map[it.EAllStructuralFeatures].flatten.toSet | ||
185 | navigationHelper.registerObservedTypes( | ||
186 | classes, | ||
187 | null, | ||
188 | features, | ||
189 | IndexingLevel.FULL); | ||
190 | |||
191 | |||
192 | navigationHelper.addFeatureListener(features, new FeatureListener() { | ||
193 | override public void featureInserted(EObject host, EStructuralFeature feature, Object value) { invalidate } | ||
194 | override public void featureDeleted(EObject host, EStructuralFeature feature, Object value) { invalidate } | ||
195 | }); | ||
196 | navigationHelper.addInstanceListener(classes, new InstanceListener() { | ||
197 | override public void instanceInserted(EClass clazz, EObject instance) { invalidate } | ||
198 | override public void instanceDeleted(EClass clazz, EObject instance) { invalidate } | ||
199 | }); | ||
200 | } | ||
201 | |||
202 | synchronized def public invalidate() { | ||
203 | this.nodeRepresentations = null | ||
204 | this.modelRepresentation = null | ||
205 | } | ||
206 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretation2Gml.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretation2Gml.xtend new file mode 100644 index 00000000..819cae00 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretation2Gml.xtend | |||
@@ -0,0 +1,136 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
5 | import java.util.Map | ||
6 | import java.util.HashMap | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation | ||
10 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation | ||
12 | import java.util.Set | ||
13 | |||
14 | class PartialInterpretation2Gml { | ||
15 | def public transform(PartialInterpretation i) { | ||
16 | val p = i.problem | ||
17 | val Map<DefinedElement, Integer> objectToID = new HashMap | ||
18 | val containmentRelations = p.containmentHierarchies.map[it.containmentRelations].flatten.toSet | ||
19 | ''' | ||
20 | graph | ||
21 | [ | ||
22 | «FOR object:p.elements + i.newElements SEPARATOR '\n'» | ||
23 | «this.transformObject(object,object.typesOfElement(i),objectToID)» | ||
24 | «ENDFOR» | ||
25 | «FOR relation:i.partialrelationinterpretation» | ||
26 | «FOR link:relation.relationlinks.filter(BinaryElementRelationLink)» | ||
27 | «transformLink(relation,link,objectToID,containmentRelations)» | ||
28 | «ENDFOR» | ||
29 | «ENDFOR» | ||
30 | ] | ||
31 | '''.toString | ||
32 | } | ||
33 | def typesOfElement(DefinedElement e, PartialInterpretation i) { | ||
34 | i.problem.types.filter(TypeDefinition).filter[it.elements.contains(e)] + | ||
35 | i.partialtypeinterpratation.filter[it.elements.contains(e)].map[it.interpretationOf] | ||
36 | } | ||
37 | |||
38 | val protected titleSize = 16 | ||
39 | val protected attributeSize = 14 | ||
40 | val protected borderDistance = 6 | ||
41 | val protected attributeBorderDistance = 8 | ||
42 | val protected ratio = 11.0/20.0 | ||
43 | |||
44 | def protected transformObject(DefinedElement object,Iterable<Type> types,Map<DefinedElement, Integer> objectToID){ | ||
45 | val title = object.transormTitle | ||
46 | val attributes = types.map[it.name] | ||
47 | |||
48 | var double width = title.length*titleSize + borderDistance*2; | ||
49 | for(x:attributes.map[length*attributeSize + borderDistance*2 + attributeBorderDistance*2]) | ||
50 | width = Math::max(width,x) | ||
51 | width = width*ratio | ||
52 | |||
53 | val height = Math::max( | ||
54 | titleSize+4, | ||
55 | (attributes.size+1)*attributeSize + borderDistance*2) | ||
56 | |||
57 | val id = objectToID.size | ||
58 | objectToID.put(object,id) | ||
59 | |||
60 | ''' | ||
61 | node | ||
62 | [ | ||
63 | id «id» | ||
64 | graphics | ||
65 | [ | ||
66 | w «width» | ||
67 | h «height» | ||
68 | type "rectangle" | ||
69 | fill "#FFFFFF" | ||
70 | fill2 "#FFFFFF" | ||
71 | outline "#000000" | ||
72 | ] | ||
73 | LabelGraphics | ||
74 | [ | ||
75 | text "«title»" | ||
76 | outline "#000000" | ||
77 | fill "#FFFFFF" | ||
78 | fontSize «titleSize» | ||
79 | fontName "Monospace" | ||
80 | autoSizePolicy "node_width" | ||
81 | anchor "t" | ||
82 | borderDistance 0.0 | ||
83 | ] | ||
84 | LabelGraphics | ||
85 | [ | ||
86 | text " | ||
87 | «FOR attribute : attributes» | ||
88 | «attribute» | ||
89 | «ENDFOR»" | ||
90 | fontSize «attributeSize» | ||
91 | fontName "Consolas" | ||
92 | alignment "left" | ||
93 | anchor "tl" | ||
94 | borderDistance «borderDistance» | ||
95 | ] | ||
96 | ] | ||
97 | ''' | ||
98 | } | ||
99 | |||
100 | def protected transormTitle(DefinedElement object) { | ||
101 | if(object.name!= null)object.name | ||
102 | else "null" | ||
103 | } | ||
104 | |||
105 | def protected transformLink( | ||
106 | PartialRelationInterpretation reference, | ||
107 | BinaryElementRelationLink link, | ||
108 | Map<DefinedElement, Integer> objectToID, | ||
109 | Set<Relation> containmentRelations) | ||
110 | { | ||
111 | ''' | ||
112 | edge | ||
113 | [ | ||
114 | source «objectToID.get(link.param1)» | ||
115 | target «objectToID.get(link.param2)» | ||
116 | graphics | ||
117 | [ | ||
118 | fill "#000000" | ||
119 | «IF containmentRelations.contains(reference.interpretationOf)» | ||
120 | width 3 | ||
121 | «ENDIF» | ||
122 | targetArrow "standard" | ||
123 | ] | ||
124 | LabelGraphics | ||
125 | [ | ||
126 | text "«reference.interpretationOf.name»" | ||
127 | fontSize 14 | ||
128 | fontName "Consolas" | ||
129 | configuration "AutoFlippingLabel" | ||
130 | model "six_pos" | ||
131 | position "thead" | ||
132 | ] | ||
133 | ] | ||
134 | ''' | ||
135 | } | ||
136 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/.classpath b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/.classpath new file mode 100644 index 00000000..2b46fc9b --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/.classpath | |||
@@ -0,0 +1,9 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <classpath> | ||
3 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | ||
4 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
5 | <classpathentry kind="src" path="src"/> | ||
6 | <classpathentry kind="src" path="xtend-gen"/> | ||
7 | <classpathentry kind="src" path="src-gen/"/> | ||
8 | <classpathentry kind="output" path="bin"/> | ||
9 | </classpath> | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/.gitignore b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/.gitignore new file mode 100644 index 00000000..b33f6aff --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | /bin/ | ||
2 | /xtend-gen/ | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/.project b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/.project new file mode 100644 index 00000000..712083e9 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/.project | |||
@@ -0,0 +1,34 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <projectDescription> | ||
3 | <name>hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner</name> | ||
4 | <comment></comment> | ||
5 | <projects> | ||
6 | </projects> | ||
7 | <buildSpec> | ||
8 | <buildCommand> | ||
9 | <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
10 | <arguments> | ||
11 | </arguments> | ||
12 | </buildCommand> | ||
13 | <buildCommand> | ||
14 | <name>org.eclipse.jdt.core.javabuilder</name> | ||
15 | <arguments> | ||
16 | </arguments> | ||
17 | </buildCommand> | ||
18 | <buildCommand> | ||
19 | <name>org.eclipse.pde.ManifestBuilder</name> | ||
20 | <arguments> | ||
21 | </arguments> | ||
22 | </buildCommand> | ||
23 | <buildCommand> | ||
24 | <name>org.eclipse.pde.SchemaBuilder</name> | ||
25 | <arguments> | ||
26 | </arguments> | ||
27 | </buildCommand> | ||
28 | </buildSpec> | ||
29 | <natures> | ||
30 | <nature>org.eclipse.pde.PluginNature</nature> | ||
31 | <nature>org.eclipse.jdt.core.javanature</nature> | ||
32 | <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
33 | </natures> | ||
34 | </projectDescription> | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/.settings/org.eclipse.jdt.core.prefs b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..295926d9 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/.settings/org.eclipse.jdt.core.prefs | |||
@@ -0,0 +1,7 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
4 | org.eclipse.jdt.core.compiler.compliance=1.8 | ||
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
7 | org.eclipse.jdt.core.compiler.source=1.8 | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/META-INF/MANIFEST.MF b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/META-INF/MANIFEST.MF new file mode 100644 index 00000000..bc965aa4 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/META-INF/MANIFEST.MF | |||
@@ -0,0 +1,23 @@ | |||
1 | Manifest-Version: 1.0 | ||
2 | Bundle-ManifestVersion: 2 | ||
3 | Bundle-Name: Reasoner | ||
4 | Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner | ||
5 | Bundle-Version: 1.0.0.qualifier | ||
6 | Export-Package: hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner | ||
7 | Require-Bundle: hu.bme.mit.inf.dslreasoner.ecore2logic;bundle-version="1.0.0", | ||
8 | hu.bme.mit.inf.dslreasoner.logic.model;bundle-version="1.0.0", | ||
9 | hu.bme.mit.inf.dslreasoner.viatra2logic;bundle-version="1.0.0", | ||
10 | hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatraquery;bundle-version="1.0.0", | ||
11 | hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage;bundle-version="1.0.0", | ||
12 | hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic;bundle-version="1.0.0", | ||
13 | com.google.guava, | ||
14 | org.eclipse.xtext.xbase.lib, | ||
15 | org.eclipse.xtend.lib, | ||
16 | org.eclipse.xtend.lib.macro, | ||
17 | org.eclipse.viatra.query.runtime.matchers;bundle-version="1.5.0", | ||
18 | org.eclipse.viatra.query.runtime;bundle-version="1.5.0", | ||
19 | org.eclipse.viatra.dse;bundle-version="0.15.0", | ||
20 | org.eclipse.viatra.dse.genetic;bundle-version="0.15.0", | ||
21 | org.eclipse.emf.ecore.edit;bundle-version="2.9.0" | ||
22 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
23 | Import-Package: org.apache.log4j | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/build.properties b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/build.properties new file mode 100644 index 00000000..aed85a48 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/build.properties | |||
@@ -0,0 +1,5 @@ | |||
1 | bin.includes = META-INF/,\ | ||
2 | . | ||
3 | source.. = src/,\ | ||
4 | src-gen/ | ||
5 | output.. = bin/ | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ModelGenerationMethodBasedGlobalConstraint.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ModelGenerationMethodBasedGlobalConstraint.xtend new file mode 100644 index 00000000..28cf986d --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ModelGenerationMethodBasedGlobalConstraint.xtend | |||
@@ -0,0 +1,11 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner | ||
2 | |||
3 | import org.eclipse.viatra.dse.objectives.IGlobalConstraint | ||
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod | ||
5 | |||
6 | abstract class ModelGenerationMethodBasedGlobalConstraint implements IGlobalConstraint { | ||
7 | val protected ModelGenerationMethod method | ||
8 | new(ModelGenerationMethod method) { | ||
9 | this.method = method | ||
10 | } | ||
11 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend new file mode 100644 index 00000000..38cc9459 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend | |||
@@ -0,0 +1,205 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasonerException | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicSolverConfiguration | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicresultFactory | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult | ||
11 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethodProvider | ||
12 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.PartialInterpretationInitialiser | ||
13 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage | ||
14 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.IdentifierBasedStateCoderFactory | ||
15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.NeighbourhoodBasedStateCoderFactory | ||
16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.BestFirstStrategyForModelGeneration | ||
17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.ModelGenerationCompositeObjective | ||
18 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.PartialModelAsLogicInterpretation | ||
19 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.ScopeObjective | ||
20 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.UnfinishedMultiplicityObjective | ||
21 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.UnfinishedWFObjective | ||
22 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.WF2ObjectiveConverter | ||
23 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace | ||
24 | import org.eclipse.viatra.dse.api.DesignSpaceExplorer | ||
25 | import org.eclipse.viatra.dse.api.DesignSpaceExplorer.DseLoggingLevel | ||
26 | import org.eclipse.viatra.dse.solutionstore.SolutionStore | ||
27 | import org.eclipse.viatra.dse.statecode.IStateCoderFactory | ||
28 | |||
29 | class ViatraReasoner extends LogicReasoner{ | ||
30 | val PartialInterpretationInitialiser initialiser = new PartialInterpretationInitialiser() | ||
31 | val ModelGenerationMethodProvider modelGenerationMethodProvider = new ModelGenerationMethodProvider | ||
32 | val extension LogicresultFactory factory = LogicresultFactory.eINSTANCE | ||
33 | val WF2ObjectiveConverter wf2ObjectiveConverter = new WF2ObjectiveConverter | ||
34 | |||
35 | val LogicReasoner inconsistencyDetector | ||
36 | |||
37 | public new() { | ||
38 | this.inconsistencyDetector=null | ||
39 | } | ||
40 | |||
41 | public new(LogicReasoner inconsistencyDetector) { | ||
42 | this.inconsistencyDetector = inconsistencyDetector | ||
43 | } | ||
44 | |||
45 | override solve(LogicProblem problem, LogicSolverConfiguration configuration, ReasonerWorkspace workspace) throws LogicReasonerException { | ||
46 | val viatraConfig = configuration.asConfig | ||
47 | val DesignSpaceExplorer dse = new DesignSpaceExplorer(); | ||
48 | |||
49 | /* | ||
50 | DesignSpaceExplorer.turnOnLogging(DseLoggingLevel.VERBOSE_FULL) | ||
51 | /*/ | ||
52 | DesignSpaceExplorer.turnOnLogging(DseLoggingLevel.WARN) | ||
53 | //*/ | ||
54 | |||
55 | dse.addMetaModelPackage(LogiclanguagePackage.eINSTANCE) | ||
56 | dse.addMetaModelPackage(LogicproblemPackage.eINSTANCE) | ||
57 | dse.addMetaModelPackage(PartialinterpretationPackage.eINSTANCE) | ||
58 | |||
59 | val transformationStartTime = System.nanoTime | ||
60 | |||
61 | val emptySolution = initialiser.initialisePartialInterpretation(problem, | ||
62 | viatraConfig.typeScopes.minNewElements, | ||
63 | viatraConfig.typeScopes.maxNewElements).output | ||
64 | emptySolution.problemConainer = problem | ||
65 | |||
66 | val method = modelGenerationMethodProvider.createModelGenerationMethod( | ||
67 | problem, | ||
68 | emptySolution, | ||
69 | viatraConfig.existingQueries, | ||
70 | workspace, | ||
71 | viatraConfig.nameNewElements, | ||
72 | viatraConfig.typeInferenceMethod | ||
73 | ) | ||
74 | |||
75 | dse.addObjective(new ModelGenerationCompositeObjective( | ||
76 | new ScopeObjective, | ||
77 | method.unfinishedMultiplicities.map[new UnfinishedMultiplicityObjective(it)], | ||
78 | new UnfinishedWFObjective(method.unfinishedWF) | ||
79 | )) | ||
80 | |||
81 | dse.addGlobalConstraint(wf2ObjectiveConverter.createInvalidationObjective(method.invalidWF)) | ||
82 | for(additionalConstraint : configuration.asConfig.additionalGlobalConstraints) { | ||
83 | dse.addGlobalConstraint(additionalConstraint.apply(method)) | ||
84 | } | ||
85 | |||
86 | dse.setInitialModel(emptySolution) | ||
87 | |||
88 | var IStateCoderFactory statecoder = if(viatraConfig.stateCoderStrategy == StateCoderStrategy.Neighbourhood) { | ||
89 | new NeighbourhoodBasedStateCoderFactory | ||
90 | } else { | ||
91 | new IdentifierBasedStateCoderFactory | ||
92 | } | ||
93 | dse.stateCoderFactory = statecoder | ||
94 | |||
95 | dse.maxNumberOfThreads = 1 | ||
96 | |||
97 | val solutionStore = new SolutionStore(configuration.solutionScope.numberOfRequiredSolution) | ||
98 | dse.solutionStore = solutionStore | ||
99 | |||
100 | for(rule : method.relationRefinementRules) { | ||
101 | dse.addTransformationRule(rule) | ||
102 | } | ||
103 | for(rule : method.objectRefinementRules) { | ||
104 | dse.addTransformationRule(rule) | ||
105 | } | ||
106 | |||
107 | val strategy = new BestFirstStrategyForModelGeneration( | ||
108 | workspace,inconsistencyDetector, | ||
109 | viatraConfig.inconsistencDetectorConfiguration, | ||
110 | viatraConfig.diversityRequirement) | ||
111 | |||
112 | val transformationTime = System.nanoTime - transformationStartTime | ||
113 | val solverStartTime = System.nanoTime | ||
114 | var boolean stoppedByTimeout | ||
115 | var boolean stoppedByException | ||
116 | try{ | ||
117 | stoppedByTimeout = dse.startExplorationWithTimeout(strategy,configuration.runtimeLimit*1000); | ||
118 | stoppedByException = false | ||
119 | } catch (NullPointerException npe) { | ||
120 | stoppedByTimeout = false | ||
121 | stoppedByException = true | ||
122 | } | ||
123 | |||
124 | val solverTime = System.nanoTime - solverStartTime | ||
125 | |||
126 | val statecoderFinal = statecoder | ||
127 | val statistics = createStatistics => [ | ||
128 | //it.solverTime = viatraConfig.runtimeLimit | ||
129 | it.solverTime = (solverTime/1000000) as int | ||
130 | it.transformationTime = (transformationTime/1000000) as int | ||
131 | it.entries += createIntStatisticEntry => [ | ||
132 | it.name = "TransformationExecutionTime" it.value = (method.statistics.transformationExecutionTime/1000000) as int | ||
133 | ] | ||
134 | it.entries += createIntStatisticEntry => [ | ||
135 | it.name = "TypeAnalysisTime" it.value = (method.statistics.PreliminaryTypeAnalisisTime/1000000) as int | ||
136 | ] | ||
137 | it.entries += createIntStatisticEntry => [ | ||
138 | it.name = "StateCoderTime" it.value = (statecoderFinal.runtime/1000000) as int | ||
139 | ] | ||
140 | it.entries += createIntStatisticEntry => [ | ||
141 | it.name = "StateCoderFailCount" it.value = strategy.numberOfStatecoderFaiL | ||
142 | ] | ||
143 | it.entries += createIntStatisticEntry => [ | ||
144 | it.name = "SolutionCopyTime" it.value = (strategy.solutionStoreWithCopy.sumRuntime/1000000) as int | ||
145 | ] | ||
146 | if(strategy.solutionStoreWithDiversityDescriptor.isActive) { | ||
147 | it.entries += createIntStatisticEntry => [ | ||
148 | it.name = "SolutionDiversityCheckTime" it.value = (strategy.solutionStoreWithDiversityDescriptor.sumRuntime/1000000) as int | ||
149 | ] | ||
150 | it.entries += createRealStatisticEntry => [ | ||
151 | it.name = "SolutionDiversitySuccessRate" it.value = strategy.solutionStoreWithDiversityDescriptor.successRate | ||
152 | ] | ||
153 | } | ||
154 | ] | ||
155 | |||
156 | if(stoppedByTimeout) { | ||
157 | return createInsuficientResourcesResult=>[ | ||
158 | it.problem = problem | ||
159 | it.resourceName="time" | ||
160 | it.statistics = statistics | ||
161 | ] | ||
162 | } else { | ||
163 | if(solutionStore.solutions.empty) { | ||
164 | return createInconsistencyResult => [ | ||
165 | it.problem = problem | ||
166 | it.statistics = statistics | ||
167 | ] | ||
168 | } else { | ||
169 | |||
170 | /*solutionStore.solutions.head.trajectories.head | ||
171 | solutionTrajectory.doTransformation(emptySolution) | ||
172 | * | ||
173 | */ | ||
174 | return factory.createModelResult => [ | ||
175 | it.problem = problem | ||
176 | it.trace = null | ||
177 | it.representation += strategy.solutionStoreWithCopy.solutions | ||
178 | it.statistics = statistics | ||
179 | ] | ||
180 | } | ||
181 | } | ||
182 | } | ||
183 | |||
184 | /*private def simpleWeithts(List<IObjective> objectives) { | ||
185 | objectives.map[1.0].toList | ||
186 | }*/ | ||
187 | |||
188 | private def dispatch long runtime(NeighbourhoodBasedStateCoderFactory sc) { | ||
189 | sc.sumStatecoderRuntime | ||
190 | } | ||
191 | |||
192 | private def dispatch long runtime(IdentifierBasedStateCoderFactory sc) { | ||
193 | sc.sumStatecoderRuntime | ||
194 | } | ||
195 | |||
196 | override getInterpretation(ModelResult modelResult) { | ||
197 | return new PartialModelAsLogicInterpretation | ||
198 | } | ||
199 | |||
200 | def ViatraReasonerConfiguration asConfig(LogicSolverConfiguration configuration) { | ||
201 | if(configuration instanceof ViatraReasonerConfiguration) { | ||
202 | return configuration | ||
203 | } else throw new IllegalArgumentException('''Wrong configuration. Expected: «ViatraReasonerConfiguration.name», but got: «configuration.class.name»"''') | ||
204 | } | ||
205 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend new file mode 100644 index 00000000..d638dd71 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend | |||
@@ -0,0 +1,42 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicSolverConfiguration | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeInferenceMethod | ||
8 | import java.util.LinkedList | ||
9 | import java.util.List | ||
10 | import java.util.Set | ||
11 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | ||
12 | import org.eclipse.xtext.xbase.lib.Functions.Function1 | ||
13 | |||
14 | public enum StateCoderStrategy { | ||
15 | Neighbourhood, NeighbourhoodWithEquivalence, IDBased, DefinedByDiversity | ||
16 | } | ||
17 | |||
18 | class ViatraReasonerConfiguration extends LogicSolverConfiguration{ | ||
19 | public var Iterable<PQuery> existingQueries | ||
20 | public var LogicSolverConfiguration inconsistencDetectorConfiguration = null | ||
21 | public var List<Function1<ModelGenerationMethod,ModelGenerationMethodBasedGlobalConstraint>> additionalGlobalConstraints = new LinkedList | ||
22 | int maxDepth = -1 | ||
23 | |||
24 | public var TypeInferenceMethod typeInferenceMethod = TypeInferenceMethod.Generic | ||
25 | |||
26 | public var nameNewElements = false | ||
27 | public var StateCoderStrategy stateCoderStrategy = StateCoderStrategy.Neighbourhood | ||
28 | |||
29 | /** | ||
30 | * Describes the required diversity between the solutions. | ||
31 | * Null means that the solutions have to have different state codes only. | ||
32 | */ | ||
33 | public var DiversityDescriptor diversityRequirement = null | ||
34 | } | ||
35 | |||
36 | public class DiversityDescriptor { | ||
37 | public var int range = -1 | ||
38 | public var int parallels = Integer.MAX_VALUE | ||
39 | public var int maxNumber = Integer.MAX_VALUE | ||
40 | public var Set<TypeDeclaration> relevantTypes | ||
41 | public var Set<RelationDeclaration> relevantRelations | ||
42 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/diversity/StateCodeCoverageComparator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/diversity/StateCodeCoverageComparator.xtend new file mode 100644 index 00000000..9a9446ba --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/diversity/StateCodeCoverageComparator.xtend | |||
@@ -0,0 +1,8 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.diversity | ||
2 | |||
3 | abstract class StateCodeCoverageComparator<StateCodeType>{ | ||
4 | def public boolean covers(Object superStateCode, Object subStateCode) { | ||
5 | return innerCover(superStateCode as StateCodeType, subStateCode as StateCodeType) | ||
6 | } | ||
7 | abstract def protected boolean innerCover(StateCodeType superStateCode, StateCodeType subStateCode) | ||
8 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java new file mode 100644 index 00000000..5a6fee2c --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java | |||
@@ -0,0 +1,372 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2010-2017, Andras Szabolcs Nagy and Daniel Varro | ||
3 | * All rights reserved. This program and the accompanying materials | ||
4 | * are made available under the terms of the Eclipse Public License v1.0 | ||
5 | * which accompanies this distribution, and is available at | ||
6 | * http://www.eclipse.org/legal/epl-v10.html | ||
7 | * Contributors: | ||
8 | * Andras Szabolcs Nagy - initial API and implementation | ||
9 | *******************************************************************************/ | ||
10 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse; | ||
11 | |||
12 | import java.util.ArrayList; | ||
13 | import java.util.Arrays; | ||
14 | import java.util.Collections; | ||
15 | import java.util.Comparator; | ||
16 | import java.util.Iterator; | ||
17 | import java.util.List; | ||
18 | import java.util.PriorityQueue; | ||
19 | import java.util.Random; | ||
20 | |||
21 | import org.apache.log4j.Logger; | ||
22 | import org.eclipse.viatra.dse.api.strategy.interfaces.IStrategy; | ||
23 | import org.eclipse.viatra.dse.base.ThreadContext; | ||
24 | import org.eclipse.viatra.dse.objectives.Fitness; | ||
25 | import org.eclipse.viatra.dse.objectives.ObjectiveComparatorHelper; | ||
26 | import org.eclipse.viatra.dse.solutionstore.SolutionStore; | ||
27 | |||
28 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner; | ||
29 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicSolverConfiguration; | ||
30 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult; | ||
31 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.PartialInterpretation2Logic; | ||
32 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation; | ||
33 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml; | ||
34 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.DiversityDescriptor; | ||
35 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace; | ||
36 | |||
37 | /** | ||
38 | * This exploration strategy eventually explorers the whole design space but goes in the most promising directions | ||
39 | * first, based on the {@link Fitness}. | ||
40 | * | ||
41 | * There are a few parameter to tune such as | ||
42 | * <ul> | ||
43 | * <li>maximum depth</li> | ||
44 | * <li>continue the exploration from a state that satisfies the hard objectives (the default that it will | ||
45 | * backtrack),</li> | ||
46 | * <li>whether to continue the exploration from the newly explored state if it is at least equally good than the | ||
47 | * previous one or only if it is better (default is "at least equally good").</li> | ||
48 | * </ul> | ||
49 | * | ||
50 | * @author Andras Szabolcs Nagy | ||
51 | * | ||
52 | */ | ||
53 | public class BestFirstStrategyForModelGeneration implements IStrategy { | ||
54 | |||
55 | private ThreadContext context; | ||
56 | private SolutionStore solutionStore; | ||
57 | private SolutionStoreWithCopy solutionStoreWithCopy; | ||
58 | private SolutionStoreWithDiversityDescriptor solutionStoreWithDiversityDescriptor; | ||
59 | private int numberOfStatecoderFail=0; | ||
60 | |||
61 | private int maxDepth = Integer.MAX_VALUE; | ||
62 | private boolean isInterrupted = false; | ||
63 | //private boolean backTrackIfSolution = true; | ||
64 | private boolean onlyBetterFirst = false; | ||
65 | |||
66 | private PriorityQueue<TrajectoryWithFitness> trajectoiresToExplore; | ||
67 | private Logger logger = Logger.getLogger(IStrategy.class); | ||
68 | |||
69 | private static class TrajectoryWithFitness { | ||
70 | |||
71 | public Object[] trajectory; | ||
72 | public Fitness fitness; | ||
73 | |||
74 | public TrajectoryWithFitness(Object[] trajectory, Fitness fitness) { | ||
75 | super(); | ||
76 | this.trajectory = trajectory; | ||
77 | this.fitness = fitness; | ||
78 | } | ||
79 | |||
80 | @Override | ||
81 | public String toString() { | ||
82 | return Arrays.toString(trajectory) + fitness.toString(); | ||
83 | } | ||
84 | |||
85 | } | ||
86 | |||
87 | public BestFirstStrategyForModelGeneration(ReasonerWorkspace workspace, LogicReasoner reasoner, LogicSolverConfiguration configuration, DiversityDescriptor descriptor) { | ||
88 | this.maxDepth = Integer.MAX_VALUE; | ||
89 | this.workspace = workspace; | ||
90 | this.reasoner = reasoner; | ||
91 | this.configuration = configuration; | ||
92 | this.solutionStoreWithDiversityDescriptor = new SolutionStoreWithDiversityDescriptor(descriptor); | ||
93 | } | ||
94 | |||
95 | @Override | ||
96 | public void initStrategy(ThreadContext context) { | ||
97 | this.context = context; | ||
98 | this.solutionStore = context.getGlobalContext().getSolutionStore(); | ||
99 | this.solutionStoreWithCopy = new SolutionStoreWithCopy(); | ||
100 | |||
101 | |||
102 | final ObjectiveComparatorHelper objectiveComparatorHelper = context.getObjectiveComparatorHelper(); | ||
103 | |||
104 | Comparator<TrajectoryWithFitness> comparator = new Comparator<BestFirstStrategyForModelGeneration.TrajectoryWithFitness>() { | ||
105 | |||
106 | @Override | ||
107 | public int compare(TrajectoryWithFitness o1, TrajectoryWithFitness o2) { | ||
108 | return objectiveComparatorHelper.compare(o2.fitness, o1.fitness); | ||
109 | } | ||
110 | }; | ||
111 | |||
112 | trajectoiresToExplore = new PriorityQueue<TrajectoryWithFitness>(11, comparator); | ||
113 | |||
114 | } | ||
115 | |||
116 | public SolutionStoreWithCopy getSolutionStoreWithCopy() { | ||
117 | return solutionStoreWithCopy; | ||
118 | } | ||
119 | |||
120 | public SolutionStoreWithDiversityDescriptor getSolutionStoreWithDiversityDescriptor() { | ||
121 | return solutionStoreWithDiversityDescriptor; | ||
122 | } | ||
123 | |||
124 | public int getNumberOfStatecoderFaiL() { | ||
125 | return numberOfStatecoderFail; | ||
126 | } | ||
127 | |||
128 | @Override | ||
129 | public void explore() { | ||
130 | final ObjectiveComparatorHelper objectiveComparatorHelper = context.getObjectiveComparatorHelper(); | ||
131 | |||
132 | boolean globalConstraintsAreSatisfied = context.checkGlobalConstraints(); | ||
133 | if (!globalConstraintsAreSatisfied) { | ||
134 | logger.info("Global contraint is not satisifed in the first state. Terminate."); | ||
135 | return; | ||
136 | } | ||
137 | |||
138 | final Fitness firstFittness = context.calculateFitness(); | ||
139 | if (firstFittness.isSatisifiesHardObjectives()) { | ||
140 | context.newSolution(); | ||
141 | logger.info("First state is a solution. Terminate."); | ||
142 | return; | ||
143 | } | ||
144 | |||
145 | if (maxDepth == 0) { | ||
146 | return; | ||
147 | } | ||
148 | |||
149 | final Object[] firstTrajectory = context.getTrajectory().toArray(new Object[0]); | ||
150 | TrajectoryWithFitness currentTrajectoryWithFittness = new TrajectoryWithFitness(firstTrajectory, firstFittness); | ||
151 | trajectoiresToExplore.add(currentTrajectoryWithFittness); | ||
152 | |||
153 | mainLoop: while (!isInterrupted) { | ||
154 | |||
155 | if (currentTrajectoryWithFittness == null) { | ||
156 | if (trajectoiresToExplore.isEmpty()) { | ||
157 | logger.debug("State space is fully traversed."); | ||
158 | return; | ||
159 | } else { | ||
160 | currentTrajectoryWithFittness = selectRandomState();// trajectoiresToExplore.element(); | ||
161 | if (logger.isDebugEnabled()) { | ||
162 | logger.debug("Current trajectory: " + Arrays.toString(context.getTrajectory().toArray())); | ||
163 | logger.debug("New trajectory is chosen: " + currentTrajectoryWithFittness); | ||
164 | } | ||
165 | // context.backtrackUntilRoot(); | ||
166 | // context.executeTrajectoryWithoutStateCoding(currentTrajectoryWithFittness.trajectory); | ||
167 | context.getDesignSpaceManager().executeTrajectoryWithMinimalBacktrackWithoutStateCoding(currentTrajectoryWithFittness.trajectory); | ||
168 | } | ||
169 | |||
170 | } | ||
171 | |||
172 | List<Object> activationIds; | ||
173 | try { | ||
174 | activationIds = new ArrayList<Object>(context.getUntraversedActivationIds()); | ||
175 | Collections.shuffle(activationIds); | ||
176 | } catch (NullPointerException e) { | ||
177 | numberOfStatecoderFail++; | ||
178 | activationIds = Collections.emptyList(); | ||
179 | } | ||
180 | |||
181 | Iterator<Object> iterator = activationIds.iterator(); | ||
182 | |||
183 | // writeCurrentState(); | ||
184 | // boolean consistencyCheckResult = checkConsistency(currentTrajectoryWithFittness); | ||
185 | // if(consistencyCheckResult == true) { | ||
186 | // continue mainLoop; | ||
187 | // } | ||
188 | |||
189 | while (!isInterrupted && iterator.hasNext()) { | ||
190 | final Object nextActivation = iterator.next(); | ||
191 | if (!iterator.hasNext()) { | ||
192 | logger.debug("Last untraversed activation of the state."); | ||
193 | trajectoiresToExplore.remove(currentTrajectoryWithFittness); | ||
194 | } | ||
195 | |||
196 | if (logger.isDebugEnabled()) { | ||
197 | logger.debug("Executing new activation: " + nextActivation); | ||
198 | } | ||
199 | context.executeAcitvationId(nextActivation); | ||
200 | |||
201 | // writeCurrentState(); | ||
202 | |||
203 | if (context.isCurrentStateAlreadyTraversed()) { | ||
204 | logger.info("The new state is already visited."); | ||
205 | context.backtrack(); | ||
206 | } else if (!context.checkGlobalConstraints()) { | ||
207 | logger.debug("Global contraint is not satisifed."); | ||
208 | context.backtrack(); | ||
209 | } else { | ||
210 | final Fitness nextFitness = context.calculateFitness(); | ||
211 | if (nextFitness.isSatisifiesHardObjectives()) { | ||
212 | if(solutionStoreWithDiversityDescriptor.isDifferent(context)) { | ||
213 | solutionStoreWithCopy.newSolution(context); | ||
214 | solutionStoreWithDiversityDescriptor.newSolution(context); | ||
215 | solutionStore.newSolution(context); | ||
216 | logger.debug("Found a solution."); | ||
217 | } | ||
218 | } | ||
219 | if (context.getDepth() > maxDepth) { | ||
220 | logger.debug("Reached max depth."); | ||
221 | context.backtrack(); | ||
222 | continue; | ||
223 | } | ||
224 | |||
225 | TrajectoryWithFitness nextTrajectoryWithFittness = new TrajectoryWithFitness( | ||
226 | context.getTrajectory().toArray(), nextFitness); | ||
227 | trajectoiresToExplore.add(nextTrajectoryWithFittness); | ||
228 | |||
229 | int compare = objectiveComparatorHelper.compare(currentTrajectoryWithFittness.fitness, | ||
230 | nextTrajectoryWithFittness.fitness); | ||
231 | if (compare < 0) { | ||
232 | logger.debug("Better fitness, moving on: " + nextFitness); | ||
233 | currentTrajectoryWithFittness = nextTrajectoryWithFittness; | ||
234 | continue mainLoop; | ||
235 | } else if (compare == 0) { | ||
236 | if (onlyBetterFirst) { | ||
237 | logger.debug("Equally good fitness, backtrack: " + nextFitness); | ||
238 | context.backtrack(); | ||
239 | continue; | ||
240 | } else { | ||
241 | logger.debug("Equally good fitness, moving on: " + nextFitness); | ||
242 | currentTrajectoryWithFittness = nextTrajectoryWithFittness; | ||
243 | continue mainLoop; | ||
244 | } | ||
245 | } else { | ||
246 | logger.debug("Worse fitness."); | ||
247 | // context.backtrack(); | ||
248 | currentTrajectoryWithFittness = null; | ||
249 | continue mainLoop; | ||
250 | } | ||
251 | } | ||
252 | } | ||
253 | |||
254 | logger.debug("State is fully traversed."); | ||
255 | trajectoiresToExplore.remove(currentTrajectoryWithFittness); | ||
256 | currentTrajectoryWithFittness = null; | ||
257 | |||
258 | } | ||
259 | logger.info("Interrupted."); | ||
260 | } | ||
261 | |||
262 | @Override | ||
263 | public void interruptStrategy() { | ||
264 | isInterrupted = true; | ||
265 | } | ||
266 | |||
267 | Random random = new Random(); | ||
268 | private TrajectoryWithFitness selectRandomState() { | ||
269 | int randomNumber = random.nextInt(100); | ||
270 | if(randomNumber < 5) { | ||
271 | int elements = trajectoiresToExplore.size(); | ||
272 | int randomElementIndex = random.nextInt(elements); | ||
273 | logger.debug("Randomly backtract to the " + randomElementIndex + " best solution..."); | ||
274 | Iterator<TrajectoryWithFitness> iterator = trajectoiresToExplore.iterator(); | ||
275 | while(randomElementIndex!=0) { | ||
276 | iterator.next(); | ||
277 | randomElementIndex--; | ||
278 | } | ||
279 | TrajectoryWithFitness res = iterator.next(); | ||
280 | if(res == null) { | ||
281 | return trajectoiresToExplore.element(); | ||
282 | } else { | ||
283 | return res; | ||
284 | } | ||
285 | } else { | ||
286 | return trajectoiresToExplore.element(); | ||
287 | } | ||
288 | } | ||
289 | |||
290 | private PartialInterpretation2Logic partialInterpretation2Logic = new PartialInterpretation2Logic(); | ||
291 | private LogicReasoner reasoner; | ||
292 | private PartialInterpretation2Gml partialInterpretation2Gml = new PartialInterpretation2Gml(); | ||
293 | private ReasonerWorkspace workspace; | ||
294 | private LogicSolverConfiguration configuration; | ||
295 | int numberOfPrintedModel = 0; | ||
296 | public ModelResult modelResultByTheSolver = null; | ||
297 | public void writeCurrentState() { | ||
298 | PartialInterpretation p = (PartialInterpretation)(context.getModel()); | ||
299 | int id= ++numberOfPrintedModel; | ||
300 | if(id%100 == 1) { | ||
301 | String text = this.partialInterpretation2Gml.transform(p); | ||
302 | this.workspace.writeText(id+".gml", text); | ||
303 | this.workspace.writeModel(p, id+".partialinterpretation"); | ||
304 | logger.debug("State "+id+" is saved."); | ||
305 | } | ||
306 | } | ||
307 | |||
308 | // int numberOfSolverCalls = 0; | ||
309 | // | ||
310 | // protected boolean checkConsistency(TrajectoryWithFitness t) { | ||
311 | // if (reasoner != null) { | ||
312 | // int id = ++numberOfSolverCalls; | ||
313 | // if (id % 100 == 1) { | ||
314 | // try { | ||
315 | // PartialInterpretation interpretation = (PartialInterpretation) (context.getModel()); | ||
316 | // PartialInterpretation copied = EcoreUtil.copy(interpretation); | ||
317 | // this.partialInterpretation2Logic.transformPartialIntepretation2Logic(copied.getProblem(), copied); | ||
318 | // LogicProblem newProblem = copied.getProblem(); | ||
319 | // | ||
320 | // this.configuration.typeScopes.maxNewElements = interpretation.getMaxNewElements(); | ||
321 | // this.configuration.typeScopes.minNewElements = interpretation.getMinNewElements(); | ||
322 | // LogicResult result = reasoner.solve(newProblem, configuration, workspace); | ||
323 | // if (result instanceof InconsistencyResult) { | ||
324 | // logger.debug("Solver found an Inconsistency!"); | ||
325 | // removeSubtreeFromQueue(t); | ||
326 | // return true; | ||
327 | // } else if (result instanceof ModelResult) { | ||
328 | // logger.debug("Solver found a model!"); | ||
329 | // solutionStore.newSolution(context); | ||
330 | |||
331 | // modelResultByTheSolver = (ModelResult) result; | ||
332 | // return true; | ||
333 | // } else { | ||
334 | // logger.debug("Failed consistency check."); | ||
335 | // return false; | ||
336 | // } | ||
337 | // } catch (Exception e) { | ||
338 | // // TODO Auto-generated catch block | ||
339 | // e.printStackTrace(); | ||
340 | // return false; | ||
341 | // } | ||
342 | // } | ||
343 | // | ||
344 | // } | ||
345 | // return false; | ||
346 | // } | ||
347 | // | ||
348 | // protected void removeSubtreeFromQueue(TrajectoryWithFitness t) { | ||
349 | // PriorityQueue<TrajectoryWithFitness> previous = this.trajectoiresToExplore; | ||
350 | // this.trajectoiresToExplore = new PriorityQueue<>(this.comparator); | ||
351 | // for (TrajectoryWithFitness trajectoryWithFitness : previous) { | ||
352 | // if(! containsAsSubstring(trajectoryWithFitness.trajectory,t.trajectory)) { | ||
353 | // this.trajectoiresToExplore.add(trajectoryWithFitness); | ||
354 | // } else { | ||
355 | // logger.debug("State has been excluded due to inherent inconsistency"); | ||
356 | // } | ||
357 | // } | ||
358 | // } | ||
359 | // | ||
360 | // private boolean containsAsSubstring(Object[] full, Object[] substring) { | ||
361 | // if(substring.length > full.length) { | ||
362 | // return false; | ||
363 | // } else if(substring.length == full.length) { | ||
364 | // return Arrays.equals(full, substring); | ||
365 | // } else { | ||
366 | // Object[] part = Arrays.copyOfRange(full, 0, substring.length); | ||
367 | // return Arrays.equals(part, substring); | ||
368 | // } | ||
369 | // } | ||
370 | // | ||
371 | |||
372 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend new file mode 100644 index 00000000..1ca2343f --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend | |||
@@ -0,0 +1,85 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse | ||
2 | |||
3 | import java.util.Comparator | ||
4 | import java.util.List | ||
5 | import org.eclipse.viatra.dse.base.ThreadContext | ||
6 | import org.eclipse.viatra.dse.objectives.Comparators | ||
7 | import org.eclipse.viatra.dse.objectives.IObjective | ||
8 | import org.eclipse.viatra.dse.objectives.impl.BaseObjective | ||
9 | |||
10 | //class ViatraReasonerNumbers { | ||
11 | // public static val scopePriority = 2 | ||
12 | // public static val unfinishedMultiplicityPriority = 2 | ||
13 | // public static val unifinshedWFPriority = 2 | ||
14 | // //public static val complexityPriority = 4 | ||
15 | // | ||
16 | // public static val scopeWeigth = 1.0 | ||
17 | // public static val unfinishedMultiplicityWeigth = 1.5 | ||
18 | // public static val unfinishedWFWeigth = 1.5 | ||
19 | // //public static val complexityWeigth = 0.1 | ||
20 | // | ||
21 | // public static val useCompositeObjective = true | ||
22 | // public static val compositePriority = 2 | ||
23 | //} | ||
24 | |||
25 | class ModelGenerationCompositeObjective implements IObjective{ | ||
26 | val ScopeObjective scopeObjective | ||
27 | val List<UnfinishedMultiplicityObjective> unfinishedMultiplicityObjectives | ||
28 | val UnfinishedWFObjective unfinishedWFObjective | ||
29 | |||
30 | public new( | ||
31 | ScopeObjective scopeObjective, | ||
32 | List<UnfinishedMultiplicityObjective> unfinishedMultiplicityObjectives, | ||
33 | UnfinishedWFObjective unfinishedWFObjective) | ||
34 | { | ||
35 | this.scopeObjective = scopeObjective | ||
36 | this.unfinishedMultiplicityObjectives = unfinishedMultiplicityObjectives | ||
37 | this.unfinishedWFObjective = unfinishedWFObjective | ||
38 | } | ||
39 | |||
40 | override init(ThreadContext context) { | ||
41 | this.scopeObjective.init(context) | ||
42 | this.unfinishedMultiplicityObjectives.forEach[it.init(context)] | ||
43 | this.unfinishedWFObjective.init(context) | ||
44 | } | ||
45 | |||
46 | override createNew() { | ||
47 | return new ModelGenerationCompositeObjective( | ||
48 | this.scopeObjective, this.unfinishedMultiplicityObjectives, this.unfinishedWFObjective) | ||
49 | } | ||
50 | |||
51 | override getComparator() { Comparators.LOWER_IS_BETTER } | ||
52 | override getFitness(ThreadContext context) { | ||
53 | var sum = 0.0 | ||
54 | val scopeFitnes = scopeObjective.getFitness(context) | ||
55 | //val unfinishedMultiplicitiesFitneses = unfinishedMultiplicityObjectives.map[x|x.getFitness(context)] | ||
56 | val unfinishedWFsFitness = unfinishedWFObjective.getFitness(context) | ||
57 | |||
58 | sum+=scopeFitnes | ||
59 | var multiplicity = 0.0 | ||
60 | for(multiplicityObjective : unfinishedMultiplicityObjectives) { | ||
61 | multiplicity+=multiplicityObjective.getFitness(context)//*0.5 | ||
62 | } | ||
63 | sum+=multiplicity | ||
64 | sum += unfinishedWFsFitness//*0.5 | ||
65 | |||
66 | // println('''Sum=«sum»|Scope=«scopeFitnes»|Multiplicity=«multiplicity»|WFs=«unfinishedWFsFitness»''') | ||
67 | |||
68 | return sum | ||
69 | } | ||
70 | |||
71 | override getLevel() { 2 } | ||
72 | override getName() { "CompositeUnfinishednessObjective"} | ||
73 | |||
74 | override isHardObjective() { true } | ||
75 | override satisifiesHardObjective(Double fitness) { fitness <= 0.001 } | ||
76 | |||
77 | |||
78 | override setComparator(Comparator<Double> comparator) { | ||
79 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
80 | } | ||
81 | override setLevel(int level) { | ||
82 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
83 | } | ||
84 | |||
85 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PartialModelAsLogicInterpretation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PartialModelAsLogicInterpretation.xtend new file mode 100644 index 00000000..b2a7e3f5 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PartialModelAsLogicInterpretation.xtend | |||
@@ -0,0 +1,30 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicModelInterpretation | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDeclaration | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDeclaration | ||
8 | |||
9 | class PartialModelAsLogicInterpretation implements LogicModelInterpretation{ | ||
10 | |||
11 | |||
12 | override getElements(Type type) { | ||
13 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
14 | } | ||
15 | |||
16 | override getInterpretation(FunctionDeclaration function, Object[] parameterSubstitution) { | ||
17 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
18 | } | ||
19 | |||
20 | override getInterpretation(RelationDeclaration relation, Object[] parameterSubstitution) { | ||
21 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
22 | } | ||
23 | |||
24 | override getInterpretation(ConstantDeclaration constant) { | ||
25 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
26 | } | ||
27 | |||
28 | override getMinimalInteger() { 0 } | ||
29 | override getMaximalInteger() {0 } | ||
30 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend new file mode 100644 index 00000000..d3497ef2 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend | |||
@@ -0,0 +1,41 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse | ||
2 | |||
3 | import org.eclipse.viatra.dse.objectives.IObjective | ||
4 | import org.eclipse.viatra.dse.base.ThreadContext | ||
5 | import java.util.Comparator | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
7 | |||
8 | class ScopeObjective implements IObjective{ | ||
9 | static val comparator = new Comparator<Double>() { | ||
10 | override compare(Double o1, Double o2) { | ||
11 | |||
12 | return o2.compareTo(o1) | ||
13 | } | ||
14 | } | ||
15 | |||
16 | //val static scopeLevel = 3 | ||
17 | |||
18 | override createNew() { return new ScopeObjective } | ||
19 | override getName() { '''ScopeConstraint''' } | ||
20 | override init(ThreadContext context) { } | ||
21 | |||
22 | override getComparator() { comparator } | ||
23 | |||
24 | override getFitness(ThreadContext context) { | ||
25 | val interpretation = context.model as PartialInterpretation | ||
26 | val res = interpretation.minNewElements | ||
27 | return res.doubleValue | ||
28 | } | ||
29 | |||
30 | override isHardObjective() { true } | ||
31 | override satisifiesHardObjective(Double fitness) { return fitness <=0.01 } | ||
32 | |||
33 | override setComparator(Comparator<Double> comparator) { | ||
34 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
35 | } | ||
36 | |||
37 | override setLevel(int level) { | ||
38 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
39 | } | ||
40 | override getLevel() { 2 } | ||
41 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionStoreWithCopy.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionStoreWithCopy.xtend new file mode 100644 index 00000000..2892723b --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionStoreWithCopy.xtend | |||
@@ -0,0 +1,35 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse | ||
2 | |||
3 | import java.util.List | ||
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
5 | import java.util.LinkedList | ||
6 | import org.eclipse.emf.ecore.EObject | ||
7 | import java.util.Map | ||
8 | import org.eclipse.emf.ecore.util.EcoreUtil | ||
9 | import org.eclipse.viatra.dse.base.ThreadContext | ||
10 | |||
11 | class SolutionStoreWithCopy { | ||
12 | long runtime = 0 | ||
13 | List<PartialInterpretation> solutions = new LinkedList | ||
14 | List<Map<EObject,EObject>> copyTraces = new LinkedList | ||
15 | |||
16 | long initTime = System.nanoTime | ||
17 | |||
18 | def newSolution(ThreadContext context) { | ||
19 | //print(System.nanoTime-initTime + ";") | ||
20 | val copyStart = System.nanoTime | ||
21 | val solution = context.model as PartialInterpretation | ||
22 | val copier = new EcoreUtil.Copier | ||
23 | val solutionCopy = copier.copy(solution) as PartialInterpretation | ||
24 | copier.copyReferences | ||
25 | solutions.add(solutionCopy) | ||
26 | copyTraces.add(copier) | ||
27 | runtime += System.nanoTime - copyStart | ||
28 | } | ||
29 | def getSumRuntime() { | ||
30 | return runtime | ||
31 | } | ||
32 | def getSolutions() { | ||
33 | solutions | ||
34 | } | ||
35 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionStoreWithDiversityDescriptor.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionStoreWithDiversityDescriptor.xtend new file mode 100644 index 00000000..ca39cada --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionStoreWithDiversityDescriptor.xtend | |||
@@ -0,0 +1,77 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.AbstractNodeDescriptor | ||
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.NeighbourhoodWithTraces | ||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2ImmutableTypeLattice | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.DiversityDescriptor | ||
8 | import java.util.LinkedList | ||
9 | import java.util.List | ||
10 | import java.util.Map | ||
11 | import org.eclipse.viatra.dse.base.ThreadContext | ||
12 | |||
13 | class SolutionStoreWithDiversityDescriptor { | ||
14 | val DiversityDescriptor descriptor | ||
15 | val PartialInterpretation2ImmutableTypeLattice solutionCoder = new PartialInterpretation2ImmutableTypeLattice | ||
16 | val List<NeighbourhoodWithTraces<Map<? extends AbstractNodeDescriptor, Integer>, AbstractNodeDescriptor>> solutionCodeList = new LinkedList | ||
17 | |||
18 | var long runtime | ||
19 | var int allCheck | ||
20 | var int successfulCheck | ||
21 | |||
22 | public new(DiversityDescriptor descriptor) { | ||
23 | this.descriptor = descriptor | ||
24 | } | ||
25 | |||
26 | def public isActive() { | ||
27 | descriptor!==null | ||
28 | } | ||
29 | |||
30 | def getSumRuntime() { | ||
31 | return runtime | ||
32 | } | ||
33 | def getSuccessRate() { | ||
34 | return successfulCheck as double / allCheck | ||
35 | } | ||
36 | |||
37 | def isDifferent(ThreadContext context) { | ||
38 | if(active) { | ||
39 | val start = System.nanoTime | ||
40 | val model = context.model as PartialInterpretation | ||
41 | val code = solutionCoder.createRepresentation(model, | ||
42 | descriptor.range, | ||
43 | descriptor.parallels, | ||
44 | descriptor.maxNumber, | ||
45 | descriptor.relevantTypes, | ||
46 | descriptor.relevantRelations) | ||
47 | val isDifferent = solutionCodeList.forall[previous | ! code.equals(previous)] | ||
48 | runtime += System.nanoTime - start | ||
49 | allCheck++ | ||
50 | if(isDifferent) { successfulCheck++ } | ||
51 | return isDifferent | ||
52 | } else { | ||
53 | allCheck++ | ||
54 | successfulCheck++ | ||
55 | return true | ||
56 | } | ||
57 | } | ||
58 | |||
59 | def canBeDifferent(ThreadContext context) { | ||
60 | return true | ||
61 | } | ||
62 | |||
63 | def newSolution(ThreadContext context) { | ||
64 | if(active) { | ||
65 | val start = System.nanoTime | ||
66 | val model = context.model as PartialInterpretation | ||
67 | val code = solutionCoder.createRepresentation(model, | ||
68 | descriptor.range, | ||
69 | descriptor.parallels, | ||
70 | descriptor.maxNumber, | ||
71 | descriptor.relevantTypes, | ||
72 | descriptor.relevantRelations) | ||
73 | solutionCodeList += code | ||
74 | runtime += System.nanoTime - start | ||
75 | } | ||
76 | } | ||
77 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedMultiplicityObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedMultiplicityObjective.xtend new file mode 100644 index 00000000..aad9a448 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedMultiplicityObjective.xtend | |||
@@ -0,0 +1,37 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.MultiplicityGoalConstraintCalculator | ||
4 | import java.util.Comparator | ||
5 | import org.eclipse.viatra.dse.base.ThreadContext | ||
6 | import org.eclipse.viatra.dse.objectives.IObjective | ||
7 | import org.eclipse.viatra.dse.objectives.Comparators | ||
8 | |||
9 | class UnfinishedMultiplicityObjective implements IObjective { | ||
10 | val MultiplicityGoalConstraintCalculator unfinishedMultiplicity; | ||
11 | |||
12 | public new(MultiplicityGoalConstraintCalculator unfinishedMultiplicity) { | ||
13 | this.unfinishedMultiplicity = unfinishedMultiplicity | ||
14 | } | ||
15 | |||
16 | override getName() '''unfinishedMultiplicity «unfinishedMultiplicity.name»''' | ||
17 | override createNew() { | ||
18 | return new UnfinishedMultiplicityObjective(new MultiplicityGoalConstraintCalculator(this.unfinishedMultiplicity)) | ||
19 | } | ||
20 | |||
21 | override getComparator() { Comparators.LOWER_IS_BETTER } | ||
22 | override getFitness(ThreadContext context) { | ||
23 | val unfinishedMultiplicity = unfinishedMultiplicity.calculateValue | ||
24 | return unfinishedMultiplicity.doubleValue | ||
25 | } | ||
26 | override getLevel() { 2 } | ||
27 | override init(ThreadContext context) { unfinishedMultiplicity.init(context.model) } | ||
28 | override isHardObjective() { true } | ||
29 | override satisifiesHardObjective(Double fitness) { return fitness <=0.01 } | ||
30 | |||
31 | override setComparator(Comparator<Double> comparator) { | ||
32 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
33 | } | ||
34 | override setLevel(int level) { | ||
35 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
36 | } | ||
37 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend new file mode 100644 index 00000000..0fd20fa3 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend | |||
@@ -0,0 +1,56 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse | ||
2 | |||
3 | import org.eclipse.viatra.dse.objectives.IObjective | ||
4 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | ||
5 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | ||
6 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification | ||
7 | import java.util.Collection | ||
8 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine | ||
9 | import org.eclipse.viatra.query.runtime.emf.EMFScope | ||
10 | import org.eclipse.viatra.dse.base.ThreadContext | ||
11 | import java.util.List | ||
12 | import org.eclipse.viatra.dse.objectives.Comparators | ||
13 | import java.util.ArrayList | ||
14 | import java.util.Comparator | ||
15 | |||
16 | class UnfinishedWFObjective implements IObjective { | ||
17 | Collection<? extends IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> unfinishedWFs | ||
18 | val List<ViatraQueryMatcher<?>> matchers | ||
19 | |||
20 | public new(Collection<? extends IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> unfinishedWFs) { | ||
21 | this.unfinishedWFs = unfinishedWFs | ||
22 | matchers = new ArrayList(unfinishedWFs.size) | ||
23 | } | ||
24 | override getName() '''unfinishedWFs''' | ||
25 | override createNew() { | ||
26 | return new UnfinishedWFObjective(unfinishedWFs) | ||
27 | } | ||
28 | override init(ThreadContext context) { | ||
29 | val engine = context.queryEngine//ViatraQueryEngine.on(new EMFScope(context.model)) | ||
30 | for(unfinishedWF : unfinishedWFs) { | ||
31 | matchers += unfinishedWF.getMatcher(engine) | ||
32 | } | ||
33 | } | ||
34 | |||
35 | override getComparator() { Comparators.LOWER_IS_BETTER } | ||
36 | override getFitness(ThreadContext context) { | ||
37 | var sumOfMatches = 0 | ||
38 | for(matcher : matchers) { | ||
39 | val number = matcher.countMatches | ||
40 | // println('''«matcher.patternName» = «number»''') | ||
41 | sumOfMatches+=number | ||
42 | } | ||
43 | return sumOfMatches.doubleValue | ||
44 | } | ||
45 | |||
46 | override getLevel() { 2 } | ||
47 | override isHardObjective() { true } | ||
48 | override satisifiesHardObjective(Double fitness) { return fitness <=0.01 } | ||
49 | |||
50 | override setComparator(Comparator<Double> comparator) { | ||
51 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
52 | } | ||
53 | override setLevel(int level) { | ||
54 | throw new UnsupportedOperationException("TODO: auto-generated method stub") | ||
55 | } | ||
56 | } \ No newline at end of file | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/WF2ObjectiveConverter.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/WF2ObjectiveConverter.xtend new file mode 100644 index 00000000..4fd297ca --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/WF2ObjectiveConverter.xtend | |||
@@ -0,0 +1,36 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse | ||
2 | |||
3 | import java.util.ArrayList | ||
4 | import java.util.Collection | ||
5 | import org.eclipse.viatra.dse.objectives.Comparators | ||
6 | import org.eclipse.viatra.dse.objectives.IGlobalConstraint | ||
7 | import org.eclipse.viatra.dse.objectives.impl.ConstraintsObjective | ||
8 | import org.eclipse.viatra.dse.objectives.impl.ConstraintsObjective.QueryConstraint | ||
9 | import org.eclipse.viatra.dse.objectives.impl.ModelQueriesGlobalConstraint | ||
10 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | ||
11 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification | ||
12 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | ||
13 | |||
14 | class WF2ObjectiveConverter { | ||
15 | |||
16 | def createCompletenessObjective( | ||
17 | Collection<? extends IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> unfinishedWF) | ||
18 | { | ||
19 | val res = new ConstraintsObjective('''unfinishedWFs''', | ||
20 | unfinishedWF.map[ | ||
21 | new QueryConstraint(it.fullyQualifiedName,it,1.0) | ||
22 | ].toList | ||
23 | ) | ||
24 | res.withComparator(Comparators.LOWER_IS_BETTER) | ||
25 | res.level = 2 | ||
26 | return res | ||
27 | } | ||
28 | |||
29 | def IGlobalConstraint createInvalidationObjective( | ||
30 | Collection<? extends IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> invalidatedByWF) | ||
31 | { | ||
32 | return new ModelQueriesGlobalConstraint('''invalidatedWFs''', | ||
33 | new ArrayList(invalidatedByWF) | ||
34 | ) | ||
35 | } | ||
36 | } \ No newline at end of file | ||